Saturday, April 3, 2010


Remember our previous topology which only allows the clients to ping connected networks. For the client to ping the router's address, they just have to do an ARP. For the clients to ping the address, they can simply ARP for the default gateway (which is the router), then send the packet through it.
However, that is only possible because the router knows how to get to (it is directly connected). However, other than 192.168.1.x and 152.226.152.x, nothing else can be pinged because the router does not know how to get to them.

To see the list of subnets the router knows how to get to, use:
show ip route

I'll now give an example of how to create a static route. We'll make use of a topology that is set up like this:

In this topology, RA knows of the .1.0 and the .2.0 network but doesn't know how to get to the .3.0 network. RB on the other hand knows of the .2.0 network and the .3.0 but doesn't know that .1.0 exists. In other words, they only know about their connected networks. In this case, the routers cannot route packets from .1.0 to .3.0 properly and thus the computers would not be able to communicate.

Static routes refer to routes that are manually entered into the routing table. In RA, we would have to enter the static route to .3.0. In RB, we would have to enter the static route to .1.0. The static route command is in the form:

Therefore, to configure RA, type:
ip route

To configure RB, type:
ip route

Note that the "ip route" command is to be typed in Global Configuration mode. For static routes to work, the next-hop router must be reachable. For the packets to go to-and-fro .1.0 and .3.0 successfully, it must know how to get there and return.

Static routes are good for small installations where no real routing needs to occur (like in this example). But when you are in large networks, static routes are impractical.

The most used static route is the default route. The default route matches anything that's not in the routing table. To set the default route (we're now back on the original topology in CCNA 22), type:
ip route

To allow the router to use a DNS server, use:
ip name

At this point the computer is sending its packets through the router. However, it is not able to do anything because it is blocked by the ISP. The ISP does not route RFC1918 addresses. For it to really work, we'll have to use NAT.

No comments :

Post a Comment