Date created: Saturday, June 18, 2016 3:27:31 PM. Last modified: Saturday, June 18, 2016 3:27:31 PM

Inter-AS MPLS OptionAB

Inter-AS OptAB example, using a single MP-eBGP session for signalling and a VLAN sub-interface per L3VPN forwarding path:

PE1:

ip vrf VRF1
 rd 10.0.0.1:1
 route-target export 100:1
 route-target export 200:1
 route-target import 100:1
!
ip vrf VRF2
 rd 10.0.0.1:2
 route-target export 100:2
 route-target export 200:2
 route-target import 100:2
!
interface Loopback0
 ip address 10.0.0.1 255.255.255.255
 ip ospf 1 area 0
!
interface FastEthernet0/0
 description Link to ASBR2-IOS
 ip address 10.0.13.1 255.255.255.0
 ip ospf network point-to-point
 ip ospf 1 area 0
 mpls ip
!
interface FastEthernet1/0
 description Link to VRF1-CE1
 ip vrf forwarding VRF1
 ip address 192.168.1.2 255.255.255.252
!
interface FastEthernet1/1
 description Link to VRF2-CE1
 ip vrf forwarding VRF2
 ip address 192.168.2.2 255.255.255.252
!
router ospf 1
 router-id 10.0.0.1
 passive-interface default
 no passive-interface FastEthernet0/0
!
router bgp 100
 bgp router-id 10.0.0.1
 bgp log-neighbor-changes
 neighbor 10.0.0.3 remote-as 100
 neighbor 10.0.0.3 update-source Loopback0
 !
 address-family vpnv4
  neighbor 10.0.0.3 activate
  neighbor 10.0.0.3 send-community both
  neighbor 10.0.0.3 next-hop-self
 exit-address-family
 !
 address-family ipv4 vrf VRF1
  redistribute connected
 exit-address-family
 !
 address-family ipv4 vrf VRF2
  redistribute connected
 exit-address-family

ASBR2:

ip vrf VRF1
 rd 10.0.0.3:1
 inter-as-hybrid next-hop 10.1.0.2
 route-target export 100:1
 route-target import 100:1
!
ip vrf VRF2
 rd 10.0.0.3:2
 inter-as-hybrid next-hop 10.2.0.2
 route-target export 100:2
 route-target import 100:2
!
interface Loopback0
 ip address 10.0.0.3 255.255.255.255
 ip ospf 1 area 0
!
interface FastEthernet0/0
 description Link to PE1
 ip address 10.0.13.3 255.255.255.0
 ip ospf network point-to-point
 ip ospf 1 area 0
 mpls ip
!
interface FastEthernet0/1
 description Link to ASBR-N
 ip address 10.0.34.3 255.255.255.0
 mpls bgp forwarding
!
interface FastEthernet0/1.10
 encapsulation dot1Q 10
 ip vrf forwarding VRF1
 ip address 10.1.0.1 255.255.255.252
!
interface FastEthernet0/1.20
 encapsulation dot1Q 20
 ip vrf forwarding VRF2
 ip address 10.2.0.1 255.255.255.252
!
router ospf 1
 router-id 10.0.0.3
 passive-interface default
 no passive-interface FastEthernet0/0
!
router bgp 100
 bgp router-id 10.0.0.3
 bgp log-neighbor-changes
 no bgp default ipv4-unicast
 neighbor 10.0.0.1 remote-as 100
 neighbor 10.0.0.1 update-source Loopback0
 neighbor 10.0.34.4 remote-as 200
 !
 address-family vpnv4
  no bgp default route-target filter
  neighbor 10.0.0.1 activate
  neighbor 10.0.0.1 send-community both
  neighbor 10.0.0.1 next-hop-self
  neighbor 10.0.34.4 activate
  neighbor 10.0.34.4 send-community both
  neighbor 10.0.34.4 next-hop-self
  neighbor 10.0.34.4 inter-as-hybrid
 exit-address-family

ASBR-N:

ip vrf VRF1
 rd 10.0.1.1:1
 inter-as-hybrid next-hop 10.1.0.1
 route-target export 200:1
 route-target export 100:1
 route-target import 200:1
!
ip vrf VRF2
 rd 10.0.1.1:2
 inter-as-hybrid next-hop 10.2.0.1
 route-target export 200:2
 route-target export 100:2
 route-target import 200:2
!
interface Loopback0
 ip address 10.0.1.1 255.255.255.255
!
interface FastEthernet0/1
 description Link to ASBR2-IOS
 ip address 10.0.34.4 255.255.255.0
 mpls bgp forwarding
!
interface FastEthernet0/1.10
 encapsulation dot1Q 10
 ip vrf forwarding VRF1
 ip address 10.1.0.2 255.255.255.252
!
interface FastEthernet0/1.20
 encapsulation dot1Q 20
 ip vrf forwarding VRF2
 ip address 10.2.0.2 255.255.255.252
!
interface FastEthernet1/0
 description Link to VRF1-CE2
 ip vrf forwarding VRF1
 ip address 192.168.3.2 255.255.255.252
!
interface FastEthernet1/1
 description Link to VRF2-CE2
 ip vrf forwarding VRF2
 ip address 192.168.4.2 255.255.255.252
!
router bgp 200
 bgp router-id 10.0.1.1
 bgp log-neighbor-changes
 neighbor 10.0.34.3 remote-as 100
 !
 address-family vpnv4
  neighbor 10.0.34.3 activate
  neighbor 10.0.34.3 send-community both
  neighbor 10.0.34.3 next-hop-self
  neighbor 10.0.34.3 inter-as-hybrid
 exit-address-family
 !
 address-family ipv4 vrf VRF1
  redistribute connected
 exit-address-family
 !
 address-family ipv4 vrf VRF2
  redistribute connected
 exit-address-family