bài lab làm việc với tftp server

88
http://bloghoctap.blogspot.com/2009/05/bai-lab-lam-viec- voi-tftp-server.html trang nay hay lam Bài lab làm vic vi tftp server Mô t Backup cc file cu hnh ca switch vo TFTP server Np li file backup t TFTP server. Thc hin 1. Đt IP address cho host c TFTP server 2. Đt IP address cho management VLAN Switch#conf t Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#hostname ALSwitch ALSwitch(config)#int vlan 1 ALSwitch(config-if)#ip address 10.1.1.251 255.255.255.0 ALSwitch(config-if)#no shut 3. Cu hnh cho port gn vi TFTP server access mode (gi s l port f0/9) ALSwitch(config-if)#int f0/9 ALSwitch(config-if)#switchport mode access ALSwitch(config-if)#switchport access vlan 1

Upload: dvkien08

Post on 04-Apr-2015

104 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Bài lab làm việc với tftp server

http://bloghoctap.blogspot.com/2009/05/bai-lab-lam-viec-voi-tftp-server.html

trang nay hay lam

Bài lab làm viêc vơi tftp server

Mô ta

Backup cac file câu hinh cua switch vao TFTP serverNap lai file backup tư TFTP server.

Thưc hiên1. Đăt IP address cho host co TFTP server

2. Đăt IP address cho management VLAN

Switch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname ALSwitchALSwitch(config)#int vlan 1ALSwitch(config-if)#ip address 10.1.1.251 255.255.255.0ALSwitch(config-if)#no shut

3. Câu hinh cho port găn vơi TFTP server ơ access mode (gia sư la port f0/9)

ALSwitch(config-if)#int f0/9ALSwitch(config-if)#switchport mode accessALSwitch(config-if)#switchport access vlan 1ALSwitch(config-if)#no shutALSwitch(config-if)#01:38:36: %LINK-3-UPDOWN: Interface FastEthernet0/9, changed state to up01:38:36: %LINK-3-UPDOWN: Interface FastEthernet0/9, changed state to up

4. Kiêm tra kêt nôi giưa switch vơi tftp server

Page 2: Bài lab làm việc với tftp server

ALSwitch#ping 10.1.1.10

Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.1.1.10, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/5 msALSwitch#

5. Xem nôi dung flash:

ALSwitch#show flash

Directory of flash:/2 -rwx 1645824 Mar 01 1993 00:27:37 bootfile4 -rwx 1180 Mar 01 1993 00:26:01 config.text8 -rwx 976 Mar 01 1993 00:41:54 config.old9 -rwx 17 Jan 01 1970 00:00:20 env_vars3612672 bytes total (1960448 bytes free)ALSwitch#

6. Copy câu hinh hiên tai vao tftp serverALSwitch#copy running-config tftpAddress or name of remote host []? 10.1.1.10Destination filename [running-config]? running-config.txt!!685 bytes copied in 1.106 secs (685 bytes/sec)ALSwitch#

7. Copy startup-config vao tftp serverALSwitch#copy startup-config tftpAddress or name of remote host []? 10.1.1.10Destination filename [startup-config]? startup-config.txt!!685 bytes copied in 0.84 secsALSwitch#

Page 3: Bài lab làm việc với tftp server

8. Copy file config.text tư flash vao tftp server

ALSwitch#copy flash:config.text tftpAddress or name of remote host []? 10.1.1.10Destination filename [config.text]?Ân Enter !!685 bytes copied in 0.89 secs

Chu y file startup-config.txt va config.text co nôi dung giông nhau.

9. Copy biên môi trương vao tftp server đê xem tham sôALSwitch#copy env_vars tftpAddress or name of remote host []? 10.1.1.10Destination filename [env_vars]?!!17 bytes copied in 0.79 secsALSwitch#

10. Copy bootfile vao tftp serverALSwitch#copy bootfile tftpAddress or name of remote host []? 10.1.1.10Destination filename [bootfile]? switch2900XL.bin!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1645824 bytes copied in 13.657 secs (126601 bytes/sec)Xem version cua switchALSwitch#show versionCisco Internetwork Operating System SoftwareIOS (tm) C2900XL Software (C2900XL-C3H2S-M), Version 12.0(5.2)XU, ROM: Bootstrap program is C2900XL boot loaderSystem image file is "flash:bootfile"cisco WS-C2912-XL (PowerPC403GA) processor (revision 0x11) with 8192K/1024K...

Page 4: Bài lab làm việc với tftp server

File Switch2900XL.bin co kich thươc giông file c2900XL-c3h2s-mz-120.5.2-XU.bin co săn trong flash

11. Upload lai file tư tftp lên switch

ALSwitch#copy tftp:c2900XL-c3h2s-mz-120.5.2-XU.bin flashAddress or name of remote host []? 10.1.1.10Destination filename [c2900XL-c3h2s-mz-120.5.2-XU.bin]?Ân EnterAccessing tftp://10.1.1.10/c2900XL-c3h2s-mz-120.5.2-XU.bin...Loading c2900XL-c3h2s-mz-120.5.2-XU.bin from 10.1.1.10 (via VLAN1): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!![OK - 1645810 bytes]

1645810 bytes copied in 55.266 secs (29923 bytes/sec)ALSwitch#12. Xem câu hinh sau khi uploadALSwitch#sh flash

Directory of flash:/

2 -rwx 1645824 Mar 01 1993 00:27:37 bootfile4 -rwx 685 Mar 01 1993 01:53:49 config.text5 -rwx 1645810 Mar 01 1993 02:07:53 c2900XL-c3h2s-mz-120.5.2-XU.bin9 -rwx 17 Jan 01 1970 00:00:20 env_vars

3612672 bytes total (314880 bytes free)ALSwitch#

Page 5: Bài lab làm việc với tftp server

LAB 3-1: ĐỊNH TUYẾN TRÊN ROUTER CISCO

- Đinh tuyên IP đươc cho phep măc đinh trên Cisco router. Lênh đê cho phep hay vô hiêu hoa đinh tuyên: [no] ip routing- Vi lênh nay măc đinh nên khi xem câu hinh đang chay băng lênh show running–config se không thây hiên thi lênh nay.- Đê kiêm tra tac đông cua câu lênh cho router nôi vơi PC1 va PC2 qua hai cổng Ethernet 0 va Ethernet 1 như hinh ve.– Router A vơi 2 cổng Ethernet se đươc câu hinh như sau:RouterA(config)#interface Ethernet0RouterA(config–if)#ip address 172.108.1.1 255.255.255.0RouterA(config–if)#no shutdownRouterA(config–if)#exit

RouterA(config)#interface Ethernet1RouterA(config–if)#ip address 172.108.2.1 255.255.255.0RouterA(config–if)#no shutdownRouterA(config–if)#exit

RouterA(config)#ip routing <- lênh nay măc đinh trên Cisco routerRouterA(config)# Ctrl+zRouterA#– Đăt đia chi IP cho PC1 va PC2 cung mang vơi cổng Ethernet0 va Ethernet1, như trên hinh. Lưu y.Win 2000, XP: Start – Settings – Connection – Local Area Connection – Properties – Internet Protocol (TCP/IP)

Page 6: Bài lab làm việc với tftp server

Win98: Start – Settings – Control Panel – Networks – TCP/IP – TCP/IP PropertiesPC1:

PC2:

–Thưc hiên lênh ping trên PC1 va PC2, lênh ping phai thanh công: Goi IP tư PC1 tơi PC2 se đươc đinh tuyên bơi R1 ma không cân giao thưc đinh tuyên vi cac mang đươc kêt nôi trưc tiêp vơi RouterA. Win 2000, XP: Start – Run: cmd.exeWin98: Start – Run: command.exe

Tai PC1Microsoft Windows XP [Version 5.1.2600](C) Copyright 1985-2001 Microsoft Corp.

C:\> ping 172.108.2.2

Pinging 172.108.2.2 with 32 bytes of data:

Reply from 172.108.2.2: bytes=32 time&lt;1ms TTL=127Reply from 172.108.2.2: bytes=32 time&lt;1ms TTL=127Reply from 172.108.2.2: bytes=32 time&lt;1ms TTL=127Reply from 172.108.2.2: bytes=32 time&lt;1ms TTL=127

Ping statistics for 172.108.2.2:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\>_

Tai PC2Microsoft Windows XP [Version 5.1.2600](C) Copyright 1985-2001 Microsoft Corp.

Page 7: Bài lab làm việc với tftp server

C:\> ping 172.108.1.2

Pinging 172.108.2.2 with 32 bytes of data:

Reply from 172.108.1.2: bytes=32 time&lt;1ms TTL=127Reply from 172.108.1.2: bytes=32 time&lt;1ms TTL=127Reply from 172.108.1.2: bytes=32 time&lt;1ms TTL=127Reply from 172.108.1.2: bytes=32 time&lt;1ms TTL=127

Ping statistics for 172.108.1.2:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:Minimum = 0ms, Maximum = 0ms, Average = 0ms

–Xem bang đinh tuyên RouterA băng lênh show ip route. Chư C ơ phia trai bang đinh tuyên tương trưng cho cac mang nôi trưc tiêp.

RouterA#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate defaultU - per-user static route, o - ODR

Gateway of last resort is not set172.100.0.0 is subnetted, 2 subnetsC 172.108.1.0 is directly connected, Ethernet0C 172.108.2.0 is directly connected, Ethernet1

3LAB 3-2: CẤU HÌNH ĐỊNH TUYẾN TĨNH

Page 8: Bài lab làm việc với tftp server

[C] ----10.0.3.0--- [A] ---10.0.2.0--- [B]

Mô tả và yêu cầu:- Câu hinh static route trên cac router A, router B va router C.- Router C hoat đông như DCE router, Router A la DTE router.- Tư cac router, ta phai co thê ping đươc tât ca cac đia chi trong mang.Cấu hình:Router A:!hostname RouterAno ip domain-lookup!interface s0ip address 10.0.3.2 255.255.255.0no shutdown!interface E0ip address 10.0.2.2 255.255.255.0no shutdown!endRouter B:!hostname RouterBno ip domain-lookup!interface E0ip address 10.0.2.1 255.255.255.0no shutdown!ip route 10.0.3.0 255.255.255.0 e0!endRouter C:!hostname RouterCno ip domain-lookup!

Page 9: Bài lab làm việc với tftp server

interface s0ip address 10.0.3.100 255.255.255.0no shutdown!ip route 10.0.2.0 255.255.255.0 10.0.3.2!endCác bươc thực hiên:Bươc 1: Cấu hình Router A.RouterA(config)#hostname RouterARouterA(config)#no ip domain-lookupRouterA(config)#interface s0RouterA(config-if)#ip address 10.0.3.2 255.255.255.0RouterA(config-if)#no shutdownChú ý: Khi thưc hiên lênh no shutdown, se xuât hiên dòng thông bao:01:31:19: %LINK-3-UPDOWN: Interface Serial0/0, changed state to upRouterA(config-if)#interface E0RouterA(config-if)#ip address 10.0.2.2 255.255.255.0RouterA(config-if)#no shutdown01:34:38: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to upRouterA(config-if)#end01:35:39: %SYS-5-CONFIG_I: Configured from console by consoleRouterA#Bươc 2: Cấu hình Router B.RouterB(config)#hostname RouterBRouterB(config)#no ip domain-lookupRouterB(config-if)#interface e0RouterB(config-if)#ip address 10.0.2.1 255.255.255.0RouterB(config-if)#no shut

01 38: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to upRouterB(config-if)#end

01 39: %SYS-5-CONFIG_I: Configured from console by consoleRouterB#Bươc 3: Cấu hình cơ bản Router C.RouterC(config)#hostname RouterCRouterC(config)#no ip domain-lookup

Page 10: Bài lab làm việc với tftp server

RouterC(config)#interface s0RouterC(config-if)#ip address 10.0.3.100 255.255.255.0RouterC(config-if)#no shutdown

01 19: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up RouterC(config-if)#end

01 39: %SYS-5-CONFIG_I: Configured from console by consoleRouterC#Bươc 4: Kiểm tra kết nối giữa các Router A, Router B, Router CRouterC#ping 10.0.3.2 Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.0.3.2, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 msChú ý: Nêu không ping đươc, kiêm tra lai câu hinh băng lênh show running-config, show interface đê bao đam câu hinh đung, giai quyêt sư cô nêu cân.RouterB#ping 10.0.2.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.0.2.2, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 msRouterB#ping 10.0.2.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.0.2.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms

RouterA#ping 10.0.3.100Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.0.3.100, timeout is 2 seconds:!!!!!

Page 11: Bài lab làm việc với tftp server

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms

RouterC#ping 10.0.2.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.0.2.1, timeout is 2 seconds:.....Success rate is 0 percent (0/5)

RouterB#ping 10.0.3.100Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.0.3.100, timeout is 2 seconds:.....Success rate is 0 percent (0/5)- Trên Router C, xem bang đinh tuyên băng lênh show ip routeRouterC#show ip routeCodes: C - connected, S - static, I - IGRP, 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 external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static route

Gateway of last resort is not set

10.0.0.0/24 is subnetted, 1 subnetsC 10.0.3.0 is directly connected, Serial0/0Bươc 5: Cấu hình static routes.- Tai Router C, câu hinh static route đên Router B:RouterC(config)#ip route 10.0.2.0 255.255.255.0 10.0.3.2RouterC(config)#exit02:06:37: %SYS-5-CONFIG_I: Configured from console by console

Page 12: Bài lab làm việc với tftp server

Chú ý: Khi câu hinh next hop router la đia chi IP thi AD=1; ta câu hinh next hop router sư dụng outgoing interface thi AD =0.- Tai Router B, đinh tuyên static route đên Router C.RouterB(config)#ip route 10.0.3.0 255.255.255.0 e0RouterB(config)#exit02:06:37: %SYS-5-CONFIG_I: Configured from console by console- Tai Router C, ping Router B băng lênh ping 10.0.2.1RouterC#ping 10.0.2.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.0.2.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms- Tai Router B, ping Router C băng lênh ping 10.0.3.100RouterB#ping 10.0.3.100Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.0.3.100, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/4/8 ms- Xem bang đinh tuyên trên Router C băng lênh show ip route:RouterC#show ip route...Gateway of last resort is not set

10.0.0.0/24 is subnetted, 2 subnetsS 10.0.2.0 [1/0] via 10.0.3.2C 10.0.3.0 is directly connected, Serial0/0Chu y: "S" biêu thi cho kêt nôi static vơi AD =1 va hop count la 0 [1/0]- Xem bang đinh tuyên trên router B:RouterB#show ip route...Gateway of last resort is not set

10.0.0.0/24 is subnetted, 2 subnetsC 10.0.2.0 is directly connected, FastEthernet0/1 S 10.0.3.0 is directly connected, FastEthernet0/1

Page 13: Bài lab làm việc với tftp server

Chu y: AD=0 khi ta chọn outgoing interface đê câu hinh static route. Ở đây ta không thây entry [1/0] trong câu hinh.

4

Lab 3-3: Cấu hình RIP cơ bản

Page 14: Bài lab làm việc với tftp server

Mô tả & yêu cầu

–Router A, B, C sư dụng RIP đê quang cao thông tin đinh tuyên–Router B hoat đông như DCE cung câp xung clock cho router A va C–Cac router câu hinh RIP va quang cao tât ca cac mang nôi trưc tiêp.–Tư router A, B va C, ta ping đươc hêt cac đia chi trong mang.

Cấu hình Router A!hostname Router Ano ip domain-lookup!interface Loopback0 ← Đinh nghia interface ao đê lam điêm kiêm traip address 10.1.1.1 255.255.255.0 !interface Ethernet0ip address 148.1.1.1 255.255.255.0no shutdownno keepalive ← cho phep cổng Ethernet vân up khi không kêt nôi vơi bên ngoai! interface Serial0ip address 192.1.1.1 255.255.255.0no shutdown!router rip ← kich hoat qua trinh đinh tuyên RIP trên routernetwork 10.0.0.0 ← chi ra mang se quang cao va xac đinh interface nao se gơi va nhân thông tin đinh tuyên RIPnetwork 148.1.0.0network 192.1.1.0!no ip classless!end

Router B

Page 15: Bài lab làm việc với tftp server

!hostname RouterBno ip domain-lookup!interface Serial0ip address 192.1.1.2 255.255.255.0clock rate 64000 ← hoat đông như DCE cung câp xung clockno shutdown!interface Serial1ip address 193.1.1.1 255.255.255.0clock rate 64000 ← hoat đông như DCE cung câp xung clockno shutdown!router ripnetwork 192.1.1.0 network 193.1.1.0!end

+ Đê xac đinh router nao cung câp xung clock tưc la thiêt bi DCE dung câu lênh: show controller [type number]

Router C!hostname RouterCno ip domain-lookup!interface Ethernet0ip address 152.1.1.1 255.255.255.0no shutdownno keepalive ← vô hiêu hoa keepalive trên router cho phep interface ethernet0 vân up khi không kêt nôi ra bên ngoai!interface Serial0ip address 193.1.1.2 255.255.255.0no shutdown!router rip

Page 16: Bài lab làm việc với tftp server

network 152.1.0.0network 193.1.1.0!no ip classless!end

Cac bươc thưc hiênĐăt hostname, đăt đia chi IP cho cac cổng Loopback, Serial, EthernetĐôi vơi RouterA

Router>enRouter#config terminalRouter(config)#hostname RouterA

RouterA(config)#interface LoopbackRouterA(config–if)# ip address 10.1.1.1 255.255.255.0 RouterA(config–if)#exit

RouterA(config)#interface Ethernet0RouterA(config–if)#ip address 148.1.1.1 255.255.255.0RouterA(config–if)#no shutdownRouterA(config–if)#no keepaliveRouterA(config–if)#exit

RouterA(config)#interface Serial0RouterA(config–if)#ip address 192.1.1.1 255.255.255.0RouterA(config–if)#no shutdownRouterA(config–if)#endRouterA#

Câu hinh tương tư đôi vơi RouterB va RouterC. Lưu y tai RouterB co lênh clock rate khi câu hinh cổng Serial.

RouterB(config)#interface Serial0RouterB(config–if)#ip address 192.1.1.2 255.255.255.0RouterB(config–if)#clock rate 64000 RouterB(config–if)#no shutdown

Page 17: Bài lab làm việc với tftp server

RouterB(config–if)#interface Serial1RouterB(config–if)#ip address 193.1.1.1 255.255.255.0RouterB(config–if)#clock rate 64000RouterB(config–if)#no shutdownRouterB(config–if)#endRouterB#

Kiêm tra hoat đông cổng Serial tai cac router băng lênh show interface [Type Number]

RouterA#show interface Serial0Serial0 is up, line protocol is up Hardware is HD64570Internet address is 192.1.1.1/24MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255Encapsulation HDLC, loopback not setKeepalive set (10 sec)Last input 00:00:06, output 00:00:08, output hang neverLast clearing of "show interface" counters neverInput queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0Queueing strategy: weighted fairOutput queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/3/256 (active/max active/max total)Reserved Conversations 0/0 (allocated/max allocated)5 minute input rate 0 bits/sec, 0 packets/sec5 minute output rate 0 bits/sec, 0 packets/sec489 packets input, 30563 bytes, 0 no bufferReceived 473 broadcasts, 0 runts, 0 giants, 0 throttles0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort524 packets output, 33973 bytes, 0 underruns0 output errors, 0 collisions, 26 interface resets0 output buffer failures, 0 output buffers swapped out15 carrier transitions--More—-

RouterB#sh int s0Serial0 is up, line protocol is up Hardware is HD64570

Page 18: Bài lab làm việc với tftp server

Internet address is 192.1.1.2/24MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255Encapsulation HDLC, loopback not set...RouterB#show interface serial1Serial1 is up, line protocol is up Hardware is HD64570Internet address is 193.1.1.1/24MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255Encapsulation HDLC, loopback not set...

RouterC#show interface Serial0Serial0 is up, line protocol is up Hardware is HD64570Internet address is 193.1.1.2/24MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255Encapsulation HDLC, loopback not set...Chay giao thưc đinh tuyên RIP trên môi router

RouterA(config)#router ripRouterA(config–router)#network 10.0.0.0RouterA(config–router)#network 148.1.0.0RouterA(config–router)#network 192.1.1.0

RouterB(config)#router ripRouterB(config–router)#network 192.1.1.0 RouterB(config–router)#network 193.1.1.0

RouterC(config)#router ripRouterC(config–router)#network 152.1.0.0RouterC(config–router)#network 193.1.1.0

Kiểm tra Xem bang đinh tuyên băng lênh show ip route

Page 19: Bài lab làm việc với tftp server

RouterA# show ip route...Gateway of last resort is not set10.0.0.0 is subnetted, 1 subnetsC 10.1.1.0 is directly connected, Loopback0148.1.0.0/24 is subnetted, 1 subnetsC 148.1.1.0 is directly connected, Ethernet0R 152.1.0.0/16 [120/2] via 192.1.1.2, 00:00:20, Serial0C 192.1.1.0/24 is directly connected, Serial0R 193.1.1.0/24 [120/1] via 192.1.1.2, 00:00:20, Serial0

+ Dung lênh show ip route rip nêu chi muôn xem cac route học tư RIP.

RouterA# show ip route ripR 152.1.0.0/16 [120/2] via 192.1.1.2, 00:00:20, Serial0R 193.1.1.0/24 [120/1] via 192.1.1.2, 00:00:20, Serial0

Tư router ping cac đia chi trên mang

RouterC#ping 192.1.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.1.1.1 timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms

RouterC#ping 192.1.1.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.1.1.2 timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms

RouterA#ping 148.1.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 148.1.1.1 timeout is 2

Page 20: Bài lab làm việc với tftp server

seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms

RouterC#ping 10.1.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.1.1.1 timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms

Ta co thê xem qua trinh câp nhât đinh tuyên cua RIP băng cach dung lênh debug ip rip. Chu y tai cổng serial0, RouterA không quang cao network học tư RouterB (152.1.0.0 va 193.1.1.0) nhưng ơ cac router còn lai cac network nay đươc quang cao. Đây la hoat đông cua cơ chê split horizon: khi split horizone hoat đông, router se không quang cao route ngươc trơ lai nơi no đên.

RouterA#debug ip ripRIP: sending v1 update to 255.255.255.255 via Ethernet0 (148.1.1.1)network 10.0.0.0, metric 1network 152.1.0.0, metric 3network 192.1.1.0, metric 1network 193.1.1.0, metric 2RIP: sending v1 update to 255.255.255.255 via Loopback0 (10.1.1.1)network 148.1.0.0, metric 1network 152.1.0.0, metric 3network 192.1.1.0, metric 1network 193.1.1.0, metric 2RIP: sending v1 update to 255.255.255.255 via Serial0 (192.1.1.1)network 10.0.0.0, metric 1network 148.1.0.0, metric 1

Khi debug chay, router se đưa ra thông tin đinh tuyên RIP, đê ngưng debug dung lênh:

RouterA#undebug all

Page 21: Bài lab làm việc với tftp server

Vô hiêu hoa split horizon tai RouterA dung lênh tai interface mode

RouterA(config)#int s0RouterA(config–if)#no ip split–horizon

Luc nay, đê kiêm tra thông tin đinh tuyên tai RouterA dung lênh debug ip rip. Thông tin xuât hiên dươi đây (chu y tât ca cac route đươc quang cao ra cổng serial , bao gôm ca cac route học tư RouterB va RouterC):

RouterA#debug ip ripRIP: sending v1 update to 255.255.255.255 via Ethernet0 (148.1.1.1)network 10.0.0.0, metric 1network 152.1.0.0, metric 3network 192.1.1.0, metric 1network 193.1.1.0, metric 2RIP: sending v1 update to 255.255.255.255 via Loopback0 (10.1.1.1)network 148.1.0.0, metric 1network 152.1.0.0, metric 3network 192.1.1.0, metric 1network 193.1.1.0, metric 2RIP: sending v1 update to 255.255.255.255 via Serial0 (192.1.1.1)network 10.0.0.0, metric 1network 148.1.0.0, metric 1network 152.1.0.0, metric 3network 192.1.1.0, metric 1network 193.1.1.0, metric 2 5

LAB 3-3: CẤU HÌNH RIP CƠ BẢN

Mô tả và yêu cầu:- Router A, B, C sư dụng RIP đê quang ba thông tin đinh tuyên.- Router B hoat đông như DCE cung câp xung clock cho Router A va C.

Page 22: Bài lab làm việc với tftp server

- Cac Router câu hinh RIP va quang ba tât ca cac mang nôi trưc tiêp.- Tư Router A, B, va C, ta ping đươc hêt cac đia chi trong mang.Cấu hình:Router A:!hostname Router Ano ip domain-lookup!interface Loopback0 <- Đinh nghĩa interface ảo để lam điểm kiểm tra.ip address 10.1.1.1 255.255.255.0 !interface Ethernet0ip address 148.1.1.1 255.255.255.0no shutdownno keepalive <- cho phép cổng Ethernet vẫn up khi không kết nối với bên ngoai! interface Serial0ip address 192.1.1.1 255.255.255.0no shutdown!router rip <- kích hoạt quá trình đinh tuyến RIP trên routernetwork 10.0.0.0 <- Chỉ ra mạng sẽ quảng bá va xác đinh interface nao sẽ gởi va nhận thông tin đinh tuyết RIPnetwork 148.1.0.0network 192.1.1.0!no ip classless!end

Router B:!hostname RouterBno ip domain-lookup!interface Serial0ip address 192.1.1.2 255.255.255.0

Page 23: Bài lab làm việc với tftp server

clock rate 64000 <- hoat đông như DCE cung câp xung clockno shutdown!interface Serial1ip address 193.1.1.1 255.255.255.0clock rate 64000 <- hoat đông như DCE cung câp xung clockno shutdown!router ripnetwork 192.1.1.0 network 193.1.1.0!end

Chú ý: Đê xac đinh router nao cung câp xung clock tưc la thiêt bi DCE dung câu lênh: show controller [type number]

Router C:!hostname RouterCno ip domain-lookup!interface Ethernet0ip address 152.1.1.1 255.255.255.0no shutdownno keepalive <- vô hiêu hóa keepalive trên Router cho phép interface ethernet0 vẫn up khi không kết nối ra bên ngoai!interface Serial0ip address 193.1.1.2 255.255.255.0no shutdown!router ripnetwork 152.1.0.0network 193.1.1.0!no ip classless!end

Page 24: Bài lab làm việc với tftp server

Các bươc thực hiên:- Đăt hostname, đăt đia chi IP cho cac cổng Loopback, Serial, Ethernet.Đối vơi Router A:Router#config terminalRouter(config)#hostname RouterA

RouterA(config)#interface LoopbackRouterA(config–if)# ip address 10.1.1.1 255.255.255.0 RouterA(config–if)#exit

RouterA(config)#interface Ethernet0RouterA(config–if)#ip address 148.1.1.1 255.255.255.0RouterA(config–if)#no shutdownRouterA(config–if)#no keepaliveRouterA(config–if)#exit

RouterA(config)#interface Serial0RouterA(config–if)#ip address 192.1.1.1 255.255.255.0RouterA(config–if)#no shutdownRouterA(config–if)#endRouterA#- Câu hinh tương tư đôi vơi Router B va Router C. Lưu y tai Router B co lênh clock rate khi câu hinh cổng Serial.RouterB(config)#interface Serial0RouterB(config–if)#ip address 192.1.1.2 255.255.255.0RouterB(config–if)#clock rate 64000 RouterB(config–if)#no shutdown

RouterB(config–if)#interface Serial1RouterB(config–if)#ip address 193.1.1.1 255.255.255.0RouterB(config–if)#clock rate 64000RouterB(config–if)#no shutdownRouterB(config–if)#endRouterB#- Kiêm tra hoat đông cổng serial tai cac router băng lênh show interface [typenumeber]RouterA#show interface Serial0Serial0 is up, line protocol is up

Page 25: Bài lab làm việc với tftp server

Hardware is HD64570Internet address is 192.1.1.1/24MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255Encapsulation HDLC, loopback not setKeepalive set (10 sec)Last input 00:00:06, output 00:00:08, output hang neverLast clearing of "show interface" counters neverInput queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0Queueing strategy: weighted fairOutput queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/3/256 (active/max active/max total)Reserved Conversations 0/0 (allocated/max allocated)5 minute input rate 0 bits/sec, 0 packets/sec5 minute output rate 0 bits/sec, 0 packets/sec489 packets input, 30563 bytes, 0 no bufferReceived 473 broadcasts, 0 runts, 0 giants, 0 throttles0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort524 packets output, 33973 bytes, 0 underruns0 output errors, 0 collisions, 26 interface resets0 output buffer failures, 0 output buffers swapped out15 carrier transitions--More—-

RouterB#sh int s0Serial0 is up, line protocol is up Hardware is HD64570Internet address is 192.1.1.2/24MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255Encapsulation HDLC, loopback not set...RouterB#show interface serial1Serial1 is up, line protocol is up Hardware is HD64570Internet address is 193.1.1.1/24MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255

Page 26: Bài lab làm việc với tftp server

Encapsulation HDLC, loopback not set...

RouterC#show interface Serial0Serial0 is up, line protocol is up Hardware is HD64570Internet address is 193.1.1.2/24MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255Encapsulation HDLC, loopback not set...- Chay giao thưc đinh tuyên RIP trên môi routerRouterA(config)#router ripRouterA(config–router)#network 10.0.0.0RouterA(config–router)#network 148.1.0.0RouterA(config–router)#network 192.1.1.0

RouterB(config)#router ripRouterB(config–router)#network 192.1.1.0 RouterB(config–router)#network 193.1.1.0

RouterC(config)#router ripRouterC(config–router)#network 152.1.0.0RouterC(config–router)#network 193.1.1.06

IP

Lab 3-4: Giao thưc đinh tuyến RIP

Page 27: Bài lab làm việc với tftp server

Mô tả & yêu cầu

–Lab nay câu hinh đinh tuyên IP dung đia chi mang lơp B (131.108.0.0/16), vơi subnet mask lơp C (255.255.255.0 hay /24). –Câu hinh giao thưc đinh tuyên RIP trên R1 va R2 đê tư router ping đươc tât ca đia chi trên mang.

Câu hinhR1!hostname R1!interface loopback0ip address 131.108.4.1 255.255.255.0exit!interface loopback1ip address 131.108.5.1 255.255.255.0exit!interface loopback2ip address 131.108.6.1 255.255.255.0exit!interface Ethernet0ip address 131.108.1.1 255.255.255.0no shutdownno keepalive

Page 28: Bài lab làm việc với tftp server

exit!interface Serial0ip address 131.108.3.1 255.255.255.0clock rate 64000no shutexit!router rip network 131.108.0.0!end

R2!hostname R2!interface loopback0ip address 131.108.7.1 255.255.255.0exit!interface loopback1ip address 131.108.8.1 255.255.255.0exit!interface loopback2ip address 131.108.9.1 255.255.255.0exit!interface Ethernet0ip address 131.108.2.1 255.255.255.0no shutdownno keepaliveexit!interface Serial0ip address 131.108.3.2 255.255.255.0no shutexit

Page 29: Bài lab làm việc với tftp server

!router rip network 131.108.0.0!end

Các bươc thực hiên như sau

1. Đăt hostname, câu hinh cho cac cổng loopback, Ethernet va Serial trên R1 va R2.

Đăt hostname

Router(config)#hostname R1R1(config)# _

Router(config)#hostname R2R2(config)# _

Xac đinh thiêt bi nao la DCE va DTE:

R1#show controllers S0Interface Serial0Hardware is PowerQuiCC MPC860DCE V.35, no clock...

R2#show controllers S1HD unit 0, idb = 0xFBDB0, driver structure at 0x1020C8buffer size 1524 HD unit 0, V.35 DTE cablecpb = 0x1, eda = 0x483C, cda = 0x4850...

Câu hinh đia chi IP cho cac cổng cua R1

R1(config)#interface loopback0R1(conig–if)# ip address 131.108.4.1 255.255.255.0

R1(config–if)#interface loopback1R1(conig–if)# ip address 131.108.5.1 255.255.255.0

Page 30: Bài lab làm việc với tftp server

R1(config–if)#interface loopback2R1(conig–if)# ip address 131.108.6.1 255.255.255.0R1(conig–if)# exit

R1(config)#interface Ethernet0R1(conig–if)#ip address 131.108.1.1 255.255.255.0R1(conig–if)#no shutdown%LINK-3-UPDOWN: Interface Ethernet0, changed state to up%LINK-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to upR1(conig–if)#no keepaliveR1(conig–if)# exit

R1(config)#interface Serial0R1(conig–if)#ip address 131.108.3.1 255.255.255.0R1(conig–if)#clock rate 128000R1(conig–if)#no shut

Tương tư đôi vơi R2

R2(config)#interface loopback0R2(conig–if)# ip address 131.108.7.1 255.255.255.0

R2(config)#interface loopback1R2(conig–if)# ip address 131.108.8.1 255.255.255.0

R2(config)#interface loopback2R2(conig–if)# ip address 131.108.9.1 255.255.255.0

R2(config)#interface Ethernet0R2(conig–if)#ip address 131.108.2.1 255.255.255.0R2(conig–if)#no shutdownR2(conig–if)#no keepaliveR2(conig–if)# exit

R2(config)#interface Serial1R2(conig–if)#ip address 131.108.3.2 255.255.255.0R2(conig–if)#no shut

Page 31: Bài lab làm việc với tftp server

2. Kiêm tra bang đinh tuyên IP trên cac router

R1# show ip route...Gateway of last resort is not set

131.108.0.0/24 is subnetted, 5 subnetsC 131.108.6.0 is directly connected, Loopback2C 131.108.5.0 is directly connected, Loopback1C 131.108.4.0 is directly connected, Loopback0C 131.108.3.0 is directly connected, Serial0C 131.108.1.0 is directly connected, Ethernet0

R2# show ip route...Gateway of last resort is not set

131.108.0.0/24 is subnetted, 5 subnetsC 131.108.9.0 is directly connected, Loopback2C 131.108.8.0 is directly connected, Loopback1C 131.108.7.0 is directly connected, Loopback0C 131.108.3.0 is directly connected, Serial1C 131.108.2.0 is directly connected, Ethernet0

3. Chay giao thưc đinh tuyến RIP trên cả hai router

R1(config)#router ripR1(config–router)#network 131.108.0.0R1(config–router)#endR1#copy run start ← lưu câu hinh vao NVRAM

R2(config)#router ripR2(config–router)network 131.108.0.0R2(config–router)#endR2#copy run start

Xem qua trinh câp nhât đinh tuyên trên router

R1#debug ip rip

Page 32: Bài lab làm việc với tftp server

RIP protocol debugging is on

R1#debug ip rip eventsRIP event debugging is on

4. Xem lai bảng đinh tuyến trên R1 và R2

R1# show ip route...Gateway of last resort is not set

131.108.0.0/24 is subnetted, 5 subnetsR 131.108.9.0/24 [120/1] via 131.108.3.2, 00:00:00, Serial0R 131.108.8.0/24 [120/1] via 131.108.3.2, 00:00:00, Serial0R 131.108.7.0/24 [120/1] via 131.108.3.2, 00:00:00, Serial0C 131.108.6.0 is directly connected, Loopback2C 131.108.5.0 is directly connected, Loopback1C 131.108.4.0 is directly connected, Loopback0C 131.108.3.0 is directly connected, Serial0R 131.108.2.0/24 [120/1] via 131.108.3.2, 00:00:00, Serial0C 131.108.1.0 is directly connected, Ethernet0

R2# show ip route...Gateway of last resort is not set131.108.0.0/24 is subnetted, 5 subnetsC 131.108.9.0 is directly connected, Loopback2C 131.108.8.0 is directly connected, Loopback1C 131.108.7.0 is directly connected, Loopback0R 131.108.6.0/24 [120/1] via 131.108.3.1, 00:00:00, Serial1R 131.108.5.0/24 [120/1] via 131.108.3.1, 00:00:00, Serial1R 131.108.4.0/24 [120/1] via 131.108.3.1, 00:00:00, Serial1C 131.108.3.0 is directly connected, Serial1C 131.108.2.0 is directly connected, Ethernet0R 131.108.1.0/24 [120/1] via 131.108.3.1, 00:00:00, Serial1

5. Kiểm tra hoat đông băng ping các mang ơY xa (tất cả các lênh ping phải thành công)

R1#ping 131.108.9.1

Page 33: Bài lab làm việc với tftp server

R1#ping 131.108.8.1R1#ping 131.108.7.1R1#ping 131.108.2.1

R2#ping 131.108.4.1R2#ping 131.108.5.1R2#ping 131.108.6.1R2#ping 131.108.1.1

Vi dụ ping thanh công

R1#ping 131.108.9.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 131.108.9.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 32/32/32 ms 8

LAB 3-4: GIAO THỨC ĐỊNH TUYẾN RIP

Mô tả và yêu cầu:- Lab nay câu hinh đinh tuyên IP dung đia ci mang lơp B (131.108.0.0/16), vơi subnet mask lơp C (255.255.255.0 hay /24).- Câu hinh giao thưc đinh tuyên RIP trên R1 va R2 đê tư Router ping đươc tât ca đia chi trên mang.Cấu hình:R1:!hostname R1!interface loopback0ip address 131.108.4.1 255.255.255.0exit!interface loopback1ip address 131.108.5.1 255.255.255.0exit

Page 34: Bài lab làm việc với tftp server

!interface loopback2ip address 131.108.6.1 255.255.255.0exit!interface Ethernet0ip address 131.108.1.1 255.255.255.0no shutdownno keepaliveexit!interface Serial0ip address 131.108.3.1 255.255.255.0clock rate 64000no shutexit!router rip network 131.108.0.0!endR2:!hostname R2!interface loopback0ip address 131.108.7.1 255.255.255.0exit!interface loopback1ip address 131.108.8.1 255.255.255.0exit!interface loopback2ip address 131.108.9.1 255.255.255.0exit!interface Ethernet0ip address 131.108.2.1 255.255.255.0

Page 35: Bài lab làm việc với tftp server

no shutdownno keepaliveexit!interface Serial0ip address 131.108.3.2 255.255.255.0no shutexit!router rip network 131.108.0.0!endCác bươc thực hiên:- Đăt hostname, câu hinh cho cac cổng loopback, Ethernet va serial trên R1 va R2.Đăt Hostname:Router(config)#hostname R1R1(config)# _

Router(config)#hostname R2R2(config)# _Xac đinh thiêt bi nao la DCE va DTE:R1#show controllers S0Interface Serial0Hardware is PowerQuiCC MPC860DCE V.35, no clock...

R2#show controllers S1HD unit 0, idb = 0xFBDB0, driver structure at 0x1020C8buffer size 1524 HD unit 0, V.35 DTE cablecpb = 0x1, eda = 0x483C, cda = 0x4850...Câu hinh đia chi IP cho cac cổng cua R1:R1(config)#interface loopback0R1(conig–if)# ip address 131.108.4.1 255.255.255.0

R1(config–if)#interface loopback1R1(conig–if)# ip address 131.108.5.1 255.255.255.0

Page 36: Bài lab làm việc với tftp server

R1(config–if)#interface loopback2R1(conig–if)# ip address 131.108.6.1 255.255.255.0R1(conig–if)# exit

R1(config)#interface Ethernet0R1(conig–if)#ip address 131.108.1.1 255.255.255.0R1(conig–if)#no shutdown%LINK-3-UPDOWN: Interface Ethernet0, changed state to up%LINK-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to upR1(conig–if)#no keepaliveR1(conig–if)# exit

R1(config)#interface Serial0R1(conig–if)#ip address 131.108.3.1 255.255.255.0R1(conig–if)#clock rate 128000R1(conig–if)#no shutTương tư đôi vơi R2:R2(config)#interface loopback0R2(conig–if)# ip address 131.108.7.1 255.255.255.0

R2(config)#interface loopback1R2(conig–if)# ip address 131.108.8.1 255.255.255.0

R2(config)#interface loopback2R2(conig–if)# ip address 131.108.9.1 255.255.255.0

R2(config)#interface Ethernet0R2(conig–if)#ip address 131.108.2.1 255.255.255.0R2(conig–if)#no shutdownR2(conig–if)#no keepaliveR2(conig–if)# exit

R2(config)#interface Serial1R2(conig–if)#ip address 131.108.3.2 255.255.255.0R2(conig–if)#no shut- Kiêm tra bang đinh tuyên IP trên cac Router

Page 37: Bài lab làm việc với tftp server

R1# show ip route...Gateway of last resort is not set

131.108.0.0/24 is subnetted, 5 subnetsC 131.108.6.0 is directly connected, Loopback2C 131.108.5.0 is directly connected, Loopback1C 131.108.4.0 is directly connected, Loopback0C 131.108.3.0 is directly connected, Serial0C 131.108.1.0 is directly connected, Ethernet0

R2# show ip route...Gateway of last resort is not set

131.108.0.0/24 is subnetted, 5 subnetsC 131.108.9.0 is directly connected, Loopback2C 131.108.8.0 is directly connected, Loopback1C 131.108.7.0 is directly connected, Loopback0C 131.108.3.0 is directly connected, Serial1C 131.108.2.0 is directly connected, Ethernet0- Chay giao thưc đinh tuyên RIP trên ca hai router:R1(config)#router ripR1(config–router)#network 131.108.0.0R1(config–router)#endR1#copy run start ← lưu câu hinh vao NVRAM

R2(config)#router ripR2(config–router)network 131.108.0.0R2(config–router)#endR2#copy run startXem qua trinh câp nhât đinh tuyên trên RouterR1#debug ip ripRIP protocol debugging is on

R1#debug ip rip eventsRIP event debugging is on- Xem bang đinh tuyên trên R1 va R2:

Page 38: Bài lab làm việc với tftp server

R1# show ip route...Gateway of last resort is not set

131.108.0.0/24 is subnetted, 5 subnetsR 131.108.9.0/24 [120/1] via 131.108.3.2, 00:00:00, Serial0R 131.108.8.0/24 [120/1] via 131.108.3.2, 00:00:00, Serial0R 131.108.7.0/24 [120/1] via 131.108.3.2, 00:00:00, Serial0C 131.108.6.0 is directly connected, Loopback2C 131.108.5.0 is directly connected, Loopback1C 131.108.4.0 is directly connected, Loopback0C 131.108.3.0 is directly connected, Serial0R 131.108.2.0/24 [120/1] via 131.108.3.2, 00:00:00, Serial0C 131.108.1.0 is directly connected, Ethernet0

R2# show ip route...Gateway of last resort is not set131.108.0.0/24 is subnetted, 5 subnetsC 131.108.9.0 is directly connected, Loopback2C 131.108.8.0 is directly connected, Loopback1C 131.108.7.0 is directly connected, Loopback0R 131.108.6.0/24 [120/1] via 131.108.3.1, 00:00:00, Serial1R 131.108.5.0/24 [120/1] via 131.108.3.1, 00:00:00, Serial1R 131.108.4.0/24 [120/1] via 131.108.3.1, 00:00:00, Serial1C 131.108.3.0 is directly connected, Serial1C 131.108.2.0 is directly connected, Ethernet0R 131.108.1.0/24 [120/1] via 131.108.3.1, 00:00:00, Serial1- Kiêm tra hoat đông băng cach ping cac mang ơ xa (tât ca cac lênh ping phai thanh công)R1#ping 131.108.9.1R1#ping 131.108.8.1R1#ping 131.108.7.1R1#ping 131.108.2.1

R2#ping 131.108.4.1R2#ping 131.108.5.1R2#ping 131.108.6.1R2#ping 131.108.1.1

Page 39: Bài lab làm việc với tftp server

Vi dụ ping thanh công:R1#ping 131.108.9.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 131.108.9.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 32/32/32 ms9

Lab 3-5: Cấu hình Passive Interface

Mô tả & yêu cầu

Bai thưc hanh nay mô ta cach dung lênh passive interface; lênh nay cho phep router co chay RIP nhân, nhưng không gơi thông tin đinh tuyên ra ngoai cổng chi đinh.

– Cac router câu hinh RIP– Không cho gơi thông tin đinh tuyên qua cổng Serial 0 cua RouterA– Router B va C quang cao tât ca cac mang nôi trưc tiêp

Câu hinhRouter A!hostname Router A!interface Loopback0 ← Đinh nghia interface ao đê lam điêm kiêm traip address 10.1.1.1 255.255.255.0 !

Page 40: Bài lab làm việc với tftp server

interface Ethernet0ip address 148.1.1.1 255.255.255.0no shutdownno keepalive ← cho phep interface Ethernet vân up khi không kêt nôi vơi HUB hoặc SWITCH! interface Serial0ip address 192.1.1.1 255.255.255.0no shutdown!!router rip ← kich hoat qua trinh đinh tuyên RIP trên routerpassive–interface Serial0 ← không cho gơi thông tin đinh tuyên RIP trên Serial0network 10.0.0.0 ← chi ra mang se quang cao va xac đinh cổng nao se gơi va nhân thông tin đinh tuyên RIPnetwork 148.1.0.0network 192.1.1.0!no ip classless!end

Router B!hostname RouterB!interface Serial0ip address 192.1.1.2 255.255.255.0clock rate 64000 ← hoat đông như DCE cung câp xung clockno shutdown!interface Serial1ip address 193.1.1.1 255.255.255.0clock rate 64000 ← hoat đông như DCE cung câp xung clockno shutdown!router ripnetwork 192.1.1.0

Page 41: Bài lab làm việc với tftp server

network 193.1.1.0!end

Router C!hostname RouterC!interface Ethernet0ip address 152.1.1.1 255.255.255.0no shutdownno keepalive ← vô hiêu hoa keepalive trên router cho phep cổng ethernet0 vân up khi không kêt nôi ra bên ngoai!interface Serial0ip address 193.1.1.2 255.255.255.0no shutdown!router ripnetwork 152.1.0.0network 193.1.1.0!no ip classless!end

Kiểm tra

Xem qua trinh gơi nhân thông tin đinh tuyên băng lênh debug ip rip trên RouterA. Chu y câp nhât RIP chi gơi ra cổng Ethernet0 va Loopback0, Serial0 chi nhân thông tin đinh tuyên RIP.

RouterA#debug ip ripRIP: received v1 update from 192.1.1.2 on Serial0152.1.0.0 in 2 hops193.1.1.0 in 1 hopsRIP: sending v1 update to 255.255.255.255 via Ethernet0 (148.1.1.1)network 10.0.0.0, metric 1network 152.1.0.0, metric 3

Page 42: Bài lab làm việc với tftp server

network 192.1.1.0, metric 1network 193.1.1.0, metric 2RIP: sending v1 update to 255.255.255.255 via Loopback0 (10.1.1.1)network 148.1.0.0, metric 1network 152.1.0.0, metric 3network 192.1.1.0, metric 1network 193.1.1.0, metric 2

Xem bang đinh tuyên trên RouterA va RouterC băng lênh show ip route. Chu y RouterA học tât ca cac route tư RouterC, RouterC không co route tư RouterA

RouterA# show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate defaultU - per-user static route, o - ODR

Gateway of last resort is not set

10.0.0.0 /24 is subnetted, 1 subnetsC 10.1.1.0 is directly connected, Loopback0148.1.0.0/24 is subnetted, 1 subnetsC 148.1.1.0 is directly connected, Ethernet0R 152.1.0.0/16 [120/2] via 192.1.1.2, 00:00:20, Serial0C 192.1.1.0/24 is directly connected, Serial0R 193.1.1.0/24 [120/1] via 192.1.1.2, 00:00:20, Serial0

RouterC# show ip route...Gateway of last resort is not set

152.1.0.0/24 is subnetted, 1 subnetsC 152.1.1.0 is directly connected, Ethernet0

Page 43: Bài lab làm việc với tftp server

R 192.1.1.0/24 [120/1] via 193.1.1.2, 00:00:20, Serial0C 193.1.1.0/24 is directly connected, Serial0

Lab 3-6: Cấu hình IGRP cơ bản

Mô tả & yêu cầu

–Router 1, router 2 sư dụng IGRP đê quang cao thông tin đinh tuyên–Router 1 hoat đông như DCE cung câp xung clock cho router 2–Cac router câu hinh IGRP va quang cao tât ca cac mang nôi trưc tiêp.–Tư router 1, router 2 ping đươc hêt cac đia chi trong mang.

Cấu hình

Router R1

hostname R1!enable password cisco!ip subnet-zerono ip domain-lookup!interface Loopback0ip address 192.168.4.1 255.255.255.0!interface Loopback1

Page 44: Bài lab làm việc với tftp server

ip address 192.168.5.1 255.255.255.0!interface Loopback2ip address 192.168.6.1 255.255.255.0!interface Ethernet0ip address 192.168.1.1 255.255.255.0!interface Serial0ip address 192.168.3.1 255.255.255.0clock rate 64000!router igrp 234network 192.168.1.0network 192.168.3.0network 192.168.4.0network 192.168.5.0network 192.168.6.0!end

Router R2!hostname R2!enable password cisco!ip subnet-zerono ip domain-lookup!interface Loopback0ip address 192.168.7.1 255.255.255.0!interface Loopback1ip address 192.168.8.1 255.255.255.0!interface Loopback2ip address 192.168.9.1 255.255.255.0!

Page 45: Bài lab làm việc với tftp server

interface Ethernet0ip address 192.168.2.1 255.255.255.0!interface Serial0ip address 192.168.3.2 255.255.255.0!router igrp 234network 192.168.2.0network 192.168.3.0network 192.168.7.0network 192.168.8.0network 192.168.9.0!end

Các bươc thực hiên

1. Đăt hostname, cấu hình cho các cổng loopback, ethernet và serial trên router R1

Router> enRouter# conf tRouter(config)# hostname R1R1(config)# no ip domain-lookup R1(config)# int e0R1(config-if)#ip addr 192.168.1.1 255.255.255.0R1(config-if)#no keepalive ← cho phep cổng Ethernet vân up khi không kêt nôi vơi bên ngoaiR1(config-if)# no shut%LINK-3-UPDOWN: Interface Ethernet0, changed state to up%LINK-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to upR1(config-if)# exit

R1(config)# int lo0 ← Đinh nghia cổng ao đê lam điêm kiêm traR1(config-if)# ip addr 192.168.4.1 255.255.255.0R1(config-if)# int lo1R1(config-if)# ip addr 192.168.5.1 255.255.255.0R1(config-if)# int lo2R1(config-if)# ip addr 192.168.6.1 255.255.255.0R1(config-if)# exit

Page 46: Bài lab làm việc với tftp server

R1(config-if)# int s0R1(config-if)# ip addr 192.168.3.1 255.255.255.0R1(config-if)# clock rate 64000 ← hoat đông như DCE cung câp xung clockR1(config-if)# no shut

2. Đăt hostname, cấu hình cho các cổng loopback, ethernet và serial trên router R2

Router> enRouter# conf tRouter(config)# hostname R2R2(config)# no ip domain-lookup

R2(config)#int e0R2(config-if)# ip addr 192.168.2.1 255.255.255.0R2(config-if)# no shutR2(config-if)# int lo0R2(config-if)# ip addr 192.168.7.1 255.255.255.0R2(config-if)# int lo1R2(config-if)# ip addr 192.168.8.1 255.255.255.0R2(config-if)# int lo2R2(config-if)# ip addr 192.168.9.1 255.255.255.0

R2(config-if)# int s0R2(config-if)# ip addr 192.168.3.2 255.255.255.0R2(config-if)# no shut

3. Cấu hình giao thưc đinh tuyến IGRP và sau đo lưu cấu hình vào NVRAM trên router R1

R1(config)# router igrp 234 ← kich hoat qua trinh đinh tuyên IGRP trên routerR1(config-router)# network 192.168.1.0 ← chi ra mang se quang cao va xac đinh cổng nao se gơi va nhân thông tin đinh tuyên RIPR1(config-router)# network 192.168.3.0R1(config-router)# network 192.168.4.0R1(config-router)# network 192.168.5.0R1(config-router)# network 192.168.6.0R1(config-router)# endR1#copy run start

Page 47: Bài lab làm việc với tftp server

4. Cấu hình giao thưc đinh tuyến IGRP và sau đo lưu cấu hình vào NVRAM trên router R2

R2(config)# router igrp 234R2(config-router)# network 192.168.2.0R2(config-router)# network 192.168.3.0R2(config-router)# network 192.168.7.0R2(config-router)# network 192.168.8.0R2(config-router)# network 192.168.9.0R2(config-rputer)# endR2# copy run start

5. Kiểm tra và giải quyết sự cố

Dung lênh clear ip route * đê xoa toan bô route tư bang đinh tuyên.

R1# clear ip route *

Xem qua trinh gưi nhân thông tin đinh tuyên IGRP băng lênh debug ip igrp events, debug ip igrp transactions.

R1# debug ip igrp eventsIGRP event debugging is onR1# debug ip igrp transactionsIGRP protocol debuging is onR1#IGRP: received update from 192.168.3.2 on R2IGRP: Update contains 0 interior, 4 system, and 0 exterior routes.IGRP: Total routes in update: 4

Tăt chế đô debug băng lênh undebug all.

R1# undebug allAll possible debugging has been turned off

Xem bang đinh tuyên trên R1 va R2 băng lênh show ip route.

R1# show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

Page 48: Bài lab làm việc với tftp server

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate defaultU - per-user static route, o - ODRGateway of last resort is not set

I 192.168.9.0/24 [100/8976] via 192.168.3.2, 00:00:46, Serial0I 192.168.8.0/24 [100/8976] via 192.168.3.2, 00:00:46, Serial0C 192.168.3.0/24 is directly connected, Serial0I 192.168.2.0/24 [100/8576] via 192.168.3.2, 00:00:46, Serial0C 192.168.1.0/24 is directly connected, Ethernet0I 192.168.7.0/24 [100/8976] via 192.168.3.2, 00:00:47, Serial0C 192.168.6.0/24 is directly connected, Loopback2C 192.168.5.0/24 is directly connected, Loopback1C 192.168.4.0/24 is directly connected, Loopback0

Tư R1, ban co thể thấy co 4 route IGRP hoc tư next-hop 192.168.3.2 và đi qua cổng S0. Chu y số AD trong trương hơp IGRP là 100(RIP là 120 và OSPF là 110). I co nghia là IGRP.

R2# show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate defaultU - per-user static route, o - ODRGateway of last resort is not setI 192.168.4.0/24 [100/8976] via 192.168.3.1, 00:00:46, Serial0I 192.168.5.0/24 [100/8976] via 192.168.3.1, 00:00:46, Serial0C 192.168.3.0/24 is directly connected, Serial0I 192.168.1.0/24 [100/8576] via 192.168.3.1, 00:00:46, Serial0C 192.168.2.0/24 is directly connected, Ethernet0I 192.168.6.0/24 [100/8976] via 192.168.3.1, 00:00:47, Serial0C 192.168.9.0/24 is directly connected, Loopback2C 192.168.8.0/24 is directly connected, Loopback1C 192.168.7.0/24 is directly connected, Loopback0

Page 49: Bài lab làm việc với tftp server

11Lab 3-7: Cấu hình IGRP Passive Interface

Mô tả & yêu cầu –Router A, B, C sư dụng IGRP đê quang cao thông tin đinh tuyên.–Router B hoat đông như DCE cung câp xung clock cho router A va C.–Cac router câu hinh IGRP va quang cao tât ca cac mang nôi trưc tiêp.–Cổng S0 cua router A không gưi thông tin đinh tuyên ma chi nhân thông tin đinh tuyên.–Router B va C quang cao tât ca cac mang nôi trưc tiêp.

Cấu hình

Router A!hostname Router A!interface Loopback0 ← Đinh nghia interface ao đê lam điêm kiêm traip address 10.1.1.1 255.255.255.0 !interface Ethernet0ip address 148.1.1.1 255.255.255.0no shutdown

Page 50: Bài lab làm việc với tftp server

no keepalive ← cho phep interface Ethernet vân up khi không kêt nôi vơi bên ngoai! interface Serial0ip address 192.1.1.1 255.255.255.0no shutdown!!router igrp 64 ← kich hoat qua trinh đinh tuyên IGRP trên routerpassive–interface Serial0 ← không cho gơi thông tin đinh tuyên IGRP trên Serial0network 10.0.0.0 ← chi ra mang se quang cao va xac đinh cổng nao se gơi va nhân thông tin đinh tuyên IGRPnetwork 148.1.0.0network 192.1.1.0!no ip classless!end

Router B!hostname RouterB!interface Serial0ip address 192.1.1.2 255.255.255.0clock rate 64000 ← hoat đông như DCE cung câp xung clockno shutdown!interface Serial1ip address 193.1.1.1 255.255.255.0clock rate 64000 ← hoat đông như DCE cung câp xung clockno shutdown!router igrp 64network 192.1.1.0 network 193.1.1.0!end

Page 51: Bài lab làm việc với tftp server

Router C!hostname RouterC!interface Ethernet0ip address 152.1.1.1 255.255.255.0no shutdownno keepalive ← vô hiêu hoa keepalive trên router cho phep interface ethernet0 vân up khi không kêt nôi ra bên ngoai!interface Serial0ip address 193.1.1.1 255.255.255.0no shutdown!router igrp 64network 152.1.0.0network 193.1.1.0!no ip classless!end

Kiểm tra

1. Xem thông tin vê IGRP băng lênh show ip protocols, chu y răng Serial cổng trên router A ơ trang thái passive.

RouterA#show ip protocolsRouting Protocol is “igrp 64”Sending updates every 90 second, next due in 31 secondsInvalid after 270 seconds, hold dow 280, flushed after 630Outgoing update filter list for all interface is not setIncoming update filter list for all interface is not setDefault networks flagged in outgoing updatesDefault networks accepted from incoming updatesIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0IGRP maximum hopcount 100IGRP maximum metric variance 1

Page 52: Bài lab làm việc với tftp server

Redistributing: IGRP 64Routing for Network:10.0.0.0148.1.0.0192.1.1.0Passive Interface(s):Serial0Routing Information Sources:Gateway Distance Last Update192.1.1.2 100 00:00:48Distance: (default is 100)

2. Xem quá trình gơi nhân thông tin đinh tuyến băng lênh debug ip igrp transactions trên router A. Chu y câp nhât IGRP chi gơi ra cổng Ethernet0 và Loopback0, cổng Serial0 chi nhân chư không gưi đi thông tin đinh tuyến IGRP.

RouterA# debug ip igrp transactions

IGRP: sending update to 255.255.255.255 via Ethernet0 (148.1.1.1)network 10.0.0.0, metric=501network 152.1.0.0, metric=10576network 192.1.1.0, metric=8476network 193.1.1.0, metric=10476IGRP: sending update to 255.255.255.255 via Loopback0 (10.1.1.1)network 148.1.0.0, metric=1100network 152.1.0.0, metric=10576network 192.1.1.0, metric=8476network 193.1.1.0, metric=10476IGRP: received update from 192.1.1.2 on Serial0network 152.1.0.0, metric 10576 (neighbor 8576)network 193.1.1.0, metric 10476 (neighbor 8476)

3. Xem bảng đinh tuyến trên RouterA và RouterC băng lênh show ip route. Chu y RouterA hoc tất cả các route tư RouterC, RouterC không co route tư RouterA.

RouterA#show ip routeCodes: C – connected, S – static, I – IGRP, R – RIP, M – mobile, B – BGPD – EIGRP, EX – EIGRP external, 0 – OSPF, IA – OSPF inter areaN1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2

Page 53: Bài lab làm việc với tftp server

E1 – OSPF external type 1, E2 – OSPF external type 2, E – EGPi – IS-IS, L1 – IS-IS level-1, L2 – IS-IS level-2, * - candidate defaultU – per-user static route, o – ODR

Gateway of last resort is not set

10.0.0.0/24 is subnetted, 1 subnetsC 10.1.1.0 is directly connected, Loopback0148.1.0.0/24 is subnetted, 1 subnetsC 148.1.1.0 is directly connected, Ethernet0I 152.1.0.0/16 [100/10576] via 192.1.1.2, 00:00:29, Serial0C 192.1.1.0/24 is directly connected, Serial0I 193.1.1.0/24 [100/10476] via 192.1.1.2, 00:00:29, Serial0

RouterC#show ip routeCodes: C – connected, S – static, I – IGRP, R – RIP, M – mobile, B – BGPD – EIGRP, EX – EIGRP external, 0 – OSPF, IA – OSPF inter areaN1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2E1 – OSPF external type 1, E2 – OSPF external type 2, E – EGPi – IS-IS, L1 – IS-IS level-1, L2 – IS-IS level-2, * - candidate defaultU – per-user static route, o – ODR

Gateway of last resort is not set

152.1.0.0/24 is subnetted, 1 subnetsC 152.1.1.0 is directly connected, Ethernet0I Route from192.1.1.0/24 [100/10476] via 193.1.1.2, 00:00:13, Serial0 RouterBC 193.1.1.0/24 is directly connected, Serial0

12Lab 3-8: Cấu hình IGRP Unequal-Cost Load Balancing

[img]

Page 54: Bài lab làm việc với tftp server

[/img]

Mô tả & yêu cầu

–Router A, B, C sư dụng IGRP đê quang cao thông tin đinh tuyên.–Router B hoat đông như DCE cung câp xung clock cho router A va C.–Cac router câu hinh IGRP va quang cao tât ca cac mang nôi trưc tiêp.–Câu hinh router A va B sư dụng IGRP cân băng tai trên cổng S0, E0.–Tư router A, B, C ping đươc hêt cac đia chi trong mang.

+ Măc đinh router se cân băng tai 4 tuyên đương đi co cost băng nhau. Ta co thê câu hinh IGRP cân băng tai đươc đên 4 tuyên đương đi co đơn gia(cost) không băng nhau đê đên đich băng cach sư dụng biên varian x vơi: X= highest cost/ lowest cost.

Vi dụ nêu router A co 2 đương đi đên đich 3.3.3.3 môt đương co cost la 4, va đương kia co cost la 8 thi măc đinh se sư dụng đương đi co cost la 4 đê đên 3.3.3.3. Tuy nhiên nêu ta thiêt lâp variance la 2 thi router se cân băng tai trên ca 2 tuyên đương nay.

Câu hinhRouterA!hostname RouterA! Đinh nghia cổng aointerface Loopback0 ip address 10.1.1.1 255.255.255.0!interface Ethernet0ip address 152.1.1.1 255.255.255.0

Page 55: Bài lab làm việc với tftp server

keepalive !interface Serial0ip addres 192.1.1.1 255.255.255.0no shut!!router IGRP 64 network 10.0.0.0 network 152.1.0.0network 192.1.1.0!no ip classless!end

RouterB!hostname RouterB!interface Ethernet0no ip addressip address 152.1.1.2 255.255.255.0!interface Serial0ip address 192.1.1.2 255.255.255.0clockrate 64000! hoat đông như DCE cung câp xung clockno shut!interface Serial1ip address 193.1.1.2 255.255.255.0 hoat đông như DCE cung câp xung clockclockrate 64000 no shut!router igrp 64 ! kich hoat qua trinh đinh tuyên IGRP trên routernetwork 192.1.1.0 ! chi ra mang se quang cao va xac đinh cổng nao se gơi va nhân

Page 56: Bài lab làm việc với tftp server

thông tin đinh tuyên IGRPnetwork 193.1.1.0network 152.1.0.0!no ip classless!end

RouterC!hostname RouterC!interface Loopback0ip address 3.3.3.3 255.255.255.0!interface serial0ip address 193.1.1.1 255.255.255.0!!router igrp 64 ! kich hoat qua trinh đinh tuyên IGRP trên routernetwork 193.1.1.0 ! chi ra mang se quang cao va xac đinh cổng nao se gơi va nhân thông tin đinh tuyên IGRPnetwork 3.0.0.0!no ip classless!end

Kiểm tra

1. Xem bang đinh tuyên trên Router A băng lênh show ip route

RouterA#show ip routeCodes: C – connected, S – static, I – IGRP, R – RIP, M – mobile, B – BGPD – EIGRP, EX – EIGRP external, 0 – OSPF, IA – OSPF inter area

Page 57: Bài lab làm việc với tftp server

N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2E1 – OSPF external type 1, E2 – OSPF external type 2, E – EGPi – IS-IS, L1 – IS-IS level-1, L2 – IS-IS level-2, * - candidate defaultU – per-user static route, o – ODR

Gateway of last report is not set

I 3.0.0.0/8 [100/9076] via 152.1.1.1, 00:00:04, Ethernet0[100/10976] via 192.1.1.2, 00:00:04, Serial0 10.0.0.0/24 is subnetted, 1 subnetsC 10.1.1.0 is directly connected, Loopback0152.1.0.0/24 is subnetted, 1 subnetsC 152.1.1.0 is directly connected, Ethernet0C 192.1.1.0/24 is directly connected, Serial0I 193.1.1.0/24 [100/10476] via 192.1.1.2, 00:00:27, Serial0[100/8576] via 152.1.1.1, 00:00:27, Ethernet0

Chu y co 2 đương đi đến mang 3.0.0.0, môt đương qua Ethernet cổng (cost là 9076), đương kia qua Serial cổng (cost là 10976). Cost cua 2 tuyến đương không băng nhau, khi thiết lâp variance là 2, tuyến đương qua Serial cổng co cost nho hơn giá tri này (10976&lt;18152 = 9076*2) nên se đươc sư dung.

2. Tư router A xem đương đi đến host 3.3.3.3 băng lênh show ip route 3.3.3.3

RouterA#show ip route 3.3.3.3Routing entry for 3.0.0.0/8Known via “igrp 64”, distance 100, metric 9076Redistributing via igrp 64Advertised by igrp 64 (self originated)Last update from 192.1.1.2 on Serial0, 00:00:18 agoRouting Descriptor Blocks:* 152.1.1.1, from 152.1.1.1, 00:00:18 ago, via Ethernet0Route metric is 9076, traffic share count is 1Total delay is 26000 microseconds, minimum bandwith is 1544 KbitReliability 255/255, minimum MTU 1500 bytesLoading 1/255, Hops 1192.1.1.2, from 192.1.1.2,00:00:18 ago, via Serial0Route metric is 10976, traffic share count is 1

Page 58: Bài lab làm việc với tftp server

Total delay is 45000 microseconds, minimum bandwith is 1544 KbitReliability 255/255, minimum MTU 1500 bytesLoading 1/255, Hops 1

Ta thây ca 2 tuyên đương đên host 3.3.3.3, dâu * cho biêt goi tin tư touter A se sư dụng đương nay đê đên host 3.3.3.3.

3. Tư router A ping host 3.3.3.3

RouterA#ping 3.3.3.3Type the escape sequence to abort.Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 second:!!!!!

4. Bây giơ xem lai tuyến đương đi đến host 3.3.3.3 băng lênh show ip route 3.3.3.3.

RouterA#show ip route 3.3.3.3Routing entry for 3.0.0.0/8Known via “igrp 64”, distance 100, metric 9076Redistributing via igrp 64Advertised by igrp 64 (self originated)Last update from 192.1.1.2 on Serial0, 00:00:06 agoRouting Descriptor Blocks:152.1.1.1, from 152.1.1.1, 00:00:06 ago, via Ethernet0Route metric is 9076, traffic share count is 1Total delay is 26000 microseconds, minimum bandwith is 1544 KbitReliability 255/255, minimum MTU 1500 bytesLoading 1/255, Hops 1* 192.1.1.2, from 192.1.1.2, 00:00:07 ago, via Serial0Route metric is 10976, traffic share count is 1Total delay is 45000 microseconds, minimum bandwith is 1544 KbitReliability 255/255, minimum MTU 1500 bytesLoading 1/255, Hops 1

Ta thây dâu * bây giơ ơ tuyên đương thư hai. Điêu nay do router thưc hiên cân băng tai cho ca 2 tuyên đương đê đên mang 3.0.0.0

5. Loai bo variance tư router A băng lênh no variance.

Page 59: Bài lab làm việc với tftp server

RouterA#configuration terminalRouterA(config)#router igrp 64RouterA(config-router)#no variance

13

LAB 3-12: REDISTRIBUTE GIỮA EIGRP & IGRP

Mô tả:- Giao thưc đinh tuyên EIGRP đươc sư dụng trên Router A, B, C. Router B đong vai trò la DCe cung câp xungclock hoat đông cho router A va C.- Giao thưc đinh tuyên IGRP đươc sư dụng trên Router C, D. router C đong vai trò la DCE cung câp xung clock hoat đông cho router D.- Bai Lab nay se mô ta cach thưc redistribution giưa IGRP & EIGRP.Cấu hình:Router A:!hostname RouterA!interface Loopback0ip address 192.1.1.1 255.255.255.0!interface Serial0ip address 192.1.1.1 255.255.255.0!router eigrp 100network 192.1.1.0network 1.0.0.0!endRouter B:!hostname RouterB!interface Serial0ip address 192.1.1.2 255.255.255.0

Page 60: Bài lab làm việc với tftp server

clock rate 64000!interface Serial1ip address 194.1.1.2 255.255.255.0clock rate 64000!router eigrp 100network 192.1.1.0network 194.1.1.0!endRouter C:!hostname RouterC!interface Serial0ip address 194.1.1.1 255.255.255.0!interface Serial1ip address 195.1.1.1 255.255.255.0clock rate 64000!router eirgp 100network 194.1.1.0!router igrp 200network 195.1.1.0!endRouter D:!hostname RouterD!interface Loopback0ip address 4.4.4.4 255.255.255.0!interface Serial0ip address 195.1.1.2 255.255.255.0!

Page 61: Bài lab làm việc với tftp server

router igrp 200network 195.1.1.0network 4.0.0.0!endThực hiên:1. Câu hinh trên Router A:Router> enRouter# conf tRouter(config)# hostname RouterARouterA (config)# int lo0RouterA (config-if)# ip addr 1.1.1.1 255.255.255.0RouterA (config-if)# int s0RouterA (config-if)# ip addr 192.1.1.1 255.255.255.0RouterA (config-if)# no shutRouterA (config-if)#exit

RouterA (config)# router eigrp 100RouterA (config-router)# network 192.1.1.0RouterA (config-router)# network 1.0.0.0

RouterA (config-router)# endRouterA# copy run startRouterA#2. Câu hinh trên Router B:Router(config)# hostname RouterBRouterB (config)# int s0RouterB (config-if)# ip addr 192.1.1.2 255.255.255.0RouterB (config-if)# clock rate 64000RouterB (config-if)# no shutRouterB (config-if)# int s1RouterB (config-if)# ip addr 194.1.1.2 255.255.255.0RouterB (config-if)# clock rate 64000RouterB (config-if)# no shutRouterB (config-if)#exit

RouterB (config)# router eigrp 100RouterB (config-router)# network 192.1.1.0RouterB (config-router)# network 194.1.1.0

Page 62: Bài lab làm việc với tftp server

RouterB (config-router)# endRouterB# copy run startRouterB#3. Câu hinh trên Router C:Router> enRouter# conf tRouter(config)# hostname RouterCRouterC (config)# int s0RouterC (config-if)# ip addr 194.1.1.1 255.255.255.0RouterC (config-if)# no shutRouterC (config-if)# int s1RouterC (config-if)# ip addr 195.1.1.1 255.255.255.0RouterC (config-if)# clock rate 64000 RouterC (config-if)# no shutRouterC (config-if)#exitRouterC (config)# router eigrp 100RouterC (config-router)# network 194.1.1.0RouterC (config-router)# router igrp 200RouterC (config-router)# network 195.1.1.0RouterC (config-router)# endRouterC# copy run startRouterC#4. Câu hinh trên Router D:Router> enRouter# conf tRouter(config)# hostname RouterDRouterD(config)# int lo0RouterD(config-if)# ip addr 4.4.4.4 255.255.255.0RouterD(config-if)# int s0RouterD(config-if)# ip addr 195.1.1.2 255.255.255.0RouterD(config-if)# no shutRouterD(config-if)#exitRouterD(config)# router igrp 200RouterD(config-router)# network 195.1.1.0RouterD(config-router)# network 4.0.0.0RouterD(config-router)# endRouterD# copy run startRouterD#

Page 63: Bài lab làm việc với tftp server

Kiểm tra:1. Xem bang đinh tuyên trên router C băng lênh show ip routeRouterC# show ip route D 1.0.0.0/8 [90/2809856] via 194.1.1.2, 00:00:55, Serial0I 4.0.0.0/8 [100/8976] via 195.1.1.2, 00:00:10, Serial1D 192.1.1.0/24 [90/2681856] via 194.1.1.2, 00:00:55, Serial0C 194.1.1.0/24 is directly connected, Serial0C 195.1.1.0/24 is directly connected, Serial1RouterC#Chu y răng Router C học cac route cua router A qua giao thưc đinh tuyên EIGRP.

2. Xem bang đinh tuyên trên router B băng lênh show ip routeRouterB# show ip route D 1.0.0.0/8 [90/2297856] via 192.1.1.1, 00:01:50, Serial0C 192.1.1.0/24 is directly connected, Serial0C 194.1.1.0/24 is directly connected, Serial1RouterB#Chu y răng Router B không học cac route xuât phat tư cac mang đươc quang ba bơi giao thưc IGRP.

3. Xem bang đinh tuyên trên router D băng lênh show ip routeRouterD# show ip route 4.0.0.0/24 is subnetted, 1 subnetsC 4.4.4.0 is directly connected, Loopback0C 195.1.1.0/24 is directly connected, Serial0RouterD#

17Lab 3-10: Redistribute giữa RIP và IGRP

Page 64: Bài lab làm việc với tftp server

Mô tả

–Router R1, R3 sư dụng IGRP đê quang cao thông tin đinh tuyên–Router R1, R2 sư dụng RIP đê quang cao thông tin đinh tuyên–Router R1 hoat đông như DCE cung câp xung clock cho R2 va R3–Tư router R1, R2, R3 ping đươc hêt cac đia chi trong mang.

Cấu hình

Router R1hostname R1!enable password vnpro!ip subnet-zerono ip domain-lookup!interface Serial0ip address 9.1.1.1 255.255.255.0

Page 65: Bài lab làm việc với tftp server

clock rate 64000!interface Serial1ip address 9.1.2.1 255.255.255.0clock rate 64000!router rip redistribute igrp 10 metric 1passive-interface Serial1network 9.0.0.0!router igrp 10redistribute rip metric 128 20000 255 1 1500passive-interface Serial0network 9.0.0.0!end

Router R2

hostname R2!enable password cisco!ip subnet-zerono ip domain-lookup!interface Ethernet0ip address 10.1.1.1 255.255.255.0!interface Serial0ip address 9.1.1.2 255.255.255.0!router rip network 9.0.0.0network 10.0.0.0!end

Page 66: Bài lab làm việc với tftp server

Router R3

hostname R3!enable password vnpro!ip subnet-zerono ip domain-lookup!interface Loopback0ip address 10.1.2.1 255.255.255.0!interface Ethernet0ip address 9.1.3.1 255.255.255.0!interface Serial0ip address 9.1.2.2 255.255.255.0!router igrp 10network 9.0.0.0network 10.0.0.0!end

Các bươc thực hiên

1. Đăt hostname, cấu hình cho các cổng trên router R1

Router> enRouter# conf tRouter(config)# hostname R1R1(config)# no ip domain-lookup R1(config)# int Serial0R1(config-if)# ip addr 9.1.1.1 255.255.255.0R1(config-if)# clock rate 64000 ← hoat đông như DCE cung câp xung clockR1(config-if)# no shutR1(config-if)# exit

R1(config)# int Serial1

Page 67: Bài lab làm việc với tftp server

R1(config-if)# ip addr 9.1.2.1 255.255.255.0R1(config-if)# clock rate 64000 ← hoat đông như DCE cung câp xung clockR1(config-if)# no shut

2. Đăt hostname, cấu hình cho cổng trên router R2

Router> enRouter# conf tRouter(config)# hostname R2R2(config)# no ip domain-lookup

R2(config)#int e0R2(config-if)# ip addr 10.1.1.1 255.255.255.0R2(config-if)# no keepalive R2(config-if)# no shut

R2(config-if)# int s0R2(config-if)# ip addr 9.1.1.2 255.255.255.0R2(config-if)# no shut

3. Đăt hostname, cấu hình cho cổng trên router R3

Router> enRouter# conf tRouter(config)# hostname R3R3(config)# no ip domain-lookup

R3(config-if)# int Ethernet0R3(config-if)# ip address 9.1.3.1 255.255.255.0R3(config-if)# no keepaliveR3(config-if)# no shut

R3(config-if)# int s0R3(config-if)# ip addr 9.1.2.2 255.255.255.0R3(config-if)# no shut

4. Cấu hình giao thưc đinh tuyến IGRP vơi AS là 10 trên router R3

R3(config)# router igrp 10 ← kich hoat qua trinh đinh tuyên IGRP trên router vơi AS la 10

Page 68: Bài lab làm việc với tftp server

R3(config-router)# network 9.0.0.0 ← chi ra mang nao se chay IGRPR3(config-router)# endR3#

+ Lưu y răng vì IGRP và RIP thuôc dang classfull nên se tự đông thực hiên summarization vê đia chi classfull lơp A.

5. Cấu hình giao thưc đinh tuyến RIP trên router R2

R2(config)# router ripR2(config-router)# network 9.0.0.0R2(config-router)# network 10.0.0.0R2(config-rputer)# endR2#

6. Cấu hình giao thưc đinh tuyến RIP và IGRP cho mang 9.0.0.0 trên router R1

R1(config)# router ripR1(config-router)# network 9.0.0.0R1(config-router) router igrp 10R1(config-router)# network 9.0.0.0R1(config-rputer)# endR1#

7. Trên router R1, ta cần đảm bảo răng RIP updates không gưi sang R3 (chay IGRP) và đảm bảo IGRP updates tư R3 không gưi sang R2(chay RIP). Do đo ta cần thực hiên passive interface trên router R1 để đảm bảo không quảng cáo các thông tin update ra mang ngoài.

R1(config)# router rip Đam bao RIP updates không gưi sang R3R1(config-router)# passive-interface Serial1 R1(config-router)# router igrp 10 Đam bao IGRP updates không gưi sang R2R1(config-router)# passive-interface Serial0

8. Kiểm tra bảng đinh tuyến

–Dung lênh clear ip route * để xoá toàn bô route tư bảng đinh tuyến.

R1# clear ip route *

Page 69: Bài lab làm việc với tftp server

–Xem bảng đinh tuyến trên R1 băng lênh show ip route.

R1# show ip route...Gateway of last resort is not set9.0.0.0/24 is subnetted, 3 subnetsC 9.1.1.0 is directly connected, Serial0C 9.1.2.0 is directly connected, Serial1I 9.1.3.0 [100/80225] via 9.1.2.2, 00:00:31, Serial1R 10.0.0.0/8 [120/1] via 9.1.1.2, 00:00:15, Serial0R1#

–Xem bảng đinh tuyến trên R2 băng lênh show ip route.

R2# show ip route...9.0.0.0/24 is subnetted, 2 subnetsC 9.1.1.0 is directly connected, Serial0R 9.1.2.0 [120/1] via 9.1.1.1, 00:00:27, Serial010.0.0.0/24 is subnetted, 1 subnetsC 10.1.1.0 is directly connected, Ethernet0R2#

Xem bảng đinh tuyến trên R2 ta thấy R2 không kết nối đươc vơi mang 9.1.3.0/24. Do đo, ta cần cấu hình redistribute trên router R1 để cho phep R2 thấy mang 9.1.3.0/24.

Redistribution đinh nghia cách thưc trao đổi routing updates giữa các giao thưc đinh tuyến khác nhau. Môi giao thưc đinh tuyến co cách đinh nghia vê metric khác nhau, do đo khi thực hiên redistribution ta cần phải chuyển đổi dang metric sao cho phu hơp vơi giao thưc đinh tuyến đo.

9. Để R2 thấy đươc R3 ta thực hiên redistribute IGRP trong RIP vơi hop count là 1

R1(config)# router ripR1(config-router)# redistribute igrp 10 metric 1

10. Để R3 thấy đươc R2 ta thực hiên redistribute RIP trong IGRP, sư dung ky tự giup đơ ? để hiển thi IGRP metric.

Page 70: Bài lab làm việc với tftp server

R1(config)# router igrp 10R1(config-router)# redistribute rip ?Metric Metric for redistributed routedroute-map Route map referenceR1(config-router)# redistribute rip metric ?&lt;1-4294967295> Bandwidth metric in Kbits per secondR1(config-router)# redistribute rip metric 128 ?&lt;0-4294967295> IGRP delay metric, in 10 microsecond unitsR1(config-router)# redistribute rip metric 128 20000 ?&lt;0-255> IGRP reliability metric where 255 is 100% reliableR1(config-router)# redistribute rip metric 128 20000 255 ?&lt;0-255> IGRP effective bandwidth metric (Loading) where 255 is 100% loadedR1(config-router)# redistribute rip metric 128 20000 255 1 ? &lt;0-4294967295> IGRP MTU of the pathR1(config-router)# redistribute rip metric 128 20000 255 1 1500

11. Sau khi cấu hình, thực hiên clear ip route * và xem lai bảng đinh tuyến trên router R2. Ping mang 9.1.3.0 để kiểm tra đa kết nối đươc vơi mang IGRP chưa.

R2# show ip route9.0.0.0/24 is subnetted, 3 subnetsC 9.1.1.0 is directly connected, Serial0R 9.1.2.0 [120/1] via 9.1.1.1, 00:00:09, Serial0R 9.1.3.0 [120/1] via 9.1.1.1, 00:00:09, Serial010.0.0.0/24 is subnetted, 1 subnetsC 10.1.1.0 is directly connected, Ethernet0R2#

R2#ping 9.1.3.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 9.1.3.1, timeout is 2 seconds:! ! ! ! !Success rate is 100 percent (5/5), round-trip min/avg/max = 28/29/32 ms

12. Xem bảng đinh tuyến trên router R3. Ping mang 10.1.1.0 để kiểm tra đa kết nối vơi mang RIP chưa.

R3# show ip route

Page 71: Bài lab làm việc với tftp server

9.0.0.0/24 is subnetted, 3 subnetsI 9.1.1.0 [100/84000] via 9.1.2.1, 00:00:58, Serial0C 9.1.2.0 is directly connected, Serial0C 9.1.3.0 is directly connected, Ethernet0I 10.0.0.0/8 [100/102000] via 9.1.2.1, 00:00:58, Serial0R3#R3#ping 10.1.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 9.1.3.1, timeout is 2 seconds:! ! ! ! !Success rate is 100 percent (5/5), round-trip min/avg/max = 28/29/32 ms

13. Mơ rông vấn đê hơn, ta thêm môt subnet mơi vào R3 băng cách cấu hình interface loopback 10.1.2.1/24 sư dung IGRP.

R3(config)# int loopback0R3(config-if)# ip address 10.1.2.1 255.255.255.0R3(config-if)# router igrp 10R3(config-router)# network 10.0.0.0

Ban đầu, R3 se không quảng cáo mang 10.0.0.0 đến router R1 vì R1 chi biết đến mang 10.0.0.0/8 thông qua quảng cáo RIP vơi AD là 120 tư R2.

R1# show ip routeGateway of last resort is not set9.0.0.0/24 is subnetted, 3 subnetsC 9.1.1.0 is directly connected, Serial0C 9.1.2.0 is directly connected, Serial1I 9.1.3.0 [100/80225] via 9.1.2.2, 00:00:31, Serial1R 10.0.0.0/8 [120/1] via 9.1.1.2, 00:00:15, Serial0R1#

Khi IGRP update tư R3 gưi đến R1, bảng đinh tuyến trên R1 se thay đổi như sau:

R1# show ip routeGateway of last resort is not set9.0.0.0/24 is subnetted, 3 subnetsC 9.1.1.0 is directly connected, Serial0C 9.1.2.0 is directly connected, Serial1

Page 72: Bài lab làm việc với tftp server

I 9.1.3.0 [100/80225] via 9.1.2.2,00:00:53, Serial1I 10.0.0.0/8 [100/80225] via 9.1.1.2, 00:00:53, Serial1R1#

Nguyên do cua sự thay đổi này là do R3 sư dung IGRP nên co AD=100 thấp hơn RIP (AD=120) nên R1 se gưi tất cả các lưu lương cho mang 10.0.0.0 qua router R3.

R1#ping 10.1.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:. . . . .Success rate is 0 percent (0/5)

R1#ping 10.1.2.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.1.2.1, timeout is 2 seconds:! ! ! ! !Success rate is 100 percent (5/5), round-trip min/avg/max = 12/14/16 ms

14. Để giải quyết vấn đê này ta cấu hình static route đến R2:

R1(config)# ip route 10.1.1.0 255.255.255.0 Serial0

15. Kiểm tra kết quả thực hiên

R1# show ip routeGateway of last resort is not set9.0.0.0/24 is subnetted, 3 subnetsC 9.1.1.0 is directly connected, Serial0C 9.1.2.0 is directly connected, Serial1I 9.1.3.0 [100/80225] via 9.1.2.2, 00:00:53, Serial110.0.0.0/8 is variably subnetted, 2 subnets, 2 masksS 10.1.1.0/24 is directly connected, Serial0I 10.0.0.0/8 [100/80225] via 9.1.1.2, 00:00:53, Serial1R1#

R1#ping 10.1.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:

Page 73: Bài lab làm việc với tftp server

! ! ! ! !Success rate is 0 percent (5/5), round-trip min/avg/max = 16/16/16 ms

R1#pi ng 10.1.2.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.1.2.1, timeout is 2 seconds:! ! ! ! !Success rate is 100 percent (5/5), round-trip min/avg/max = 12/14/16 ms