
MPLS VPN
정의
- Overlay VPN과 P2P VPN 기술의 장점을 결합하여 만든 VPN
- PE가 고객의 라우팅에 참여
- 고객들의 라우팅 정보를 VRF를 이용하여 완벽히 분리
- RD, RT 값을 이용하여 1:1, 1:n 구성 가능
- VPN Site 추가가 쉽고 Provisioning 제공 쉬움
- Overlay VPN
- 서비스에 대한 책임 소재가 명확
- 구현 용이
- 확장성에 문제가 있음
- Peer-to-Peer
- 고객 기준 최적의 라우팅 경로 보장
- Provisioning 및 좋은 확장성
- 중복된 경로에 대한 필터링 필요
- 고객들을 위한 보안설정 작업 필요
VRF Table
- 하나의 라우터에 가상의 라우팅 테이블을 생성하여 별도로 관리
- 해당 기술을 통해 고객들의 네트워크 간 중첩, 중복이 발생하지 않음
- PE 라우터에서 주로 사용하고, BGP를 통해 외부 네트워크와 통신한다고 가정했을 때
- 각 VRF마다 RD라는 인자를 만들어 중복 경로 구분
- 1:1 10.0.0.0/8 2:2 10.0.0.0/8
- 두 경로는 주소가 같지만 RD 값이 다르기 때문에 다른 경로로 인식
RD(Route Distinguishers)
- IP 정보에 붙어 유일 주소를 생성
- IP에 64 bit 값으로 추가되어 유일한 주소 생성
- VPNv4는 BGP를 통해 PE 라우터 사이의 주소 정보 전달
- BGP는 다양한 주소 체계 정보 전달 가능
- MP-BGP(Multi Protocol-BGP)라고도 함
- IPv6에도 동일한 규칙 적용
- 주소를 유일하게 만드는 역할만 수행
- 하나의 주소에는 하나의 값만 사용 가능
- 한 네트워크에 하나만 붙을 수 있음
RT(Route Targets)
- RD는 하나 이상의 VPN에 참여 불가
- RT는 더 복잡한 VPN 토폴로지 지원
- 둘 이상의 VPN에서 사용 가능
- 어느 VPN에 속해 있는지 표시하는 Attribute를 생성
- 해당 속성 항목을 인코딩 하기 위해서 Extended Communities를 사용
- Export RT
- VPN membership 정의
- IPv4에서 VPNv4로 변환될 때 추가됨
- Import RT
- 수신한 트래픽 정보에서 RT를 확인한 후 설정과 일치하는 경우에만 수신
- 어느 VPN과 통신해야 하는지 결정
MPLS VPN Routing 요구사항
- CE(Customer Edge) 라우터는 표준 IP 라우팅 소프트웨어를 사용해야 함
- PE(Provider Edge) 라우터는 MPLS VPN 서비스와 IP 라우팅을 지원해야 함
- P(Provider) 라우터는 고객 VPN 라우팅에 연관되어 있어야 함
MPLS VPNs and Label Propagation
- VPN label은 BGP next hop에 의해 할당되어야 함
- BP-IBGP 업데이트 홍보 중 BGP next hop이 바뀌면 안 됨
- Confederation 영역에서는 next-hop-self 명령을 사용하지 않음
- PE 라우터에서 next-hop-self 명령을 사용해야 함
Implementing MPLS Layer 3 VPN Backbones
VPN-Aware Routing Protocols
- Routing Context
- Routing Protocol run in one VRF
- VPN-Aware routing protocol의 지원을 받음
- External BGP, EIGRP, RIPv2, IS-IS, static routes
- 인스턴스로 나누든 프로세스로 나누든 각각 독립적으로 동작
VRF Table
- 어떤 경로들을 특정 site와 통신할 수 있도록 export 할 것인가 import 할 것인가 결정하는 데에 사용
- 인터페이스를 할당할 때, 하나의 VRF에는 여러 인터페이스가 할당될 수 있지만 하나의 인터페이스에 여러 VRF를 할당할 수는 없음
- 하나의 인터페이스에 여러 VRF를 연동하고 싶다면 subinterface로 나누어 할당
BGP Route Propagation - Outbound

- 외부에서 고객한테 BGP로 정보 전달받으면, BGP로 받은 정보가 VRF Table에 내려감
- 이를 VPNv4 주소로 가지고 오면서 RD 값 추가
- Export RT 값 부착
BGP Route Propagation - Inbound

- 외부에서 네트워크 정보가 들어오면 Import RT 값 확인 후 VRF 테이블로 내려감
- IPv4에 넣어주기 위해 RT, RD 값 제거
Non-BGP(IGP) Route Propagation - Outbound
- IGP를 돌리고 있을 때, 직접 VPNv4 테이블로 가지고 올 수 없기 때문에 VRF마다 BGP가 Default로 동작
- IGP IPv4가 BGP IPv4로 redirection되고, RD RT 값이 붙어서 VPNv4로 전달됨
MP-BGP
- 오직 Edge Router에서만 설정되어야 함
- MPLS VPN이 활성화되어 있어야 함
- 설정 단계가 있음
- address family VPNv4 추가
- address family VPNv4에서 neighbor 활성화
- 선택적 구성
BGP Address family
- 전역적 BGP 경로들은 기존의 BGP 셋업을 통해 교환됨
BGP Neighbors
LAB(VRF)


C2_R1컨피그
C2_R1
Building configuration...
Current configuration : 1657 bytes
!
! Last configuration change at 05:00:59 UTC Fri Sep 20 2024
!
version 15.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname C2_R1
!
boot-start-marker
boot-end-marker
!
!
vrf definition A
rd 3:3
!
address-family ipv4
exit-address-family
!
vrf definition B
rd 4:4
!
address-family ipv4
exit-address-family
!
!
no aaa new-model
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
!
!
!
!
!
!
!
!
!
!
!
!
no ip domain lookup
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
redundancy
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 21.21.21.21 255.255.255.255
!
interface Loopback1
vrf forwarding A
ip address 1.1.1.1 255.255.255.255
ip ospf 1 area 0
!
interface Loopback2
vrf forwarding B
ip address 2.2.2.2 255.255.255.255
ip ospf 2 area 0
!
interface Ethernet0/0
vrf forwarding A
ip address 202.2.21.2 255.255.255.252
ip ospf 1 area 0
!
interface Ethernet0/1
vrf forwarding B
ip address 202.2.21.6 255.255.255.252
ip ospf 2 area 0
!
interface Ethernet0/2
no ip address
shutdown
!
interface Ethernet0/3
no ip address
shutdown
!
router ospf 1 vrf A
capability vrf-lite
network 0.0.0.0 255.255.255.255 area 0
!
router ospf 2 vrf B
capability vrf-lite
network 0.0.0.0 255.255.255.255 area 0
!
router rip
version 2
network 202.2.21.0
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 202.2.21.1
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
transport input none
!
____________________________________________________________
R9 컨피그
R9(config-if)#do show run
Building configuration...
Current configuration : 1945 bytes
!
version 15.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R9
!
boot-start-marker
boot-end-marker
!
!
vrf definition A
rd 1:1
route-target export 1:1
route-target import 2:2
!
address-family ipv4
exit-address-family
!
!
no aaa new-model
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
!
!
!
!
!
!
!
!
!
!
!
!
no ip domain lookup
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
redundancy
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 102.102.102.9 255.255.255.255
ip ospf 1 area 0
!
interface Ethernet0/0
no ip address
ip ospf 1 area 0
shutdown
!
interface Ethernet0/1
ip address 102.102.89.9 255.255.255.0
ip ospf 1 area 0
mpls ip
!
interface Ethernet0/2
ip address 102.102.129.9 255.255.255.0
ip ospf 1 area 0
mpls ip
!
interface Ethernet0/3
no ip address
shutdown
!
interface Ethernet1/0
vrf forwarding A
ip address 202.2.21.1 255.255.255.252
!
interface Ethernet1/1
no ip address
shutdown
!
interface Ethernet1/2
no ip address
shutdown
!
interface Ethernet1/3
no ip address
shutdown
!
router ospf 1
!
router ospf 10 vrf A
redistribute bgp 1 subnets
network 0.0.0.0 255.255.255.255 area 0
!
router rip
version 2
network 202.2.21.0
!
router bgp 1
bgp log-neighbor-changes
neighbor 102.102.102.12 remote-as 1
neighbor 102.102.102.12 update-source Loopback0
!
address-family vpnv4
neighbor 102.102.102.12 activate
neighbor 102.102.102.12 send-community extended
neighbor 102.102.102.12 next-hop-self
exit-address-family
!
address-family ipv4 vrf A
redistribute ospf 10 match internal external 1 external 2
exit-address-family
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
transport input none
!
!
____________________________________________________________
R12컨피그
R12(config)#
R12(config)#DO SHOW RUN
Building configuration...
Current configuration : 1908 bytes
!
version 15.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R12
!
boot-start-marker
boot-end-marker
!
!
vrf definition B
rd 2:2
route-target export 2:2
route-target import 1:1
!
address-family ipv4
exit-address-family
!
!
no aaa new-model
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
!
!
!
!
!
!
!
!
!
!
!
!
no ip domain lookup
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
redundancy
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 102.102.102.12 255.255.255.255
ip ospf 1 area 0
!
interface Ethernet0/0
no ip address
ip ospf 1 area 0
shutdown
!
interface Ethernet0/1
ip address 102.102.112.12 255.255.255.0
ip ospf 1 area 0
!
interface Ethernet0/2
ip address 102.102.129.12 255.255.255.0
ip ospf 1 area 0
mpls ip
!
interface Ethernet0/3
ip address 102.105.129.12 255.255.255.0
!
interface Ethernet1/0
vrf forwarding B
ip address 202.2.21.5 255.255.255.252
!
interface Ethernet1/1
no ip address
shutdown
!
interface Ethernet1/2
no ip address
shutdown
!
interface Ethernet1/3
no ip address
shutdown
!
router ospf 10 vrf B
redistribute bgp 1 subnets
network 0.0.0.0 255.255.255.255 area 0
!
router ospf 1
!
router bgp 1
bgp log-neighbor-changes
neighbor 102.102.102.9 remote-as 1
neighbor 102.102.102.9 update-source Loopback0
!
address-family vpnv4
neighbor 102.102.102.9 activate
neighbor 102.102.102.9 send-community extended
neighbor 102.102.102.9 next-hop-self
exit-address-family
!
address-family ipv4 vrf B
redistribute ospf 10 match internal external 1 external 2
exit-address-family
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
transport input none
!
!
LAB 2(Route Reflector)


- config 정리
- R1과 R9은 config 형태 동일
as-override
- 만약 BGP 과정 중에서 같은 AS 번호를 지닌 기기끼리 통신할 경우 출발 지역의 AS 번호가 AS Path 속성에 추가되는 것이 아닌 ISP의 AS를 대신 넣어 같은 AS 번호의 기기끼리 정보를 주고 받을 수 있게 해 주는 옵션
allows-in
- as-override와 같이 같은 AS끼리 통신이 가능하도록 돕는 옵션
- override와의 차이점은 출발지 AS 번호를 그대로 달고 통신해도 무방하다는 점
SOO(Site of Original)
- Loop를 막기 위한 설정
- EIGRP에서 TLV를 늘려 BGP의 SOO값을 인식하게 만듦
- SOO는 extended community
- site마다 SOO값이 달라야 함(SOO 값이 같으면 통신 불가능)
- 무조건 inbound로 동작
- EIGRP를 사용하는 경우 PE 장비에서 추가 설정이 필요
- PE 장비에서 EIGRP를 동작하려면 SOO 기능 필요

- process-id는 as와 동일하지 않아도 됨
- address family 설정에서 해당 VRF는 특정 as로 동작하겠다는 설정만 있으면 됨
LAB 3(EIGRP, allowas-in, as-override)
