Skip to content

Review, Why Routers Exist

Every interface on a router is a network.

A router stops broadcasts. If those would get out to the internet, the internet would be a flood.

Inside of these routers is a routing table. Which helps the router routing the traffic to the right destination.

The connected networks

The connected networks are the networks which are directly connected to the router.

The static route

A static route:

CommandDestination networkDestination subnet maskNext hop
Ip route192.168.3.0255.255.255.0192.168.2.2

A client of the network 192.168.1.10 /24 wants to reach the server in 192.168.3.100 /24. So the coffee now knows these server is not in his network. So the client creates a packet and sends it to its default gateway. This packet includes the source ip address (192.168.1.10), the destination address (192.168.3.100) and the source mac address (2222) and the destination mac address (1111 the routers mac). The router strips of the destination mac address. And the router says “oooh you not are going TO me, you are going THROUGH me). Consults its routing table and sends it there, and writes its source mac address to it and the mac address of the fallout shelter router in the destination mac address.

The server now has to tell the client that it received that message and sends the message back to the fallout shelter router. If we haven’t configured the routing back, the answer never reaches the client. So that’s why static routes are good for small networks. For bigger networks these are not the solution.

The default route

The default route -> 0.0.0.0 0.0.0.0

  • The rule of specificity -> the more specific the route is, the better the route is
  • So if you have a route 192.168.0.0 /16 and a route 192.168.3.0 /24 and the default route 0.0.0.0 /0 the most specific route applies. So here the 192.168.3.0 /24 wins.

Configuring Local Routing

The ios commands explained

 Ip route -> i wanna route

Destination + subnetmask -> where do i wanna route?

Forwardings routers ip address -> how to do wanna get there?

We have to configure two static routes to get that thing to work.

First from server2 to reach out to PC1. To succeed the ping has to come back, and stats where we need 2 static routes for, one for each router.

CommandDestination ipDestination Subnet maskForwardings routers ip address
Ip route192.168.3.0255.255.255.0<IP_OF_FORWARDING_ROUTER>

Configuring Default Routing

As you can tell by the name, the default route is the route which should be taken by default. By default means, if no other route matches the criteria, then you should take this route.

The command for this is:

CommandIp addressSubnet maskNext hop
Ip route0.0.0.00.0.0.0<IP_OF_ISP_REMOTE>

Configuring Dynamic Routing

If the static routing table is exhausted because there are so many entries. We can use dynamic routing, where the router does the work for us.

Dynamic routing protocol (OSPF, EIGRP, BGP, RIP) these, tell the router you know where you plugged into, so tell your friends. And with the HELLO protocol the exchange their routing protocol.

So, dynamic routing means that the routers talk to each other. So if you advertise a network for dynamic routing (in this case with EIGRP), the tell the other router “look, I got this networks here” and the other routers now saves that information and for alter use he will now where to go route traffic to that specific network.

EIGRP -> enhanced interior gateway protocol

To set up EIGRP you first enable the EIGRP with its autonomous number

CommandProtocolSystem number
RouterEigrp<1>

Then in the config of that specific EIGRP number we advertise which networks should be “published” to the other site.

Commandnetwork
Network192.168.1.0

If this is set up on both sites, the routers now know the path to each others networks, and we don’t have to establish static routes for every network.

Routing Table Concepts and Route Selection

Because every interface represents a network on a router, as soon as we give a interface an ip address the router learns that we are directly connected to this network. So he adds it to its routing table with the letter “C”.

Important to remember: the more specific route wins!

Because we added some dynamic routes with our EIGRP, we have a line in the routing table like this:

D 192.168.3.0/24 [90/3072] via 192.168.2.2, 01:01:00, GigabitEthernet0/0/0

This line is the most complex line you will see in a routing table so let’s talk about that for a moment.

LetterDestination network and subnet maskAdministrative distance (AD) / MetricNext hop (via)AgeOutgoing Interface
D192.168.3.0/24[90/3072]Via 192.168.2.201:01:00GigabitEthernet0/0/0

What is the administrative distance?

The administrative distance tells us “how believable is this route?” This is a score from 0 to 255. The lower you are the better you are. The static routes always have a score of 1, because we added this manually. So if we add a static route with the same network we got from the EIGRP the default route is gone because we typed that in manually it has the lower administrative distance, means its more believable, so the other one disappears.

What is the metric?

The metric comes in when the administrative distance is tied as well. So, the metric tells us “how good is this route”. For example, when we have two routes to the fallout shelter, one is the backup, here comes the metric in. As in the AD the lower the number, the better the route is. So, if we had a backup connection to the fallout shelter, like over starlink the number would be higher then our primary connection, so the only time this route is getting chosen is when the primary connection is down.

So if you read that route backwards, it’s like you telling the router what to do.

You: “Go out on this interface GigabitEthernet0/0/0”

Router: “Why should I do that?”

You: “Well, to get to that next hop 192.168.2.2”

Router: “Why do I want to get to that next hop?”

You: “To get to that network 192.168.3.0/24”

Leave a Reply

Your email address will not be published. Required fields are marked *