Lab 4: IOS-XR BGP with Sub-interfaces

hostname Router1
vrf portland
 address-family ipv4 unicast
  import route-target
   1:1
  !
  export route-target
   1:1
  !
 !
!
interface MgmtEth0/0/CPU0/0
 shutdown
!
interface GigabitEthernet0/0/0/0.10
 vrf portland
 ipv4 address 10.0.0.1 255.255.255.252
 encapsulation dot1q 10
!
interface GigabitEthernet0/0/0/1
 shutdown
!
interface GigabitEthernet0/0/0/2
 shutdown
!
router bgp 65000
 bgp router-id 1.1.1.1
 address-family ipv4 unicast
 !
 address-family vpnv4 unicast
 !
 vrf portland
  rd 1:1
  bgp router-id 1.1.1.1
  address-family ipv4 unicast
   network 10.0.0.0/30
  !
  neighbor 10.0.0.2
   remote-as 65000
   update-source GigabitEthernet0/0/0/0.10
   address-family ipv4 unicast
   !
  !
 !
!
end
hostname Router2
vrf portland
 address-family ipv4 unicast
  import route-target
   2:2
  !
  export route-target
   2:2
  !
 !
!
interface MgmtEth0/0/CPU0/0
 shutdown
!
interface GigabitEthernet0/0/0/0.10
 vrf portland
 ipv4 address 10.0.0.2 255.255.255.252
 encapsulation dot1q 10
!
interface GigabitEthernet0/0/0/1
 shutdown
!
interface GigabitEthernet0/0/0/2
 shutdown
!
router bgp 65000
 bgp router-id 2.2.2.2
 address-family ipv4 unicast
 !
 address-family vpnv4 unicast
 !
 vrf portland
  rd 2:2
  bgp router-id 2.2.2.2
  address-family ipv4 unicast
   network 10.0.0.0/30
  !
  neighbor 10.0.0.1
   remote-as 65000
   update-source GigabitEthernet0/0/0/0.10
   address-family ipv4 unicast
   !
  !
 !
!
end
RP/0/0/CPU0:Router2# show bgp vrf portland nei 10.0.0.1 nsr
Fri Nov 22 02:51:15.879 UTC

BGP neighbor is 10.0.0.1
  BGP state = Established, up for 01:34:31