Monday, January 30, 2017

MPLS TE Auto Tunnel Mesh


R1:
interface Loopback0
 ip address 1.1.1.1 255.255.255.255

interface FastEthernet1/0
 ip address 192.168.12.1 255.255.255.0
 speed 100
 duplex full

router rip
 version 2
 network 1.0.0.0
 network 192.168.12.0
 no auto-summary

R2:
interface Loopback0
 ip address 2.2.2.2 255.255.255.255

interface FastEthernet1/0
 ip address 192.168.23.2 255.255.255.0
 speed 100
 duplex full
 mpls traffic-eng tunnels

interface FastEthernet1/1
 ip address 192.168.24.2 255.255.255.0
 speed 100
 duplex full
 mpls traffic-eng tunnels

ip vrf MSSK
 rd 1:1
 route-target export 1:1
 route-target import 1:1

interface FastEthernet2/0
 ip vrf forwarding MSSK
 ip address 192.168.12.2 255.255.255.0
 speed 100
 duplex full

mpls traffic-eng tunnels
mpls traffic-eng auto-tunnel mesh

router ospf 1
 router-id 2.2.2.2
 network 2.2.2.2 0.0.0.0 area 0
 network 192.168.23.2 0.0.0.0 area 0
 network 192.168.24.2 0.0.0.0 area 0
 mpls traffic-eng router-id Loopback0
 mpls traffic-eng area 0
 mpls traffic-eng mesh-group 10 Loopback0 area 0

router rip
 address-family ipv4 vrf MSSK
  redistribute bgp 1 metric 2
  network 192.168.12.0
  no auto-summary
  version 2
 exit-address-family

router bgp 1
 bgp log-neighbor-changes
 no bgp default ipv4-unicast
 neighbor 6.6.6.6 remote-as 1
 neighbor 6.6.6.6 update-source Loopback0

 address-family vpnv4
  neighbor 6.6.6.6 activate
  neighbor 6.6.6.6 send-community both
 exit-address-family

 address-family ipv4 vrf MSSK
  redistribute rip
 exit-address-family

interface Auto-Template1
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination mesh-group 10
 tunnel mpls traffic-eng autoroute announce
 tunnel mpls traffic-eng path-option 10 dynamic

R3:
interface Loopback0
 ip address 3.3.3.3 255.255.255.255

interface FastEthernet1/0
 ip address 192.168.23.3 255.255.255.0
 speed 100
 duplex full
 mpls traffic-eng tunnels

interface FastEthernet1/1
 ip address 192.168.36.3 255.255.255.0
 speed 100
 duplex full
 mpls traffic-eng tunnels

interface FastEthernet2/0
 ip address 192.168.35.3 255.255.255.0
 speed 100
 duplex full
 mpls traffic-eng tunnels

mpls traffic-eng tunnels
mpls traffic-eng auto-tunnel mesh

router ospf 1
 router-id 3.3.3.3
 network 3.3.3.3 0.0.0.0 area 0
 network 192.168.23.3 0.0.0.0 area 0
 network 192.168.35.3 0.0.0.0 area 0
 network 192.168.36.3 0.0.0.0 area 0
 mpls traffic-eng router-id Loopback0
 mpls traffic-eng area 0
 mpls traffic-eng mesh-group 10 Loopback0 area 0

R4:
interface Loopback0
 ip address 4.4.4.4 255.255.255.255

interface FastEthernet1/0
 ip address 192.168.24.4 255.255.255.0
 speed 100
 duplex full
 mpls traffic-eng tunnels

interface FastEthernet1/1
 ip address 192.168.45.4 255.255.255.0
 speed 100
 duplex full
 mpls traffic-eng tunnels

mpls traffic-eng tunnels
mpls traffic-eng auto-tunnel mesh

router ospf 1
 router-id 4.4.4.4
 network 4.4.4.4 0.0.0.0 area 0
 network 192.168.24.4 0.0.0.0 area 0
 network 192.168.45.4 0.0.0.0 area 0
 mpls traffic-eng router-id Loopback0
 mpls traffic-eng area 0
 mpls traffic-eng mesh-group 10 Loopback0 area 0

R5:
interface Loopback0
 ip address 5.5.5.5 255.255.255.255

interface FastEthernet1/0
 ip address 192.168.56.5 255.255.255.0
 speed 100
 duplex full
 mpls traffic-eng tunnels

interface FastEthernet1/1
 ip address 192.168.45.5 255.255.255.0
 speed 100
 duplex full
 mpls traffic-eng tunnels

interface FastEthernet2/0
 ip address 192.168.35.5 255.255.255.0
 speed 100
 duplex full
 mpls traffic-eng tunnels

mpls traffic-eng tunnels
mpls traffic-eng auto-tunnel mesh

router ospf 1
 router-id 5.5.5.5
 network 5.5.5.5 0.0.0.0 area 0
 network 192.168.35.5 0.0.0.0 area 0
 network 192.168.45.5 0.0.0.0 area 0
 network 192.168.56.5 0.0.0.0 area 0
 mpls traffic-eng router-id Loopback0
 mpls traffic-eng area 0
 mpls traffic-eng mesh-group 10 Loopback0 area 0

R6:
interface Loopback0
 ip address 6.6.6.6 255.255.255.255

interface FastEthernet1/0
 ip address 192.168.36.6 255.255.255.0
 speed 100
 duplex full
 mpls traffic-eng tunnels

interface FastEthernet1/1
 ip address 192.168.56.6 255.255.255.0
 speed 100
 duplex full
 mpls traffic-eng tunnels

ip vrf MSSK
 rd 1:1
 route-target export 1:1
 route-target import 1:1

interface FastEthernet2/0
 ip vrf forwarding MSSK
 ip address 192.168.67.6 255.255.255.0
 speed 100
 duplex full

mpls traffic-eng tunnels
mpls traffic-eng auto-tunnel mesh

router ospf 1
 router-id 6.6.6.6
 network 6.6.6.6 0.0.0.0 area 0
 network 192.168.36.6 0.0.0.0 area 0
 network 192.168.56.6 0.0.0.0 area 0
 mpls traffic-eng router-id Loopback0
 mpls traffic-eng area 0
 mpls traffic-eng mesh-group 10 Loopback0 area 0

router rip
 address-family ipv4 vrf MSSK
  redistribute bgp 1 metric 2
  network 192.168.67.0
  no auto-summary
  version 2
 exit-address-family

router bgp 1
 bgp log-neighbor-changes
 no bgp default ipv4-unicast
 neighbor 2.2.2.2 remote-as 1
 neighbor 2.2.2.2 update-source Loopback0

 address-family vpnv4
  neighbor 2.2.2.2 activate
  neighbor 2.2.2.2 send-community both
 exit-address-family

 address-family ipv4 vrf MSSK
  redistribute rip
 exit-address-family

interface Auto-Template1
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination mesh-group 10
 tunnel mpls traffic-eng autoroute announce
 tunnel mpls traffic-eng path-option 10 dynamic

R7:
interface Loopback0
 ip address 7.7.7.7 255.255.255.255

interface FastEthernet1/0
 ip address 192.168.67.7 255.255.255.0
 speed 100
 duplex full

router rip
 version 2
 network 7.0.0.0
 network 192.168.67.0
 no auto-summary

Verification:

Let us check CE1 routing table and test connectivity to CE2:
R1#sh ip route rip
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      7.0.0.0/32 is subnetted, 1 subnets
R        7.7.7.7 [120/2] via 192.168.12.2, 00:00:16, FastEthernet1/0
R     192.168.67.0/24 [120/2] via 192.168.12.2, 00:00:16, FastEthernet1/0

R1#ping 7.7.7.7 source loopback 0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 7.7.7.7, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 76/88/104 ms

R1#traceroute 7.7.7.7 source lo0 numeric
Type escape sequence to abort.
Tracing the route to 7.7.7.7
VRF info: (vrf in name/id, vrf out name/id)
  1 192.168.12.2 56 msec 72 msec 68 msec
  2 192.168.23.3 [MPLS: Labels 18/17 Exp 0] 76 msec 52 msec 76 msec
  3 192.168.67.6 [MPLS: Label 17 Exp 0] 116 msec 124 msec 88 msec
  4 192.168.67.7 116 msec 152 msec 136 msec

R2#show mpls traffic-eng topology brief
My_System_id: 2.2.2.2 (ospf 1  area 0)

Signalling error holddown: 10 sec Global Link Generation 18

IGP Id: 2.2.2.2, MPLS TE Id:2.2.2.2 Router Node  (ospf 1  area 0)
      link[0]: Broadcast, DR: 192.168.23.2, nbr_node_id:1, gen:8
      frag_id: 2, Intf Address: 192.168.23.2
      TE metric: 1, IGP metric: 1, attribute flags: 0x0
      SRLGs: None

      link[1]: Broadcast, DR: 192.168.24.2, nbr_node_id:2, gen:8
      frag_id: 3, Intf Address: 192.168.24.2
      TE metric: 1, IGP metric: 1, attribute flags: 0x0
      SRLGs: None

IGP Id: 3.3.3.3, MPLS TE Id:3.3.3.3 Router Node  (ospf 1  area 0)
Area mg-id's:
: mg-id 10    3.3.3.3 :
      link[0]: Broadcast, DR: 192.168.23.2, nbr_node_id:1, gen:11
      frag_id: 2, Intf Address: 192.168.23.3
      TE metric: 1, IGP metric: 1, attribute flags: 0x0
      SRLGs: None

      link[1]: Broadcast, DR: 192.168.36.6, nbr_node_id:4, gen:11
      frag_id: 3, Intf Address: 192.168.36.3
      TE metric: 1, IGP metric: 1, attribute flags: 0x0
      SRLGs: None

      link[2]: Broadcast, DR: 192.168.35.3, nbr_node_id:3, gen:11
      frag_id: 4, Intf Address: 192.168.35.3
      TE metric: 1, IGP metric: 1, attribute flags: 0x0
      SRLGs: None

IGP Id: 4.4.4.4, MPLS TE Id:4.4.4.4 Router Node  (ospf 1  area 0)
Area mg-id's:
: mg-id 10    4.4.4.4 :
      link[0]: Broadcast, DR: 192.168.24.2, nbr_node_id:2, gen:13
      frag_id: 2, Intf Address: 192.168.24.4
      TE metric: 1, IGP metric: 1, attribute flags: 0x0
      SRLGs: None

      link[1]: Broadcast, DR: 192.168.45.4, nbr_node_id:5, gen:13
      frag_id: 3, Intf Address: 192.168.45.4
      TE metric: 1, IGP metric: 1, attribute flags: 0x0
      SRLGs: None

IGP Id: 5.5.5.5, MPLS TE Id:5.5.5.5 Router Node  (ospf 1  area 0)
Area mg-id's:
: mg-id 10    5.5.5.5 :
      link[0]: Broadcast, DR: 192.168.56.6, nbr_node_id:6, gen:16
      frag_id: 2, Intf Address: 192.168.56.5
      TE metric: 1, IGP metric: 1, attribute flags: 0x0
      SRLGs: None

      link[1]: Broadcast, DR: 192.168.45.4, nbr_node_id:5, gen:16
      frag_id: 3, Intf Address: 192.168.45.5
      TE metric: 1, IGP metric: 1, attribute flags: 0x0
      SRLGs: None

      link[2]: Broadcast, DR: 192.168.35.3, nbr_node_id:3, gen:16
      frag_id: 4, Intf Address: 192.168.35.5
      TE metric: 1, IGP metric: 1, attribute flags: 0x0
      SRLGs: None

IGP Id: 6.6.6.6, MPLS TE Id:6.6.6.6 Router Node  (ospf 1  area 0)
Area mg-id's:
: mg-id 10    6.6.6.6 :
      link[0]: Broadcast, DR: 192.168.36.6, nbr_node_id:4, gen:18
      frag_id: 2, Intf Address: 192.168.36.6
      TE metric: 1, IGP metric: 1, attribute flags: 0x0
      SRLGs: None

      link[1]: Broadcast, DR: 192.168.56.6, nbr_node_id:6, gen:18
      frag_id: 3, Intf Address: 192.168.56.6
      TE metric: 1, IGP metric: 1, attribute flags: 0x0
      SRLGs: None

IGP Id: 192.168.23.2, Network Node  (ospf 1  area 0)
      link[0]: Broadcast, Nbr IGP Id: 2.2.2.2, nbr_node_id:7, gen:1

      link[1]: Broadcast, Nbr IGP Id: 3.3.3.3, nbr_node_id:8, gen:1

IGP Id: 192.168.24.2, Network Node  (ospf 1  area 0)
      link[0]: Broadcast, Nbr IGP Id: 2.2.2.2, nbr_node_id:7, gen:2

      link[1]: Broadcast, Nbr IGP Id: 4.4.4.4, nbr_node_id:9, gen:2

IGP Id: 192.168.35.3, Network Node  (ospf 1  area 0)
      link[0]: Broadcast, Nbr IGP Id: 3.3.3.3, nbr_node_id:8, gen:3

      link[1]: Broadcast, Nbr IGP Id: 5.5.5.5, nbr_node_id:10, gen:3

IGP Id: 192.168.36.6, Network Node  (ospf 1  area 0)
      link[0]: Broadcast, Nbr IGP Id: 6.6.6.6, nbr_node_id:11, gen:4

      link[1]: Broadcast, Nbr IGP Id: 3.3.3.3, nbr_node_id:8, gen:4

IGP Id: 192.168.45.4, Network Node  (ospf 1  area 0)
      link[0]: Broadcast, Nbr IGP Id: 4.4.4.4, nbr_node_id:9, gen:5

      link[1]: Broadcast, Nbr IGP Id: 5.5.5.5, nbr_node_id:10, gen:5

IGP Id: 192.168.56.6, Network Node  (ospf 1  area 0)
      link[0]: Broadcast, Nbr IGP Id: 6.6.6.6, nbr_node_id:11, gen:6

      link[1]: Broadcast, Nbr IGP Id: 5.5.5.5, nbr_node_id:10, gen:6

R2# sh ip int bri | ex down
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet1/0        192.168.23.2    YES manual up                    up
FastEthernet1/1        192.168.24.2    YES manual up                    up
FastEthernet2/0        192.168.12.2    YES manual up                    up
Auto-Template1         2.2.2.2         YES TFTP   up                    up
Loopback0              2.2.2.2         YES manual up                    up
Tunnel64336            2.2.2.2         YES TFTP   up                    up
Tunnel64337            2.2.2.2         YES TFTP   up                    up
Tunnel64338            2.2.2.2         YES TFTP   up                    up
Tunnel64339            2.2.2.2         YES TFTP   up                    up

R2#show mpls forwarding-table
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
16         No Label   192.168.12.0/24[V]   \
                                       0             aggregate/MSSK
17         No Label   1.1.1.1/32[V]    3768          Fa2/0      192.168.12.1

R3#show mpls forwarding-table
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
16         Pop Label  2.2.2.2 64338 [7768]   \
                                       0             Fa2/0      192.168.35.5
17         Pop Label  6.6.6.6 64336 [2762]   \
                                       6801          Fa1/0      192.168.23.2
18         Pop Label  2.2.2.2 64339 [3399]   \
                                       4961          Fa1/1      192.168.36.6
R2#show ip route | inc Tunnel
O        3.3.3.3 [110/2] via 3.3.3.3, 00:19:55, Tunnel64336
O        4.4.4.4 [110/2] via 4.4.4.4, 00:19:55, Tunnel64337
O        5.5.5.5 [110/3] via 5.5.5.5, 00:19:45, Tunnel64338
O        6.6.6.6 [110/3] via 6.6.6.6, 00:19:45, Tunnel64339
O     192.168.35.0/24 [110/2] via 3.3.3.3, 00:19:55, Tunnel64336
O     192.168.36.0/24 [110/2] via 3.3.3.3, 00:19:55, Tunnel64336
O     192.168.45.0/24 [110/2] via 4.4.4.4, 00:19:55, Tunnel64337
O     192.168.56.0/24 [110/3] via 6.6.6.6, 00:19:45, Tunnel64339
                               [110/3] via 5.5.5.5, 00:19:45, Tunnel64338

R2#show mpls traffic-eng auto-tunnel mesh

Auto-Template1:

 Using mesh-group 10 to clone the following tunnel interfaces:

  Destination         Interface
  -----------         ---------

  3.3.3.3             Tunnel64336
  4.4.4.4             Tunnel64337
  5.5.5.5             Tunnel64338
  6.6.6.6             Tunnel64339

Mesh tunnel interface numbers: min 64336 max 65335

R6#show mpls traffic-eng auto-tunnel mesh

Auto-Template1:

 Using mesh-group 10 to clone the following tunnel interfaces:

  Destination         Interface
  -----------         ---------

  2.2.2.2             Tunnel64336
  3.3.3.3             Tunnel64337
  4.4.4.4             Tunnel64338
  5.5.5.5             Tunnel64339

Mesh tunnel interface numbers: min 64336 max 65335

If we checked the OSPF database for one of the PE routers (we are using two , one for the MPLS TE and one for the mesh-group)

  LS age: 1695
  Options: (No TOS-capability, DC)
  LS Type: Opaque Area Link
  Link State ID: 4.0.0.0
  Opaque Type: 4
  Opaque ID: 0
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000001
  Checksum: 0xE129
  Length: 32

    Capability Type: Mesh-group
    Length: 8
    Value:

    0000 000A 0202 0202

  LS age: 1686
  Options: (No TOS-capability, DC)
  LS Type: Opaque Area Link
  Link State ID: 4.0.0.0
  Opaque Type: 4
  Opaque ID: 0
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000001
  Checksum: 0xF50D
  Length: 32

    Capability Type: Mesh-group
    Length: 8
    Value:

    0000 000A 0303 0303

  LS age: 1681
  Options: (No TOS-capability, DC)
  LS Type: Opaque Area Link
  Link State ID: 4.0.0.0
  Opaque Type: 4
  Opaque ID: 0
  Advertising Router: 4.4.4.4
  LS Seq Number: 80000001
  Checksum: 0xAF0
  Length: 32

    Capability Type: Mesh-group
    Length: 8
    Value:

    0000 000A 0404 0404

  LS age: 1678
  Options: (No TOS-capability, DC)
  LS Type: Opaque Area Link
  Link State ID: 4.0.0.0
  Opaque Type: 4
  Opaque ID: 0
  Advertising Router: 5.5.5.5
  LS Seq Number: 80000001
  Checksum: 0x1ED4
  Length: 32

    Capability Type: Mesh-group
    Length: 8
    Value:

    0000 000A 0505 0505

  LS age: 1661
  Options: (No TOS-capability, DC)
  LS Type: Opaque Area Link
  Link State ID: 4.0.0.0
  Opaque Type: 4
  Opaque ID: 0
  Advertising Router: 6.6.6.6
  LS Seq Number: 80000001
  Checksum: 0x32B8
  Length: 32

    Capability Type: Mesh-group
    Length: 8
    Value:

    0000 000A 0606 0606

As can be seen the 0000 000A refers to the TLV which when decoded back to decimal equals to 10 (which is the mesh group number configured in the command mpls traffic-eng mesh-group 10 Loopback0 area 0 under the OSPF process)

No comments: