Static Routing
When using the ip route command, you can identify where packets should be routed to in two ways:
The next-hop address
The exit interface
Both ways are shown in both the "Configuration Example: Static Routes" section and the "Default Routing" section.
Router(config)#ip route 172.16.20.0 255.255.255.0 172.16.10.2 | 172.16.20.0 = destination network 255.255.255.0 = subnet mask 172.16.10.2 = next-hop address Read this to say: To get to the destination network of 172.16.20.0, with a subnet mask of 255.255.255.0, send all packets to 172.16.10.2 |
Router(config)#ip route 172.16.20.0 255.255.255.0 s0/0 | 172.16.20.0 = destination network 255.255.255.0 = subnet mask s0/0 = exit interface Read this to say: To get to the destination network of 172.16.20.0, with a subnet mask of 255.255.255.0, send all packets out interface Serial 0/0 |
Why do I want to use static routes when there are neat routing protocols like OSPF?
- static routes are easy, no overhead either on the link or the the CPU of the router. They also offer good security when coupled with a tight IP mask like 252 which gives only 2 hosts on a given link
No comments:
Post a Comment