VPN OSPF ROUTE TYPE / ROUTER ID / DOMAIN ID

TASK

MPLS-VPN でPE-CEがOSPFの時、MP-BGPで運ばれる拡張コミュニティを理解する(★は別途確認)

NOTE

(1)OSPF RT(ROUTE TYPE)

OSPF RT:0.0.0.0:2:0

  • 最初の0.0.0.0はエリア番号(32ビット)、inter-areaとexternalは0になるらしい
  • 次の2はLSAタイプ(タイプは1,2,3,5,7,129(sham-link))
  • 最後の0はLSAタイプが5/7の時、0がE1/N1、1がE2/N2

(2)OSPF ROUTER ID

OSPF ROUTER ID:192.168.0.2:0

  • 192.168.0.2はPEのVRF OSPFルータID
  • 最後の0は未使用

(3)OSPF DOMAIN ID

OSPF DOMAIN ID:0x0005:0x000000630200

  • 8バイト(2バイト:6バイト)
  • 最初の2バイトは0x0005 or 0x0105 or 0x0205 or 0x8005があり、0x0005がデフォルト
  • 次の2バイトは0000は未使用
  • 次の2バイトは0063はOSPFプロセスID
  • 最後の2バイトは0200 は固定値のようだが詳細確認できず★

DIAGRAM

 

VERIFY

R1#sh bgp vpnv4 uni rd 65099:12 192.168.120.12/32
BGP routing table entry for 65099:12:192.168.120.12/32, version 11
Paths: (1 available, best #1, no table)
  Advertised to update-groups:
     1
  Refresh Epoch 1
  Local, (Received from a RR-client)
    10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2)
      Origin incomplete, metric 2, localpref 100, valid, internal, best
      Extended Community: RT:65000:65099 OSPF DOMAIN ID:0x0005:0x000000630200
        OSPF RT:0.0.0.0:2:0 OSPF ROUTER ID:192.168.0.2:0
      mpls labels in/out nolabel/24
      rx pathid: 0, tx pathid: 0x0
R1#
R1#sh bgp vpnv4 uni rd 65099:13 192.168.130.13/32
BGP routing table entry for 65099:13:192.168.130.13/32, version 7
Paths: (1 available, best #1, no table)
  Advertised to update-groups:
     1
  Refresh Epoch 1
  Local, (Received from a RR-client)
    10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3)
      Origin incomplete, metric 2, localpref 100, valid, internal, best
      Extended Community: RT:65000:65099 OSPF DOMAIN ID:0x0005:0x000000630200
        OSPF RT:0.0.0.0:3:0 OSPF ROUTER ID:192.168.0.3:0
      mpls labels in/out nolabel/25
      rx pathid: 0, tx pathid: 0x0
R1#
R1#sh bgp vpnv4 uni rd 65099:14 192.168.141.14/32
BGP routing table entry for 65099:14:192.168.141.14/32, version 16
Paths: (1 available, best #1, no table)
  Advertised to update-groups:
     1
  Refresh Epoch 1
  Local, (Received from a RR-client)
    10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4)
      Origin incomplete, metric 21, localpref 100, valid, internal, best
      Extended Community: RT:65000:65099 OSPF DOMAIN ID:0x0005:0x000000630200
        OSPF RT:0.0.0.0:5:0 OSPF ROUTER ID:192.168.0.4:0
      mpls labels in/out nolabel/25
      rx pathid: 0, tx pathid: 0x0
R1#
R1#sh bgp vpnv4 uni rd 65099:14 192.168.142.14/32
BGP routing table entry for 65099:14:192.168.142.14/32, version 17
Paths: (1 available, best #1, no table)
  Advertised to update-groups:
     1
  Refresh Epoch 1
  Local, (Received from a RR-client)
    10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4)
      Origin incomplete, metric 20, localpref 100, valid, internal, best
      Extended Community: RT:65000:65099 OSPF DOMAIN ID:0x0005:0x000000630200
        OSPF RT:0.0.0.0:5:1 OSPF ROUTER ID:192.168.0.4:0
      mpls labels in/out nolabel/26
      rx pathid: 0, tx pathid: 0x0
R1#
R1#sh bgp vpnv4 uni rd 65099:15 192.168.151.15/32
BGP routing table entry for 65099:15:192.168.151.15/32, version 20
Paths: (1 available, best #1, no table)
  Advertised to update-groups:
     1
  Refresh Epoch 1
  Local, (Received from a RR-client)
    10.0.0.5 (metric 2) from 10.0.0.5 (10.0.0.5)
      Origin incomplete, metric 21, localpref 100, valid, internal, best
      Extended Community: RT:65000:65099 OSPF DOMAIN ID:0x0005:0x000000630200
        OSPF RT:255.255.255.255:7:0 OSPF ROUTER ID:192.168.0.5:0
      mpls labels in/out nolabel/25
      rx pathid: 0, tx pathid: 0x0
R1#
R1#sh bgp vpnv4 uni rd 65099:15 192.168.152.15/32
BGP routing table entry for 65099:15:192.168.152.15/32, version 21
Paths: (1 available, best #1, no table)
  Advertised to update-groups:
     1
  Refresh Epoch 1
  Local, (Received from a RR-client)
    10.0.0.5 (metric 2) from 10.0.0.5 (10.0.0.5)
      Origin incomplete, metric 20, localpref 100, valid, internal, best
      Extended Community: RT:65000:65099 OSPF DOMAIN ID:0x0005:0x000000630200
        OSPF RT:255.255.255.255:7:1 OSPF ROUTER ID:192.168.0.5:0
      mpls labels in/out nolabel/26
      rx pathid: 0, tx pathid: 0x0
R1#

CONFIG

hostname R1
!
interface Loopback0
 ip address 10.0.0.1 255.255.255.255
 ip ospf 1 area 0
!
interface FastEthernet0/0
 ip address 10.1.2.1 255.255.255.0
 ip ospf 1 area 0
 no shutdown
!
interface FastEthernet1/0
 ip address 10.1.3.1 255.255.255.0
 ip ospf 1 area 0
 no shutdown
!
interface FastEthernet2/0
 ip address 10.1.4.1 255.255.255.0
 ip ospf 1 area 0
 no shutdown
!
interface FastEthernet3/0
 ip address 10.1.5.1 255.255.255.0
 ip ospf 1 area 0
 no shutdown
!
router ospf 1
 mpls ldp autoconfig
 router-id 10.0.0.1
!
router bgp 65000
 bgp router-id 10.0.0.1
 no bgp default ipv4-unicast
 neighbor iBGP peer-group
 neighbor iBGP remote-as 65000
 neighbor iBGP update-source Loopback0
 neighbor 10.0.0.2 peer-group iBGP
 neighbor 10.0.0.3 peer-group iBGP
 neighbor 10.0.0.4 peer-group iBGP
 neighbor 10.0.0.5 peer-group iBGP
 !
 address-family vpnv4
  neighbor iBGP send-community both
  neighbor iBGP route-reflector-client
  neighbor 10.0.0.2 activate
  neighbor 10.0.0.3 activate
  neighbor 10.0.0.4 activate
  neighbor 10.0.0.5 activate
 exit-address-family
!
mpls ldp router-id Loopback0 force
!
end
hostname R2
!
ip vrf VPN-A
 rd 65099:12
 route-target export 65000:65099
 route-target import 65000:65099
!
interface Loopback0
 ip address 10.0.0.2 255.255.255.255
 ip ospf 1 area 0
!
interface FastEthernet0/0
 ip address 10.1.2.2 255.255.255.0
 ip ospf 1 area 0
 no shutdown
!
interface FastEthernet1/0
 ip vrf forwarding VPN-A
 ip address 10.2.12.2 255.255.255.0
 ip ospf 99 area 0
 no shutdown
!
router ospf 99 vrf VPN-A
 router-id 192.168.0.2
 redistribute bgp 65000 subnets
!
router ospf 1
 mpls ldp autoconfig
 router-id 10.0.0.2
!
router bgp 65000
 bgp router-id 10.0.0.2
 no bgp default ipv4-unicast
 neighbor 10.0.0.1 remote-as 65000
 neighbor 10.0.0.1 update-source Loopback0
 !
 address-family vpnv4
  neighbor 10.0.0.1 activate
  neighbor 10.0.0.1 send-community both
 exit-address-family
 !
 address-family ipv4 vrf VPN-A
  redistribute ospf 99
 exit-address-family
!
mpls ldp router-id Loopback0 force
!
end
hostname R3
!
ip vrf VPN-A
 rd 65099:13
 route-target export 65000:65099
 route-target import 65000:65099
!
interface Loopback0
 ip address 10.0.0.3 255.255.255.255
 ip ospf 1 area 0
!
interface FastEthernet0/0
 ip address 10.1.3.3 255.255.255.0
 ip ospf 1 area 0
 no shutdown
!
interface FastEthernet1/0
 ip vrf forwarding VPN-A
 ip address 10.3.13.3 255.255.255.0
 ip ospf 99 area 0
 no shutdown
!
router ospf 99 vrf VPN-A
 router-id 192.168.0.3
 redistribute bgp 65000 subnets
!
router ospf 1
 mpls ldp autoconfig
 router-id 10.0.0.3
!
router bgp 65000
 bgp router-id 10.0.0.3
 no bgp default ipv4-unicast
 neighbor 10.0.0.1 remote-as 65000
 neighbor 10.0.0.1 update-source Loopback0
 !
 address-family vpnv4
  neighbor 10.0.0.1 activate
  neighbor 10.0.0.1 send-community both
 exit-address-family
 !
 address-family ipv4 vrf VPN-A
  redistribute ospf 99
 exit-address-family
!
mpls ldp router-id Loopback0 force
!
end
hostname R4
!
ip vrf VPN-A
 rd 65099:14
 route-target export 65000:65099
 route-target import 65000:65099
!
interface Loopback0
 ip address 10.0.0.4 255.255.255.255
 ip ospf 1 area 0
!
interface FastEthernet0/0
 ip address 10.1.4.4 255.255.255.0
 ip ospf 1 area 0
 no shutdown
!
interface FastEthernet1/0
 ip vrf forwarding VPN-A
 ip address 10.4.14.4 255.255.255.0
 ip ospf 99 area 255
 no shutdown
!
router ospf 99 vrf VPN-A
 router-id 192.168.0.4
 redistribute bgp 65000 subnets
!
router ospf 1
 mpls ldp autoconfig
 router-id 10.0.0.4
!
router bgp 65000
 bgp router-id 10.0.0.4
 no bgp default ipv4-unicast
 neighbor 10.0.0.1 remote-as 65000
 neighbor 10.0.0.1 update-source Loopback0
 !
 address-family vpnv4
  neighbor 10.0.0.1 activate
  neighbor 10.0.0.1 send-community both
 exit-address-family
 !
 address-family ipv4 vrf VPN-A
  redistribute ospf 99 match internal external 1 external 2
 exit-address-family
!
mpls ldp router-id Loopback0 force
!
end
hostname R5
!
ip vrf VPN-A
 rd 65099:15
 route-target export 65000:65099
 route-target import 65000:65099
!
interface Loopback0
 ip address 10.0.0.5 255.255.255.255
 ip ospf 1 area 0
!
interface FastEthernet0/0
 ip address 10.1.5.5 255.255.255.0
 ip ospf 1 area 0
 no shutdown
!
interface FastEthernet1/0
 ip vrf forwarding VPN-A
 ip address 10.5.15.5 255.255.255.0
 ip ospf 99 area 4294967295
 no shutdown
!
router ospf 99 vrf VPN-A
 router-id 192.168.0.5
 area 4294967295 nssa
 redistribute bgp 65000 subnets
!
router ospf 1
 mpls ldp autoconfig
 router-id 10.0.0.5
!
router bgp 65000
 bgp router-id 10.0.0.5
 no bgp default ipv4-unicast
 neighbor 10.0.0.1 remote-as 65000
 neighbor 10.0.0.1 update-source Loopback0
 !
 address-family vpnv4
  neighbor 10.0.0.1 activate
  neighbor 10.0.0.1 send-community both
 exit-address-family
 !
 address-family ipv4 vrf VPN-A
  redistribute ospf 99 match internal nssa-external 1 nssa-external 2
 exit-address-family
!
mpls ldp router-id Loopback0 force
!
end
hostname R12
!
interface Loopback120
 ip address 192.168.120.12 255.255.255.255
 ip ospf 99 area 0
!
interface FastEthernet0/0
 ip address 10.2.12.12 255.255.255.0
 ip ospf 99 area 0
 no shutdown
!
router ospf 99
 router-id 192.168.0.12
!
end
hostname R13
!
interface Loopback130
 ip address 192.168.130.13 255.255.255.255
 ip ospf 99 area 13
!
interface FastEthernet0/0
 ip address 10.3.13.13 255.255.255.0
 ip ospf 99 area 0
 no shutdown
!
router ospf 99
 router-id 192.168.0.13
!
end
hostname R14
!
interface Loopback141
 ip address 192.168.141.14 255.255.255.255
!
interface Loopback142
 ip address 192.168.142.14 255.255.255.255
!
interface FastEthernet0/0
 ip address 10.4.14.14 255.255.255.0
 ip ospf 99 area 255
 no shutdown
!
router ospf 99
 router-id 192.168.0.14
 redistribute connected subnets route-map CON-INTO-OSPF
!
route-map CON-INTO-OSPF permit 10
 match interface Loopback141
 set metric-type type-1
!
route-map CON-INTO-OSPF permit 20
 match interface Loopback142
 set metric-type type-2
!
end
hostname R15
!
interface Loopback151
 ip address 192.168.151.15 255.255.255.255
!
interface Loopback152
 ip address 192.168.152.15 255.255.255.255
!
interface FastEthernet0/0
 ip address 10.5.15.15 255.255.255.0
 ip ospf 99 area 4294967295
 no shutdown
!
router ospf 99
 router-id 192.168.0.15
 area 4294967295 nssa
 redistribute connected subnets route-map CON-INTO-OSPF
!
route-map CON-INTO-OSPF permit 10
 match interface Loopback151
 set metric-type type-1
!
route-map CON-INTO-OSPF permit 20
 match interface Loopback152
 set metric-type type-2
!
end

コメント