...

Saturday, April 3, 2010

CCNA 25

Remember our previous topology which only allows the clients to ping connected networks. For the client to ping the router's 192.168.1.1 address, they just have to do an ARP. For the clients to ping the 152.226.152.18 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 152.226.152.18 (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:
ip route NETWORK MASK NEXT-HOP-ROUTER

Therefore, to configure RA, type:
ip route 192.168.3.0 255.255.255.0 192.168.2.2

To configure RB, type:
ip route 192.168.1.0 255.255.255.0 192.168.2.1

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 0.0.0.0 0.0.0.0 152.226.152.1

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

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

<