Contents

L3 MPLS VPN - OSPF / RIP / EIGRP

   Apr 25, 2023     6 min read

L3 MPLS VPN - OSPF

Step 04. VRF 구성

사진첨부

  • vIOS5)
router ospf 1
network 192.168.10.2 0.0.0.0 area 0
network 2.2.12.1 0.0.0.0 area 0



  • vIOS6)
router ospf 1
network 192.168.11.2 0.0.0.0 area 0
network 22.2.12.1 0.0.0.0 area 0



  • vIOS7)
router ospf 2
network 192.168.20.2 0.0.0.0 area 0
network 3.3.12.2 0.0.0.0 area 0



  • vIOS8)
router ospf 2
network 192.168.21.2 0.0.0.0 area 0
network 33.2.12.2 0.0.0.0 area 0



  • vIOS1)
ip vrf A
rd 1:1
route-target 1:1

int g0/0
ip vrf forwarding A
ip add 2.2.12.2 255.255.255.0

ip vrf C
rd 3:3
route-target 3:3

int g0/2
ip vrf forwarding C
ip add 3.3.12.1 255.255.255.0



  • vIOS4)
ip vrf B
rd 2:2
route-target 2:2

int g0/1
ip vrf forwarding B
ip add 22.2.12.2 255.255.255.0

ip vrf D
rd 4:4
route-target 4:4

int g0/2
ip vrf forwarding D
ip add 33.2.12.1 255.255.255.0



Step 05. BGP를 이용해 VRF간 재분배 구성

  • vIOS1)
router ospf 1 vrf A
redistribute bgp 100 subnet
network 2.2.12.2 0.0.0.0 area 0

router ospf 2 vrf C
redistribute bgp 100 subnet
network 3.3.12.1 0.0.0.0 area 0

router bgp 100
address-family vpnv4
neighbor 1.1.4.4 activate
neighbor 1.1.4.4 send-community both

address-family ipv4 vrf A
redistribute ospf 1

address-family ipv4 vrf C
redistribute ospf 2


ip vrf A
route-target import 2:2

ip vrf C
route-target import 4:4



  • vIOS4)
router ospf 1 vrf B
redistribute bgp 100 subnet
network 22.2.12.2 0.0.0.0 area 0

router ospf 2 vrf D
redistribute bgp 100 subnet
network 33.2.12.1 0.0.0.0 area 0

router bgp 100
address-family vpnv4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community both

adderss-family ipv4 vrf B
redistribute ospf 1

address-family ipv4 vrf D
redistribute ospf 2


ip vrf B
route-target import 1:1

ip vrf D
route-target import 3:3



  • 결과) show bgp all

사진첨부

사진첨부

Step 06. BGP를 이용해 공인 네트워크 구성

사진첨부

  • vIOS13)
router bgp 200
neighbor 5.5.12.2 remote-as 100
network 192.168.30.0 mask 255.255.255.0



  • vIOS1)
router bgp 100
neighbor 5.5.12.1 remote-as 200
neighbor 1.1.4.4 next-hop-self



  • vIOS14)
router bgp 300
neighbor 6.6.12.1 remote-as 100
network 192.168.31.0 mask 255.255.255.0



  • vIOS4)
router bgp 100
neighbor 6.6.12.2 remote-as 300
neighbor 1.1.1.1 next-hop-self



  • 결과)

사진첨부
삼성은 삼성끼리 통신이 된다.

사진첨부
공인 네트워크는 공인 네트워크끼리 통신이 된다.

사진첨부
LG는 LG끼리 통신이 된다.

L3 MPLS VPN - RIP

사진첨부

Step 04.

  • vIOS5)
router rip
version 2
network 192.168.10.0
network 2.0.0.0
no auto-summary



  • vIOS6)
router rip
version 2
network 192.168.11.0
network 22.0.0.0
no auto-summary



  • vIOS7)
router rip
version 2
network 192.168.20.0
network 3.0.0.0
no auto-summary



  • vIOS8)
router rip
version 2
network 192.168.21.0
network 33.0.0.0
no auto-summary



Step 05.

  • vIOS1)
router rip
version 2

address-family ipv4 vrf A
network 2.0.0.0
redistribute bgp 100 metric 1
no auto-summary

address-family ipv4 vrf C
network 3.0.0.0
redistribute bgp 100 metric 1
no auto-summary

router bgp 100
address-family vpnv4
neighbor 1.1.4.4 activate
neighbor 1.1.4.4 send-community both

address-family ipv4 vrf A
redistribute rip

address-family ipv4 vrf C
redistribute rip

ip vrf A
route-target import 2:2

ip vrf C
route-target import 4:4



  • vIOS4)
router rip
version 2

address-family ipv4 vrf B
network 22.0.0.0
redistribute bgp 100 metric 1
no auto-summary

address-family ipv4 vrf D
network 33.0.0.0
redistribute bgp 100 metric 1
no auto-summary

router bgp 100
address-familiy vpnv4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community both

address-family ipv4 vrf B
redistribute rip

address-family ipv4 vrf D
redistribute rip

ip vrf B
route-target import 1:1

ip vrf D
route-target import 3:3



L3 MPLS VPN - EIGRP

Step 04.

  • vIOS5)
router eigrp 200
network 192.168.10.0
network 2.0.0.0
no auto-summary



  • vIOS6)
router eigrp 200
network 192.168.11.0
netowrk 22.0.0.0
no auto-summary



  • vIOS7)
router eigrp 300
network 192.168.20.0
network 3.0.0.0
no auto-summary



  • vIOS8)
router eigrp 300
network 192.168.21.0
network 33.0.0.0
no auto-summary



Step 05.

  • vIOS1)
router eigrp 23

address-family ipv4 vrf A autonomous-system 200
network 2.0.0.0
redistribute bgp 100 metric 1 1 1 1 1
no auto-summary

address-family ipv4 vrf C autonomous-system 300
network 3.0.0.0
redistribute bgp 100 metric 1 1 1 1 1
no auto-summary

router bgp 100
address-family vpnv4
neighbor 1.1.4.4 activate
neighbor 1.1.4.4 send-community

address-family ipv4 vrf A
redistribute eigrp 200

address-family ipv4 vrf C
redistribute eigrp 300



  • vIOS4)
router eigrp 32
address-family ipv4 vrf B autonomous-system 200
network 22.0.0.0
redistribute bgp 100 metric 1 1 1 1 1
no auto-summary

address-family ipv4 vrf D autonomous-system 300
network 33.0.0.0
redistribute bgp 100 metric 1 1 1 1 1
no auto-summary

router bgp 100
address-family vpnv4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community both

address-family ipv4 vrf B
redistribute eigrp 200

address-famil ipv4 vrf D
redistribute eigrp 300