Skip to content

Solved dynamic routing lab.

Prerequisites

Before running the generator and parser, install the requirements by running:

pip3 install -r requirements.txt

Generator

Before running generator, specify the configuration in the file config.yaml and create empty containers.

To run generator, execute:

python3 generator.py

It will connect to each node and setup the ip addresses for each router and PC automatically by taking the configuration from config.yaml

Parser

To run parser, execute:

python3 parser.py -n {router1,router2,router3,PC1,PC2,PC3} -n {router1,router2,router3,PC1,PC2,PC3} -s {router1,router2,router3,PC1,PC2,PC3} -s {router1,router2,router3,PC1,PC2,PC3}

With -n options you specify the first and the second node for which ping and traceroute will be run. (this option is required) With -s options you specify for which nodes you want all show commands to be executed.

Example:

python3 parser.py -n router1 -n router2 -s PC1 -s router3

This command will execute ping and traceroute from router1 to router2. Also, it will execute sh run, sh ip route and show isis database and show isis database detail for PC1 and router3.

3. По п.1.3 своими словами написать несколько предложений, отвечающих на вопрос и объясняющих ситуацию и приложить вывод show-команд.

Before breaking the link, let's execute ping from PC1 to PC2:

sudo docker exec -it clab-frrlab1_1-PC1 vtysh
ping 192.168.22.4

The output is:

PING 192.168.22.4 (192.168.22.4): 56 data bytes
64 bytes from 192.168.22.4: seq=0 ttl=62 time=0.238 ms
64 bytes from 192.168.22.4: seq=1 ttl=62 time=0.110 ms
64 bytes from 192.168.22.4: seq=2 ttl=62 time=0.081 ms
64 bytes from 192.168.22.4: seq=3 ttl=62 time=0.109 ms
64 bytes from 192.168.22.4: seq=4 ttl=62 time=0.113 ms
ç64 bytes from 192.168.22.4: seq=5 ttl=62 time=0.112 ms
64 bytes from 192.168.22.4: seq=6 ttl=62 time=0.095 ms

Now, let's break the link:

router1# conf
router1(config)# int eth1
router1(config-if)# shutdown

Confirm the interface is down:

router1(config)# do sh int eth1
Interface eth1 is down

router1# sh run
!
interface eth1
 ip address 192.168.1.1/24
 shutdown
exit

And try to execute the ping/traceroute again:

PC1# traceroute 192.168.22.4
traceroute to 192.168.22.4 (192.168.22.4), 30 hops max, 46 byte packets
 1  192.168.11.1 (192.168.11.1)  0.005 ms  0.004 ms  0.003 ms
 2  192.168.2.3 (192.168.2.3)  0.002 ms  0.003 ms  0.004 ms
 3  192.168.3.2 (192.168.3.2)  0.002 ms  0.004 ms  0.004 ms
 4  192.168.22.4 (192.168.22.4)  0.003 ms  0.006 ms  0.006 ms

We can see that although the link from router1 to router2 is broken, ISIS was able to determine the new path through router3 because of the dynamic routing configuration.

По дополнительному заданию в п.1.4 своими словами написать несколько предложений, отвечающих на вопрос и объясняющих ситуацию и приложить вывод show-команд.

After removing isis network point-to-point from router1, we can execute traceroute from PC1 to PC2. The result is:

PC1# traceroute 192.168.22.4
traceroute to 192.168.22.4 (192.168.22.4), 30 hops max, 46 byte packets
 1  192.168.11.1 (192.168.11.1)  0.007 ms  0.005 ms  0.003 ms
 2  192.168.2.3 (192.168.2.3)  0.003 ms  0.005 ms  0.004 ms
 3  192.168.3.2 (192.168.3.2)  0.003 ms  0.003 ms  0.003 ms
 4  192.168.22.4 (192.168.22.4)  0.002 ms  0.005 ms  0.004 ms

We can see that the new path was defined which goes through router3 although it's not optimal in terms of number of nodes. It happens because when we don't specify point-to-point, the broadcast network type is used by default. Unmatching of network types can lead to changes in routing behaviour which we could confirm by executing traceroute.

Merge request reports