* EVE-NG๋ฅผ ์ฌ์ฉํ์ฌ ์์ฑ๋์์ต๋๋ค.
ํน EVE-NG Lab ํ์ผ์ด ํ์ํ์ ๋ถ์ ๋๊ธ ๋จ๊ฒจ์ฃผ์ธ์.
- ๊ธฐ๋ณธ ํ ํด๋ก์ง ๊ตฌ์ฑ
- MPLS VPN ์๋น์ค๋ง ์ค์
– MPLS ๋ผ์ฐํฐ ๊ฐ LDP ์ค์
– PE ๋ผ์ฐํฐ ๊ฐ MBGP ์ค์ - MPLS VPN ๊ณ ๊ฐ๋ง ์ค์
– Company A ์ค์
– Company B ์ค์
1. ๊ธฐ๋ณธ ํ ํด๋ก์ง ๊ตฌ์ฑ

- ๊ฐ ๋คํธ์ํฌ์ ๋ง์ง๋ง ์ฅํ
์ ๋ผ์ฐํฐ ๋ฒํธ๋ก ์ง์ ํ๋ค.
ex) R1: 1.1.12.1, 10.1.15.1, 10.1.17.1
R4: 1.1.34.4, 10.1.46.4, 10.1.48.4
2. MPLS VPN ์๋น์ค๋ง ์ค์
(1) MPLS ๋ผ์ฐํฐ ๊ฐ LDP ์ค์
R1(config)# mpls label protocol ldp R1(config)# mpls ldp router-id lo0 R1(config)# int fa0/0 R1(config-if)# mpls ip R2(config)# mpls label protocol ldp R2(config)# mpls ldp router-id lo0 R2(config)# int fa0/0 R2(config-if)# mpls ip R2(config-if)# int fa1/0 R2(config-if)# mpls ip R3(config)# mpls label protocol ldp R3(config)# mpls ldp router-id lo 0 R3(config)# int fa1/0 R3(config-if)# mpls ip R3(config-if)# int fa2/0 R3(config-if)# mpls ip R3(config-if)# R4(config)# mpls label protocol ldp R4(config)# mpls ldp router-id lo 0 R4(config)# int fa2/0 R4(config-if)# mpls ip
1: MPLS ๋ผ๋ฒจ ๋ฐ์ธ๋ฉ ์ ๋ณด ์ ์ก ํ๋กํ ์ฝ์ ์ง์ ํ๋ค.
LDP, TDP๋ฅผ ์ง์ ํ ์ ์๋ค. LDP๊ฐ ๋ํดํธ ๊ฐ์ด๋ค.
2: LDP Router-id๋ก ์ฌ์ฉํ ์ธํฐํ์ด์ค๋ฅผ ์ง์ ํ๋ค.
router-id๋ฅผ ๋ฐ๋ก ์ง์ ํ์ง ์์ ๊ฒฝ์ฐ ‘๋ฃจํ๋ฐฑ ์ธํฐํ์ด์ค IP’ (๋์->๋ฎ์) -> ‘๋ฌผ๋ฆฌ ์ธํฐํ์ด์ค IP’ ์์ผ๋ก ์ง์ ๋๋ค.
3,4: MPLS๊ฐ ๋์ํ ์ธํฐํ์ด์ค๋ก ๋ค์ด๊ฐ์ MPLS๋ฅผ ์ฌ์ฉํ๋ค๊ณ ์ง์ ํ๋ค. PE-CE ๊ตฌ๊ฐ์์๋ ์ ์ฉํ์ง ์๋๋ค.
LDP ์ค์ ํ์ธ


– ๋คํธ์ํฌ ๋ณ๋ก ๊ฐ LSR์ด ๋ถ์ฌํ ๋ผ๋ฒจ๊ฐ์ ๋ชจ๋ ์ ์ฅํ ๊ฒ์ ํ์ธํ ์ ์๋ค.

(2) PE ๋ผ์ฐํฐ ๊ฐ MBGP ์ค์
R1(config)# router bgp 1 R1(config-router)# bgp router-id 1.1.1.1 R1(config-router)# neighbor 1.1.4.4 remote-as 1 R1(config-router)# neighbor 1.1.4.4 update-source lo0 R1(config-router)# address-family vpnv4 R1(config-router-af)# neighbor 1.1.4.4 activate R1(config-router-af)# neighbor 1.1.4.4 send-community extended R4(config)# router bgp 1 R4(config-router)# bgp router-id 1.1.4.4 R4(config-router)# neighbor 1.1.1.1 remote-as 1 R4(config-router)# neighbor 1.1.1.1 update-source lo0 R4(config-router)# address-family vpnv4 R4(config-router-af)# neighbor 1.1.1.1 activate R4(config-router-af)# neighbor 1.1.1.1 send-community both
5: MBGP ์ค์ ๋ชจ๋๋ก ์ง์
ํ๋ค. MPLS VPN์ ์ฌ์ฉํ๊ธฐ ์ํด์ vpnv4 ์ต์
์ ์
๋ ฅํด์ผ ํ๋ค.
6: ๋ค์ด๋ฒ๋ฅผ ํ์ฑํํ๋ค.
7: MPLS VPN์์ ์ฌ์ฉ๋๋ RT ๋ฑ๊ณผ ๊ฐ์ BGP ํ์ฅ ์ปค๋ฎค๋ํฐ๋ฅผ ์ ์กํ ์ ์๋๋ก ์ค์ ํ๋ค.
๋ง์ฝ, MPLS VPN ์ธ BGP์์ ํ์ค ์ปค๋ฎค๋ํฐ๋ฅผ ์ฌ์ฉํด ์ ์ฑ
์ค์ ํด์ผ ํ๋ค๋ฉด, 15๋ฒ์งธ ์ค์ฒ๋ผ both ์ต์
์ ์ฌ์ฉํ๋ค.
BGP ํ์ธ


3. MPLS VPN ๊ณ ๊ฐ๋ง ์ค์
(1) Company A ์ค์
R1 (PE) <-> R5 (CE) ๊ตฌ๊ฐ
< VRF ์ค์ > R1(config)# ip vrf A_company R1(config-vrf)# rd 1:100 R1(config-vrf)# route-target export 1:101 R1(config-vrf)# route-target import 1:102 R1(config-vrf)# exit R1(config)# R1(config)# int fa1/0 R1(config-if)# ip vrf forwarding A_company R1(config-if)# ip addr 10.1.15.1 255.255.255.0 R1(config-if)# R1(config-if)# exit < Static Routing ์ค์ > R1(config)# R1(config)# ip route vrf A_company 10.1.1.0 255.255.255.0 10.1.15.5 < BGP ์ค์ > R1(config)# R1(config)# router bgp 1 R1(config-router)# address-family ipv4 vrf A_company R1(config-router-af)# redistribute static R1(config-router-af)# redistribute connected R1(config-router-af)# exit R1(config-router)# exit R1(config)# < R5 Static Default Routing ์ค์ > R5(config)# ip route 0.0.0.0 0.0.0.0 10.1.15.1
2: A_company๋ผ๋ VRF์ ์ค์ ๋ชจ๋๋ก ์ง์
ํ๋ค.
3: RD ๊ฐ์ ์ง์ ํ๋ค.
4: A_company์ ์์๋ ๋คํธ์ํฌ(CE ๋ผ์ฐํฐ์ ๋คํธ์ํฌ)์ ๋ํ RT ๊ฐ์ ์ง์ ํ๋ค.
5: ์ธ์ CE๋ผ์ฐํฐ๋ก ๊ด๊ณ ํ ๋ ์ฌ์ฉํ๋ RT๊ฐ์ ์ง์ ํ๋ค.
์ฆ, RT๊ฐ์ด 1:102์ธ ๋คํธ์ํฌ์ ํต์ ์ด ๋๋๋ก ํ๋ค.
9: ํด๋น ์ธํฐํ์ด์ค์ ๋จผ์ ์ค์ ํ VRF๋ฅผ ์ ์ฉํ๋ค.
10: IP์ฃผ์๋ฅผ ์ง์ ํ๋ค. ์ด๋, ๊ธฐ์กด์ ์ค์ ๋ IP๋ ์ญ์ ๋๊ณ ๋ค์ IP์ฃผ์๋ฅผ ์ ์ฉํ๊ฒ ๋๋ค.
16: R1์์ R5 ๋ด๋ถ๋ง์ผ๋ก ์ ์ ๊ฒฝ๋ก๋ฅผ ์ค์ ํ๋ค.
21: MBGP๋ฅผ ์ด์ฉํด VRF A_company์ ๋คํธ์ํฌ๊ฐ ์๋ PE ๋ผ์ฐํฐ๋ก ์ ๋ฌ๋๋๋ก ํ๋ค.
22: Static Routing๊ณผ BGP๋ฅผ ์ฌ๋ถ๋ฐฐํ๋ค.
23: PE-CE๊ตฌ๊ฐ์ ๋คํธ์ํฌ๋ฅผ MBGP์ ํฌํจ์ํจ๋ค. ์ด ๋ช
๋ น์ด๋ฅผ ์ฌ์ฉํ์ง ์์ผ๋ฉด, R1์์ R6๋ก ์ ๊ทผํ ๋ source๊ฐ R1์์ ๋ฐํ์ผ ํ๋ค. ์๋ฅผ ๋ค์ด ping ํ
์คํธ๋ฅผ ์งํํ๋ค๋ฉด, ‘ping 10.1.2.2 source 10.1.1.1’์ ์ณ์ผ ํ๋ค. ํ์ง๋ง, ์ด ๋ช
๋ น์ด๋ฅผ ์ฌ์ฉํ๋ฏ๋ก ‘ping 10.1.2.2’๋ง ์น๋ฉด ๋๋ค.
29: R5์์ Default Static Routing์ ์ค์ ํ๋ค.
R4 (PE) <-> R6 (CE) ๊ตฌ๊ฐ
< VRF ์ค์ > R4(config)# ip vrf A_company R4(config-vrf)# rd 1:100 R4(config-vrf)# route-target export 1:102 R4(config-vrf)# route-target import 1:101 R4(config-vrf)# exit R4(config)# int fa1/0 R4(config-if)# ip vrf forwarding A_company R4(config-if)# ip addr 10.1.46.4 255.255.255.0 R4(config-if)# exit < Static Routing ์ค์ > R4(config)# R4(config)# ip route vrf A_company 10.1.2.0 255.255.255.0 10.1.46.6 < BGP ์ค์ > R4(config)# R4(config)# router bgp 1 R4(config-router)# address-family ipv4 vrf A_company R4(config-router-af)# redistribute static R4(config-router-af)# redistribute connected R4(config-router-af)# exit R4(config-router)# exit < R6 Static Default Routing ์ค์ > R6(config)# ip route 0.0.0.0 0.0.0.0 10.1.46.4
๊ณ ๊ฐ๋ง ์ค์ ํ์ธ

VRF ์ค์ ํ R1์์ R5๋ก ping์ ์๋๋ค. R1 ๋ผ์ฐํ ํ ์ด๋ธ์๋ VRF A_company์ ๊ด๋ จ๋ ๋คํธ์ํฌ ์ ๋ณด๊ฐ ์๊ณ , VRF๋ณ ๋ผ์ฐํ ํ ์ด๋ธ๋ก ๋ณ๊ฒฝ๋๊ธฐ ๋๋ฌธ์ด๋ค. ๊ทธ๋์ pingํ ๋์๋ VRF A_company๋ฅผ ๋ช ์ํด์ผ ํ๋ค.


์์ ์ธ๊ธํ ๊ฒ์ฒ๋ผ CE ๋คํธ์ํฌ ์ ๋ณด๋ VRF ๋ผ์ฐํ ํ ์ด๋ธ์ ์๋ ๊ฒ์ ํ์ธํ ์ ์๋ค.

์ ์์ ์ผ๋ก Ping Test๊ฐ ์ฑ๊ณตํ๋ ๊ฒ์ ๋ณผ ์ ์๋ค.
(2) Company B ์ค์
< R1 - R7 ๊ตฌ์ฑ > R1(config)# ip vrf B_company R1(config-vrf)# rd 1:200 R1(config-vrf)# route-target export 1:201 R1(config-vrf)# route-target import 1:202 R1(config-vrf)# exit R1(config)# R1(config)# int fa3/0 R1(config-if)# ip vrf forwarding B_company R1(config-if)# ip addr 10.1.17.1 255.255.255.0 R1(config-if)# exit R1(config-if)# R1(config)# ip route vrf B_company 10.1.1.0 255.255.255.0 10.1.17.7 R1(config)# R1(config)# router bgp 1 R1(config-router)# address-family ipv4 vrf B_company R1(config-router-af)# redistribute static R1(config-router-af)# redistribute connected R1(config-router-af)# exit R1(config-router)# exit R1(config)# R7(config)# ip route 0.0.0.0 0.0.0.0 10.1.17.1 < R4 - R8 ๊ตฌ์ฑ > R4(config)# ip vrf B_company R4(config-vrf)# rd 1:200 R4(config-vrf)# route-target export 1:202 R4(config-vrf)# route-target import 1:201 R4(config-vrf)# exit R4(config)# int fa3/0 R4(config-if)# ip vrf forwarding B_company R4(config-if)# ip addr 10.1.48.4 255.255.255.0 R4(config-if)# exit R4(config)# R4(config)# ip route vrf B_company 10.1.2.0 255.255.255.0 10.1.48.8 R4(config)# router bgp 1 R4(config-router)#address-family ipv4 vrf B_company R4(config-router-af)#redistribute static R4(config-router-af)#redistribute connected R4(config-router-af)#exit R4(config-router)#exit R8(config)#ip route 0.0.0.0 0.0.0.0 10.1.48.4