Sunday, June 7, 2015

Simple Topology - GNS3 + Quagga on 8 Ports QEMU + OSPF


GNS3

This implementation is on GNS3 1.3.4.


Quagga QEMU Image

Special thanks to the person who make this QEMU image available.   It just works for me beatifully.   It can be downloaded from here, http://brezular.com/2013/09/17/linux-core-qemu-and-virtualbox-appliances-download/.


Quagga QEMU settings on GNS3

I added the image via Edit -> Preferences -> QEMU VMs -> New.  Then, select Default, then follow the rest.    The number of Adapters can be set to 1 - 8.  (8 is the maximum limit imposed by QEMU, Ref: http://forum.gns3.net/topic12536.html, https://github.com/qemu/qemu/blob/master/include/net/net.h#L163)



Quagga started & login

Once started successfully, the login username is 'tc' with no password.

I use vtysh to configure all the networking interface.

Here is my configuration.

tc@box:~$ vtysh

Hello, this is Quagga (version 0.99.22.4).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

box# show running-config
Building configuration...

Current configuration:
!
!
debug ospf6 lsa unknown
!
password quagga
!
interface dummy0
 ipv6 nd suppress-ra
!
interface eth0
 ip address 192.168.1.1/24
 ipv6 nd suppress-ra
!
interface eth1
 ip address 192.168.2.1/24
 ipv6 nd suppress-ra
!
interface eth2
 ip address 192.168.3.1/24
 ipv6 nd suppress-ra
!
interface eth3
 ip address 192.168.4.1/24
 ipv6 nd suppress-ra
!
interface eth4
 ip address 192.168.5.1/24
 ipv6 nd suppress-ra
!
interface eth5
 ip address 192.168.6.1/24
 ipv6 nd suppress-ra
!
interface eth6
 ip address 192.168.7.1/24
 ipv6 nd suppress-ra
!
interface eth7
 ip address 192.168.8.1/24
 ipv6 nd suppress-ra
!
interface lo
!
interface eth8
!
router-id 9.9.9.9
!
router ospf
 ospf router-id 9.9.9.9
 network 0.0.0.0/0 area 0.0.0.0
!
ip forwarding
ipv6 forwarding
!
line vty
!
end


R1 - R8

I just use Cisco 3725 for testing.   I  could be anything.   Configruation is similar on all the node (except for interface's IP and OSPF router-id) so I will just show an example using R1's config.

interface FastEthernet0/0
 ip address 192.168.1.2 255.255.255.0
 duplex auto
 speed auto
end

router ospf 1
 router-id 1.1.1.1
 log-adjacency-changes
 network 0.0.0.0 255.255.255.255 area 0
!


Sample Output - Quagga

box# show ip route ospf
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, A - Babel,
       > - selected route, * - FIB route

O   127.0.0.1/32 [110/10] is directly connected, lo, 00:44:06
O   192.168.1.0/24 [110/10] is directly connected, eth0, 00:27:54
O   192.168.2.0/24 [110/10] is directly connected, eth1, 00:27:54
O   192.168.3.0/24 [110/10] is directly connected, eth2, 00:27:56
O   192.168.4.0/24 [110/10] is directly connected, eth3, 00:27:54
O   192.168.5.0/24 [110/10] is directly connected, eth4, 00:27:54
O   192.168.6.0/24 [110/10] is directly connected, eth5, 00:27:54
O   192.168.7.0/24 [110/10] is directly connected, eth6, 00:27:54
O   192.168.8.0/24 [110/10] is directly connected, eth7, 00:27:54

box# show ip ospf neighbor

    Neighbor ID Pri State           Dead Time Address         Interface            RXmtL RqstL DBsmL
1.1.1.1           1 Full/Backup       32.437s 192.168.1.2     eth0:192.168.1.1         0     0     0
2.2.2.2           1 Full/Backup       37.805s 192.168.2.2     eth1:192.168.2.1         0     0     0
3.3.3.3           1 Full/Backup       38.591s 192.168.3.2     eth2:192.168.3.1         0     0     0
4.4.4.4           1 Full/Backup       33.293s 192.168.4.2     eth3:192.168.4.1         0     0     0
5.5.5.5           1 Full/Backup       32.603s 192.168.5.2     eth4:192.168.5.1         0     0     0
6.6.6.6           1 Full/Backup       34.583s 192.168.6.2     eth5:192.168.6.1         0     0     0
7.7.7.7           1 Full/Backup       30.781s 192.168.7.2     eth6:192.168.7.1         0     0     0
8.8.8.8           1 Full/Backup       31.431s 192.168.8.2     eth7:192.168.8.1         0     0     0

box# show ip ospf database

       OSPF Router with ID (9.9.9.9)

                Router Link States (Area 0.0.0.0)

Link ID         ADV Router      Age  Seq#       CkSum  Link count
1.1.1.1         1.1.1.1          599 0x80000003 0x3513 1
2.2.2.2         2.2.2.2          433 0x80000003 0xfe3f 1
3.3.3.3         3.3.3.3          501 0x80000004 0xc66c 1
4.4.4.4         4.4.4.4          369 0x80000004 0x9098 1
5.5.5.5         5.5.5.5          252 0x80000004 0x5ac4 1
6.6.6.6         6.6.6.6          167 0x80000004 0x24f0 1
7.7.7.7         7.7.7.7          149 0x80000004 0xed1d 1
8.8.8.8         8.8.8.8          112 0x80000004 0xb749 1
9.9.9.9         9.9.9.9         1701 0x80000011 0x7c3c 9

                Net Link States (Area 0.0.0.0)

Link ID         ADV Router      Age  Seq#       CkSum
192.168.1.1     9.9.9.9         1701 0x80000003 0x0d93
192.168.2.1     9.9.9.9         1701 0x80000002 0x3666
192.168.3.1     9.9.9.9         1701 0x80000002 0x5d3a
192.168.4.1     9.9.9.9         1701 0x80000002 0x840e
192.168.5.1     9.9.9.9         1701 0x80000002 0xabe1
192.168.6.1     9.9.9.9         1701 0x80000002 0xd2b5
192.168.7.1     9.9.9.9         1701 0x80000002 0xf989
192.168.8.1     9.9.9.9          301 0x80000002 0x215d
192.168.8.1     192.168.8.1     3600 0x80000001 0x9151


box# ping 192.168.1.2
PING 192.168.1.2 (192.168.1.2): 56 data bytes
64 bytes from 192.168.1.2: seq=0 ttl=255 time=34.801 ms

--- 192.168.1.2 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 34.801/34.801/34.801 ms
box# ping 192.168.2.2
PING 192.168.2.2 (192.168.2.2): 56 data bytes
64 bytes from 192.168.2.2: seq=0 ttl=255 time=28.509 ms

--- 192.168.2.2 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 28.509/28.509/28.509 ms

box# ping 192.168.3.2
PING 192.168.3.2 (192.168.3.2): 56 data bytes
64 bytes from 192.168.3.2: seq=0 ttl=255 time=16.442 ms

--- 192.168.3.2 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 16.442/16.442/16.442 ms
box# ping 192.168.4.2
PING 192.168.4.2 (192.168.4.2): 56 data bytes
64 bytes from 192.168.4.2: seq=0 ttl=255 time=17.274 ms

--- 192.168.4.2 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 17.274/17.274/17.274 ms
box# ping 192.168.5.2
PING 192.168.5.2 (192.168.5.2): 56 data bytes
64 bytes from 192.168.5.2: seq=0 ttl=255 time=22.596 ms

--- 192.168.5.2 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 22.596/22.596/22.596 ms
box# ping 192.168.6.2
PING 192.168.6.2 (192.168.6.2): 56 data bytes
64 bytes from 192.168.6.2: seq=0 ttl=255 time=24.688 ms

--- 192.168.6.2 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 24.688/24.688/24.688 ms
box# ping 192.168.7.2
PING 192.168.7.2 (192.168.7.2): 56 data bytes
64 bytes from 192.168.7.2: seq=0 ttl=255 time=19.950 ms

--- 192.168.7.2 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 19.950/19.950/19.950 ms
box# ping 192.168.8.2
PING 192.168.8.2 (192.168.8.2): 56 data bytes
64 bytes from 192.168.8.2: seq=0 ttl=255 time=27.255 ms

--- 192.168.8.2 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 27.255/27.255/27.255 ms


R1

R1#show ip route ospf
O    192.168.8.0/24 [110/20] via 192.168.1.1, 00:30:23, FastEthernet0/0
O    192.168.4.0/24 [110/20] via 192.168.1.1, 00:30:23, FastEthernet0/0
O    192.168.5.0/24 [110/20] via 192.168.1.1, 00:30:23, FastEthernet0/0
O    192.168.6.0/24 [110/20] via 192.168.1.1, 00:30:23, FastEthernet0/0
O    192.168.7.0/24 [110/20] via 192.168.1.1, 00:30:23, FastEthernet0/0
O    192.168.2.0/24 [110/20] via 192.168.1.1, 00:30:23, FastEthernet0/0
O    192.168.3.0/24 [110/20] via 192.168.1.1, 00:30:23, FastEthernet0/0
R1#
R1#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
9.9.9.9           1   FULL/DR         00:00:36    192.168.1.1     FastEthernet0/0
R1#
R1#show ip ospf database

            OSPF Router with ID (1.1.1.1) (Process ID 1)

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         734         0x80000003 0x003513 1
2.2.2.2         2.2.2.2         570         0x80000003 0x00FE3F 1
3.3.3.3         3.3.3.3         639         0x80000004 0x00C66C 1
4.4.4.4         4.4.4.4         506         0x80000004 0x009098 1
5.5.5.5         5.5.5.5         389         0x80000004 0x005AC4 1
6.6.6.6         6.6.6.6         304         0x80000004 0x0024F0 1
7.7.7.7         7.7.7.7         287         0x80000004 0x00ED1D 1
8.8.8.8         8.8.8.8         249         0x80000004 0x00B749 1
9.9.9.9         9.9.9.9         58          0x80000012 0x007A3D 9

                Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
192.168.1.1     9.9.9.9         58          0x80000004 0x000B94
192.168.2.1     9.9.9.9         78          0x80000003 0x003467
192.168.3.1     9.9.9.9         48          0x80000003 0x005B3B
192.168.4.1     9.9.9.9         20          0x80000003 0x00820F
192.168.5.1     9.9.9.9         40          0x80000003 0x00A9E2
192.168.6.1     9.9.9.9         1841        0x80000002 0x00D2B5
192.168.7.1     9.9.9.9         1841        0x80000002 0x00F989
192.168.8.1     9.9.9.9         441         0x80000002 0x00215D

R1#ping 192.168.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/12/20 ms
R1#ping 192.168.1.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
R1#ping 192.168.2.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/9/12 ms
R1#ping 192.168.2.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/15/24 ms
R1#ping 192.168.3.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/11/12 ms
R1#ping 192.168.3.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/11/16 ms
R1#ping 192.168.4.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.4.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/10/12 ms
R1#ping 192.168.4.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.4.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/16/32 ms
R1#ping 192.168.5.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.5.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/11/12 ms
R1#ping 192.168.5.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.5.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/16/36 ms
R1#ping 192.168.6.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.6.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/11/12 ms
R1#ping 192.168.6.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.6.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/16/36 ms
R1#ping 192.168.7.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.7.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/9/12 ms
R1#ping 192.168.7.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.7.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/15/20 ms
R1#ping 192.168.8.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.8.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/12/16 ms
R1#ping 192.168.8.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.8.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/15/28 ms


R8

R8#show ip route ospf
O    192.168.4.0/24 [110/20] via 192.168.8.1, 00:32:30, FastEthernet0/0
O    192.168.5.0/24 [110/20] via 192.168.8.1, 00:32:30, FastEthernet0/0
O    192.168.6.0/24 [110/20] via 192.168.8.1, 00:32:30, FastEthernet0/0
O    192.168.7.0/24 [110/20] via 192.168.8.1, 00:32:30, FastEthernet0/0
O    192.168.1.0/24 [110/20] via 192.168.8.1, 00:32:30, FastEthernet0/0
O    192.168.2.0/24 [110/20] via 192.168.8.1, 00:32:30, FastEthernet0/0
O    192.168.3.0/24 [110/20] via 192.168.8.1, 00:32:30, FastEthernet0/0
R8#
R8#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
9.9.9.9           1   FULL/DR         00:00:38    192.168.8.1     FastEthernet0/0
R8#
R8#show ip ospf database

            OSPF Router with ID (8.8.8.8) (Process ID 1)

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         864         0x80000003 0x003513 1
2.2.2.2         2.2.2.2         698         0x80000003 0x00FE3F 1
3.3.3.3         3.3.3.3         767         0x80000004 0x00C66C 1
4.4.4.4         4.4.4.4         634         0x80000004 0x009098 1
5.5.5.5         5.5.5.5         517         0x80000004 0x005AC4 1
6.6.6.6         6.6.6.6         432         0x80000004 0x0024F0 1
7.7.7.7         7.7.7.7         414         0x80000004 0x00ED1D 1
8.8.8.8         8.8.8.8         375         0x80000004 0x00B749 1
9.9.9.9         9.9.9.9         186         0x80000012 0x007A3D 9

                Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
192.168.1.1     9.9.9.9         186         0x80000004 0x000B94
192.168.2.1     9.9.9.9         206         0x80000003 0x003467
192.168.3.1     9.9.9.9         178         0x80000003 0x005B3B
192.168.4.1     9.9.9.9         148         0x80000003 0x00820F
192.168.5.1     9.9.9.9         168         0x80000003 0x00A9E2
192.168.6.1     9.9.9.9         108         0x80000003 0x00D0B6
192.168.7.1     9.9.9.9         118         0x80000003 0x00F78A
192.168.8.1     9.9.9.9         569         0x80000002 0x00215D

R8#ping 192.168.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/9/12 ms
R8#ping 192.168.1.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/9/12 ms
R8#ping 192.168.2.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/13/28 ms
R8#ping 192.168.2.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/20/32 ms
R8#ping 192.168.3.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/13/24 ms
R8#ping 192.168.3.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/16/24 ms
R8#ping 192.168.4.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.4.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/11/12 ms
R8#ping 192.168.4.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.4.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/12/20 ms
R8#ping 192.168.5.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.5.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/10/12 ms
R8#ping 192.168.5.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.5.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/8/12 ms
R8#ping 192.168.6.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.6.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/10/12 ms
R8#ping 192.168.6.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.6.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/15/24 ms
R8#ping 192.168.7.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.7.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/13/28 ms
R8#ping 192.168.7.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.7.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/18/28 ms
R8#ping 192.168.8.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.8.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/9/16 ms
R8#ping 192.168.8.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.8.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms