You are on page 1of 15

CÔNG TY TNHH T Ư V ẤN & D ỊCH V Ụ CHUYÊN VI ỆT

149/1D Ung Văn Khiêm, phường 25, quận Bình Thạnh, Tp.HCM
ĐT: (08) 35124257 (7 lines) Fax: (08) 35124314
Website: http://vnpro.vn Support forum: http://vnpro.org
Live Chat: http://www.vnpro.vn/support WifiPro : http://wimaxpro.org

Lab 1.9 Cấu hình MPLS VPN Layer 2 và định tuyến EIGRP giữa PE-CE
Mô hình:

Customer A Customer A
Site 1 Site 2
EIGRP AS101 EIGRP AS101

1.1.1.1/24 5.5.5.5/24

R1-CE R5-CE
F0/0 F0/0
192. 1

5/ 2 4
8.15 .
68 . 15

6
19 2.1
.1 /24

Loopback 0 Loopback 0
S1/ 2 S1/0
F0/0 2.2.2.2/32 4.4.4.4/32 F0/0
.3 R3-P .3
VPN-A 24
19
2
VPN-A
S1/3 3.0 / .16
8. .4
. 2 34.
8
R2-PE 2 2.16 0 /2 S1/3 R4-PE
19 4
VPN-B VPN-B
F0/1 F0/1
19 2. 1
. 6/24

6 8.67
68 .67

Mạng trục của


nhà cung cấp dịch
192 .1

.7/24

F0/1 F0/1
vụ MPLS
R6-CE R7-CE
6.6.6. 6/24 7.7.7.7/24

EIGRP AS201 EIGRP AS202


Customer B Customer B
Site 1 Site 2

Hình 1.9.

Mô tả
- Bài lab này minh họa nhà cung cấp dịch vụ cung cấp các kết nối cho các khách hàng qua mạng trục
MPLS. Bằng cách sử dụng công nghệ MPLS VPN layer 2 để đảm bảo tính riêng tư của khách hàng

- Trong bài lab này, ta sẽ cấu hình cho toàn mô hình bao gồm phía khách hàng và nhà cung cấp dịch vụ.
Trong đó:

• R1-CE và R5-CE là 2 router của cùng 1 khách hàng A (Customer A).

• R6-CE và R7-CE là 2 router của cùng 1 khách hàng B (Customer B).

Cấu hình
Bước 1: Cấu hình cơ bản.

- Đặt hostname cho router.

- Đặt IP cho Router theo mô hình trong bài lab.


1
CÔNG TY TNHH T Ư V ẤN & D ỊCH V Ụ CHUYÊN VI ỆT
149/1D Ung Văn Khiêm, phường 25, quận Bình Thạnh, Tp.HCM
ĐT: (08) 35124257 (7 lines) Fax: (08) 35124314
Website: http://vnpro.vn Support forum: http://vnpro.org
Live Chat: http://www.vnpro.vn/support WifiPro : http://wimaxpro.org

Bước 2: Định tuyến IP trong mạng lõi trong nhà cung cấp dịch vụ bằng cách dùng giao thức định
tuyến OSPF.
Trên R2-PE:

R2-PE(config)#router ospf 1

R2-PE(config-router)# network 2.2.2.2 0.0.0.0 area 0

R2-PE(config-router)# network 192.168.23.0 0.0.0.255 area 0

Trên R3-P:

R3-P(config)#router ospf 1

R3-P(config-router)# network 192.168.34.0 0.0.0.255 area 0

R3-P(config-router)# network 192.168.23.0 0.0.0.255 area 0

Trên R4-PE:

R3-P(config)#router ospf 1

R3-P(config-router)# network 4.4.4.4 0.0.0.0 area 0

R3-P(config-router)# network 192.168.34.0 0.0.0.255 area 0

Kiểm tra bảng định tuyến trên R2-PE:


R2-PE#show ip route

Gateway of last resort is not set

2.0.0.0/32 is subnetted, 1 subnets

C 2.2.2.2 is directly connected, Loopback0

4.0.0.0/32 is subnetted, 1 subnets

O 4.4.4.4 [110/129] via 192.168.23.3, 00:00:04, Serial1/3

C 192.168.23.0/24 is directly connected, Serial1/3

O 192.168.34.0/24 [110/128] via 192.168.23.3, 00:00:04, Serial1/3

Ping kiểm tra:

R2-PE#ping 4.4.4.4 source 2.2.2.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:

Packet sent with a source address of 2.2.2.2

!!!!!

2
CÔNG TY TNHH T Ư V ẤN & D ỊCH V Ụ CHUYÊN VI ỆT
149/1D Ung Văn Khiêm, phường 25, quận Bình Thạnh, Tp.HCM
ĐT: (08) 35124257 (7 lines) Fax: (08) 35124314
Website: http://vnpro.vn Support forum: http://vnpro.org
Live Chat: http://www.vnpro.vn/support WifiPro : http://wimaxpro.org

Success rate is 100 percent (5/5), round-trip min/avg/max = 64/87/120 ms

Bước 3: Cấu hình MPLS trong mạng lõi nhà cung cấp dịch vụ.
R2-PE(config)# interface s1/3

R2-PE(config-if)#mpls lable protocol ldp label distribution protocol

R2-PE(config-if)#mpls ip
R3-P(config)# interface s1/2

R3-P(config-if)#mpls lable protocol ldp

R3-P(config-if)#mpls ip

R3-P(config)# interface s1/0

R3-P(config-if)#mpls lable protocol ldp

R3-P(config-if)#mpls ip
R4-PE(config)# interface s1/3

R3-PE(config-if)#mpls lable protocol ldp

R3-PE(config-if)#mpls ip

Kiểm tra việc MPLS đã được thiết lập láng giềng chưa. Thực hiện trên R3-P:
R3-P#show mpls ldp neighbor

Peer LDP Ident: 2.2.2.2:0; Local LDP Ident 192.168.34.3:0

TCP connection: 2.2.2.2.646 - 192.168.34.3.20938

State: Oper; Msgs sent/rcvd: 10/10; Downstream

Up time: 00:02:49

LDP discovery sources:

Serial1/2, Src IP addr: 192.168.23.2

Addresses bound to peer LDP Ident:

192.168.23.2 2.2.2.2

Peer LDP Ident: 4.4.4.4:0; Local LDP Ident 192.168.34.3:0

TCP connection: 4.4.4.4.646 - 192.168.34.3.11532

State: Oper; Msgs sent/rcvd: 9/9; Downstream

Up time: 00:02:13

LDP discovery sources:

Serial1/0, Src IP addr: 192.168.34.4

Addresses bound to peer LDP Ident:

192.168.34.4 4.4.4.4

3
CÔNG TY TNHH T Ư V ẤN & D ỊCH V Ụ CHUYÊN VI ỆT
149/1D Ung Văn Khiêm, phường 25, quận Bình Thạnh, Tp.HCM
ĐT: (08) 35124257 (7 lines) Fax: (08) 35124314
Website: http://vnpro.vn Support forum: http://vnpro.org
Live Chat: http://www.vnpro.vn/support WifiPro : http://wimaxpro.org

R3-P#

Xem bảng forwarding-table trên R2-PE:


R2-PE#show mpls forwarding-table

Local Outgoing Prefix Bytes tag Outgoing Next Hop

tag tag or VC or Tunnel Id switched interface

16 17 4.4.4.4/32 0 Se1/3 point2point

17 Pop tag 192.168.34.0/24 0 Se1/3 point2point

4
CÔNG TY TNHH T Ư V ẤN & D ỊCH V Ụ CHUYÊN VI ỆT
149/1D Ung Văn Khiêm, phường 25, quận Bình Thạnh, Tp.HCM
ĐT: (08) 35124257 (7 lines) Fax: (08) 35124314
Website: http://vnpro.vn Support forum: http://vnpro.org
Live Chat: http://www.vnpro.vn/support WifiPro : http://wimaxpro.org

Bước 4: Cấu hình Port Transparent.

Port transparent được cấu hình giữa 2 router PE gồm R2-PE và R4-PE để tạo ra các đường kết nối
ảo nối giữa các khách hàng. Đảm bảo rằng 2 site cùng 1 khách hàng phải có cùng số VC ID.
Customer A:

R2-PE(config)#int f0/0

R2-PE(config-if)#no sh

R2-PE(config-if)#xconnect 4.4.4.4 105 encapsulation mpls

R2-PE(config-if-xconn)#end
R4-PE(config)#int f0/0 ip loopback

R4-PE(config-if)#no sh

R4-PE(config-if)#xconnect 2.2.2.2 105 encapsulation mpls

R4-PE(config-if-xconn)#end

Customer B:

R2-PE(config)#int f0/1

R2-PE(config-if)#no sh

R2-PE(config-if)#xconnect 4.4.4.4 607 encapsulation mpls

R2-PE(config-if-xconn)#end
R4-PE(config)#int f0/0

R4-PE(config-if)#no sh

R4-PE(config-if)#xconnect 2.2.2.2 607 encapsulation mpls

R4-PE(config-if-xconn)#end

Bước 5: Kiểm tra kết nối và cấu hình.


Kiểm tra bảng VC trên các router PE:

R2-PE#show mpls l2transport vc

Local intf Local circuit Dest address VC ID Status

------------- -------------------------- --------------- ---------- ----------

Fa0/0 Ethernet 4.4.4.4 105 UP

Fa0/1 Ethernet 4.4.4.4 607 UP

R2-PE#

5
CÔNG TY TNHH T Ư V ẤN & D ỊCH V Ụ CHUYÊN VI ỆT
149/1D Ung Văn Khiêm, phường 25, quận Bình Thạnh, Tp.HCM
ĐT: (08) 35124257 (7 lines) Fax: (08) 35124314
Website: http://vnpro.vn Support forum: http://vnpro.org
Live Chat: http://www.vnpro.vn/support WifiPro : http://wimaxpro.org

R4-PE#show mpls l2transport vc

Local intf Local circuit Dest address VC ID Status

------------- -------------------------- --------------- ---------- ----------

Fa0/0 Ethernet 2.2.2.2 105 UP

Fa0/1 Ethernet 2.2.2.2 607 UP

R4-PE#

Kiểm tra bảng ARP của các router khách hàng:


R1-CE#show ip arp

Protocol Address Age(min) Hardware Addr Type Interface

Internet 192.168.15.1 - c200.00c0.0000 ARPA FastEthernet0/0

Internet 192.168.15.5 9 c204.00c0.0000 ARPA FastEthernet0/0

R1-CE#
R6-CE#show ip arp

Protocol Address Age(min) Hardware Addr Type Interface

Internet 192.168.67.6 - c205.00c0.0001 ARPA FastEthernet0/1

Internet 192.168.67.7 4 c206.00c0.0001 ARPA FastEthernet0/1

R6-CE#

Bước 6: Cấu hình định tuyến EIGRP giữa các site khách hàng.
Customer A:

R1-CE(config)# router eigrp 101

R1-CE(config-router)# network 192.168.15.0 link R1-CE to R2-PE

R1-CE(config-router)# network 1.0.0.0

R1-CE(config-router)# no auto-summary
R5-CE(config)# router eigrp 101

R5-CE(config-router)# network 192.168.15.0 link R5-CE to R4-PE

R5-CE(config-router)# network 5.0.0.0

R5-CE(config-router)# no auto-summary

Customer B:

R6-CE(config)# router eigrp 202

R6-CE(config-router)# network 192.168.67.0

6
CÔNG TY TNHH T Ư V ẤN & D ỊCH V Ụ CHUYÊN VI ỆT
149/1D Ung Văn Khiêm, phường 25, quận Bình Thạnh, Tp.HCM
ĐT: (08) 35124257 (7 lines) Fax: (08) 35124314
Website: http://vnpro.vn Support forum: http://vnpro.org
Live Chat: http://www.vnpro.vn/support WifiPro : http://wimaxpro.org

R6-CE(config-router)# network 6.0.0.0

R6-CE(config-router)# no auto-summary
R7-CE(config)# router eigrp 202

R7-CE(config-router)# network 192.168.67.0

R7-CE(config-router)# network 7.0.0.0

R7-CE(config-router)# no auto-summary

Kiểm tra láng giềng EIGRP và bảng định tuyến:


R1-CE#show ip eigrp neighbors

IP-EIGRP neighbors for process 1

IP-EIGRP neighbors for process 101

H Address Interface Hold Uptime SRTT RTO Q Seq

(sec) (ms) Cnt Num

0 192.168.15.5 Fa0/0 11 00:10:52 328 1968 0 9

R1-CE#
R1-CE#show ip route

Gateway of last resort is not set

1.0.0.0/24 is subnetted, 1 subnets

C 1.1.1.0 is directly connected, Loopback0

C 192.168.15.0/24 is directly connected, FastEthernet0/0

5.0.0.0/24 is subnetted, 1 subnets

D 5.5.5.0 [90/409600] via 192.168.15.5, 00:11:09, FastEthernet0/0

R1-CE#
R6-CE#show ip eigrp ne

R6-CE#show ip eigrp neighbors

IP-EIGRP neighbors for process 202

H Address Interface Hold Uptime SRTT RTO Q Seq

(sec) (ms) Cnt Num

0 192.168.67.7 Fa0/1 13 00:06:27 343 2058 0 9

R6-CE#
R6-CE#show ip route

Gateway of last resort is not set

6.0.0.0/24 is subnetted, 1 subnets

C 6.6.6.0 is directly connected, Loopback0

7
CÔNG TY TNHH T Ư V ẤN & D ỊCH V Ụ CHUYÊN VI ỆT
149/1D Ung Văn Khiêm, phường 25, quận Bình Thạnh, Tp.HCM
ĐT: (08) 35124257 (7 lines) Fax: (08) 35124314
Website: http://vnpro.vn Support forum: http://vnpro.org
Live Chat: http://www.vnpro.vn/support WifiPro : http://wimaxpro.org

7.0.0.0/24 is subnetted, 1 subnets

D 7.7.7.0 [90/409600] via 192.168.67.7, 00:06:49, FastEthernet0/1

C 192.168.67.0/24 is directly connected, FastEthernet0/1

R6-CE#
Ping kiểm tra kết nối

R1-CE#ping 5.5.5.5 source 1.1.1.1


Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:

Packet sent with a source address of 1.1.1.1

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 84/164/236 ms

R1-CE#
R6-CE#ping 7.7.7.7 source 6.6.6.6
Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 7.7.7.7, timeout is 2 seconds:

Packet sent with a source address of 6.6.6.6

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 112/178/240 ms

R6-CE#

8
CÔNG TY TNHH T Ư V ẤN & D ỊCH V Ụ CHUYÊN VI ỆT
149/1D Ung Văn Khiêm, phường 25, quận Bình Thạnh, Tp.HCM
ĐT: (08) 35124257 (7 lines) Fax: (08) 35124314
Website: http://vnpro.vn Support forum: http://vnpro.org
Live Chat: http://www.vnpro.vn/support WifiPro : http://wimaxpro.org

Cấu hình đầy đủ

R1-CE

R1-CE#show running-config

Building configuration...

Current configuration : 1504 bytes

version 12.4

hostname R1-CE

ip cef

interface Loopback0

ip address 1.1.1.1 255.255.255.0

interface FastEthernet0/0

ip address 192.168.15.1 255.255.255.0

duplex auto

speed auto

router eigrp 101

network 1.0.0.0

network 192.168.15.0

no auto-summary

end

R2-PE

R2-PE#show running-config

Building configuration...

Current configuration : 1824 bytes

!
9
CÔNG TY TNHH T Ư V ẤN & D ỊCH V Ụ CHUYÊN VI ỆT
149/1D Ung Văn Khiêm, phường 25, quận Bình Thạnh, Tp.HCM
ĐT: (08) 35124257 (7 lines) Fax: (08) 35124314
Website: http://vnpro.vn Support forum: http://vnpro.org
Live Chat: http://www.vnpro.vn/support WifiPro : http://wimaxpro.org

version 12.4

hostname R2-PE

ip cef

interface Loopback0

ip address 2.2.2.2 255.255.255.255

interface FastEthernet0/0

no ip address

duplex auto

speed auto

xconnect 4.4.4.4 105 encapsulation mpls

interface FastEthernet0/1

no ip address

duplex auto

speed auto

xconnect 4.4.4.4 607 encapsulation mpls

interface Serial1/3

ip address 192.168.23.2 255.255.255.0

mpls label protocol ldp

mpls ip

serial restart-delay 0

router ospf 1

log-adjacency-changes

network 2.2.2.2 0.0.0.0 area 0

network 192.168.23.0 0.0.0.255 area 0

!
10
CÔNG TY TNHH T Ư V ẤN & D ỊCH V Ụ CHUYÊN VI ỆT
149/1D Ung Văn Khiêm, phường 25, quận Bình Thạnh, Tp.HCM
ĐT: (08) 35124257 (7 lines) Fax: (08) 35124314
Website: http://vnpro.vn Support forum: http://vnpro.org
Live Chat: http://www.vnpro.vn/support WifiPro : http://wimaxpro.org

end

R3-P

R3-P#show running-config

Building configuration...

Current configuration : 1540 bytes

version 12.4

hostname R3-P

ip cef

interface Serial1/0

ip address 192.168.34.3 255.255.255.0

mpls label protocol ldp

mpls ip

serial restart-delay 0

interface Serial1/2

ip address 192.168.23.3 255.255.255.0

mpls label protocol ldp

mpls ip

serial restart-delay 0

router ospf 1

log-adjacency-changes

network 192.168.23.0 0.0.0.255 area 0

network 192.168.34.0 0.0.0.255 area 0

end

R4-PE

11
CÔNG TY TNHH T Ư V ẤN & D ỊCH V Ụ CHUYÊN VI ỆT
149/1D Ung Văn Khiêm, phường 25, quận Bình Thạnh, Tp.HCM
ĐT: (08) 35124257 (7 lines) Fax: (08) 35124314
Website: http://vnpro.vn Support forum: http://vnpro.org
Live Chat: http://www.vnpro.vn/support WifiPro : http://wimaxpro.org

R4-PE#show running-config

Building configuration...

Current configuration : 2011 bytes

version 12.4

hostname R4-PE

ip cef

interface Loopback0

ip address 4.4.4.4 255.255.255.255

interface FastEthernet0/0

no ip address

duplex auto

speed auto

xconnect 2.2.2.2 105 encapsulation mpls

interface FastEthernet0/1

no ip address

duplex auto

speed auto

xconnect 2.2.2.2 607 encapsulation mpls

interface Serial1/3

ip address 192.168.34.4 255.255.255.0

mpls label protocol ldp

mpls ip

serial restart-delay 0

!
12
CÔNG TY TNHH T Ư V ẤN & D ỊCH V Ụ CHUYÊN VI ỆT
149/1D Ung Văn Khiêm, phường 25, quận Bình Thạnh, Tp.HCM
ĐT: (08) 35124257 (7 lines) Fax: (08) 35124314
Website: http://vnpro.vn Support forum: http://vnpro.org
Live Chat: http://www.vnpro.vn/support WifiPro : http://wimaxpro.org

router ospf 1

log-adjacency-changes

network 4.4.4.4 0.0.0.0 area 0

network 192.168.34.0 0.0.0.255 area 0

end

R5-CE

R5-CE#show running-config

Building configuration...

Current configuration : 1504 bytes

version 12.4

hostname R5-CE

ip cef

interface Loopback0

ip address 5.5.5.5 255.255.255.0

interface FastEthernet0/0

ip address 192.168.15.5 255.255.255.0

duplex auto

speed auto

router eigrp 101

network 5.0.0.0

network 192.168.15.0

no auto-summary

end

13
CÔNG TY TNHH T Ư V ẤN & D ỊCH V Ụ CHUYÊN VI ỆT
149/1D Ung Văn Khiêm, phường 25, quận Bình Thạnh, Tp.HCM
ĐT: (08) 35124257 (7 lines) Fax: (08) 35124314
Website: http://vnpro.vn Support forum: http://vnpro.org
Live Chat: http://www.vnpro.vn/support WifiPro : http://wimaxpro.org

R6-CE

R6-CE#show running-config

Building configuration...

Current configuration : 1473 bytes

version 12.4

hostname R6-CE

ip cef

interface Loopback0

ip address 6.6.6.6 255.255.255.0

interface FastEthernet0/1

ip address 192.168.67.6 255.255.255.0

duplex auto

speed auto

router eigrp 202

network 6.0.0.0

network 192.168.67.0

no auto-summary

end

R7-CE

R7-CE#show running-config

Building configuration...

Current configuration : 905 bytes

14
CÔNG TY TNHH T Ư V ẤN & D ỊCH V Ụ CHUYÊN VI ỆT
149/1D Ung Văn Khiêm, phường 25, quận Bình Thạnh, Tp.HCM
ĐT: (08) 35124257 (7 lines) Fax: (08) 35124314
Website: http://vnpro.vn Support forum: http://vnpro.org
Live Chat: http://www.vnpro.vn/support WifiPro : http://wimaxpro.org

version 12.4

hostname R7-CE

ip cef

interface Loopback0

ip address 7.7.7.7 255.255.255.0

interface FastEthernet0/1

ip address 192.168.67.7 255.255.255.0

duplex auto

speed auto

router eigrp 202

network 7.0.0.0

network 192.168.67.0

no auto-summary

End

15

You might also like