Lab Cấu hình MPLS cơ bản pptx

17 246 0
Lab Cấu hình MPLS cơ bản pptx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

+ Sơ đồ cấu hình như sau: Như đã đề cập trong phần 3.1 thì quá trình cấu hình MPLS có thể được thể hiện gói gọn trong lược đồ sau: + Cấu hình toàn bộ Do tính chất cấu hình giống nhau giữa CE1, PE1, P1 v CE2, PE2, P2 nn chỉ minh họa cấu hình tồn bộ của CE1, PE1, P1. + Cấu hình CE1 Current configuration : 1467 bytes ! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname CE1 ! no ip domain lookup ! ip cef ip audit po max-events 100 ! interface FastEthernet0/0 ip address 192.168.70.1 255.255.255.0 duplex half no keepalive ! interface Serial0/1 ip address 192.168.1.1 255.255.255.0 serial restart-delay 0 clock rate 64000 ! ip classless ip route 0.0.0.0 0.0.0.0 192.168.1.2 no ip http server no ip http secure-server ! line con 0 exec-timeout 0 0 logging synchronous stopbits 1 line aux 0 stopbits 1 line vty 0 4 exec-timeout 0 0 privilege level 15 logging synchronous no login ! ! end + Cấu hình PE1: Current configuration : 1814 byte ! version 12.3 service timestamps debug datetime service timestamps log datetime m no service password-encryption ! hostname PE1 ! no ip domain lookup ! ip cef ip audit po max-events 100 tag-switching tdp router-id Loopb ! interface Loopback0 ip address 1.1.1.1 255.255.255.2 ! interface Serial0/1 ip address 192.168.1.2 255.255.2 serial restart-delay 0 ! ! router ospf 1 log-adjacency-changes network 0.0.0.0 255.255.255.255 ! router bgp 1 no synchronization bgp log-neighbor-changes network 1.1.1.1 mask 255.255.255 redistribute static neighbor 4.4.4.4 remote-as 1 neighbor 4.4.4.4 update-source L no auto-summary ! line con 0 exec-timeout 0 0 logging synchronous stopbits 1 line aux 0 stopbits 1 line vty 0 4 exec-timeout 0 0 privilege level 15 logging synchronous no login ! ! end + Cấu hình P1 Current configuration : 1637 bytes ! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname P1 ! no ip domain lookup ! ip cef ip audit po max-events 100 tag-switching tdp router-id Loopback0 ! interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface Serial0/0 ip address 10.0.0.1 255.255.255.0 tag-switching ip serial restart-delay 0 clock rate 64000 ! interface Serial0/1 ip address 11.0.0.1 255.255.255.0 tag-switching ip serial restart-delay 0 clock rate 64000 ! router ospf 1 log-adjacency-changes network 0.0.0.0 255.255.255.255 area 0 ! line con 0 exec-timeout 0 0 logging synchronous stopbits 1 line aux 0 stopbits 1 line vty 0 4 exec-timeout 0 0 privilege level 15 logging synchronous no login ! ! end + Cấu hình chi tiết + Bước 1 : cấu hình địa chỉ cho các router CE1(config)#interface s0/1 CE1(config-if)#ip address 192.168.1.1 255.255.255.0 CE1(config-if)#clock rate 64000 CE1(config-if)#no shutdown CE1(config-if)#exit CE1(config)#interface e0/0 CE1(config-if)#ip address 192.168.70.1 255.255.255.0 CE1(config-if)#no keepalive CE1(config-if)#no shutdown PE1(config)#interface s0/1 PE1(config-if)#ip address 192.168.1.2 255.255.255.0 PE1(config-if)#clock rate 64000 PE1(config-if)#no shutdown PE1(config-if)#exit PE1(config)#interface s0/0 PE1(config-if)#ip address 10.0.0.2 255.255.255.0 PE1(config-if)#no shutdown PE1(config)#interface lo0 PE1(config-if)#ip address 1.1.1.1 255.255.255.255 P1(config)#interface s0/0 P1(config-if)#ip address 10.0.0.1 255.255.255.0 P1(config-if)#clock rate 64000 P1(config-if)#no shutdown P1(config-if)#exit P1(config)#interface s0/1 P1(config-if)#ip address 11.0.0.1 255.255.255.0 P1(config-if)#clock rate 64000 P1(config-if)#no shutdown P1(config)#interface lo0 P1(config-if)#ip address 2.2.2.2 255.255.255.255 P2(config)#interface s0/1 P2(config-if)#ip address 11.0.0.2 255.255.255.0 P2(config-if)#clock rate 64000 P2(config-if)#no shutdown P2(config-if)#exit P2(config)#interface s0/0 P2(config-if)#ip address 12.0.0.2 255.255.255.0 P2(config-if)#clock rate 64000 P2(config-if)#no shutdown P2(config)#interface lo0 P2(config-if)#ip address 3.3.3.3 255.255.255.255 PE2(config)#interface s0/0 PE2(config-if)#ip address 12.0.0.2 255.255.255.0 PE2(config-if)#clock rate 64000 PE2(config-if)#no shutdown PE2(config-if)#exit PE2(config)#interface s0/1 PE2(config-if)#ip address 192.168.2.2 255.255.255.0 PE2(config-if)#no shutdown PE2(config)#interface lo0 PE2(config-if)#ip address 4.4.4.4 255.255.255.255 CE2(config)#interface s0/1 CE2(config-if)#ip address 192.168.2.1 255.255.255.0 CE2(config-if)#clock rate 64000 CE2(config-if)#no shutdown CE2(config-if)#exit CE2(config)#interface e0/0 CE2(config-if)#ip address 192.168.80.1 255.255.255.0 CE2(config-if)#no keepalive CE2(config-if)#no shutdown + bước 2 : cấu hình định tuyến cho các router .Router CE1 , CE2 chỉ sửdụng định tuyến tĩnh để đi đến mạng của ISP . Router PE1 , PE2 chạy giao thức BGP , router P1 , P2 chạy giao thức OSPF. CE1(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.2 PE1(config)#router ospf 1 PE1(config-router)#network 0.0.0.0 0.0.0.0 area 0 PE1(config)#router bgp 1 PE1(config-router)#no synchronization PE1(config-router)#network 1.1.1.1 mask 255.255.255.255 PE1(config-router)#neighbor 4.4.4.4 remote-as 1 PE1(config-router)#neighbor 4.4.4.4 update-source lo0 PE1(config-router)#redistribute static P1(config)#router ospf 1 P1(config-router)# network 2.2.2.2 0.0.0.0 area 0 P1(config-router)# network 10.0.0.0 0.0.0.255 area 0 P1(config-router)# network 11.0.0.0 0.0.0.255 area 0 P1(config-router)# network 0.0.0.0 255.255.255.255 area 0 P2(config)#router ospf 1 P2(config-router)#network 3.3.3.3 0.0.0.0 area 0 P2(config-router)#network 11.0.0.0 0.0.0.255 area 0 P2(config-router)#network 12.0.0.0 0.0.0.255 area 0 P2(config-router)#network 0.0.0.0 255.255.255.255 area 0 PE2(config)#router ospf 1 PE2(config-router)#network 0.0.0.0 0.0.0.0 area 0 PE2(config)#router bgp 1 PE2(config-router)#no synchronization PE2(config-router)#network 4.4.4.4 mask 255.255.255.255 PE2(config-router)#neighbor 1.1.1.1 remote-as 1 PE2(config-router)#neighbor 1.1.1.1 update-source lo0 PE2(config-router)#redistribute static CE2(config)#ip route 0.0.0.0 0.0.0.0 128.107.10.5 + Bước 3 : Kiểm tra bảng định tuyến Tag-switching hay MPLS sẽ không làm việc nếu trong mạng service provider phần định tuyến không chạy. CE1#sh ip route … Gateway of last resort is 192.168.1.2 to network 0.0.0.0 C 192.168.1.0/24 is directly connected, Serial0/1 C 192.168.70.0/24 is directly connected, FastEthernet0/0 S* 0.0.0.0/0 [1/0] via 192.168.1.2 PE1#sh ip route … Gateway of last resort is not set 1.0.0.0/32 is subnetted, 1 subnets C 1.1.1.1 is directly connected, Loopback0 2.0.0.0/32 is subnetted, 1 subnets O 2.2.2.2 [110/65] via 10.0.0.1, 01:39:11, Serial0/0 3.0.0.0/32 is subnetted, 1 subnets O 3.3.3.3 [110/129] via 10.0.0.1, 01:39:11, Serial0/0 4.0.0.0/32 is subnetted, 1 subnets O 4.4.4.4 [110/193] via 10.0.0.1, 01:39:11, Serial0/0 10.0.0.0/24 is subnetted, 1 subnets C 10.0.0.0 is directly connected, Serial0/0 11.0.0.0/24 is subnetted, 1 subnets O 11.0.0.0 [110/128] via 10.0.0.1, 01:39:11, Serial0/0 12.0.0.0/24 is subnetted, 1 subnets O 12.0.0.0 [110/192] via 10.0.0.1, 01:39:16, Serial0/0 C 192.168.1.0/24 is directly connected, Serial0/1 O 192.168.2.0/24 [110/256] via 10.0.0.1, 01:39:16, Serial0/0 P1#sh ip route … Gateway of last resort is not set 1.0.0.0/32 is subnetted, 1 subnets O 1.1.1.1 [110/65] via 10.0.0.2, 01:41:11, Serial0/0 2.0.0.0/32 is subnetted, 1 subnets C 2.2.2.2 is directly connected, Loopback0 3.0.0.0/32 is subnetted, 1 subnets O 3.3.3.3 [110/65] via 11.0.0.2, 01:41:11, Serial0/1 4.0.0.0/32 is subnetted, 1 subnets O 4.4.4.4 [110/129] via 11.0.0.2, 01:41:11, Serial0/1 10.0.0.0/24 is subnetted, 1 subnets C 10.0.0.0 is directly connected, Serial0/0 11.0.0.0/24 is subnetted, 1 subnets C 11.0.0.0 is directly connected, Serial0/1 12.0.0.0/24 is subnetted, 1 subnets O 12.0.0.0 [110/128] via 11.0.0.2, 01:41:14, Serial0/1 O 192.168.1.0/24 [110/128] via 10.0.0.2, 01:41:14, Serial0/0 O 192.168.2.0/24 [110/192] via 11.0.0.2, 01:41:14, Serial0/1 P2#sh ip route … Gateway of last resort is not set 1.0.0.0/32 is subnetted, 1 subnets O 1.1.1.1 [110/129] via 11.0.0.1, 01:42:13, Serial0/1 2.0.0.0/32 is subnetted, 1 subnets O 2.2.2.2 [110/65] via 11.0.0.1, 01:42:13, Serial0/1 3.0.0.0/32 is subnetted, 1 subnets C 3.3.3.3 is directly connected, Loopback0 4.0.0.0/32 is subnetted, 1 subnets O 4.4.4.4 [110/65] via 12.0.0.2, 01:42:13, Serial0/0 10.0.0.0/24 is subnetted, 1 subnets O 10.0.0.0 [110/128] via 11.0.0.1, 01:42:13, Serial0/1 11.0.0.0/24 is subnetted, 1 subnets C 11.0.0.0 is directly connected, Serial0/1 12.0.0.0/24 is subnetted, 1 subnets C 12.0.0.0 is directly connected, Serial0/0 O 192.168.1.0/24 [110/192] via 11.0.0.1, 01:42:18, Serial0/1 O 192.168.2.0/24 [110/128] via 12.0.0.2, 01:42:18, Serial0/0 PE2#sh ip route … Gateway of last resort is not set 1.0.0.0/32 is subnetted, 1 subnets O 1.1.1.1 [110/193] via 12.0.0.1, 01:43:12, Serial0/0 2.0.0.0/32 is subnetted, 1 subnets O 2.2.2.2 [110/129] via 12.0.0.1, 01:43:12, Serial0/0 3.0.0.0/32 is subnetted, 1 subnets O 3.3.3.3 [110/65] via 12.0.0.1, 01:43:12, Serial0/0 4.0.0.0/32 is subnetted, 1 subnets C 4.4.4.4 is directly connected, Loopback0 10.0.0.0/24 is subnetted, 1 subnets O 10.0.0.0 [110/192] via 12.0.0.1, 01:43:12, Serial0/0 11.0.0.0/24 is subnetted, 1 subnets O 11.0.0.0 [110/128] via 12.0.0.1, 01:43:12, Serial0/0 12.0.0.0/24 is subnetted, 1 subnets C 12.0.0.0 is directly connected, Serial0/0 O 192.168.1.0/24 [110/256] via 12.0.0.1, 01:43:13, Serial0/0 C 192.168.2.0/24 is directly connected, Serial0/1 CE2#sh ip route … Bây giờ ta kiểm tra xem mạng hoạt động như thế nào bằng cách dùng extended ping từ mạng LAN của Router CE1 đến mạng LAN của Router CE2 : CE1#ping Gateway of last resort is 192.168.2.2 to network 0.0.0.0 C 192.168.80.0/24 is directly connected, FastEthernet0/0 C 192.168.2.0/24 is directly connected, Serial0/1 S* 0.0.0.0/0 [1/0] via 192.168.2.2 Protocol [ip]: Target IP address: 192.168.80.1 Repeat count [5]: Datagram size [100]: Timeout in seconds [2]: Extended commands [n]: y [...]... Để cấu hình tag-switching, Cisco Express Forwarding (CEF) phải được bật lên cũng như tag-switching phải được bật trên các interface tương ứng Lưu ý : Ta cũng có thể cấu hình MPLS thay vì cấu hình tag-switching, MPLS ra đời sau tag-switching, hoạt động và có cấu hình tương tự như tag-switching Tuy nhiên MPLS phụ thuộc vào Label Distribution protocol (LDP) để trao đổi nhãn với các láng giềng Khi cấu hình. .. CE1 đến CE2 thì gói tin sẽ bị P1 đánh rớt Để giải quyết vấn đề này, ta sử dụng MPLS trên các router của mạng ISP + Bước 4: Cấu hình MPLS trên các router Cấu hình MPLS trên các router Như đã phân tích ở trên, vì các gói từ router CE1 và CE2 không cần phải gắn nhãn nên ta chỉ cấu hình MPLS trên các router của mạng ISP Cấu hình bằng cách sử dụng tag-switching Tag-switching phụ thuộc vào tag distribution... ra của bảng trên , ta có thể thấy gói tin được gởi đi như một nhãn , hay trong trường hợp này là gói tin được tag Vì gói tin cần phải được chuyển đến 4.4.4.4 nên quan sát bảng trên ta thấy , router PE1 gắn nhãn 18 vào gói tin này , quan sát bảng trên ta biết được nhãn ngõ ra là 19 , interface ngõ ra là se0/0, chính là router P1 Gói tin được chuyển đến P1 Step 4 : Tại router P1 , quan sát bảng định... tag-switching tdp discovery (nếu dùng mpls thì sử dụng câu lệnh show mpls ldp discovery) Ví dụ : PE2#sh tag-switching tdp discovery Local TDP Identifier: 4.4.4.4:0 Discovery Sources: Interfaces: Serial0/0 (tdp): xmit/recv TDP Id: 3.3.3.3:0 Nếu muốn có nhiều thông tin hơn cho việc gán nhãn trong một mạng , sử dụng câu lệnh show tag-switching tdp bindings ( hoặc là show mpls ldp bindings ) PE2#sh tag-switching... gateway của nó là CE1 Step 2 : CE1 nhận frame , bỏ qua thông tin lớp 2 , kiểm tra thông tin lớp 3 để xem thử có đường đến mạng đích 192.168.80.0 hay không ? Không có route nào trong bảng định tuyến để đến mạng này (xem bảng định tuyến của CE1) nên nó chuyển gói tin đến router PE1 bằng route tĩnh Step 3 : Router PE1 nhận gói tin và kiểm tra thông tin lớp 3 , nó biết có một route đến mạng đích mà nó... tương tự như tag-switching Tuy nhiên MPLS phụ thuộc vào Label Distribution protocol (LDP) để trao đổi nhãn với các láng giềng Khi cấu hình MPLS, các câu lệnh đều giống như tag-switching nhưng chỉ khác ở chỗ thay vì sử dụng lệnh tag-switching ip ta sử dụng câu lệnh mpls ip P1(config)#ip cef P1(config)#tag-switching advertise-tags P1(config)#tag-switching ip P1(config)#int s0/0 P1(config-if)#tag-switching... Operational Serial0/0 Yes (tdp) No Yes Serial0/1 Yes (tdp) No Yes CE2#sh tag-switching interfaces Interface IP Tunnel Operational Serial0/0 Yes (tdp) No Yes + Bước 6: Kiểm tra hoạt động mạng mpls Cách tốt nhất để kiểm tra xem MPLS hoạt động hay chưa ta hãy thực hiện extended ping từ mạng LAN của CE1 đến mạng LAN của CE2 CE1#ping Protocol [ip]: Target IP address: 192.168.80.1 Repeat count [5]: Datagram size... hiện định tuyến, nó chỉ đơn giản chuyển các gói tin untagged (các gói tin sau khi đã tháo nhãn) đến router PE2 Step 6 : router PE2 nhận gói tin và kiểm tra thông tin lớp 3, PE2 biết mạng đích (quan sát bảng định tuyến của PE2), địa chỉ next- hop của mạng đích là 192.168.2.1 Router PE2 chuyển gói tin đến CE2 PE2#sh tag-switching forwarding-table Local Outgoing Prefix Bytes tag Outgoing Next Hop tag tag . + Sơ đồ cấu hình như sau: Như đã đề cập trong phần 3.1 thì quá trình cấu hình MPLS có thể được thể hiện gói gọn trong lược đồ sau: + Cấu hình toàn bộ Do tính chất cấu hình giống nhau. bị P1 đánh rớt. Để giải quyết vấn đề này, ta sử dụng MPLS trên các router của mạng ISP. + Bước 4: Cấu hình MPLS trên các router Cấu hình MPLS trên các router. Như đã phân tích ở trên, vì các. Để cấu hình tag-switching, Cisco Express Forwarding (CEF) phải được bật lên cũng như tag-switching phải được bật trên các interface tương ứng. Lưu ý : Ta cũng có thể cấu hình MPLS thay vì cấu

Ngày đăng: 25/07/2014, 07:21

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan