12.07.2015 Views

download

download

download

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 10You can add a route to the routing table, only if it does not already exist in the table.In case you want to modify an existing route, you should use the route changecommand as shown:# route change 172.21.30.0/24 10.1.1.5change net 172.21.30.0: gateway 10.1.1.5This will update the routing table with a new gateway address (that is next-hop) fornetwork 172.21.30.0, which in this example is 10.1.1.5.And to remove an existing route from the routing table, you may use the routedelete command as shown here:# route delete 172.21.30.0/24delete net 172.21.30.0The add, change, and delete commands are three basic commands that you need tomaintain a routing table. However, you will also need to see the current routing tablestatus for a specific route or for all existing routes.To view the routing table entries, you may use the route get command:# route get 172.21.30.0/24route to: 172.21.30.0destination: 172.21.30.0mask: 255.255.255.0gateway: 10.1.1.5interface: bge1flags: recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtuexpire0 0 0 0 0 0 1500 0This will show you the routing table entry for a specific route (in this example,172.21.30.0/24). For example, this subnet is routed to 10.1.1.5 via the bge1network interface.You can also use netstat –r to see the status of all routing entries in therouting table.To clean up the routing table, the route flush command is used. This will removeall the existing routing table entries.[ 161 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!