CẤU HÌNH MPLS LDP

Post new topic   Reply to topic

View previous topic View next topic Go down

CẤU HÌNH MPLS LDP

Post  chantroitinhoc on Thu Oct 06, 2011 2:51 pm

Bài LAB này tôi giới thiệu cách cấu hình MPLS LDP.
Topology:



1. Các bạn tự cấu hình cơ bản trên các router, thiết lập địa chỉ IP như trong mô hình.

2. Cấu hình định tuyến OSPF trên các router và cho quảng bá tất cả các lớp mạng.

3. Cấu hình kích hoạt tính năng MPLS với giao thức MPLS chuẩn IETF trên các router P2, P3 và P4:


P2(config)# interface f0/0
P2(config-if)# mpls ip
P2(config)# interface f1/0
P2(config-if)# mpls ip

P3(config)# interface f0/0
P3(config-if)# mpls ip
P3(config)# interface f1/0
P3(config-if)# mpls ip

P4(config)# interface f0/0
P4(config-if)# mpls ip
P4(config)# interface f1/0
P4(config-if)# mpls ip


4. Cấu hình router P1 để kích hoạt cùng giao thức MPLS mà không sử dụng lệnh mpls ip:

P1(config)# interface f0/0
P1(config-if)# tag-switching ip

P1(config)# interface f1/0
P1(config-if)# tag-switching ip

Các bạn có thể kiểm tra lại cấu hình các interface f0/0, f1/0 trên P1 để thấy giao thức mpls đã được kích hoạt.

P1# show running-config interface f0/0
P1# show running-config interface f1/0


5. Cấu hình trên các router chỉ cho sử dụng dãy nhãn từ 20 đến 200:


P1(config)# mpls label range 20 200

Các bạn cấu hình tương tự trên các router P2, P3 và P4.


6. Cấu hình router P1 sử dụng địa chỉ IP cổng f0/0 làm MPLS Router-ID:

Chúng ta dùng lệnh show mpls ldp neighbor trên router P2 để thầy ID của router P1 chính là 1.1.1.1:0

P2# show mpls ldp neighbor

Chúng ta thay đổi ID trên router P1 như sau:

P1(config)# mpls ldp router-id fastEthernet 0/0 force

Bây giờ chúng ta qua router P2 thì thấy router-id của neighbor P1 đã thay đổi là 192.168.12.1:0


7. Cấu hình trên các router để gửi MPLS Hello sau mỗi 2 giấy và holdtime là 10 giậy:

P1(config)# mpls ldp discovery hello interval 2
P1(config)# mpls ldp discovery hello holdtime 10

Chúng ta có thể dùng lệnh show running-config | include discovery để kiểm tra thông tin vừa cấu hình

P1# show running-config | include discovery

Các bạn cấu hình tương tự trên các router P2, P3 và P4.


8. Cấu hình router P3 và P4 để thiết lập kết nối LDP giữa các interface của chúng:

P3(config)# interface f1/0
P3(config-if)# mpls ldp discovery transport-address interface

P4(config)# interface f1/0
P4(config-if)# mpls ldp discovery transport-address interface

Các bạn có thể kiểm tra lại bằng lệnh show mpls ldp neighbor

P3# show mpls ldp neighbor

P4# show mpls ldp neighbor


9. Cấu hình trên tất cả các router để sử dụng cơ chế chứng thực MPLS MD5 với password là ispace:

P1(config)# mpls ldp neighbor 2.2.2.2 password ispace
P1(config)# mpls ldp neighbor 3.3.3.3 password ispace

P2(config)# mpls ldp neighbor 192.168.12.1 password ispace
P2(config)# mpls ldp neighbor 4.4.4.4 password ispace

P3(config)# mpls ldp neighbor 192.168.12.1 password ispace
P3(config)# mpls ldp neighbor 4.4.4.4 password ispace

P4(config)# mpls ldp neighbor 2.2.2.2 password ispace
P4(config)# mpls ldp neighbor 3.3.3.3 password ispace


10. Cấu hình để trường TTL từ các gói tin IP được sao chép lên nhãn trên các router:

P1(config)# mpls ip propagate-ttl

Các bạn cấu hình tương tự trên các router P2, P3 và P4.


11. Cấu hình quảng bá default route trên router P2:

P2(config)# router ospf 1
P2(config-router)# default-information originate always

Bây giờ các bạn có thể kiểm tra thông tin trên router P1:

P1# show ip route
P1# show mpls forwarding-table

Sau khi kiểm tra bảng MPLS forward thì không thấy chuyển tiếp cho default route.
Do vậy chúng ta cần cấu hình MPLS ip default route trên các router P1, P3 và P4:

P1(config)# mpls ip default-route

Tương tự bạn cấu hình trên router P3, P4. Sau đó các bạn kiểm tra lại bảng forward thì thấy đã có sự thay đổi.


12. Cấu hình maximum hop count cho LDP là 10 trên các router:

P1(config)# mpls ldp maxhops 10

Các bạn cấu hình tương tự trên P2, P3 và P4.




chantroitinhoc
Admin

Posts: 126
Join date: 2008-01-16

View user profile http://chantroitinhoc.niceboard.net

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You can reply to topics in this forum