Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 19 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
19
Dung lượng
66 KB
Nội dung
lab MPLS lab MPLS Bài Lab này mô tả cách hoạt động của cơ chế Multi-Protocol Lable Switching trong hệ thống, sử dụng giao thức ldp (label discovery Protocol) hỗ trợ trong việc xây dựng và phân phối thông tin label giữa các router. A) Cấu hình ban đầu: Xây dựnng hệ thống như hình vẽ và đặt địa chỉ IP ban đầu cho toàn hệ thống Saigon1#sh run Building configuration Current configuration : 949 bytes ! version 12.2 ! hostname Saigon1 ! ip subnet-zero ! no ip domain lookup ! interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface Ethernet0/0 ip address 10.10.10.1 255.255.255.0 half-duplex ! interface Ethernet0/1 ip address 172.16.1.1 255.255.255.0 half-duplex ! router eigrp 1 passive-interface Ethernet0/1 passive-interface Loopback0 network 1.0.0.0 network 10.0.0.0 network 172.16.1.0 no auto-summary ! ip http server ip classless ! ! line con 0 line aux 0 line vty 0 4 ! end Saigon2#sh run Building configuration Current configuration : 910 bytes ! version 12.2 ! hostname Saigon2 ! ip subnet-zero ! no ip domain lookup ! ! interface Loopback0 ip address 2.2.2.2 255.255.255.0 ! interface Ethernet0/0 ip address 10.10.10.2 255.255.255.0 half-duplex ! interface Serial0/0 ip address 192.1.1.2 255.255.255.0 clockrate 64000 no fair-queue ! router eigrp 1 passive-interface Loopback0 network 2.0.0.0 network 10.0.0.0 network 192.1.1.0 no auto-summary ! ip http server ip classless ! line con 0 line aux 0 line vty 0 4 ! end Saigon3#sh run Building configuration Current configuration : 881 bytes ! version 12.2 ! hostname Saigon3 ! ip subnet-zero ! no ip domain lookup ! interface Loopback0 ip address 3.3.3.3 255.255.255.255 ! interface Serial0/0 ip address 192.1.1.1 255.255.255.0 no fair-queue ! router eigrp 1 passive-interface Loopback0 network 3.0.0.0 network 192.1.1.0 no auto-summary ! ip http server ip classless ! line con 0 line aux 0 line vty 0 4 ! End Kiểm tra thông tin bảng routing trên từng router: Saigon1#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/24 is subnetted, 1 subnets D 2.2.2.0 [90/409600] via 10.10.10.2, 00:02:06, Ethernet0/0 3.0.0.0/32 is subnetted, 1 subnets D 3.3.3.3 [90/2323456] via 10.10.10.2, 00:01:54, Ethernet0/0 172.16.0.0/24 is subnetted, 1 subnets C 172.16.1.0 is directly connected, Ethernet0/1 10.0.0.0/24 is subnetted, 1 subnets C 10.10.10.0 is directly connected, Ethernet0/0 D 192.1.1.0/24 [90/2195456] via 10.10.10.2, 00:02:08, Ethernet0/0 Saigon2#sh ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP Gateway of last resort is not set 1.0.0.0/32 is subnetted, 1 subnets D 1.1.1.1 [90/409600] via 10.10.10.1, 00:02:54, Ethernet0/0 2.0.0.0/24 is subnetted, 1 subnets C 2.2.2.0 is directly connected, Loopback0 3.0.0.0/32 is subnetted, 1 subnets D 3.3.3.3 [90/2297856] via 192.1.1.1, 00:02:40, Serial0/0 172.16.0.0/24 is subnetted, 1 subnets D 172.16.1.0 [90/307200] via 10.10.10.1, 00:00:49, Ethernet0/0 10.0.0.0/24 is subnetted, 1 subnets C 10.10.10.0 is directly connected, Ethernet0/0 C 192.1.1.0/24 is directly connected, Serial0/0 Saigon3#sh ip route Gateway of last resort is not set 1.0.0.0/32 is subnetted, 1 subnets D 1.1.1.1 [90/2323456] via 192.1.1.2, 00:02:50, Serial0/0 2.0.0.0/24 is subnetted, 1 subnets D 2.2.2.0 [90/2297856] via 192.1.1.2, 00:02:50, Serial0/0 3.0.0.0/32 is subnetted, 1 subnets C 3.3.3.3 is directly connected, Loopback0 172.16.0.0/24 is subnetted, 1 subnets D 172.16.1.0 [90/2221056] via 192.1.1.2, 00:00:58, Serial0/0 10.0.0.0/24 is subnetted, 1 subnets D 10.10.10.0 [90/2195456] via 192.1.1.2, 00:02:50, Serial0/0 C 192.1.1.0/24 is directly connected, Serial0/0 B) Cấu hình MPLS B.1 ) Bước đầu tiên cho việc cấu hình MPLS là bật chức năng ip cef trên các router tham gia Saigon1(config)#ip cef Saigon2(config)#ip cef Saigon3(config)#ip cef B.2 ) Chọn LDP là giao thức gán và phân phối label trên toàn hệ thống, có thể dùng TDP thay thế LDP. Saigon1(config)#mpls label protocol ? ldp Use LDP tdp Use TDP (default) Saigon1(config)#mpls label protocol ldp Saigon2(config)#mpls label protocol ? ldp Use LDP tdp Use TDP (default) Saigon2(config)#mpls label protocol ldp Saigon3(config)#mpls label protocol ? ldp Use LDP tdp Use TDP (default) Saigon3(config)#mpls label protocol ldp B.3) Bật cơ chế MPLS trên những cổng tương ứng trên toàn hệ thống Saigon1(config)#int e0/0 Saigon1(config-if)#mpls ip Saigon1(config-if)#end Saigon2(config)#int e0/0 Saigon2(config-if)#mpls ip Saigon2(config-if)#end Saigon2(config)#int s0/0 Saigon2(config-if)#mpls ip Saigon2(config-if)#end Saigon3(config)#int s0/0 Saigon3(config-if)#mpls ip Saigon3(config-if)#end C) Kiểm tra thông tin cấu hình: Saigon1#sh mpls interfaces Interface IP Tunnel Operational Ethernet0/0 Yes (ldp) No Yes Saigon1#sh mpls ldp discovery Local LDP Identifier: 1.1.1.1:0 Discovery Sources: Interfaces: Ethernet0/0 (ldp): xmit/recv LDP Id: 2.2.2.2:0 Saigon1#sh mpls interfaces detail Interface Ethernet0/0: IP labeling enabled (ldp) LSP Tunnel labeling not enabled BGP tagging not enabled Tagging operational Fast Switching Vectors: IP to MPLS Fast Switching Vector MPLS Turbo Vector MTU = 1500 Saigon1#sh mpls ldp neighbor Peer LDP Ident: 2.2.2.2:0; Local LDP Ident 1.1.1.1:0 TCP connection: 2.2.2.2.11000 - 1.1.1.1.646 State: Oper; Msgs sent/rcvd: 34/33; Downstream Up time: 00:21:44 LDP discovery sources: Ethernet0/0, Src IP addr: 10.10.10.2 Addresses bound to peer LDP Ident: 10.10.10.2 192.1.1.2 2.2.2.2 Saigon1#sh mpls ldp neighbor detail Peer LDP Ident: 2.2.2.2:0; Local LDP Ident 1.1.1.1:0 TCP connection: 2.2.2.2.11000 - 1.1.1.1.646 State: Oper; Msgs sent/rcvd: 34/33; Downstream; Last TIB rev sent 12 Up time: 00:21:49; UID: 1; Peer Id 0; LDP discovery sources: Ethernet0/0; Src IP addr: 10.10.10.2 holdtime: 15000 ms, hello interval: 5000 ms Addresses bound to peer LDP Ident: 10.10.10.2 192.1.1.2 2.2.2.2 Peer holdtime: 180000 ms; KA interval: 60000 ms; Peer state: estab Saigon1#sh mpls ldp bindings tib entry: 1.1.1.1/32, rev 2 local binding: tag: imp-null remote binding: tsr: 2.2.2.2:0, tag: 16 tib entry: 2.2.2.0/24, rev 4 local binding: tag: 16 remote binding: tsr: 2.2.2.2:0, tag: imp-null tib entry: 3.3.3.3/32, rev 6 local binding: tag: 17 remote binding: tsr: 2.2.2.2:0, tag: 17 tib entry: 10.10.10.0/24, rev 10 local binding: tag: imp-null remote binding: tsr: 2.2.2.2:0, tag: imp-null tib entry: 172.16.1.0/24, rev 8 local binding: tag: imp-null remote binding: tsr: 2.2.2.2:0, tag: 18 tib entry: 192.1.1.0/24, rev 12 local binding: tag: 18 remote binding: tsr: 2.2.2.2:0, tag: imp-null Saigon1#sh mpls ldp bindings detail tib entry: 1.1.1.1/32, rev 2 local binding: tag: imp-null Advertised to: 2.2.2.2:0 remote binding: tsr: 2.2.2.2:0, tag: 16 tib entry: 2.2.2.0/24, rev 4 local binding: tag: 16 Advertised to: 2.2.2.2:0 remote binding: tsr: 2.2.2.2:0, tag: imp-null tib entry: 3.3.3.3/32, rev 6 local binding: tag: 17 Advertised to: 2.2.2.2:0 remote binding: tsr: 2.2.2.2:0, tag: 17 tib entry: 10.10.10.0/24, rev 10 local binding: tag: imp-null Advertised to: 2.2.2.2:0 remote binding: tsr: 2.2.2.2:0, tag: imp-null tib entry: 172.16.1.0/24, rev 8 local binding: tag: imp-null Advertised to: 2.2.2.2:0 remote binding: tsr: 2.2.2.2:0, tag: 18 tib entry: 192.1.1.0/24, rev 12 local binding: tag: 18 Advertised to: 2.2.2.2:0 remote binding: tsr: 2.2.2.2:0, tag: imp-null Saigon1# Saigon1#sh mpls forwarding-table Local Outgoing Prefix Bytes tag Outgoing Next Hop tag tag or VC or Tunnel Id switched interface 16 Pop tag 2.2.2.0/24 0 Et0/0 10.10.10.2 17 17 3.3.3.3/32 0 Et0/0 10.10.10.2 18 Pop tag 192.1.1.0/24 0 Et0/0 10.10.10.2 Saigon1# Saigon1# Saigon1#sh mpls forwarding-table detail Local Outgoing Prefix Bytes tag Outgoing Next Hop tag tag or VC or Tunnel Id switched interface 16 Pop tag 2.2.2.0/24 0 Et0/0 10.10.10.2 MAC/Encaps=14/14, MRU=1504, Tag Stack{} 0009E8C52AC00002B93EB1808847 No output feature configured Per-packet load-sharing 17 17 3.3.3.3/32 0 Et0/0 10.10.10.2 MAC/Encaps=14/18, MRU=1500, Tag Stack{17} 0009E8C52AC00002B93EB1808847 00011000 No output feature configured Per-packet load-sharing 18 Pop tag 192.1.1.0/24 0 Et0/0 10.10.10.2 MAC/Encaps=14/14, MRU=1504, Tag Stack{} 0009E8C52AC00002B93EB1808847 No output feature configured Per-packet load-sharing Saigon1# Saigon2#sh mpls interfaces Interface IP Tunnel Operational Ethernet0/0 Yes (ldp) No Yes Serial0/0 Yes (ldp) No Yes Saigon2# Saigon2#sh mpls ldp discovery Local LDP Identifier: 2.2.2.2:0 Discovery Sources: Interfaces: Ethernet0/0 (ldp): xmit/recv LDP Id: 1.1.1.1:0 Serial0/0 (ldp): xmit/recv LDP Id: 3.3.3.3:0 Saigon2#sh mpls interfaces detail Interface Ethernet0/0: IP labeling enabled (ldp) LSP Tunnel labeling not enabled BGP tagging not enabled Tagging operational Fast Switching Vectors: IP to MPLS Fast Switching Vector MPLS Turbo Vector MTU = 1500 Interface Serial0/0: IP labeling enabled (ldp) LSP Tunnel labeling not enabled BGP tagging not enabled Tagging operational Fast Switching Vectors: IP to MPLS Fast Switching Vector MPLS Turbo Vector MTU = 1500 Saigon2# Saigon2#sh mpls ldp neighbor Peer LDP Ident: 1.1.1.1:0; Local LDP Ident 2.2.2.2:0 TCP connection: 1.1.1.1.646 - 2.2.2.2.11000 State: Oper; Msgs sent/rcvd: 33/34; Downstream Up time: 00:22:03 LDP discovery sources: Ethernet0/0, Src IP addr: 10.10.10.1 Addresses bound to peer LDP Ident: 10.10.10.1 1.1.1.1 172.16.1.1 Peer LDP Ident: 3.3.3.3:0; Local LDP Ident 2.2.2.2:0 TCP connection: 3.3.3.3.11001 - 2.2.2.2.646 State: Oper; Msgs sent/rcvd: 11/12; Downstream Up time: 00:02:42 LDP discovery sources: Serial0/0, Src IP addr: 192.1.1.1 Addresses bound to peer LDP Ident: 192.1.1.1 3.3.3.3 Saigon2#sh mpls ldp neighbor detail Peer LDP Ident: 1.1.1.1:0; Local LDP Ident 2.2.2.2:0 TCP connection: 1.1.1.1.646 - 2.2.2.2.11000 State: Oper; Msgs sent/rcvd: 33/34; Downstream; Last TIB rev sent 12 Up time: 00:22:07; UID: 1; Peer Id 0; LDP discovery sources: Ethernet0/0; Src IP addr: 10.10.10.1 holdtime: 15000 ms, hello interval: 5000 ms Addresses bound to peer LDP Ident: 10.10.10.1 1.1.1.1 172.16.1.1 Peer holdtime: 180000 ms; KA interval: 60000 ms; Peer state: estab Peer LDP Ident: 3.3.3.3:0; Local LDP Ident 2.2.2.2:0 TCP connection: 3.3.3.3.11001 - 2.2.2.2.646 State: Oper; Msgs sent/rcvd: 12/12; Downstream; Last TIB rev sent 12 Up time: 00:02:46; UID: 2; Peer Id 1; LDP discovery sources: [...]... load-sharing Saigon2# Saigon3#sh mpls interfaces Interface IP Tunnel Operational Serial0/0 Yes (ldp) No Yes Saigon3#sh mpls ldp discovery Local LDP Identifier: 3.3.3.3:0 Discovery Sources: Interfaces: Serial0/0 (ldp): xmit/recv LDP Id: 2.2.2.2:0 Saigon3# Saigon3#sh mpls interfaces de Saigon3#sh mpls interfaces detail Interface Serial0/0: IP labeling enabled (ldp) LSP Tunnel labeling not enabled BGP tagging... (10.10.10.2) [MPLS: Label 17 Exp 0] 0 msec 0 msec 4 msec 2 sg3 (192.1.1.1) 16 msec * 12 msec Cấu hình cuối cùng của hệ thống: Saigon1#sh run Building configuration Current configuration : 1077 bytes ! version 12.2 ! no service password-encryption ! hostname Saigon1 ! logging queue-limit 100 ! ip subnet-zero ! no ip domain lookup ip host sg3 192.1.1.1 ip host sg2 10.10.10.2 ! ip cef mpls label protocol ldp mpls. .. Vectors: IP to MPLS Fast Switching Vector MPLS Turbo Vector MTU = 1500 Saigon3#sh mpls ldp neighbor Peer LDP Ident: 2.2.2.2:0; Local LDP Ident 3.3.3.3:0 TCP connection: 2.2.2.2.646 - 3.3.3.3.11001 State: Oper; Msgs sent/rcvd: 12/12; Downstream Up time: 00:02:57 LDP discovery sources: Serial0/0, Src IP addr: 192.1.1.2 Addresses bound to peer LDP Ident: 10.10.10.2 192.1.1.2 2.2.2.2 Saigon3#sh mpls ldp neighbor... tag: imp-null Saigon3# Saigon3#sh mpls forwarding-table Local Outgoing Prefix Bytes tag Outgoing Next Hop tag tag or VC or Tunnel Id switched interface 16 16 1.1.1.1/32 0 Se0/0 point2point 17 Pop tag 2.2.2.0/24 0 Se0/0 point2point 18 18 172.16.1.0/24 0 Se0/0 point2point 19 Pop tag 10.10.10.0/24 0 Se0/0 point2point Saigon3# Saigon3#sh mpls forwarding-table de Saigon3#sh mpls forwarding-table detail Local... end Saigon2#sh run Building configuration Current configuration : 977 bytes ! version 12.2 no service password-encryption ! hostname Saigon2 ! ip subnet-zero ! no ip domain lookup ! ip cef mpls label protocol ldp mpls ldp logging neighbor-changes ! interface Loopback0 ip address 2.2.2.2 255.255.255.0 ! interface Ethernet0/0 ip address 10.10.10.2 255.255.255.0 half-duplex tag-switching ip ! interface... end Saigon3#sh run Building configuration Current configuration : 930 bytes ! version 12.2 no service password-encryption ! hostname Saigon3 ! ip subnet-zero ! no ip domain lookup ! ip cef mpls label protocol ldp mpls ldp logging neighbor-changes ! ! interface Loopback0 ip address 3.3.3.3 255.255.255.255 ! interface Serial0/0 ip address 192.1.1.1 255.255.255.0 tag-switching ip no fair-queue ! router... binding: tsr: 3.3.3.3:0, tag: 18 tib entry: 192.1.1.0/24, rev 12 local binding: tag: imp-null remote binding: tsr: 1.1.1.1:0, tag: 18 remote binding: tsr: 3.3.3.3:0, tag: imp-null Saigon2#sh mpls ldp bindings de Saigon2#sh mpls ldp bindings detail tib entry: 1.1.1.1/32, rev 2 local binding: tag: 16 Advertised to: 1.1.1.1:0 3.3.3.3:0 remote binding: tsr: 1.1.1.1:0, tag: imp-null remote binding: tsr: 3.3.3.3:0,... tag: 18 remote binding: tsr: 3.3.3.3:0, tag: imp-null Saigon2# Saigon2#sh mpls forwarding-table Local Outgoing Prefix Bytes tag Outgoing Next Hop tag tag or VC or Tunnel Id switched interface 16 Pop tag 1.1.1.1/32 0 Et0/0 10.10.10.1 17 Pop tag 3.3.3.3/32 712 Se0/0 point2point 18 Pop tag 172.16.1.0/24 0 Et0/0 10.10.10.1 Saigon2#sh mpls forwarding-table detail Local Outgoing Prefix Bytes tag Outgoing Next... 192.1.1.2 holdtime: 15000 ms, hello interval: 5000 ms Addresses bound to peer LDP Ident: 10.10.10.2 192.1.1.2 2.2.2.2 Peer holdtime: 180000 ms; KA interval: 60000 ms; Peer state: estab Saigon3# Saigon3#sh mpls ldp bindings tib entry: 1.1.1.1/32, rev 2 local binding: tag: 16 remote binding: tsr: 2.2.2.2:0, tag: 16 tib entry: 2.2.2.0/24, rev 4 local binding: tag: 17 remote binding: tsr: 2.2.2.2:0, tag: imp-null... 172.16.1.0/24, rev 8 local binding: tag: 18 remote binding: tsr: 2.2.2.2:0, tag: 18 tib entry: 192.1.1.0/24, rev 12 local binding: tag: imp-null remote binding: tsr: 2.2.2.2:0, tag: imp-null Saigon3#sh mpls ldp bindings detail tib entry: 1.1.1.1/32, rev 2 local binding: tag: 16 Advertised to: 2.2.2.2:0 remote binding: tsr: 2.2.2.2:0, tag: 16 tib entry: 2.2.2.0/24, rev 4 local binding: tag: 17 Advertised . lab MPLS lab MPLS Bài Lab này mô tả cách hoạt động của cơ chế Multi-Protocol Lable Switching trong hệ thống, sử dụng giao thức ldp (label discovery Protocol) hỗ. label trên toàn hệ thống, có thể dùng TDP thay thế LDP. Saigon1(config) #mpls label protocol ? ldp Use LDP tdp Use TDP (default) Saigon1(config) #mpls label protocol ldp Saigon2(config) #mpls label. (default) Saigon2(config) #mpls label protocol ldp Saigon3(config) #mpls label protocol ? ldp Use LDP tdp Use TDP (default) Saigon3(config) #mpls label protocol ldp B.3) Bật cơ chế MPLS trên những cổng