Skip to content

Let's enable intra domain routing !

1 Overview

In Topology example you learned how to implement a local topology by declaring 4 nodes and interconnect them via UDP socket in the hardware definition file. In this page, we'll start creating a multiservice Service Provider network on top of this topology. This will be a series of articles that step by step will implement each layer needed to implement a Service Provider network. As we verified that all interconnects were working now let's enable an IGP !

2 freeRtr network example

2.1 Diagram

The demo implements a square topology:

  • nodes are r1,r2,r3,r4
  • edges are e1[r1-r2],e2[r2-r4],e3[r3-r4],e4[r1-r3] (- means is "connected to")
  r1----e1----r2
  |            |
  |            |
  e2          e2
  |            |
  |            |
  r3----e1----r4

We will consider the following assumption:

  • IGP is OSPF
  • IGP is of course bind to one VRF. Here it is VRF v1
  • Process number is 1 for both IPv4 and IPv6 address family
  • All routers' interconnections eth1 and eth2 are in backbone area 0
  • All routers' loopback0 are advertised into the IGP domain
  • All routers' router-id matches loopback0 IPv4 address

2.2 Nodes configuration

2.2.1 router r1

r1-hw.txt

hwid MyDebianVM
tcp2vrf 2321 v1 23
int eth1 eth 0000.1111.0001 127.0.0.1 1001 127.0.0.1 2001
int eth2 eth 0000.1111.0002 127.0.0.1 1002 127.0.0.1 3002
int eth3 eth 0000.1111.0003 127.0.0.1 1003 127.0.0.1 5003

r1-sw.txt

r1#show config-differences
router ospf4 1
 vrf v1
 router-id 2.2.2.1
 traffeng-id 0.0.0.0
 area 0 enable
 exit
router ospf6 1
 vrf v1
 router-id 2.2.2.1
 traffeng-id ::
 area 0 enable
 exit
 interface ethernet1
 router ospf4 1 enable
 router ospf4 1 area 0
 router ospf6 1 enable
 router ospf6 1 area 0
 exit
interface ethernet2
 router ospf4 1 enable
 router ospf4 1 area 0
 router ospf6 1 enable
 router ospf6 1 area 0
 exit
interface loopback0
 router ospf4 1 enable
 router ospf4 1 area 0
 router ospf4 1 passive
 router ospf6 1 enable
 router ospf6 1 area 0
 router ospf6 1 passive
 exit

2.2.2 router r2

r2-hw.txt

hwid MyDebianVM
tcp2vrf 2322 v1 23
int eth1 eth 0000.2222.0001 127.0.0.1 2001 127.0.0.1 1001
int eth2 eth 0000.2222.0002 127.0.0.1 2002 127.0.0.1 4002

r2-sw.txt

r2#show config-differences                                                                                 router ospf4 1
 vrf v1
 router-id 2.2.2.2
 traffeng-id 0.0.0.0
 area 0 enable
 exit
router ospf6 1
 vrf v1
 router-id 2.2.2.2
 traffeng-id ::
 area 0 enable
 exit
interface ethernet1
 router ospf4 1 enable
 router ospf4 1 area 0
 router ospf6 1 enable
 router ospf6 1 area 0
 exit
interface ethernet2
 router ospf4 1 enable
 router ospf4 1 area 0
 router ospf6 1 enable
 router ospf6 1 area 0
 exit
interface loopback0
 router ospf4 1 enable
 router ospf4 1 area 0
 router ospf4 1 passive
 router ospf6 1 enable
 router ospf6 1 area 0
 router ospf6 1 passive
 exit

2.2.3 router r3

r3-hw.txt

hwid MyDebianVM
tcp2vrf 2323 v1 23
int eth1 eth 0000.3333.0001 127.0.0.1 3001 127.0.0.1 4001
int eth2 eth 0000.3333.0002 127.0.0.1 3002 127.0.0.1 1002

r3-sw.txt

r3#show config-differences
router ospf4 1
 vrf v1
 router-id 2.2.2.3
 traffeng-id 0.0.0.0
 area 0 enable
 exit
router ospf6 1
 vrf v1
 router-id 2.2.2.3
 traffeng-id ::
 area 0 enable
 exit
interface ethernet1
 router ospf4 1 enable
 router ospf4 1 area 0
 router ospf6 1 enable
 router ospf6 1 area 0
 exit
interface ethernet2
 router ospf4 1 enable
 router ospf4 1 area 0
 router ospf6 1 enable
 router ospf6 1 area 0
 exit
interface loopback0
 router ospf4 1 enable
 router ospf4 1 area 0
 router ospf4 1 passive
 router ospf6 1 enable
 router ospf6 1 area 0
 router ospf6 1 passive
 exit

2.2.4 router r4

r4-hw.txt

hwid MyDebianVM
tcp2vrf 2324 v1 23
int eth1 eth 0000.4444.0001 127.0.0.1 4001 127.0.0.1 3001
int eth2 eth 0000.4444.0002 127.0.0.1 4002 127.0.0.1 2002
r4-sw.txt
r4#show config-differences
router ospf4 1
 vrf v1
 router-id 2.2.2.4
 traffeng-id 0.0.0.0
 area 0 enable
 exit
router ospf6 1
 vrf v1
 router-id 2.2.2.4
 traffeng-id ::
 area 0 enable
 exit
interface ethernet1
 router ospf4 1 enable
 router ospf4 1 area 0
 router ospf6 1 enable
 router ospf6 1 area 0
 exit
interface ethernet2
 router ospf4 1 enable
 router ospf4 1 area 0
 router ospf6 1 enable
 router ospf6 1 area 0
 exit
interface loopback0
 router ospf4 1 enable
 router ospf4 1 area 0
 router ospf4 1 passive
 router ospf6 1 enable
 router ospf6 1 area 0
 router ospf6 1 passive
 exit

3 Verification

3.1 Launch all nodes

Run r1,r2,r3,r4 in different terminal windows:

r1

java -jar rtr.jar routersc r1-hw.txt r1-sw.txt
r2
java -jar rtr.jar routersc r2-hw.txt r2-sw.txt
r3
java -jar rtr.jar routersc r3-hw.txt r3-sw.txt
r4
java -jar rtr.jar routersc r4-hw.txt r4-sw.txt

3.2 Physical connectivity check

  • LLDP
    r1#sh lldp nei
    interface  hostname  iface      ipv4     ipv6
    ethernet1  r2        ethernet1  1.1.1.2  1234:1::2
    ethernet2  r3        ethernet2  1.1.1.6  1234:2::2
    
  • interconnectivity reachability

ping from r1@eth1

r1#ping 1.1.1.2 vrf v1
pinging 1.1.1.2, src=null, vrf=v1, cnt=5, len=64, tim=1000, gap=0, ttl=255, tos=0, fill=0, sweep=false, multi=false, detail=false
!!!!!
result=100%, recv/sent/lost/err=5/5/0/0, rtt min/avg/max/total=1/2/5/12

r1#ping 1234:1::2 vrf v1
pinging 1234:1::2, src=null, vrf=v1, cnt=5, len=64, tim=1000, gap=0, ttl=255, tos=0, fill=0, sweep=false, multi=false, detail=false
!!!!!
result=100%, recv/sent/lost/err=5/5/0/0, rtt min/avg/max/total=0/0/3/16
ping from r1@eth2

r1#ping 1.1.1.6 vrf v1
pinging 1.1.1.6, src=null, vrf=v1, cnt=5, len=64, tim=1000, gap=0, ttl=255, tos=0, fill=0, sweep=false, multi=false, detail=false
!!!!!
result=100%, recv/sent/lost/err=5/5/0/0, rtt min/avg/max/total=0/1/2/10
r1#ping 1234:2::2 vrf v1
pinging 1234:2::2, src=null, vrf=v1, cnt=5, len=64, tim=1000, gap=0, ttl=255, tos=0, fill=0, sweep=false, multi=false, detail=false
!!!!!
result=100%, recv/sent/lost/err=5/5/0/0, rtt min/avg/max/total=0/1/4/16
r1#

3.3 OSPF and OSPFv3 verification

  • OSPF interfaces
r1#show ipv4 ospf 1 int
interface  neighbors
loopback0  0
ethernet1  1
ethernet2  1
r1#show ipv6 ospf 1 int
interface  neighbors
loopback0  0
ethernet1  1
ethernet2  1
  • OSPF neighbors
r1#show ipv4 ospf 1 nei
interface  area  address  routerid  state  uptime
ethernet1  0     1.1.1.2  2.2.2.2   4      01:24:16
ethernet2  0     1.1.1.6  2.2.2.3   4      01:20:51
r1#show ipv6 ospf 1 nei
interface  area  address    routerid  state  uptime
ethernet1  0     1234:1::2  2.2.2.2   4      01:28:10
ethernet2  0     1234:2::2  2.2.2.3   4      01:25:18
  • OSPF database
r1#show ipv4 ospf 1 database 0
routerid  lsaid    sequence  type    len  time
2.2.2.1   2.2.2.1  80000008  router  64   00:19:30
2.2.2.2   2.2.2.2  80000006  router  64   00:18:30
2.2.2.3   2.2.2.3  80000008  router  64   00:18:30
2.2.2.4   2.2.2.4  80000008  router  64   00:18:00
r1#show ipv6 ospf 1 database 0
routerid  lsaid      sequence  type    len  time
2.2.2.3   399294760  80000003  link    24   00:20:27
2.2.2.3   399294761  80000003  link    24   00:24:27
2.2.2.3   399294762  80000003  link    24   00:24:27
2.2.2.4   526130513  80000003  link    24   00:19:57
2.2.2.4   526130514  80000003  link    24   00:22:57
2.2.2.4   526130515  80000003  link    24   00:22:57
2.2.2.2   794955991  80000003  link    24   00:20:27
2.2.2.2   794955992  80000003  link    24   00:26:27
2.2.2.2   794955993  80000003  link    24   00:26:27
2.2.2.1   913665481  80000003  link    24   00:21:27
2.2.2.1   913665482  80000004  link    24   00:00:27
2.2.2.1   913665483  80000003  link    24   00:30:57
2.2.2.1   0          80000005  router  36   00:24:27
2.2.2.2   0          80000005  router  36   00:22:27
2.2.2.3   0          80000005  router  36   00:22:27
2.2.2.4   0          80000005  router  36   00:22:27
2.2.2.3   399294760  80000003  prefix  32   00:20:27
2.2.2.3   399294761  80000003  prefix  20   00:24:27
2.2.2.3   399294762  80000003  prefix  20   00:24:27
2.2.2.4   526130513  80000003  prefix  32   00:19:57
2.2.2.4   526130514  80000003  prefix  20   00:22:57
2.2.2.4   526130515  80000003  prefix  20   00:22:57
2.2.2.2   794955991  80000003  prefix  32   00:20:27
2.2.2.2   794955992  80000003  prefix  20   00:26:27
2.2.2.2   794955993  80000003  prefix  20   00:26:27
2.2.2.1   913665481  80000003  prefix  32   00:21:27
2.2.2.1   913665482  80000004  prefix  20   00:00:27
2.2.2.1   913665483  80000003  prefix  20   00:30:57
  • show ipv4 route v1
r1#show ipv4 route v1
typ  prefix       metric  iface      hop      time
C    0.0.0.0/32   0/0     ethernet3  null     01:58:12
C    1.1.1.0/30   0/0     ethernet1  null     01:58:13
LOC  1.1.1.1/32   0/1     ethernet1  null     01:58:13
C    1.1.1.4/30   0/0     ethernet2  null     01:58:13
LOC  1.1.1.5/32   0/1     ethernet2  null     01:58:13
O    1.1.1.8/30   110/1   ethernet1  1.1.1.2  01:46:07
O    1.1.1.12/30  110/1   ethernet2  1.1.1.6  01:44:26
C    2.2.2.1/32   0/0     loopback0  null     01:58:13
O    2.2.2.2/32   110/1   ethernet1  1.1.1.2  01:40:28
O    2.2.2.3/32   110/1   ethernet2  1.1.1.6  01:40:15
O    2.2.2.4/32   110/2   ethernet1  1.1.1.2  01:40:06
r1#show ipv6 route v1
typ  prefix                     metric  iface      hop        time
C    1234:1::/32                0/0     ethernet1  null       01:58:24
LOC  1234:1::1/128              0/1     ethernet1  null       01:58:24
C    1234:2::/32                0/0     ethernet2  null       01:58:24
LOC  1234:2::1/128              0/1     ethernet2  null       01:58:24
O    1234:3::/32                110/1   ethernet1  1234:1::2  01:46:12
O    1234:4::/32                110/1   ethernet2  1234:2::2  01:44:37
C    4321::1/128                0/0     loopback0  null       01:58:24
O    4321::2/128                110/1   ethernet1  1234:1::2  01:40:40
O    4321::3/128                110/1   ethernet2  1234:2::2  01:40:26
O    4321::4/128                110/2   ethernet1  1234:1::2  01:40:17
C    fe80::/64                  0/0     ethernet3  null       01:58:24
LOC  fe80::200:11ff:fe11:3/128  0/1     ethernet3  null       01:58:24

3.4 Loopback reachability verification

  • loopback reachability from r1@eth1

ping to r1@lo0

r1#ping 2.2.2.1 vrf v1
pinging 2.2.2.1, src=null, vrf=v1, cnt=5, len=64, tim=1000, gap=0, ttl=255, tos=0, fill=0, sweep=false, multi=false, detail=false
!!!!!
result=100%, recv/sent/lost/err=5/5/0/0, rtt min/avg/max/total=0/0/2/8
r1#ping 4321::1 vrf v1
pinging 4321::1, src=null, vrf=v1, cnt=5, len=64, tim=1000, gap=0, ttl=255, tos=0, fill=0, sweep=false, multi=false, detail=false
!!!!!
result=100%, recv/sent/lost/err=5/5/0/0, rtt min/avg/max/total=0/0/0/0

ping to r2@lo0

r1#ping 2.2.2.2 vrf v1
pinging 2.2.2.2, src=null, vrf=v1, cnt=5, len=64, tim=1000, gap=0, ttl=255, tos=0, fill=0, sweep=false, multi=false, detail=false
!!!!!
result=100%, recv/sent/lost/err=5/5/0/0, rtt min/avg/max/total=0/0/1/4
r1#ping 4321::2 vrf v1
pinging 4321::2, src=null, vrf=v1, cnt=5, len=64, tim=1000, gap=0, ttl=255, tos=0, fill=0, sweep=false, multi=false, detail=false
!!!!!
result=100%, recv/sent/lost/err=5/5/0/0, rtt min/avg/max/total=0/1/5/7

ping to r3@lo0

r1#ping 2.2.2.3 vrf v1
pinging 2.2.2.3, src=null, vrf=v1, cnt=5, len=64, tim=1000, gap=0, ttl=255, tos=0, fill=0, sweep=false, multi=false, detail=false
!!!!!
result=100%, recv/sent/lost/err=5/5/0/0, rtt min/avg/max/total=0/0/1/3
r1#ping 4321::3 vrf v1
pinging 4321::3, src=null, vrf=v1, cnt=5, len=64, tim=1000, gap=0, ttl=255, tos=0, fill=0, sweep=false, multi=false, detail=false
!!!!!
result=100%, recv/sent/lost/err=5/5/0/0, rtt min/avg/max/total=0/0/1/4

ping to r4@lo0

r1#ping 2.2.2.4 vrf v1
pinging 2.2.2.4, src=null, vrf=v1, cnt=5, len=64, tim=1000, gap=0, ttl=255, tos=0, fill=0, sweep=false, multi=false, detail=false
!!!!!
result=100%, recv/sent/lost/err=5/5/0/0, rtt min/avg/max/total=0/0/1/4
r1#ping 4321::4 vrf v1
pinging 4321::4, src=null, vrf=v1, cnt=5, len=64, tim=1000, gap=0, ttl=255, tos=0, fill=0, sweep=false, multi=false, detail=false
!!!!!
result=100%, recv/sent/lost/err=5/5/0/0, rtt min/avg/max/total=0/0/1/9

Note

r2,r3 and r4 verification is not displayed in order to avoid to clutter the article. But verification steps are obviously following the same path.

3 Conclusion

This section demonstrated:

  • How to implement IGP in our local square topology:
    • by configuring OSPF for IPv4 and IPv6 address family
    • by explaining how to verify OSPF operation
  • How to verify connectivity
    • from each node of the topology
    • verify loopback reachability routed by OSPF

Deploying an IGP in the entire network domain is the first step to achieve when implementing a multiservice provider network. It is not a coincidence if we advertise the loopback into the IGP. Loopbacks will be identified as iBGP nexthop within in IGP domain. But we will discuss this point in a subsequent article.

Note

The next step will be to implement MPLS so that each loopback can have reachability via MPLS LSP (Label Switch Path). This will be the core of the multiservice service provider backbone.