MPLS L3VPN CLI 설정
Router1
interface Loopback0 ipv4 address 1.1.1.1 255.255.255.255 ! interface GigabitEthernet0/0/0/0 vrf RED ipv4 address 10.1.14.1 255.255.255.0 ! interface GigabitEthernet0/0/0/1 vrf BLUE ipv4 address 10.1.15.1 255.255.255.0 ! interface GigabitEthernet0/0/0/2 ipv4 address 10.1.13.1 255.255.255.0 ! ! router ospf 1 network point-to-point area 0 interface Loopback0 ! interface GigabitEthernet0/0/0/2 ! ! ! mpls ldp interface GigabitEthernet0/0/0/2 ! ! vrf RED address-family ipv4 unicast import route-target 1:1 ! export route-target 1:1 ! ! vrf BLUE address-family ipv4 unicast import route-target 2:2 ! export route-target 2:2 ! ! ! VRF에 대한 스태틱 라우트 설정 router static vrf RED address-family ipv4 unicast 4.4.4.4/32 10.1.14.4 ! ! vrf BLUE address-family ipv4 unicast 5.5.5.5/32 10.1.15.5 ! ! ! BGP 설정 router bgp 100 bgp router-id 1.1.1.1 ! address-family vpnv4 unicast ! session-group IBGP remote-as 100 update-source Loopback0 ! neighbor-group IGBP use session-group IBGP address-family vpnv4 unicast next-hop-self soft-reconfiguration inbound always ! ! neighbor 2.2.2.2 use neighbor-group IGBP ! vrf RED rd 1:1 address-family ipv4 unicast redistribute connected redistribute static ! ! vrf BLUE rd 2:2 address-family ipv4 unicast redistribute connected redistribute static ! !
Router2
interface Loopback0 ipv4 address 2.2.2.2 255.255.255.255 ! interface GigabitEthernet0/0/0/0 ipv4 address 10.1.13.2 255.255.255.0 ! interface GigabitEthernet0/0/0/1 vrf RED ipv4 address 10.1.26.2 255.255.255.0 ! interface GigabitEthernet0/0/0/2 vrf BLUE ipv4 address 10.1.27.2 255.255.255.0 ! ! router ospf 1 network point-to-point area 0 interface Loopback0 ! interface GigabitEthernet0/0/0/0 ! ! ! mpls ldp interface GigabitEthernet0/0/0/0 ! ! vrf RED address-family ipv4 unicast import route-target 1:1 ! export route-target 1:1 ! ! vrf BLUE address-family ipv4 unicast import route-target 2:2 ! export route-target 2:2 ! ! ! VRF에 대한 스태틱 라우트 설정 router static vrf RED address-family ipv4 unicast 6.6.6.6/32 10.1.26.6 ! ! vrf BLUE address-family ipv4 unicast 7.7.7.7/32 10.1.27.7 ! ! ! BGP 설정 router bgp 100 bgp router-id 2.2.2.2 address-family ipv4 unicast ! address-family vpnv4 unicast ! session-group IBGP remote-as 100 update-source Loopback0 ! neighbor-group IGBP use session-group IBGP address-family vpnv4 unicast ! ! neighbor 1.1.1.1 use neighbor-group IGBP ! vrf RED rd 1:1 address-family ipv4 unicast redistribute connected redistribute static ! ! vrf BLUE rd 2:2 address-family ipv4 unicast redistribute static ! !
설정확인
RP/0/RP0/CPU0:ios#show bgp vpnv4 unicast summary Tue Jul 22 02:04:28.501 UTC BGP router identifier 2.2.2.2, local AS number 100 BGP generic scan interval 60 secs Non-stop routing is enabled BGP table state: Active Table ID: 0x0 RD version: 0 BGP main routing table version 7 BGP NSR Initial initsync version 5 (Reached) BGP NSR/ISSU Sync-Group versions 0/0 BGP scan interval 60 secs BGP is operating in STANDALONE mode. Process RcvTblVer bRIB/RIB LabelVer ImportVer SendTblVer StandbyVer Speaker 7 7 7 7 7 0 Neighbor Spk AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down St/PfxRcd 1.1.1.1 0 100 5 5 7 0 0 00:02:08 0
RP/0/RP0/CPU0:ios#show ospf neighbor Tue Jul 22 02:03:34.818 UTC * Indicates MADJ interface # Indicates Neighbor awaiting BFD session up Neighbors for OSPF 1 Neighbor ID Pri State Dead Time Address Interface 1.1.1.1 1 FULL/ - 00:00:34 10.1.13.1 GigabitEthernet0/0/0/0 Neighbor is up for 00:01:21 Total neighbor count: 1