NOTE: to see all Static IP addresses, use “sh run”, not “sh ip route”
The following image was taken from the first Sybex Lab configuration, and makes an excellent resource for explaining a typical IP routing scheme.
The entire network is Class B 176.16.0.0, and each of the links connecting the routers is another network - Class C, with the third portion of the IP address shown in a red circle (for example, the network between 2621A and 2501A is 176.16.11.0 and is shown as 11, since the beginning is always 176.16 and the end is always 0) :

To find the routes available to each router, type: sh ip route
If no routing has been configured yet – but the IP adresses have been configured – only the adjacent networks on each interface will be listed. For example, if you go to router 2621A and type “sh ip route”, the following will be displayed (this router only has fast ethernet ports configured) :
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.10.0 is directly connected, FastEthernet0/1
C 172.16.11.0 is directly connected, FastEthernet0/0
If you had configured routing (RIP for example) then the results of the sh ip route command would be:
172.16.0.0 /24 is subnetted, 5 subnets
R 172.16.50.0 [120/3] via 172.16.11.1, FastEthernet0/0
R 172.16.40.0 [120/2] via 172.16.11.1, FastEthernet0/0
R 172.16.20.0 [120/1] via 172.16.11.1, FastEthernet0/0
C 172.16.10.0 is directly connected, FastEthernet0/1
C 172.16.11.0 is directly connected, FastEthernet0/0
What’s inside the brackets – the first number is the “administrative distance”. The second number is the cost or metric of the route (hop count since the router is using RIP).
Administrative Distance – a value from 0 to 255. Lower value means higher trustworthiness of that route. Defults are EIGRP=90, IGRP=100, OSPF=110, RIP=120
Only connected “networks” are shown. The assigned IP addresses for Router 2621A are 172.16.10.1 and 172.16.11.2 - however, they are not displayed since the results of the “sh IP route” looks for what those interfaces are connected to – not the interface addresses themselves. Class C networks end in 0. You can think of the network as the line connecting the two routers. In the diagram, the “networks” are denoted in red circles which display the third number in the dotted decimal notation address of that network. Obviously, if routing was configured on all the routers, the result of a “sh ip route” would be completely different.
This section is very difficult to understand. You must understand that static routes deliver packets to a network – not a router, switch, or host. Once the packets reach that network, they are then either received by a host on the network, or sent to the host by a switch connected to that network.
In the previous section, IP addresses were assigned to the router interfaces, but no routes were established, and therefore the routing tables were empty. In this section, we show how to place static routing entries into the routing tables. You must be in config mode, and the format of the command is “ip route” with three addresses following (trhe middle address is the subnet mask) :
sh run (using ”sh ip route” will show all reachable routes, not just static routes)
ip route dest_network subnet_mask next-hop-interface
- where “network” is the destination network, and next-hop is the neighbor’s directly connected interface (the adjacent router’s interface that you must go through to reach that network)
- do not enter the interface of the router you are working on (common mistake)

for example, suppose the interfaces on the diagram have all been configured, but no routing has been configured. You can now ping the interface directly connected (176.16.20.2 on R2), but not the far interface on R2 (172.16.40.1), since that network is not reachable yet. From R1, you enter the following command :
ip route 172.16.40.0 255.255.255.0 172.16.20.2
This tells the router that the network 172.16.40.0 can be accessed through the directly connected neighbor’s interface 172.16.20.2 At this point, you can ping both interfaces connected to network 40 (172.16.40.1 and 172.16.40.2). All you need is a route to the network – not a route to the interfaces !!! This is next-hop routing, where you told R1 that network 40 is available through the next hop using the R2 interface, 172.16.20.2.
do not use the interface of the router that you are logged in on
do not use the far interface that is directly part of the far network
NOTE: to check yourself, CTRL-Z to get back to Priveledged mode, and enter: “sh ip route”
no ip route network subnet-mask next-hop
Important Note: Static routes notify the router of path to a “Network” – not a path to another router !!! Note that “Network” for this lab, is the links between 2 routers. However, once that route is defined, then any router interface connected to that network can be reached. Once the packets reach that network, anything connected to that network can receive them so long as they are either the host that the packet is addressed to, or a device (1900 switch) that knows how to deliver the packet to the correct host. Switches are not routable, so you cannot include the switch interface as part of the route. Instead, you make sure that each router knows how to reach each network, and then the switches deliver the packets to the hosts.
Keep in mind that as per the last “sh ip route” results, each router is aware of each network directly connected to it’s interfaces. Therefore, it can find the interfaces on each of the adjacent routers that also connect to the same network (the two routers each connect to the same serial link, or “network”). For example, consider the two routers 2621A and 2501A from the diagram. For 2501A to reach the network denoted by the red 10 on the left of the diagram (172.16.10.0), it has to route through router 2621A as the following flow shows:
1. 2501A e0 (172.16.11.1)
2. Network 172.16.11.0
3. 2621A f0/0 (172.16.11.2)
4. 2621A f0/1 (172.16.10.1)
5. Network 172.16.10.0
Router 2501A is directly connected to network 172.16.11.0 (via the e0 interface 172.16.11.1). Router 2621A is also directly connected to network 172.16.11.0 (via the f0/0 interface 172.16.11.2). Now, if you recall, when we ran the “sh ip route” on 2501A, it only shows the directly connected networks – not the interfaces of the neighboring routers. The router knows of the adjacent network - but the router must be able to find the interface of it’s neighbor to be able to route packets through to the next network 172.16.10.0. Therefore, in the “ip route” command, you tell it what address the next-hop interface is:
ip route 172.16.10.0 255.255.255.0 172.16.11.2
This says that for router 2501A to reach the network 172.16.10.0, it needs to go through the 2621A f0/0 interface (172.16.11.2). Once the packets are sent to that interface on 2621A, they are immediately routed to the network 172.16.10.0 (which is connected to the other interface f0/1 on 2621A). For 2501A to reach the other two networks:
ip route 172.16.40.0 255.255.255.0 172.16.20.2
ip route 172.16.50.0 255.255.255.0 172.16.20.2
NOTE that even though network 40 is one hop away and 50 is two hops away, in both cases you only need to tell the router which neighbor’s interface to use - and in both cases the packets can get there by going through s1 on 2501B (172.16.20.2)
Default routes tell the router what to do with packets whose network address is not found in the routing table. Basically, it says, “if you don’t know where it goes, send it here”
Note that this is a two-step process . . . the command to set up the default route, and a second command, “ip classless”, which prevents the router from dumping unknown packets. The format of the command :
ip route 0.0.0.0 0.0.0.0 next-hop
ip classless
Where “next-hop” is the IP address of the directly connected interface of the adjacent router, where you want all packets to go if no route is available for their destination addresses.
Always include the second command, “ip classless”
NOTE : you want the router to be in Classless routing mode if possible. Classful must find that the address has a match Class address, or it will not forward the packet. For example, for the Class B address 168.13.200.1, the router looks for a match in the Class B network of 168.13.0.0, and if none is found it will discard the packet (pg 294 in CCNA book). Classless, on the other hand, will always forward the packet, since the route to 0.0.0.0 is a match for any destination. For default routing :
Classful – routes to the best match in the same network as the packet’s destination address. To get router in Classful mode, go to config mode and type: no ip classless
Classless – routes to the best match in the entire routing table. To get router into classless mode, go to config mode and type: ip classless