1、试验内容:1、用 IS-IS 配置网络2、调整 metric 值1、用 IS-IS 配置网络Router(config)#hostname r1r1(config)#int e 0/0r1(config-if)#ip address 2.2.2.1 255.255.255.252r1(config-if)#no shutr1(config)#int s 1/0r1(config-if)#ip address 7.7.7.1 255.255.255.252r1(config-if)#no shutr1(config)#int loopback 0r1(config-if)#ip address
2、1.1.1.1 255.255.255.255 r1(config-if)#exitr1(config)#router isis ;启用 IS-ISr1(config-router)#net 49.0001.0000.0000.0001.00 ;定义 IS 标识r1(config-router)#is-type level-1-2 ;定义类型,默认为 level-1-2r1(config-router)#exitr1(config)#int e 0/0r1(config-if)#ip router isis ;在接口启用 IS-ISr1(config-if)#isis circuit-type
3、 level-1-2 ;接口类型,默认为 level-1-2r1(config-if)#exitr1(config)#int loopback 0r1(config-if)#ip router isisr1(config)#int s 1/0r1(config-if)#ip router isisr1(config-if)#isis circuit-type level-1-2Router#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname r2r2(config
4、)#int loopback 0r2(config-if)#ip address 1.1.1.2 255.255.255.255r2(config-if)#exitr2(config)#int e 0/0r2(config-if)#ip add 2.2.2.2 255.255.255.252r2(config-if)#no shutr2(config-if)#exit*Mar 1 00:11:57.211: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up*Mar 1 00:11:58.211: %LINEPROTO-5-UP
5、DOWN: Line protocol on Interface Ethernet0/0, changed state to r2(config)#int s 1/0r2(config-if)#ip address 5.5.5.1 255.255.255.252r2(config-if)#no shutr2(config-if)#exit*Mar 1 00:12:29.779: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up*Mar 1 00:12:30.779: %LINEPROTO-5-UPDOWN: Line protoc
6、ol on Interface Serial1/0, changed state t r2(config)#router isisr2(config-router)#net 49.0001.0000.0000.0002.00r2(config-router)#exitr2(config)#int loopback 0r2(config-if)#ip router isisr2(config)#int e 0/0r2(config-if)#ip router isisr2(config-if)#exitr2(config)#int s 1/0r2(config-if)#ip router isi
7、sr2(config-if)#Zr2#sh i*Mar 1 00:13:52.307: %SYS-5-CONFIG_I: Configured from console by consolesis neiSystem Id Type Interface IP Address State Holdtime Circuit Idr1 L1 Et0/0 2.2.2.1 UP 23 r2.01 r1 L2 Et0/0 2.2.2.1 UP 24 r2.01 为什么会有两条?Router#config tEnter configuration commands, one per line. End wi
8、th CNTL/Z.Router(config)#hostname r3r3(config)#int loopback 0r3(config-if)#ip address 1.1.1.3 255.255.255.255r3(config-if)#exitr3(config)#int e 0/0r3(config-if)#ip address 3.3.3.1 255.255.255.252r3(config-if)#no shutr3(config-if)#exit*Mar 1 00:17:39.531: %LINK-3-UPDOWN: Interface Ethernet0/0, change
9、d state to up*Mar 1 00:17:40.531: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state texitr3(config)#router isisr3(config-router)#net 49.0002.0000.0000.0003.00r3(config-router)#is-type level-1r3(config-router)#exitr3(config)#int loopback 0r3(config-if)#ip router isisr3(config
10、-if)#isis circuit-type level-1r3(config)#int e 0/0r3(config-if)#ip router isisr3(config-if)#isis circuit-type level-1Router#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname r4r4(config)#int loopback 0r4(config-if)#ip address 1.1.1.4 255.255.255.255r4(config
11、-if)#exitr4(config)#int e 0/0r4(config-if)#ip address 3.3.3.2 255.255.255.252r4(config-if)#no shutr4(config-if)#exit*Mar 1 00:20:11.451: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up*Mar 1 00:20:12.451: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to r4(con
12、fig)#int s 1/0r4(config-if)#ip address 7.7.7.2 255.255.255.252r4(config-if)#no shutr4(config-if)#*Mar 1 00:20:46.655: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up*Mar 1 00:20:47.655: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to upr4(config-if)#exitr4(config
13、)#router isisr4(config-router)#net 49.0002.0000.0000.0004.00r4(config-router)#exitr4(config)#int loopback 0r4(config-if)#ip router isisr4(config)#int e 0/0r4(config-if)#ip router isisr4(config-if)#exitr4(config)#int s 1/0r4(config-if)#ip router isisr4(config-if)#exitr4(config)#int s 1/1r4(config-if)
14、#ip router isisCannot enable ISIS-IP. Configure IP address or make the interface unnumberedr4(config-if)#no shut*Mar 1 00:22:32.287: %LINK-3-UPDOWN: Interface Serial1/1, changed state to up*Mar 1 00:22:33.287: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to upp router isi
15、sCannot enable ISIS-IP. Configure IP address or make the interface unnumberedr4(config-if)#Zr4#*Mar 1 00:22:47.491: %SYS-5-CONFIG_I: Configured from console by consolesh ip int s 1/1Serial1/1 is up, line protocol is upInternet protocol processing disabledr4#*Mar 1 00:23:03.159: %LINEPROTO-5-UPDOWN:
16、Line protocol on Interface Serial1/1, changed state to downr4#config tEnter configuration commands, one per line. End with CNTL/Z.r4(config)#int s 1/1r4(config-if)#ip address 4.4.4.1 255.255.255.252r4(config-if)#no shutr4(config-if)#exitr4(config)#Z*Mar 1 00:23:44.159: %SYS-5-CONFIG_I: Configured fr
17、om console by co r4#sh isis neiSystem Id Type Interface IP Address State Holdtime Circuit Idr1 L2 Se1/0 7.7.7.1 UP 27 00r3 L1 Et0/0 3.3.3.1 UP 9 r3.01 RouterenRouter#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname r5r5(config)#int loop 0r5(config-if)#ip ad
18、dress 1.1.1.5 255.255.255.255r5(config-if)#exitr5(config)#int e 0/0r5(config-if)#ip address 6.6.6.1 255.255.255.252r5(config-if)#no shutr5(config-if)#exit*Mar 1 00:25:18.679: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up*Mar 1 00:25:19.679: %LINEPROTO-5-UPDOWN: Line protocol on Interfac
19、e Ethernet0/0, changed state t r5(config)#int s 1/0r5(config-if)#ip addr5(config-if)#ip address 5.5.5.2 255.255.255.252r5(config-if)#no shutr5(config-if)#exit*Mar 1 00:25:45.687: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up*Mar 1 00:25:46.687: %LINEPROTO-5-UPDOWN: Line protocol on Interf
20、ace Serial1/0, changed state to r5(config)#int s 1/1r5(config-if)#ip address 4.4.4.2 255.255.255.252r5(config-if)#no shutr5(config-if)#exit*Mar 1 00:26:14.687: %LINK-3-UPDOWN: Interface Serial1/1, changed state to up*Mar 1 00:26:15.687: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, chan
21、ged state to upsisr5(config-router)#router isisr5(config-router)#net 49.0003.0000.0000.0005.00r5(config-router)#exitr5(config)#int loopback 0r5(config-if)#ip router isisr5(config)#int e 0/0r5(config-if)#ip router isisr5(config-if)#exitr5(config)#int s 1/0r5(config-if)#ip router isisr5(config-if)#exi
22、tr5(config)#int s 1/1r5(config-if)#ip router isisr5(config-if)#Zr5#sh *Mar 1 00:27:34.807: %SYS-5-CONFIG_I: Configured from console by cons r5#sh isis neiSystem Id Type Interface IP Address State Holdtime Circuit Idr2 L2 Se1/0 5.5.5.1 UP 28 00r5#ping 5.5.5.1Type escape sequence to abort.Sending 5, 1
23、00-byte ICMP Echos to 5.5.5.1, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 16/57/116 msr5#sh isis neiSystem Id Type Interface IP Address State Holdtime Circuit Idr2 L2 Se1/0 5.5.5.1 UP 24 00r5#ping 4.4.4.1Type escape sequence to abort.Sending 5, 100-byte ICMP Ec
24、hos to 4.4.4.1, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 48/72/148 msr5#sh isis neiSystem Id Type Interface IP Address State Holdtime Circuit Idr4 L2 Se1/1 4.4.4.1 UP 22 01r2 L2 Se1/0 5.5.5.1 UP 26 00RouterenRouter#config tEnter configuration commands, one pe
25、r line. End with CNTL/Z.Router(config)#hostname r6r6(config)#int loopback 0r6(config-if)#ip address 1.1.1.6 255.255.255.255r6(config-if)#exitr6(config)#int e 0/0r6(config-if)#ip address 6.6.6.2 255.255.255.252r6(config-if)#no shutr6(config-if)#exit*Mar 1 00:32:04.203: %LINK-3-UPDOWN: Interface Ether
26、net0/0, changed state to up*Mar 1 00:32:05.203: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to r6(config)#router isisr6(config-router)#net 49.0003.0000.0000.0006.00r6(config-router)#is-type level-1r6(config-router)#exitr6(config)#int loopback 0r6(config-if)#ip router i
27、sis r6(config-if)#isis circuit-type level-1r6(config)#int e 0/0r6(config-if)#ip router isisr6(config-if)#isis circuit-type level-1r6(config-if)#Zr6#sh i*Mar 1 00:33:31.239: %SYS-5-CONFIG_I: Configured from console by con r6#sh isis neiSystem Id Type Interface IP Address State Holdtime Circuit Idr5 L
28、1 Et0/0 6.6.6.1 UP 8 r5.01 常用的 show 命令r1#sh isis topology IS-IS paths to level-1 routersSystem Id Metric Next-Hop Interface SNPAr1 -r2 10 r2 Et0/0 cc00.0bd8.0000 为什么会有 level1 的关系?IS-IS paths to level-2 routersSystem Id Metric Next-Hop Interface SNPAr1 -r2 10 r2 Et0/0 cc00.0bd8.0000 r4 10 r4 Se1/0 *H
29、DLC* r5 20 r2 Et0/0 cc00.0bd8.0000 r4 Se1/0 *HDLC* r1#sh isis nei detail System Id Type Interface IP Address State Holdtime Circuit Idr4 L2 Se1/0 7.7.7.2 UP 28 00Area Address(es): 49.0002SNPA: *HDLC* State Changed: 00:33:12Format: Phase Vr2 L1 Et0/0 2.2.2.2 UP 7 r2.01 Area Address(es): 49.0001SNPA:
30、cc00.0bd8.0000 State Changed: 00:41:47LAN Priority: 64Format: Phase Vr2 L2 Et0/0 2.2.2.2 UP 9 r2.01 Area Address(es): 49.0001SNPA: cc00.0bd8.0000 State Changed: 00:41:47LAN Priority: 64Format: Phase Vr1#sh isis database IS-IS Level-1 Link State Database:LSPID LSP Seq Num LSP Checksum LSP Holdtime AT
31、T/P/OLr1.00-00 * 0x00000009 0x157B 744 1/0/0r2.00-00 0x00000009 0x741E 756 1/0/0r2.01-00 0x00000004 0x78D5 988 0/0/0IS-IS Level-2 Link State Database:LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OLr1.00-00 * 0x0000000D 0xEFB5 735 0/0/0r2.00-00 0x0000000C 0x435F 751 0/0/0r2.01-00 0x00000004 0x08
32、CE 1074 0/0/0r4.00-00 0x00000007 0x2682 780 0/0/0r5.00-00 0x00000008 0x811B 975 0/0/0r1#sh isis database detailIS-IS Level-1 Link State Database:LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OLr1.00-00 * 0x00000009 0x157B 736 1/0/0Area Address: 49.0001NLPID: 0xCC Hostname: r1IP Address: 1.1.1.1M
33、etric: 10 IP 2.2.2.0 255.255.255.252Metric: 10 IP 7.7.7.0 255.255.255.252Metric: 10 IP 1.1.1.1 255.255.255.255Metric: 10 IS r2.012、调整 metric 值r4#sh ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA exte
34、rnal type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last reso
35、rt is not set1.0.0.0/32 is subnetted, 6 subnetsi L2 1.1.1.1 115/20 via 7.7.7.1, Serial1/0i L1 1.1.1.3 115/20 via 3.3.3.1, Ethernet0/0i L2 1.1.1.2 115/30 via 7.7.7.1, Serial1/0115/30 via 4.4.4.2, Serial1/1i L2 1.1.1.5 115/20 via 4.4.4.2, Serial1/1C 1.1.1.4 is directly connected, Loopback0i L2 1.1.1.6
36、 115/30 via 4.4.4.2, Serial1/12.0.0.0/30 is subnetted, 1 subnetsi L2 2.2.2.0 115/20 via 7.7.7.1, Serial1/03.0.0.0/30 is subnetted, 1 subnetsC 3.3.3.0 is directly connected, Ethernet0/04.0.0.0/30 is subnetted, 1 subnetsC 4.4.4.0 is directly connected, Serial1/15.0.0.0/30 is subnetted, 1 subnetsi L2 5
37、.5.5.0 115/20 via 4.4.4.2, Serial1/16.0.0.0/30 is subnetted, 1 subnetsi L2 6.6.6.0 115/20 via 4.4.4.2, Serial1/17.0.0.0/30 is subnetted, 1 subnetsC 7.7.7.0 is directly connected, Serial1/0r4#r4#r4#r4#r4#r4#config tEnter configuration commands, one per line. End with CNTL/Z.r4(config)#int s1/1r4(conf
38、ig-if)#isis metric 50r4(config-if)#Zr4#sh ip*Mar 1 04:42:51.354: %SYS-5-CONFIG_I: Configured from console by console routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA extern
39、al type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set1.0.0.0/32 is subnett
40、ed, 6 subnetsi L2 1.1.1.1 115/20 via 7.7.7.1, Serial1/0i L1 1.1.1.3 115/20 via 3.3.3.1, Ethernet0/0i L2 1.1.1.2 115/30 via 7.7.7.1, Serial1/0i L2 1.1.1.5 115/40 via 7.7.7.1, Serial1/0C 1.1.1.4 is directly connected, Loopback0i L2 1.1.1.6 115/50 via 7.7.7.1, Serial1/02.0.0.0/30 is subnetted, 1 subnet
41、si L2 2.2.2.0 115/20 via 7.7.7.1, Serial1/03.0.0.0/30 is subnetted, 1 subnetsC 3.3.3.0 is directly connected, Ethernet0/04.0.0.0/30 is subnetted, 1 subnetsC 4.4.4.0 is directly connected, Serial1/15.0.0.0/30 is subnetted, 1 subnetsi L2 5.5.5.0 115/30 via 7.7.7.1, Serial1/06.0.0.0/30 is subnetted, 1 subnetsi L2 6.6.6.0 115/40 via 7.7.7.1, Serial1/07.0.0.0/30 is subnetted, 1 subnetsC 7.7.7.0 is directly connected, Serial1/0