lab 1.8 cấu hình mpls vpn layer 3 và định tuyến eigrp giữa pe-ce

22
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: Lab 1.8 Cấu hình MPLS VPN Layer 3 và định tuyến EIGRP giữa PE-CE Mô hình Hình 1.8. 1

Upload: ptit2004

Post on 29-Jul-2015

834 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Lab 1.8 Cấu hình MPLS VPN Layer 3 và định tuyến EIGRP giữa PE-CE

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

Lab 1.8 Cấu hình MPLS VPN Layer 3 và định tuyến EIGRP giữa PE-CEMô hình

Hình 1.8.

1

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

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

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 để đả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.

Bước 2: Định tuyến IP trong mạng lõi của 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

2

Page 3: Lab 1.8 Cấu hình MPLS VPN Layer 3 và định tuyến EIGRP giữa PE-CE

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

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

!!!!!

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

R2-PE#

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 label protocol ldp

R2-PE(config-if)#mpls ip

R3-P(config)# interface s1/2

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

R3-P(config-if)#mpls ip

R3-P(config)# interface s1/0

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

R3-P(config-if)#mpls ip

R4-PE(config)# interface s1/3

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

R3-PE(config-if)#mpls ip

Kiểm tra việc MPLS đã thiết lập được 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

3

Page 4: Lab 1.8 Cấu hình MPLS VPN Layer 3 và định tuyến EIGRP giữa PE-CE

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

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

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

Bước 4: Tạo bảng VRF tương ứng cho từng khách hàng trên các router PE

Customer A:

R2-PE(config)#ip vrf A

R2-PE(config-vrf)#rd 15:15

R2-PE(config-vrf)#route-target export 1:1

R2-PE(config-vrf)#route-target import 5:5

R4-PE(config)#ip vrf A

R4-PE(config-vrf)#rd 15:15

R4-PE(config-vrf)#route-target export 5:5

R4-PE(config-vrf)#route-target import 1:1

Customer B

R2-PE(config)#ip vrf B

R2-PE(config-vrf)#rd 67:67

R2-PE(config-vrf)#route-target export 6:6

R2-PE(config-vrf)#route-target import 7:7

R4-PE(config)#ip vrf B

4

Page 5: Lab 1.8 Cấu hình MPLS VPN Layer 3 và định tuyến EIGRP giữa PE-CE

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

R4-PE(config-vrf)#rd 67:67

R4-PE(config-vrf)#route-target export 7:7

R4-PE(config-vrf)#route-target import 6:6

Kiểm tra bảng VRF đã được tạo trên R2-PE:

R2-PE#show ip vrf

Name Default RD Interfaces

A 15:15

B 67:67

R2-PE#

Bước 5: Kết hợp (associate) bảng VRF với các interface của từng khách hàng.

Customer A:

R2-PE(config)# interface f0/0

R2-PE(config-if)#ip vrf forwarding A

R2-PE(config-if)#ip address 192.168.12.2 255.255.255.0

R4-PE(config)# interface f0/0

R4-PE(config-if)#ip vrf forwarding A

R4-PE(config-if)#ip address 192.168.45.4 255.255.255.0

Customer B:

R2-PE(config)# interface f0/1

R2-PE(config-if)#ip vrf forwarding B

R2-PE(config-if)#ip address 192.168.26.2 255.255.255.0

R4-PE(config)# interface f0/1

R4-PE(config-if)#ip vrf forwarding B

R4-PE(config-if)#ip address 192.168.47.4 255.255.255.0

Kiểm tra bảng định tuyến VRF và ping:

R2-PE#show ip route vrf A

Routing Table: A

Gateway of last resort is not set

C 192.168.12.0/24 is directly connected, FastEthernet0/0

R2-PE#

R2-PE#show ip route vrf B

5

Page 6: Lab 1.8 Cấu hình MPLS VPN Layer 3 và định tuyến EIGRP giữa PE-CE

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

Routing Table: B

Gateway of last resort is not set

C 192.168.26.0/24 is directly connected, FastEthernet0/1

R2-PE#

R2-PE#ping vrf A 192.168.12.1

Type escape sequence to abort.

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

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 24/63/124 ms

R2-PE#ping vrf B 192.168.26.6

Type escape sequence to abort.

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

!!!!!

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

R2-PE#

Bước 6: Định tuyến giữa PE và CE. Bằng cách sử dụng giao thức định tuyến EIGRP

Cấu hình trên các router PE phía nhà cung cấp dịch vụ:

R2-PE(config)#router eigrp 1

R2-PE(config-router)#address-family ipv4 vrf A

R2-PE(config-router-af)#network 192.168.12.0

R2-PE(config-router-af)#redistribute bgp 24 metric 1000 100 255 1 1500

R2-PE(config-router-af)#autonomous-system 101

R2-PE(config-router-af)#no auto-summary

R2-PE(config-router-af)#exit

R2-PE(config-router)#address-family ipv4 vrf B

R2-PE(config-router-af)#network 192.168.26.0

R2-PE(config-router-af)#redistribute bgp 24 metric 1000 100 255 1 1500

R2-PE(config-router-af)#autonomous-system 202

R2-PE(config-router-af)#no auto-summary

R2-PE(config-router-af)#end

R4-PE(config)#router eigrp 1

R4-PE(config-router)#address-family ipv4 vrf A

R4-PE(config-router-af)#network 192.168.45.0

6

Page 7: Lab 1.8 Cấu hình MPLS VPN Layer 3 và định tuyến EIGRP giữa PE-CE

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

R4-PE(config-router-af)#redistribute bgp 24 metric 1000 100 255 1 1500

R4-PE(config-router-af)#autonomous-system 101

R4-PE(config-router-af)#no auto-summary

R4-PE(config-router-af)#exit

R4-PE(config-router)#address-family ipv4 vrf B

R4-PE(config-router-af)#network 192.168.47.0

R4-PE(config-router-af)#redistribute bgp 24 metric 1000 100 255 1 1500

R4-PE(config-router-af)#autonomous-system 202

R4-PE(config-router-af)#no auto-summary

R4-PE(config-router-af)#end

Cấu hình định tuyến EIGRP phía khách hàng:

R1-CE(config)#router eigrp 101

R1-CE(config-router)#network 192.168.12.0

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.45.0

R5-CE(config-router)#network 5.0.0.0

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

R6-CE(config)#router eigrp 202

R6-CE(config-router)#network 192.168.26.0

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.47.0

R7-CE(config-router)#network 7.0.0.0

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

Kiểm tra sự thiết lập quan hệ láng giềng trên router R2-PE.

R2-PE#show ip eigrp vrf A neighbors

IP-EIGRP neighbors for process 101

H Address Interface Hold Uptime SRTT RTO Q Seq

(sec) (ms) Cnt Num

7

Page 8: Lab 1.8 Cấu hình MPLS VPN Layer 3 và định tuyến EIGRP giữa PE-CE

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

0 192.168.12.1 Fa0/0 13 00:07:02 209 1881 0 4

R2-PE#show ip eigrp vrf B neighbors

IP-EIGRP neighbors for process 202

H Address Interface Hold Uptime SRTT RTO Q Seq

(sec) (ms) Cnt Num

0 192.168.26.6 Fa0/1 10 00:05:44 214 1926 0 5

R2-PE#

Bước 7: Định tuyến PE-PE bằng cách sử dụng giao thức định tuyến MP-BGP.

Thiết lập láng giềng MP-BGP giữa R2-PE và R4-PE:

R2-PE(config)#router bgp 24

R2-PE(config-router)#neighbor 4.4.4.4 remote-as 24

R2-PE(config-router)#neighbor 4.4.4.4 update-source loopback 0

R4-PE(config)#router bgp 24

R4-PE(config-router)#neighbor 2.2.2.2 remote-as 24

R4-PE(config-router)#neighbor 2.2.2.2 update-source loopback 0

Cấu hình VPNv4 address family:

R2-PE(config)#router bgp 24

R2-PE(config-router)#address-family vpnv4

R2-PE(config-router-af)#neighbor 4.4.4.4 activate

R4-PE(config)#router bgp 24

R4-PE(config-router)#address-family vpnv4

R4-PE(config-router-af)#neighbor 2.2.2.2 activate

Kiểm tra thiết lập láng giềng:

R2-PE# show ip bgp summary

BGP router identifier 2.2.2.2, local AS number 24

BGP table version is 1, main routing table version 1

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd

4.4.4.4 4 24 5 5 1 0 0 00:01:06 0

R2-PE#

Cấu hình IPv4 address family:

R2-PE(config)#router bgp 24

8

Page 9: Lab 1.8 Cấu hình MPLS VPN Layer 3 và định tuyến EIGRP giữa PE-CE

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

R2-PE(config-router)#address-family ipv4 vrf A

R2-PE(config-router-af)#redistribute eigrp 101

R2-PE(config-router-af)#exit

R2-PE(config-router)#address-family ipv4 vrf B

R2-PE(config-router-af)#redistribute eigrp 202

R2-PE(config-router-af)#end

R2-PE#

R4-PE(config)#router bgp 24

R4-PE(config-router)#address-family ipv4 vrf A

R4-PE(config-router-af)#redistribute eigrp 101

R4-PE(config-router-af)#exit

R4-PE(config-router)#address-family ipv4 vrf B

R4-PE(config-router-af)#redistribute eigrp 202

R4-PE(config-router-af)#end

R4-PE#

Kiểm tra bảng định tuyến của các router khách hàng và thực hiện ping kiểm tra:

Trên R1-CE customer A:

R1-CE#show ip route

Gateway of last resort is not set

C 192.168.12.0/24 is directly connected, FastEthernet0/0

1.0.0.0/24 is subnetted, 1 subnets

C 1.1.1.0 is directly connected, Loopback0

D 192.168.45.0/24 [90/307200] via 192.168.12.2, 00:02:34, FastEthernet0/0

5.0.0.0/24 is subnetted, 1 subnets

D 5.5.5.0 [90/435200] via 192.168.12.2, 00:02:34, FastEthernet0/0

R1-CE#

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

!!!!!

9

Page 10: Lab 1.8 Cấu hình MPLS VPN Layer 3 và định tuyến EIGRP giữa PE-CE

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

Success rate is 100 percent (5/5), round-trip min/avg/max = 168/215/356 ms

R1-CE#

Trên R6-CE customer B:

R6-CE#show ip route

Gateway of last resort is not set

D 192.168.47.0/24 [90/307200] via 192.168.26.2, 00:03:34, FastEthernet0/1

6.0.0.0/24 is subnetted, 1 subnets

C 6.6.6.0 is directly connected, Loopback0

C 192.168.26.0/24 is directly connected, FastEthernet0/1

7.0.0.0/24 is subnetted, 1 subnets

D 7.7.7.0 [90/435200] via 192.168.26.2, 00:03:34, FastEthernet0/1

R6-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 = 124/222/288 ms

R6-CE#

Cấu hình đầy đủ

Trên R1-CE

R1-CE#show running-config

Building configuration...

Current configuration : 1504 bytes

!

version 12.4

hostname R1-CE

!

ip cef

!

interface Loopback0

10

Page 11: Lab 1.8 Cấu hình MPLS VPN Layer 3 và định tuyến EIGRP giữa PE-CE

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

ip address 1.1.1.1 255.255.255.0

!

interface FastEthernet0/0

ip address 192.168.12.1 255.255.255.0

duplex auto

speed auto

!

router eigrp 101

network 1.0.0.0

network 192.168.12.0

no auto-summary

!

End

Trên R2-PE

R2-PE#show running-config

Building configuration...

Current configuration : 2580 bytes

!

version 12.4

hostname R2-PE

!

ip cef

!

ip vrf A

rd 15:15

route-target export 1:1

route-target import 5:5

!

ip vrf B

rd 67:67

route-target export 6:6

route-target import 7:7

11

Page 12: Lab 1.8 Cấu hình MPLS VPN Layer 3 và định tuyến EIGRP giữa PE-CE

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

!

interface Loopback0

ip address 2.2.2.2 255.255.255.255

!

interface FastEthernet0/0

ip vrf forwarding A

ip address 192.168.12.2 255.255.255.0

duplex auto

speed auto

!

interface FastEthernet0/1

ip vrf forwarding B

ip address 192.168.26.2 255.255.255.0

duplex auto

speed auto

!

interface Serial1/3

ip address 192.168.23.2 255.255.255.0

mpls label protocol ldp

mpls ip

serial restart-delay 0

!

router eigrp 1

auto-summary

!

address-family ipv4 vrf B

redistribute bgp 24 metric 1000 100 255 1 1500

network 192.168.26.0

no auto-summary

autonomous-system 202

exit-address-family

!

12

Page 13: Lab 1.8 Cấu hình MPLS VPN Layer 3 và định tuyến EIGRP giữa PE-CE

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

address-family ipv4 vrf A

redistribute bgp 24 metric 1000 100 255 1 1500

network 192.168.12.0

no auto-summary

autonomous-system 101

exit-address-family

!

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

!

router bgp 24

no synchronization

bgp log-neighbor-changes

neighbor 4.4.4.4 remote-as 24

neighbor 4.4.4.4 update-source Loopback0

no auto-summary

!

address-family vpnv4

neighbor 4.4.4.4 activate

neighbor 4.4.4.4 send-community extended

exit-address-family

!

address-family ipv4 vrf B

redistribute eigrp 202

no synchronization

exit-address-family

!

address-family ipv4 vrf A

redistribute eigrp 101

no synchronization

13

Page 14: Lab 1.8 Cấu hình MPLS VPN Layer 3 và định tuyến EIGRP giữa PE-CE

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

exit-address-family

!

End

Trên 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

14

Page 15: Lab 1.8 Cấu hình MPLS VPN Layer 3 và định tuyến EIGRP giữa PE-CE

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

Trên R4-PE

R4-PE#show running-config

Building configuration...

Current configuration : 2580 bytes

!

version 12.4

hostname R4-PE

!

ip cef

!

ip vrf A

rd 15:15

route-target export 5:5

route-target import 1:1

!

ip vrf B

rd 67:67

route-target export 7:7

route-target import 6:6

!

interface Loopback0

ip address 4.4.4.4 255.255.255.255

!

interface FastEthernet0/0

ip vrf forwarding A

ip address 192.168.45.4 255.255.255.0

duplex auto

speed auto

!

interface FastEthernet0/1

ip vrf forwarding B

15

Page 16: Lab 1.8 Cấu hình MPLS VPN Layer 3 và định tuyến EIGRP giữa PE-CE

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

ip address 192.168.47.4 255.255.255.0

duplex auto

speed auto

!

interface Serial1/3

ip address 192.168.34.4 255.255.255.0

mpls label protocol ldp

mpls ip

serial restart-delay 0

router eigrp 1

auto-summary

!

address-family ipv4 vrf B

redistribute bgp 24 metric 1000 100 255 1 1500

network 192.168.47.0

no auto-summary

autonomous-system 202

exit-address-family

!

address-family ipv4 vrf A

redistribute bgp 24 metric 1000 100 255 1 1500

network 192.168.45.0

no auto-summary

autonomous-system 101

exit-address-family

!

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

!

router bgp 24

16

Page 17: Lab 1.8 Cấu hình MPLS VPN Layer 3 và định tuyến EIGRP giữa PE-CE

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

no synchronization

bgp log-neighbor-changes

neighbor 2.2.2.2 remote-as 24

neighbor 2.2.2.2 update-source Loopback0

no auto-summary

!

address-family vpnv4

neighbor 2.2.2.2 activate

neighbor 2.2.2.2 send-community extended

exit-address-family

!

address-family ipv4 vrf B

redistribute eigrp 202

no synchronization

exit-address-family

!

address-family ipv4 vrf A

redistribute eigrp 101

no synchronization

exit-address-family

!

end

Trên R5-CE

R5-CE#show running-config

Building configuration...

Current configuration : 1504 bytes

!

version 12.4

hostname R5-CE

!

ip cef

17

Page 18: Lab 1.8 Cấu hình MPLS VPN Layer 3 và định tuyến EIGRP giữa PE-CE

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

!

interface Loopback0

ip address 5.5.5.5 255.255.255.0

!

interface FastEthernet0/0

ip address 192.168.45.5 255.255.255.0

duplex auto

speed auto

!

router eigrp 1

auto-summary

!

router eigrp 101

network 5.0.0.0

network 192.168.45.0

no auto-summary

!

end

Trên 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

18

Page 19: Lab 1.8 Cấu hình MPLS VPN Layer 3 và định tuyến EIGRP giữa PE-CE

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

ip address 192.168.26.6 255.255.255.0

duplex auto

speed auto

router eigrp 202

network 6.0.0.0

network 192.168.26.0

no auto-summary

!

End

Trên R7-CE

R7-CE#show running-config

Building configuration...

Current configuration : 905 bytes

!

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.47.7 255.255.255.0

duplex auto

speed auto

!

router eigrp 202

network 7.0.0.0

network 192.168.47.0

no auto-summary

19

Page 20: Lab 1.8 Cấu hình MPLS VPN Layer 3 và định tuyến EIGRP giữa PE-CE

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

!

End

20