|
|||
| Lesson 9
Objective
|
Configuring the Routing Table Examine the routing table on a machine |
||
|
How do I examine the routing table on a machine?
Once the network interfaces have been configured, the next part of TCP/IP configuration is configuring routing. TCP/IP routing may be handled in two ways: static routing or dynamic routing. In static routing, routing information is programmed into the machine at boot time. In dynamic routing, a program (a route daemon) communicates with other routing daemons to continually update the system's routing information in response to changing network conditions. |
|||
|
Configure Static Routing
In this course, we will discuss how to
configure static routing only, in the simplest case of a machine with only one network interface, on a local network with only one gateway.
|
|||
|
Routing is controlled by a table called the routing table, which is linux-network-administrationtained by the kernel. To view the routing
table, using the route command:
|
|||
|
Click the View Code link to view the routing table, using the route command.
View Code Route Command Output
On Solaris, use the command netstat -nr to dump the routing table.
The output is nearly identical to the output of the route command used on Linux. The routing table gives a list of potential
destinations, and for each destination, the IP address of a gateway .
Gateway: A machine which links two networks.
Information intended for one of the listed destinations is sent to the specified gateway. We are assuming that this machine is on a local network with only one gateway (this is a typical situation), so any traffic not for the local network should be directed to that gateway. The only entry in the routing table that needs to be set is the default route, because the local route is set automatically by the ifconfig command. To set the default route, use: |
|||
|
|||
| The route command may also be used to delete a route: | |||
|
|||
|
The link below contains additional information regarding linux routing commands.
Linux Routing Commmands |
|||
| Solaris Routing Commands
Click the on the link below to learn more about Solaris Routing Commands.
Solaris Routing Command Configuration |
|||
|
|
|||