5 minutes
Lab — Static Routing and EIGRP
In this lab, the goal was to practice some basic routing configurations. Going through the NetworkChuck Summer of CCNA course, this is the section we are currently up to.
A Little Bit on Routing
Routers will not route to networks they do not know about. They are clever devices in some ways, but not that clever. So there are a few different ways to get routers to know about networks. Firstly, any network directly connected to the router (i.e plugged into an interface) will be available. Providing of course the ip address has been set and the interface is up/up.
Next is static routing. This is where the administrator will manually add routes to the device to be used in the routing table. It is a straightforward process to add static routes, but there is a catch that is easy to get tripped up on. If you put in a static route, that allows traffic to flow one way through the other router out to the desired network. But it does not help to get return traffic, because the other router will need a static route to know how to get the return traffic back through the original router. We need to always remember that if we open a path for traffic to flow out, we need to open the return path for traffic to come back.
The last type of routing is dynamic. This is the magic way of setting up routes. If you come from starting with static routes, when you first see dynamic routing in action it is a beautiful thing to see. So the very basic premise of dynamic routing is that you do not need to tell the routers manually about how to reach other networks, you enable the protocol add a little bit of configuration and the routers discover each other and share their networks. There are various protocols that can be used for dynamic routing, each with their own benefits and drawbacks, but that is for another post.
The Lab

So in the above lab, we have the 192.168.1.0 network and the 192.168.2.0 network are our main ones. We can imagine the 192.168.1.0 network as our end devices. The 192.168.2.0 network as our internal server area. The 200.2.2.0 and 200.3.3.0 networks are just simulating an ISP.
Once all the IP addresses are setup and ports brought online, in packet tracer, the link lights go green and one could be fooled into thinking ‘Wow everything is green, we can throw some pings around and everything will be sweet’ but that is not so.
At this point, the pc’s could ping R1, the local server could ping R2 and the 2 routers could ping each other. But the 192.168.1.10 pc could not ping the 192.168.2.10 server. The packets will be dropped at the pc’s default gateway (i.e R1). This is because we have not actually setup the routing yet.
We could enable static routing on both routers like so:
- We tell R1 that to access the 192.168.2.0 network, it needs to go through R2 (192.168.50.2)
Router1(config)# ip route 192.168.2.0 255.255.255.0 192.168.50.2
- We tell R2 that to access the 192.168.1.0 network, it needs to go through R1 (192.168.50.1)
Router2(config)# ip route 192.168.1.0 255.255.255.0 192.168.50.1
Once these are BOTH configured, either of the pc’s could access the server and visa versa. If only 1 was configured then traffic could only flow one way.
This is great for such a small network, but dynamic routing is what we need once networks expand a bit bigger than a simple 2 router setup like this.
Also of note is the default route. This is what we setup so the router knows where to send traffic when it doesn’t know about the network the traffic is destined for. More aptly named the gateway of last resort. So if all else fails, rather than dropping packets, just send them out that way. Typically you would say that your router connected to the internet, has the ISP network listed as the gateway of last resort. So any traffic bound for an IP address not on the local network, will get send out that interface and off to the ISP. So on R1 in our lab, it has a gateway of last resort set as 200.2.2.1, the command is like so:
Router1(config)# ip route 0.0.0.0 0.0.0.0 200.2.2.1
EIGRP
So let us tear out the static routes by issuing the exact commands above but with a ‘no’ in front of them and try a bit of dynamic routing. We will just be doing a basic EIGRP setup here, so rather than telling the routers how to access the other networks, we will be telling them to use EIGRP, what networks to advertise and/or look for neighbour routers it can communicate with. The neighbour routers will form a relationship and they will advertise their networks with each other and they will automatically learn how to route between all them networks.
First we go into config mode and enter
Router1(config)# router eigrp 1
The 1 stands for the group, you can choose any group number but you just need to make sure all the neighbours you want to form are on the same group. This will put us in a different mode, eigrp config mode and the terminal will change to (config-router). Now we have to issue the network command for all the networks we want to advertise or form connections on. So for the above lab we will have the below
Router1(config)# router eigrp 1
Router1(config-router)# network 192.168.1.0 0.0.0.255
Router1(config-router)# network 192.168.50.0 0.0.0.3
Router2(config)# router eigrp 1
Router2(config-router)# network 192.168.2.0 0.0.0.255
Router2(config-router)# network 192.168.50.0 0.0.0.3
A note on the backwards looking subnet masks in these commands. These are wildcard masks. It is kind of like the reverse of the subnet mask. Instead of telling the command what network bits to worry about with the subnet mask, we are telling it what host bit to worry about with the wildcard mask. More about that at another time though.
So now without setting up static routes, PC1 will be able to ping the local server.