Skip to main content

About this free course

Download this course

Share this free course

Discovering computer networks: hands on in the Open Networking Lab
Discovering computer networks: hands on in the Open Networking Lab

Start this free course now. Just create an account and sign in. Enrol and complete the course for a free statement of participation or digital badge if available.

14.4 Putting in the final static routes to make it all work

In this next section you are going to fix the network by putting in the final missing routes manually.

Watch the video below, which is about a minute long.

Routing with static routes

Download this video clip.Video player: 78_title_tbc.mp4
Copy this transcript to the clipboard
Print this transcript
Show transcript|Hide transcript
 
Interactive feature not available in single page view (see it in standard view).

We have now configured the two routers in our small network so that traffic can pass among all the host devices connected to them. To do this we have added static routing information to the routing table on each router, using the ip route command. This tells the router which interface to use to forward packets addressed to a particular network address. This information has to be entered manually by the network administrator, so this method is only useful for simple networks that rarely change.

Activity 4 Try it out

20 minutes

Open PT Anywhere [Tip: hold Ctrl and click a link to open it in a new tab. (Hide tip)] in a new tab or window so you can read these instructions.

In this activity you are going to configure static routes on each of the routers to enable the PCs connected to one router to access the PCs connected to the other router.

  1. Configure PC1 with IP address 192.168.1.2, subnet mask 255.255.255.0 and gateway 192.168.1.1.
  2. Configure PC2 with IP address 192.168.2.2, subnet mask 255.255.255.0 and gateway 192.168.2.1.
  3. Configure PC4 with IP address 172.16.2.2, subnet mask 255.255.255.0 and gateway 172.16.2.1.
  4. Configure PC3 with IP address 172.16.1.2, subnet mask 255.255.255.0 and gateway 172.16.1.1.
  5. On the routers (Router 1 and Router 2) enter the commands in the table below.
DeviceCommands to enter
Router 1

enable

configure terminal (abbreviate this to conf t)

interface gi0/0

ip address 192.168.1.1 255.255.255.0

no shutdown

 

interface gi0/1

ip address 192.168.2.1 255.255.255.0

no shutdown

 

interface gi0/2

ip address 10.10.10.1 255.255.255.0

no shutdown

Router 2

enable

configure terminal (abbreviate this to conf t)

interface gi0/0

ip address 172.16.1.1 255.255.255.0

no shutdown

 

interface gi0/1

ip address 172.16.2.1 255.255.255.0

no shutdown

 

interface gi0/2

ip address 10.10.10.2 255.255.255.0

no shutdown

  1. Verify that PC1 can ping PC2 (ping 192.168.2.2) and PC3 can ping PC4 (ping 172.16.2.2).
  2. Check to see if PC1 can ping PC3 (ping 172.16.1.2) – this should fail.
  3. On the routers (Router 1 and Router 2) enter the commands from the table below.
DeviceCommands to enter
Router 1

ip route 172.16.1.0 255.255.255.0 10.10.10.2

ip route 172.16.2.0 255.255.255.0 10.10.10.2

Router 2

ip route 192.168.1.0 255.255.255.0 10.10.10.1

ip route 192.168.2.0 255.255.255.0 10.10.10.1

  1. Check to see whether PC1 can now ping PC3 (ping 172.16.1.2) and PC4 (ping 172.16.2.2).

You have now configured static routes so that Router 1 can get to the two networks on Router 2 and vice versa. (Note: if you were to build this network from scratch in PT Anywhere then you would need to place a switch in the link between Router 1 and Router 2. You would also need to have switches in the links between each PC and router. This is because PT Anywhere does not provide the crossover cables for direct links.)