Packet Tracer实验集

Size: px
Start display at page:

Download "Packet Tracer实验集"

Transcription

1 Packet Tracer 1 实验集 Packet Tracer 实验集 姚俊编著

2 目 录 目 录 第一部分路由器实验... 1 实验 1-1. 路由器的 console 口访问配置... 1 实验 1-2. 路由器的 telnet 访问配置... 5 实验 1-3. CLI 的使用与 IOS 基本命令...8 实验 1-4. 配置文件的管理和 IOS 的管理 实验 1-5. 密码恢复和 IOS 的恢复 实验 1-6. CDP 配置...21 实验 1-7. 带下一跳地址的静态路由 实验 1-8. 带送出接口的静态路由 实验 1-9. 浮动静态路由 实验 RIPv1 基本配置...35 实验 不连续网络配置及其解决方案 实验 被动接口与单播更新 实验 RIPv2 基本配置...47 实验 向 RIP 网络中注入默认路由 实验 EIGRP 基本配置...55 实验 EIGRP 负载均衡...62 实验 向 EIGRP 网络中注入默认路由 实验 点到点链路上的 OSPF...70 实验 基于区域的 OSPF 简单口令认证 实验 基于区域的 OSPF MD5 认证 实验 default-information originate I

3 目 录 实验 多区域 OSPF 基本配置 实验 OSPF 末节区域和完全末节区域...92 实验 OSPF NSSA 区域 第二部分交换机实验 实验 2-1. 交换机基本配置 实验 2-2. 交换机端口安全 实验 2-3. 划分 VLAN 实验 2-4. Trunk 配置 实验 2-5. Voice VLAN 配置 实验 2-6. DTP 的配置 实验 2-7. EtherChannel 配置 实验 2-8. VTP 配置 实验 2-9. VLAN 信息覆盖 实验 STP PVST 配置 实验 RSTP 实验 STP 保护 实验 单臂路由实现 VLAN 间路由 实验 三层交换机实现 VLAN 间路由 实验 HDLC 和 PPP 封装 实验 PAP 验证 实验 CHAP 验证 实验 帧中继基本配置 实验 帧中继多点子接口配置 OSPF 实验 帧中继点到点子接口下配置 OSPF 实验 路由器的访问安全 II

4 目 录 实验 路由器日志 实验 标准 ACL 实验 扩展 ACL 实验 通过 ADSL 连接到 Internet( 使用 ADSL Modem) 实验 GRE Tunnel 实验 DHCP 配置 实验 静态 NAT 配置 实验 动态 NAT 配置 实验 NAT 过载配置 第三部分无线网实验 实验 3-1. WRT300N 无线路由器配置 实验 3-2. IPv6 静态路由配置 实验 3-3. IPv6 的 RIPng 配置 第四部分扩展性实验 实验 4-1. Easy VPN 实验指南 实验 4-2. 最真实的模拟 VPN 综合实验 实验 4-3. 交换机和路由器的维护实验 实验 4-4. SNMP 实验指南 实验 4-5. 基于 AAA 的 Easy VPN 实验 实验 4-6. GRE 实验 ( 一 ) 第五部分综合性实验 实验 5-1. 综合实验 实验 5-2. CCNA 大综合实验 III

5 第一部分 路由器实验 第一部分 路由器实验 实验 1-1. 路由器的 console 口访问配置 一 实验目的 ( 一 ) 计算机的串口和路由器 console 口的连接方法 ; ( 二 ) 使用 windows 系统自带的超级终端软件配置路由器 ; ( 三 ) 路由器的开机过程 二 实验拓扑 三 实验步骤 (1) 准备工作用 Roll Over 线连接好计算机 COM1 口和路由器的 Console 口, 路由器开机 (2) 打开超级终端在 windows 中的 开始 程序 附件 通信 菜单下打开 超级终端, 根据一系列提示后, 出现图 1-1 超级终端窗口 在 名称 对话框中输入一个名称, 例如 :Router; 单 1

6 第一部分 路由器实验 击 确定 按钮. 出现 1-2 窗口时, 在 连接时使用 下拉菜单 中选择计算机的 COM1 口, 单击 确定 按钮 图 1-1 超级终端窗口图 1-2 选择 COM 口 (3) 设置通信参数 通信参数设置如图所示 : 图 1-3 设置通信参数 (4) 观察路由器开机过程 关闭路由器电源, 稍后重新打开电源, 开机过程, 如下 : System Bootstrap, Version 12.1(3r)T2, RELEASE SOFTWARE (fc1) // 显示 Boot Rom 的版本 Copyright (c) 2000 by cisco Systems, Inc. 2

7 第一部分 路由器实验 cisco 2811 (MPC860) processor (revision 0x200) with 60416K/5120K bytes of memory // 显示路由器内存大小 Self decompressing the image : ##################################################################### ##### [OK] Restricted Rights Legend // 以上是 IOS 解压过程 Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c) of the Commercial Computer Software - Restricted Rights clause at FAR sec and subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS sec cisco Systems, Inc. 170 West Tasman Drive San Jose, California Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4(15)T1, RELEASE SOFTWARE (fc2) you unable // 以上是 IOS 的版本信息 Technical Support: Copyright (c) by Cisco Systems, Inc. Compiled Wed 18-Jul-07 06:21 by pt_rel_team Image text-base: 0x400A925C, data-base: 0x4372CE20 This product contains cryptographic features and is subject to United States and local country laws governing import, export, transfer and use. Delivery of Cisco cryptographic products does not imply third-party authority to import, export, distribute or use encryption. Importers, exporters, distributors and users are responsible for compliance with U.S. and local country laws. By using this product agree to comply with applicable laws and regulations. If you are to comply with U.S. and local laws, return this product immediately. A summary of U.S. laws governing Cisco cryptographic products may be found at: If you require further assistance please contact us by sending to export@cisco.com. cisco 2811 (MPC860) processor (revision 0x200) with 60416K/5120K bytes of memory // 显示路由器的内存大小 3

8 第一部分 路由器实验 Processor board ID JAD05190MTZ ( ) // 处理器板的编号 M860 processor: part number 0, mask 49 2 FastEthernet/IEEE interface(s) // 该路由器有 2 个快速以太网接口 239K bytes of non-volatile configuration memory. // 该路由器有 239kB 的 nvram 62720K bytes of // 该路由器有 64MB 的 flash 卡 ATA CompactFlash (Read/Write) --- System Configuration Dialog --- Continue with configuration dialog? [yes/no]: // 提示是否进入配置对话模式? 我们回答 n 介绍命令行模式 4

9 第一部分 路由器实验 实验 1-2. 路由器的 telnet 访问配置 一 实验目的 ( 一 ) 路由器的用户模式和特权模式的使用 ; ( 二 ) 配置路由器以太网接口的 IP 地址, 并打开接口 ; ( 三 ) 配置路由器的 enable 秘密密码和 vty 密码 ; ( 四 )Telnet 程序的使用 二 实验拓扑 三 实验步骤 (1) 配置路由器以太网接口 IP 地址 --- System Configuration Dialog --- Continue with configuration dialog? [yes/no]: no Press RETURN to get started! Router>enable // 进入路由器的特权模式 Router#configure terminal // 进入路由器的全局配置模式 Enter configuration commands, one per line. Router(config)#interface fastethernet 0/0 End with CNTL/Z. // 进入路由器的以太网口 fastethernet0/0 接口,fastethernet 表示快速以太网,0/0 表示是第 0 个插槽中的第 0 个接口,Serial0/0/0 则表示为第 0 个插槽中的第 0 个模块上的第 0 个串行接口 址 Router(config-if)#ip address // 配置接口的 IP 地 Router(config-if)#no shut // 打开接口, 默认时, 路由器的所有接口是关闭的, 交换机的所有接口是打开的 5

10 第一部分 路由器实验 %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up Router(config-if)#end Router# (2) 配置路由器密码 Router#configure terminal Enter configuration commands, one per line. // 退到全局配置模式, 回到特权模式下 End with CNTL/Z. Router(config)#line vty 0 4 // 进入路由器的 VTY 虚拟终端, vty 0 4 表示 vty 0~vty 4, 共 5 个虚拟终端 Router(config-line)#password CISCO Router(config-line)#login Router(config-line)#exit Router(config)#enable password CISCO Router(config)#end (3) 通过 Telnet 访问路由器 // 配置 vty 的密码, 即 Telnet 密码 // 回到上一级模式下 // 配置特权密码 如图 2-1, 在计算机上配置 IP 地址为 /24, 并 打开 DOS 命令行窗口测试计算机和路由器的连通性, 及 Telnet 远程登录 单击 : PC Desktop IP configuration, 在弹出 的对话框中, 设置 IP address : , subnet mask: loss), PC>ping Pinging with 32 bytes of data: Reply from : bytes=32 time=157ms TTL=255 Reply from : bytes=32 time=63ms TTL=255 Reply from : bytes=32 time=63ms TTL=255 Reply from : bytes=32 time=62ms TTL=255 Ping statistics for : Packets: Sent = 4, Received = 4, Lost = 0 (0% Approximate round trip times in milli-seconds: Minimum = 62ms, Maximum = 157ms, Average = 86ms PC>telnet Trying Open User Access Verification 6

11 第一部分 路由器实验 Password: Router>e nable Password: Router# // 输入 vty 的密码 CISCO, 输入 enable 密码 CISCO, 能正常进入路由器的特权模式 密码处于隐藏模式, 是看不见的 图 2-1 设置 IP 地址和子网掩码 7

12 第一部分 路由器实验 实验 1-3.CLI 的使用与 IOS 基本命令 一 实验目的 ( 一 ) 路由器 CLI 的各种模式 ( 二 ) 路由器 CLI 各种编辑命令 ( 三 ) 路由器密码的配置 ( 四 ) 路由器的 IOS 基本命令 ( 五 ) 查看路由器的有关信息二 实验拓扑 三 实验步骤 ( 一 ) 用户模式和特权模式的切换 Router>enable Router#disable Router> // Router 是路由器的名字, 而 > 代表在用户模式 enable 命令可以使路由器从用户模式进入到特权模式, disable 命令则相反, 在特区模式下提示符为 # ( 二 )? 和 Tab 键的使用 Router>enable Router#clok Translating "clok"...domain server ( ) % Unknown command or computer name, or unable to find computer address // 以上表明输入了错误的命令 Router#cl? clear clock // 列出了以 cl 开头的所有命令 8

13 第一部分 路由器实验 格式 Router#clock % Incomplete command. // 提示命令输入不完整 Router#clock? set Set the time and date Router#clock set? hh:mm:ss Current Time Router#clock set 11:36:00 % Incomplete command. Router#clock set 11:36:00? <1-31> Day of the month MONTH Month of the year Router#clock set 11:36:00 2? MONTH Month of the year // 使用了? 帮助命令, 获得 clock 命令的 Router#clock set 11:36: ^ % Invalid input detected at '^' marker. // 提示输入了无效的参数, 并用 ^ 指示错误的所在 Router#clock set 11:36:00 2 jan % Incomplete command. Router#clock set 11:36:00 2 jan 2009 Router#show clock *11:36:4.297 UTC????? Router#disable Router>en Router#dis % Ambiguous command: "dis" Router#dis? // 命令是可以缩写的, 以上 en 等同于 enable disable disconnect // 以 dis 开头的有两个无法区分出来 Router>en Tab Router>enable Router#conf Tab Router#configure t Tab Router#configure terminal ( 三 )IOS 编辑命令与历史命令缓存大小 Router#show history // 显示历史命令 Router#terminal history size 50 // 把缓存的历史命令数改为 50 ( 四 ) 基本 IOS 命令 配置路由器 R1: Router>ena Router#conf t Enter configuration commands, one per line. End with CNTL/Z. 9

14 第一部分 路由器实验 太网口 Router(config)#hostname R1 R1(config)#interface fastethernet 0/0 // 配置路由器的主机名为 R1, 设置立即生效 // 进入到接口配置模式, 这里是百兆以 R1(config-if)#ip addr // 配置 IP 地址 , 子网掩码 R1(config-if)#speed 100 ( 做该实验时, 记得在 pc 上更改其双工模式 ) R1(config-if)#duplex full // 配置以太网口的速率和全双工状态, 默认时都是自适应的 R1(config-if)#no shut // 开启以太网口 R1(config-if)#exit // 返回到上一级模式 R1(config)#interface serial0/0/0 // 进入到串行接口配置模式 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#end R1#copy running-config startup-config Destination filename [startup-config]? Building configuration... [OK] R1#show ip interface brief // 串行接口配置 IP 地址 // 介绍配置直接回到特权模式下 Interface IP-Address OK? Method Status Protocol FastEthernet0/ YES manual up up FastEthernet0/1 unassigned YES manual administratively down down Serial0/0/ YES manual down down Serial0/0/1 unassigned YES manual administratively down down Vlan1 unassigned YES manual administratively down down // 显示各个接口上的 IP 地址, 简要状态 配置路由器 R2: Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#hostname R2 R2(config)#enable password cisco R2(config)#int f0/0 R2(config-if)#ip addr R2(config-if)#no shut R2(config-if)#exit R2(config)#inter s0/0/0 R2(config-if)#no shut R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#description Connect to R1 // 标注一些信息, 方便阅读配置文件, 不影响接口的功能 R2(config-if)#end End with CNTL/Z. 10

15 第一部分 路由器实验 R2#copy r s Destination filename [startup-config]? Building configuration... [OK] R2#ping Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:!!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 31/37/62 ms // 可以 ping 通 R1 的串行接口 ( 五 ) 各种 show 命令 R2#show version Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4(15)T1, RELEASE SOFTWARE (fc2) //IOS 版本信息 Technical Support: Copyright (c) by Cisco Systems, Inc. Compiled Wed 18-Jul-07 06:21 by pt_rel_team ROM: System Bootstrap, Version 12.1(3r)T2, RELEASE SOFTWARE (fc1) //ROM 版本信息 Copyright (c) 2000 by cisco Systems, Inc. System returned to ROM by power-on // 显示路由器是如何启动的 System image file is "c2800nm-advipservicesk9-mz t1.bin" // 当前正在使用的 IOS 文件名 cisco 2811 (MPC860) processor (revision 0x200) with 60416K/5120K bytes of memory // 路由型号和 RAM 大小 Processor board ID JAD05190MTZ ( ) // 处理器版系列号 M860 processor: part number 0, mask 49 2 FastEthernet/IEEE interface(s) 2 Low-speed serial(sync/async) network interface(s) // 路由器的接口的类型和数量 239K bytes of NVRAM K bytes of processor board System flash (Read/Write) Configuration register is 0x2102 // 配置寄存器的值 R2#show running-config Building configuration... Current configuration : 675 bytes version 12.4 no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption 11

16 第一部分 路由器实验 hostname R2 enable password cisco! interface FastEthernet0/0 ip address duplex auto speed auto interface Serial0/0/0! description Connect to R1 ip address clock rate // 显示路由器正在使用的配置文件 R2#show startup-config Using 675 bytes version 12.4 no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption hostname R2 enable password cisco // 显示路由 NVRAM 中的配置文件 R2#show interface s0/0/0 Serial0/0/0 is up, line protocol is up (connected) // 接口的状态 Hardware is HD64570 Description: Connect to R1 Internet address is /24 // 接口的 IP 地址 MTU 1500 bytes, BW 1544 Kbit, DLY usec, reliability 255/255, txload 1/255, rxload 1/255 // 以上是该接口的 MTU 带宽 延时 可靠性及负载大小 Encapsulation HDLC, loopback not set, keepalive set (10 sec) // 封装 HDLC 类型协议 R2#show ip interface FastEthernet0/0 is up, line protocol is up (connected) Internet address is /24 Broadcast address is Address determined by setup command MTU is 1500 // 显示接口上的 IPv4 详细信息 12

17 第一部分 路由器实验 R2#show flash System flash directory: File Length Name/status c2800nm-advipservicesk9-mz t1.bin sigdef-category.xml sigdef-default.xml [ bytes used, available, total] 63488K bytes of processor board System flash (Read/Write) // 以上显示了 Flash 中存放的 IOS 文件名 文件大小 Flash 的总大小及可用空间 R2#show controllers s0/0/0 Interface Serial0/0/0 Hardware is PowerQUICC MPC860 DCE V.35, clock rate idb at 0x81081AC4, driver data structure at 0x81084AC0 // 显示 s0/0/0 接口为 V.35 接口且为 DCE, 配置时钟为 bps R2#show ip arp Protocol Address Age (min) Hardware Addr Type Interface Internet F2EB.B501 ARPA FastEthernet0/0 R2#show arp Protocol Address Age (min) Hardware Addr Type Interface Internet F2EB.B501 ARPA FastEthernet0/0 // 显示路由器缓存的 ARP 表 ( 六 ) 密码的配置和标语的配置 R1(config)#enable password cisco R1(config)#enable secret 码生效 ) R1#show r Building configuration...!! enable secret 5 $1$mERr$/Q/mbs3O9oHsKR7rNG4e81 enable password cisco! R1(config)#service password-encryption R1(config)#enable password cisco R1(config)#do show r Building configuration...! // 设置了从用户模式进入特权模式的明文密码 // 设置了从用户模式进入特权模式的密文密码 ( 此密 // 打开密码加密服务 13

18 第一部分 路由器实验 enable secret 5 $1$mERr$/Q/mbs3O9oHsKR7rNG4e81 enable password D0A16!! R1(config)#line vty 0 4 R1(config-line)#password cisco R1(config-line)#login R1(config-line)#exit R1(config)#banner motd # Enter TEXT message. End with the character '#' Without authorization, shall not be visited # // 以上配置标语信息, 提醒用户不得非法访问, 该信息在用户登录前就会提示 R2#telnet Trying Open Without authorization, shall not be visited // 提示的标语信息 User Access Verification Password: cisco R1>enable Password: R1# ( 七 ) 测试连通性 略 14

19 第一部分 路由器实验 实验 1-4. 配置文件的管理和 IOS 的管理 一 实验目的 ( 一 )TFTP 服务器的使用 ; ( 二 ) 如何备份路由器的配置文件 ; ( 三 ) 如何备份路由器的 IOS; ( 四 ) 如何恢复配置文件 ; 二 实验拓扑 三 实验步骤 ( 一 ) 路由器和计算机间的 IP 可达 Router>ena Router#conf t Router(config)#int f0/0 Router(config-if)#ip addr Router(config-if)#no shut Router(config-if)#end Router#ping Type escape sequence to abort. // 配置 IP 地址 // 启用接口 Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:.!!!! Success rate is 80 percent (4/5), round-trip min/avg/max = 62/62/63 ms ( 二 ) 备份配置文件到 TFTP 服务器 Router#copy running-config tftp: 15

20 第一部分 路由器实验 // 把文件中的配置文件备份到 TFTP 服务器上 Address or name of remote host []? // 回答 TFTP 服务器的 IP 地址 Destination filename [Router-confg]?!! [OK bytes] // 默认时 路由器名 -config 462 bytes copied in secs (3000 bytes/sec) ( 三 ) 采用 复制 粘贴 备份配置文件 先在终端窗口中, 执行 show running-config 显示当前的配置, 在终端窗口中复制全 部配置, 粘贴到文本文件中 ( 四 ) 备份配置 IOS 到 TFTP 服务器 Router#show flash: System flash directory: File Length Name/status c2800nm-advipservicesk9-mz t1.bin sigdef-category.xml sigdef-default.xml [ bytes used, available, total] 63488K bytes of processor board System flash (Read/Write) Router#copy flash: tftp // 把 IOS 备份到 TFTP 服务器上 Source filename []? c2800nm-advipservicesk9-mz t1.bin Address or name of remote host []? Destination filename [c2800nm-advipservicesk9-mz t1.bin]?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 省略 [OK bytes] bytes copied in secs ( bytes/sec) ( 五 ) 恢复配置文件到路由器方法一 在 config 模式下, 把原有的配置文件粘贴进来, 并手动打开接口 ( 六 ) 恢复配置文件到路由器方法二 Router#copy tftp: flash: Address or name of remote host []? Source filename []? c2800nm-advipservicesk9-mz t1.bin //TFTP 服务器的 IP 地址 Destination filename [c2800nm-advipservicesk9-mz t1.bin]? %Warning:There is a file already existing with this name Do you want to over write? [confirm] //IOS 文件名 // 警告 : 要覆盖 flash 上的原有的 IOS Accessing tftp:// /c2800nm-advipservicesk9-mz t1.bin... Erase flash: before copying? [confirm] // 警告 : 要删除 Flash 上的数据 16

21 第一部分 路由器实验 Erasing the flash filesystem will remove all files! Continue? [confirm] Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee...erased Erase of flash: complete // 删除了 Flash 上的数据 Accessing tftp:// /c2800nm-advipservicesk9-mz t1.bin... Loading c2800nm-advipservicesk9-mz t1.bin from :!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 省略 // 检验完毕 [OK bytes] // 文件下载完毕 bytes copied in secs (64006 bytes/sec) 17

22 第一部分 路由器实验 实验 1-5. 密码恢复和 IOS 的恢复 一 实验目的 ( 一 ) 路由器的密码恢复步骤 ( 二 ) 路由器的 IOS 恢复步骤二 实验拓扑 三 实验步骤 ( 一 ) 在路由器上配置密码 Router> Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#hostname R1 R1(config)#enable password 309nasfdndf12 // 故意配置一个复杂的密码 R1#copy running-config startup-config End with CNTL/Z. ( 二 ) 路由器密码恢复 关闭路由器电源并重新加电, 当控制台出现路由器的启动过程, 按 ctrl+break 中断启动, 进入 rommon 模式 R1(config)#System Bootstrap, Version 12.3(8r)T8, RELEASE SOFTWARE (fc1) Cisco 1841 (revision 5.0) with K/16384K bytes of memory. Self decompressing the image : ############# monitor: command "boot" aborted due to user interrupt rommon 1 >? boot confreg boot up an external process configuration register utility 18

23 第一部分 路由器实验 dir list files in file system help monitor builtin command help reset system reset set display the monitor variables tftpdnld tftp image download unset unset a monitor variable rommon 2 > confreg 0x2142 // 改变配置寄存器的值为 0x2142 rommon 3 > reset // 重启路由器 Router>ena Router#copy startup-config running-config Destination filename [running-config]? 501 bytes copied in secs (1204 bytes/sec) // 把配置文件从 NVRAM 中复制到 RAM 中, 在此基础上修改密码, 这样原有的配置还在 R1#conf t Enter configuration commands, one per line. R1(config)#enable secret cisco R1(config)#config-register 0x2102 R1#copy r s Destination filename [startup-config]? Building configuration... [OK] End with CNTL/Z. // 把密码修改为自己的密码 // 保持配置, 重启路由器, 检查路由器是否正常 需手动开启各个接口 ( 三 ) 故意删除 flash 中的 IOS R1#show flash: System flash directory: File Length Name/status // 把寄存器的值改为正常的 0x2102 // 显示 Flash 中的文件 (IOS) c1841-advipservicesk9-mz t1.bin sigdef-category.xml sigdef-default.xml [ bytes used, available, total] 63488K bytes of processor board System flash (Read/Write) R1#delete flash:c1841-advipservicesk9-mz t1.bin Delete filename [c1841-advipservicesk9-mz t1.bin]? Delete flash:/c1841-advipservicesk9-mz t1.bin? [confirm] // 以上删除模拟 flash 中 IOS 的丢失或者升级失败 ( 四 ) 恢复 IOS rommon 1 >? boot confreg dir boot up an external process configuration register utility list files in file system 19

24 第一部分 路由器实验 help reset set tftpdnld monitor builtin command help system reset display the monitor variables tftp image download unset unset a monitor variable rommon 2 > ip_address= rommon 3 > ip_subnet_mask= rommon 4 > default_gateway= rommon 5 > tftp_server= rommon 6 > tftp_file=c1841-advipservicesk9-mz t1.bin rommon 7 > tftpdnld 20

25 第一部分 路由器实验 实验 1-6.CDP 配置 一 实验目的 ( 一 )CDP 的配置 ( 二 ) 如何使用 CDP 协议发现网络拓扑二 实验拓扑 三 实验步骤 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R1(config)#int f0/0 R1(config-if)#no shut R1(config-if)#int s0/0/0 R1 R1(config-if)#no shutdown End with CNTL/Z. Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R2 R2(config)#int f0/0 R2(config-if)#no shut R2(config-if)#int s0/0/0 R2(config-if)#no shut R2(config-if)#clock rate End with CNTL/Z. // 默认时交换机 S1 的所有接口都是打开的,CDP 协议是二层协议, 故路由器接口即使没有 IP 地址,CDP 协议也是正常的 21

26 第一部分 路由器实验 四 实验调试 (1)show cdp R1#show cdp Global CDP information: Sending CDP packets every 60 seconds Sending a holdtime value of 180 seconds Sending CDPv2 advertisements is enabled // 每 60s 从接口发送 CDP 消息, 保存信息 180s, 当前使用的 CDP 版本 2 (2)show cdp interface 显示 CDP 在各接口的运行情况 R1#show cdp interface Vlan1 is administratively down, line protocol is down Sending CDP packets every 60 seconds Holdtime is 180 seconds FastEthernet0/0 is up, line protocol is up Sending CDP packets every 60 seconds Holdtime is 180 seconds FastEthernet0/1 is administratively down, line protocol is down Sending CDP packets every 60 seconds Holdtime is 180 seconds Serial0/0/0 is up, line protocol is up Sending CDP packets every 60 seconds Holdtime is 180 seconds Serial0/0/1 is administratively down, line protocol is down Sending CDP packets every 60 seconds Holdtime is 180 seconds (3)show cdp neighbors 显示 CDP 邻居的信息 R1#show cdp neighbors Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone Device ID Local Intrfce Holdtme Capability Platform Port ID R2 Ser 0/0/0 145 R C2800 Ser 0/0/0 S1 Fas 0/ Fas 0/1 相邻设备 R1 上的接口 CDP 消息的邻居的对方的接口 的主机名有效时间硬件型号 (4)show cdp entry R2 显示 CDP 的详细信息 22

27 第一部分 路由器实验 R1#show cdp entry R2 Device ID: R2 Entry address(es): Platform: cisco C2800, Capabilities: Router Interface: Serial0/0/0, Port ID (outgoing port): Serial0/0/0 Holdtime: 122 Version : Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4(15)T1, RELEASE SOFTWARE (fc2) Technical Support: Copyright (c) by Cisco Systems, Inc. Compiled Wed 18-Jul-07 06:21 by pt_rel_team advertisement version: 2 Duplex: full (5) 关闭与开启 CDP 以及 CDP 参数调整 R1(config)#int f0/0 R1(config-if)#no cdp enable R1(config-if)#exit R1(config)#no cdp run R1(config)#cdp run // 该接口上关闭 CDP // 在整个路由器上关闭 CDP // 在整个路由器上打开 CDP 23

28 第一部分 路由器实验 实验 1-7. 带下一跳地址的静态路由 一 实验目的 ( 一 ) 带下一跳地址的静态路由配置 ( 二 ) 路由表的含义 ( 三 ) 扩展 ping 命令的使用二 实验拓扑 三 实验步骤 Router>ena ( 一 ) 配置路由器 R1 Router#conf t Enter configuration commands, one per line. Router(config)#host R1 R1(config)#int loop0 R1(config-if)#ip addr R1(config-if)#exit R1(config)#int s0/0/0 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#exit End with CNTL/Z. // 配置环回接口 R1(config)#ip route R1(config)#ip route R1(config)#ip route ( 二 ) 配置路由器 R2 // 配置 IP 地址 // 配置静态路由 Router>ena Router#conf t Enter configuration commands, one per line. End with CNTL/Z. 24

29 第一部分 路由器实验 Router(config)#host R2 R2(config)#int s0/0/0 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#int s0/0/1 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#exit R2(config)#ip route R2(config)#ip route R2(config)#ip route Router>ena ( 三 ) 配置路由器 R3 Router#conf t Enter configuration commands, one per line. Router(config)#host R3 R3(config)#int s0/0/1 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#int s0/0/0 R3(config-if)#ip addr R3(config-if)#clock rate R3(config-if)#no shut R3(config-if)#exit End with CNTL/Z. R3(config)#ip route R3(config)#ip route R3(config)#ip route Router>ena ( 四 ) 配置路由器 R4 Router#conf t Enter configuration commands, one per line. Router(config)#hos R4 R4(config)#int lo0 R4(config-if)#ip addr R4(config-if)#int s0/0/0 R4(config-if)#ip addr R4(config-if)#no shut R4(config-if)#exit End with CNTL/Z. R4(config)#ip route R4(config)#ip route

30 第一部分 路由器实验 R4(config)#ip route 四 实验调试 ( 一 )show ip route // 查看路由表 R1#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP // 路由代码区 D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - 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 - ODR P - periodic downloaded static route Gateway of last resort is not set /24 is subnetted, 5 subnets C is directly connected, Loopback0 S [1/0] via C is directly connected, Serial0/0/0 S [1/0] via S [1/0] via R2#show ip route /24 is subnetted, 5 subnets S [1/0] via S [1/0] via C is directly connected, Serial0/0/0 C is directly connected, Serial0/0/1 S [1/0] via R3#show ip route /24 is subnetted, 5 subnets S [1/0] via S [1/0] via S [1/0] via C is directly connected, Serial0/0/1 C is directly connected, Serial0/0/0 R4#show ip route /24 is subnetted, 5 subnets S [1/0] via

31 第一部分 路由器实验 C is directly connected, Loopback0 S [1/0] via S [1/0] via C is directly connected, Serial0/0/0 ( 二 )debug ip routing // 动态查看路由表的添加和删除过程 R1#debug ip routing IP routing debugging is on R1#undebug all All possible debugging has been turned off R1#ping ( 三 ) 扩展 ping Protocol [ip]: Target IP address: Repeat count [5]: Datagram size [100]: Timeout in seconds [2]: Extended commands [n]: y Source address or interface: // 协议 // 目标 IP 地址 //ping 重复的次数 //ping 包的大小 // 超时时间 // 是否进一步使用扩展命令 // 源 IP 地址 Type of service [0]: // 服务类型, 与 Qos 有关 Set DF bit in IP header? [no]: Validate reply data? [no]: Data pattern [0xABCD]: Loose, Strict, Record, Timestamp, Verbose[none]: Sweep range of sizes [n]: Type escape sequence to abort. // 设置 DF 位确认是否分段 // 验证应答数据 // 数据的格式 Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds: Packet sent with a source address of !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 79/94/109 ms 27

32 第一部分 路由器实验 实验 1-8. 带送出接口的静态路由 一 实验目的 ( 一 ) 带送出接口的静态路由配置 ( 二 ) 带送出接口和带下一跳地址配置静态路由的不同 ( 三 ) 静态路由总结配置 ( 四 ) 静态默认路由配置二 实验拓扑 三 实验步骤 Router>ena ( 一 ) 配置路由器 R1 Router#conf t Enter configuration commands, one per line. Router(config)#host R1 R1(config)#int loop0 R1(config-if)#ip addr R1(config-if)#int lo1 R1(config-if)#ip addr R1(config-if)#int lo2 R1(config-if)#ip addr R1(config-if)#int lo3 R1(config-if)#ip addr R1(config-if)#int s0/0/0 R1(config-if)#ip addr End with CNTL/Z. 28

33 第一部分 路由器实验 R1(config-if)#no shu R1(config)#ip route s0/0/0 R1(config)#ip route s0/0/0 R1(config)#ip route s0/0/0 Router>ena ( 二 ) 配置路由器 R2 Router#conf t Enter configuration commands, one per line. Router(config)#host R2 R2(config)#int s0/0/0 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#int s0/0/1 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#exit R2(config)#ip route s0/0/0 R2(config)#ip route s0/0/0 R2(config)#ip route s0/0/0 R2(config)#ip route s0/0/0 R2(config)#ip route s0/0/1 R2(config)#ip route s0/0/1 Router>ena ( 三 ) 配置路由器 R3 Router#conf t Enter configuration commands, one per line. Router(config)#hos R3 R3(config)#int s0/0/1 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#int f0/0 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#exit R3(config)#ip route s0/0/1 R3(config)#ip route s0/0/1 R3(config)#ip route s0/0/1 R3(config)#ip route s0/0/1 R3(config)#ip route s0/0/1 R3(config)#ip route f0/0 End with CNTL/Z. End with CNTL/Z. 29

34 第一部分 路由器实验 ( 四 ) 配置路由器 R4 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R4 R4(config)#int lo0 R4(config-if)#ip addr R4(config-if)#int f0/0 R4(config-if)#ip addr R4(config-if)#no shut R4(config-if)#exit R4(config)#ip route f0/0 R4(config)#ip route f0/0 R4(config)#ip route f0/0 R4(config)#ip route f0/0 R4(config)#ip route f0/0 R4(config)#ip route f0/0 四 实验调试 R3#show ip route End with CNTL/Z. S S S S S S C C /24 is subnetted, 8 subnets is directly connected, Serial0/0/ is directly connected, Serial0/0/ is directly connected, Serial0/0/ is directly connected, Serial0/0/ is directly connected, FastEthernet0/ is directly connected, Serial0/0/ is directly connected, Serial0/0/ is directly connected, FastEthernet0/0 R3#show ip route Routing entry for /24 Known via "static", distance 1, metric 0 (connected) Routing Descriptor Blocks: * directly connected, via Serial0/0/1 Route metric is 0, traffic share count is 1 // 注意 : 带送出接口的静态路由显示的是直连 ( directly connected), 而带下一跳地址的静态路由显示的是 1/0, 但是它们的管理距离默认值都是 1 带送出接口的静态路由查找路由表的速率高 (1) Ping R4#ping

35 第一部分 路由器实验 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:.!!!! Success rate is 80 percent (4/5), round-trip min/avg/max = 93/93/94 ms (2) 配置静态路由总结 R2(config)#no ip route s0/0/0 R2(config)#no ip route s0/0/0 R2(config)#no ip route s0/0/0 R2(config)#no ip route s0/0/0 R2(config)#ip route s0/0/0 //R3 和 R4 做同样的配置 (3) 配置静态默认路由 R1(config)#ip route s0/0/0 R4(config)#ip route f0/0 R4(config)#ip route // 一条路由代替四条 31

36 第一部分 路由器实验 实验 1-9. 浮动静态路由 一 实验目的 ( 一 ) 浮动静态路由的配置 ( 二 ) 备份路由的工作原理二 实验拓扑 三 实验步骤 本实验在路由器 R1 和 R2 之间有两条链路, 分别为串行链路和以太 网链路, 我们通过提高串行链路静态路由的管理距离, 使得路由器在选路 时优先选择以太链路, 但当以太链路出现故障时, 选用串行链路, 而在以 太链路恢复后, 再优选以太链路 Router>ena ( 一 ) 配置路由器 R1 Router#conf t Enter configuration commands, one per line. Router(config)#host R1 R1(config)#int lo0 R1(config-if)#ip addr R1(config-if)#int s0/0/0 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#int f0/0 R1(config-if)#ip addr R1(config-if)#no shut End with CNTL/Z. 32

37 第一部分 路由器实验 R1(config-if)#exit R1(config)#ip route R1(config)#ip route Router>ena ( 二 ) 配置路由器 R2 Router#conf t Enter configuration commands, one per line. Router(config)#hos R2 R2(config)#int lo0 R2(config-if)#ip addr R2(config-if)#int s0/0/0 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#int f0/0 R2(config-if)#ip addr R2(config-if)#no shut R2(config-if)#exit End with CNTL/Z. R2(config)#ip route R2(config)#ip route // 浮动静态路由是一条路由的备份路由, 它可以是动态路由, 也可以是静态路由 四 实验调试 ( 一 ) 分别在路由器 R1 和 R2 上查看路由表 R1#show ip route /24 is subnetted, 4 subnets C is directly connected, Loopback0 S [1/0] via C is directly connected, Serial0/0/0 C is directly connected, FastEthernet0/0 R2#show ip route /24 is subnetted, 4 subnets S [1/0] via C is directly connected, Loopback0 C is directly connected, Serial0/0/0 C is directly connected, FastEthernet0/0 ( 二 ) 在 R1 上 f0/0 接口 shutdown 后, 查看路由表 R1(config)#int f0/0 R1(config-if)#shutdown 33

38 第一部分 路由器实验 R1(config-if)#end R1#show ip route C /24 is subnetted, 3 subnets is directly connected, Loopback0 S [100/0] via C is directly connected, Serial0/0/0 ( 三 ) 在 R1 上 f0/0 接口启动后, 查看路由表 R1(config)#int f0/0 R1(config-if)#no shut R1(config-if)#end R1#show ip route C /24 is subnetted, 4 subnets is directly connected, Loopback0 S [1/0] via C is directly connected, Serial0/0/0 C is directly connected, FastEthernet0/0 34

39 第一部分 路由器实验 实验 1-10.RIPv1 基本配置 一 实验目的 ( 一 ) 在路由器上启动 RIPv1 路由进程 ( 二 ) 激活参与路由协议的接口, 使之可发送和接收 RIPv1 更新 ( 三 ) 理解 RIP 路由表的含义 ( 四 ) 查看和调试 RIPv1 路由协议相关信息二 实验拓扑 三 实验步骤 Router>ena ( 一 ) 配置路由器 R1 Router#conf t Enter configuration commands, one per line. Router(config)#host R1 R1(config)#int lo0 R1(config-if)#ip addr R1(config-if)#int s0/0/0 R1(config-if)#ip addr R1(config-if)#no shut End with CNTL/Z. 35

40 第一部分 路由器实验 R1(config-if)#exit R1(config)#router rip // 启动 RIP 进程 R1(config-router)#version 1 // 配置 RIP 版本 1 R1(config-router)#network Router>ena ( 二 ) 配置路由器 R2 Router#conf t Enter configuration commands, one per line. Router(config)#hos R2 R2(config)#int s0/0/0 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#int s0/0/1 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#int s0/1/0 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#exit R2(config)#router rip R2(config-router)#version 1 R2(config-router)#network R2(config-router)#network ( 三 ) 配置路由器 R3 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R3 R3(config)#int s0/0/1 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#int lo0 R3(config-if)#ip addr R3(config-if)#int s0/0/0 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#exit R3(config)#router rip R3(config-router)#version 1 End with CNTL/Z. End with CNTL/Z. 36

41 第一部分 路由器实验 R3(config-router)#network Router>ena ( 四 ) 配置路由器 R4 Router#conf t Enter configuration commands, one per line. Router(config)#int lo0 Router(config-if)#ip addr Router(config-if)#int s0/0/0 Router(config-if)#ip addr Router(config-if)#clock rate Router(config-if)#no shut Router(config-if)#int s0/0/1 Router(config-if)#ip addr Router(config-if)#no shut Router(config-if)#exit Router(config)#router rip Router(config-router)#version 1 Router(config-router)#network 四 实验调试 ( 一 )show ip route End with CNTL/Z. // 查看从 RIP 邻居处接收的路由是否已添加到路由表中 R1#show ip route R /16 [120/1] via , 00:00:28, Serial0/0/0 C C /24 is subnetted, 2 subnets is directly connected, Loopback is directly connected, Serial0/0/0 a) R 路由条目是通过 RIP 路由协议学习来的 b) / 目的网络及网络掩码长度 c) RIP 路由协议的默认管理距离 d) 度量值 e) 通过路由器的下一跳 IP 地址 f) 00:00: 自上次更新的时间 g) Serial0/0/ 接收该路由条目的本路由器的接口 R R C C R2#show ip route /24 is subnetted, 5 subnets [120/1] via , 00:00:16, Serial0/0/ [120/1] via , 00:00:08, Serial0/1/ is directly connected, Serial0/0/ is directly connected, Serial0/1/0 37

42 第一部分 路由器实验 R R [120/1] via , 00:00:16, Serial0/0/ /24 is subnetted, 2 subnets [120/1] via , 00:00:08, Serial0/1/ [120/1] via , 00:00:04, Serial0/0/0 C is directly connected, Serial0/0/0 //RIPv1 路由更新可以携带子网信息, 但必须同时满足两个条件 : a. 整个网络所有地址属于同一个主要网络 b. 子网掩码长度必须相同 RIPv1 发生路由更新的原则 : 不同主类发送主类路由, 相同主类且网络掩码长度相同, 则发 送明细路由 RIPv1 接收路由更新的原则 : 如果收到路由更新及其属于相同的主类网络, 则以接收接口的 子网掩码作为路由条目的掩码 ; 如果收到路由更新及其属于不同的主类网络, 则以该网络的主类 网络掩码作为路由条目的掩码 R3#show ip route /24 is subnetted, 5 subnets C R C R C R is directly connected, Loopback [120/1] via , 00:00:01, Serial0/0/ is directly connected, Serial0/0/ [120/1] via , 00:00:16, Serial0/0/1 [120/1] via , 00:00:01, Serial0/0/0 // 两条等价路径 is directly connected, Serial0/0/ /16 [120/1] via , 00:00:16, Serial0/0/1 ( 二 )show ip protocols // 查看 IP 路由协议配置和统计信息 R1#show ip protocols Routing Protocol is "rip" // 路由器上运行的路由协议是 RIP Sending updates every 30 seconds, next due in 21 seconds // 更新周期 30s, 距离下次更新还有 21s Invalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set // 在出方向和入方向没有配置分布列表 Redistributing: rip // 只运行 RIP 协议, 没有其他的协议重分布进来 Default version control: send version 1, receive 1 Interface Send Recv Triggered RIP Key-chain Loopback0 1 1 Serial0/0/0 1 1 Automatic network summarization is in effect // 默认开启自动汇总功能 38

43 第一部分 路由器实验 Maximum path: 4 Routing for Networks: // 路由协议默认支持 4 条等价路径 // 该路由模式下配置的有类网络地址 Passive Interface(s): Routing Information Sources: Gateway Distance Last Update :00:14 // 表明从哪些 RIP 邻居接收路由更新 Gateway: 学习路由信息的路由器的接口地址, 也就是下一跳地址 Distance: 对邻居所发送的更新使用的 AD Last Update: 更新发生在多长时间以前 Distance: (default is 120) ( 三 )debug ip rip R1#debug ip rip R1#clear ip route * //RIP 路由协议默认管理距离 R1#RIP: received v1 update from on Serial0/0/ in 1 hops RIP: sending v1 update to via Loopback0 ( ) RIP: build update entries network metric 2 network metric 1 RIP: sending v1 update to via Serial0/0/0 ( ) RIP: build update entries network metric 1 39

44 第一部分 路由器实验 实验 不连续网络配置及其解决方案 实验拓扑 : 实验配置 : Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R1 R1(config)#int s0/0/0 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#int f0/0 R1(config-if)#ip addr R1(config-if)#no shut End with CNTL/Z. Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R2 R2(config)#int s0/0/0 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#int f0/0 R2(config-if)#ip addr R2(config-if)#no shut End with CNTL/Z. 配置 RIPv1: 40

45 第一部分 路由器实验 R1(config)#router rip R1(config-router)#net R1(config-router)#net R2(config)#router rip R2(config-router)#net R2(config-router)#net 测试 : R1#ping Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:... Success rate is 0 percent (0/5) R1#show ip route Codes: C - connected, S - static, I - IGRP,R - RIP, M - mobile, B - BGP D - EIGRP,EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - 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 - ODR P - periodic downloaded static route Gateway of last resort is not set C C /24 is subnetted, 1 subnets is directly connected, Serial0/0/ /24 is subnetted, 1 subnets is directly connected, FastEthernet0/0 R2#show ip route Codes: C - connected, S - static, I - IGRP,R - RIP, M - mobile, B - BGP D - EIGRP,EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - 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 - ODR P - periodic downloaded static route Gateway of last resort is not set /24 is subnetted, 1 subnets 41

46 第一部分 路由器实验 C C is directly connected, Serial0/0/ /24 is subnetted, 1 subnets is directly connected, FastEthernet0/0 R2#show ip protocols Routing Protocol is "rip" Sending updates every 30 seconds, next due in 1 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Redistributing: rip Default version control: send version 1, receive any version Interface Send Recv Triggered RIP Key-chain FastEthernet0/ Serial0/0/ Automatic network summarization is in effect Maximum path: 4 Routing for Networks: Passive Interface(s): Routing Information Sources: Gateway Distance Last Update Distance: (default is 120) 这就是不连续网络造成的, 下来我们用不同方法来解决, 让它可以 ping 通 方法 1: 配置 RIPv2 借助 ripv2 的特性支持不连续网络, 支持可变长子网 R1(config)#router rip R1(config-router)#version 2 R2(config)#router rip R2(config-router)#version 2 R1#show ip protocols Routing Protocol is "rip" Sending updates every 30 seconds, next due in 10 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Redistributing: rip Default version control: send version 2, receive 2 Interface Send Recv Triggered RIP Key-chain 42

47 第一部分 路由器实验 FastEthernet0/0 2 2 Serial0/0/0 2 2 Automatic network summarization is in effect Maximum path: 4 Routing for Networks: Passive Interface(s): Routing Information Sources: Gateway Distance Last Update :00:17 Distance: (default is 120) R2#show ip protocols Routing Protocol is "rip" Sending updates every 30 seconds, next due in 10 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Redistributing: rip Default version control: send version 2, receive 2 Interface Send Recv Triggered RIP Key-chain FastEthernet0/0 2 2 Serial0/0/0 2 2 Automatic network summarization is in effect Maximum path: 4 Routing for Networks: Passive Interface(s): Routing Information Sources: Gateway Distance Last Update :00:14 Distance: (default is 120) 测试网络 : R1#ping Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:!!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 17/28/32 ms 相互之间都可以 ping 通 43

48 第一部分 路由器实验 方法 2: 配置静态路由 R1(config)#ip route R2(config)#ip route R1#show ip route Codes: C - connected, S - static, I - IGRP,R - RIP, M - mobile, B - BGP D - EIGRP,EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - 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 - ODR P - periodic downloaded static route Gateway of last resort is not set /24 is subnetted, 1 subnets C C is directly connected, Serial0/0/ /24 is subnetted, 2 subnets is directly connected, FastEthernet0/0 S [1/0] via 方法三 : 在每个接口上通告发送数据用 RIPV2 方法四 : 在同一接口上配置双 IP 来解决 44

49 第一部分 路由器实验 实验 被动接口与单播更新 一 实验目的 ( 一 ) 被动接口的含义 配置和应用场合 ( 二 ) 单播更新的应用场合和配置二 实验拓扑 三 实验步骤 ( 一 ) 配置路由器 R1 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R1 R1(config)#int f0/0 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#int f0/1 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#int s0/0/0 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#exit R1(config)#router rip R1(config-router)#version 1 End with CNTL/Z. 45

50 第一部分 R1(config-router)#network R1(config-router)#passive-interface f0/0 R1(config-router)#passive-interface f0/1 路由器实验 // 配置被动接口 Router>ena ( 二 ) 配置路由器 R2 Router#conf t Enter configuration commands, one per line. Router(config)#host R2 R2(config)#int lo0 R2(config-if)#ip addr R2(config-if)#int s0/0/0 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#exit R2(config)#router rip R2(config-router)#version 1 R2(config-router)#network 四 实验调试 R1#debug ip rip RIP protocol debugging is on R1#clear ip route * End with CNTL/Z. R1#RIP: sending v1 update to via Serial0/0/0 ( ) RIP: build update entries network metric 1 network metric 1 RIP: received v1 update from on Serial0/0/ in 1 hops RIP: sending v1 update to via Serial0/0/0 ( ) RIP: build update entries network metric 1 network metric 1 RIP: received v1 update from on Serial0/0/ in 1 hops 46

51 第一部分 路由器实验 实验 1-13.RIPv2 基本配置 一 实验目的 ( 一 )RIPv1 和 RIPv2 的区别 ( 二 ) 在路由器上启动 RIPv2 路由进程 ( 三 ) 激活参与路由协议的接口, 使之可发生和接收 RIPv2 更新 ( 四 )auto-summary 的开启和关闭 ( 五 ) 查看和调试 RIPv2 路由协议相关信息二 实验拓扑 三 实验步骤 ( 一 ) 配置路由器 R1 Router>ena Router#conf t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#host R1 R1(config)#int lo0 R1(config-if)#ip addr R1(config-if)#int s0/0/0 R1(config-if)#ip addr

52 第一部分 路由器实验 R1(config-if)#no shut R1(config-if)#exit R1(config)#router rip // 启动 RIP 进程 R1(config-router)#version 2 // 配置 RIP 版本 2 R1(config-router)#no auto-summary R1(config-router)#network Router>ena ( 二 ) 配置路由器 R2 Router#conf t Enter configuration commands, one per line. Router(config)#host R2 R2(config)#int s0/0/0 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#int s0/0/1 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#int s0/1/0 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#exit R2(config)#router rip R2(config-router)#version 2 R2(config-router)#no au R2(config-router)#network R2(config-router)#network Router>ena ( 三 ) 配置路由器 R3 Router#conf t Enter configuration commands, one per line. Router(config)#int lo0 // 关闭自动汇总 Router(config-if)#ip addr Router(config-if)#int s0/0/1 Router(config-if)#ip addr Router(config-if)#no shut Router(config-if)#int s0/0/0 Router(config-if)#ip addr Router(config-if)#no shut Router(config-if)#exit End with CNTL/Z. End with CNTL/Z. 48

53 第一部分 路由器实验 Router(config)#router rip Router(config-router)#version 2 Router(config-router)#no au Router(config-router)#network Router>ena ( 四 ) 配置路由器 R4 Router#conf t Enter configuration commands, one per line. Router(config)#host R4 R4(config)#int lo0 R4(config-if)#ip addr R4(config-if)#int s0/0/0 R4(config-if)#ip addr R4(config-if)#clock rate R4(config-if)#no shut R4(config-if)#int s0/0/1 R4(config-if)#ip addr R4(config-if)#no shut R4(config-if)#exit R4(config)#router rip R4(config-router)#ver 2 R4(config-router)#no au R4(config-router)#net 四 实验调试 ( 一 )show ip route R1#show ip route R R R R R C C End with CNTL/Z /24 is subnetted, 5 subnets [120/2] via , 00:00:20, Serial0/0/ [120/2] via , 00:00:20, Serial0/0/ [120/1] via , 00:00:20, Serial0/0/ [120/1] via , 00:00:20, Serial0/0/ [120/2] via , 00:00:20, Serial0/0/ /24 is subnetted, 2 subnets is directly connected, Loopback is directly connected, Serial0/0/0 ( 二 )show ip protocols R1#show ip protocols Routing Protocol is "rip" Sending updates every 30 seconds, next due in 23 seconds Invalid after 180 seconds, hold down 180, flushed after

54 第一部分 路由器实验 Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Redistributing: rip Default version control: send version 2, receive 2 Interface Send Recv Triggered RIP Key-chain Loopback0 2 2 Serial0/0/0 2 2 // 默认情况下只接收和发送版本 2 的路由更新 Automatic network summarization is not in effect Maximum path: 4 Routing for Networks: Passive Interface(s): Routing Information Sources: Gateway Distance Last Update :00:13 Distance: (default is 120) ( 三 )debug ip rip R1#debug ip rip RIP protocol debugging is on R1#clear ip route * R1#RIP: received v2 update from on Serial0/0/ /24 via in 2 hops /24 via in 2 hops /24 via in 1 hops /24 via in 1 hops /24 via in 2 hops RIP: sending v2 update to via Loopback0 ( ) RIP: build update entries /24 via , metric 3, tag /24 via , metric 3, tag /24 via , metric 2, tag /24 via , metric 2, tag /24 via , metric 3, tag /24 via , metric 1, tag 0 RIP: sending v2 update to via Serial0/0/0 ( ) RIP: build update entries /24 via , metric 1, tag 0 RIP: received v2 update from on Serial0/0/ /24 via in 2 hops /24 via in 2 hops /24 via in 1 hops /24 via in 1 hops /24 via in 2 hops 50

55 第一部分 路由器实验 实验 向 RIP 网络中注入默认路由 一 实验目的 ( 一 ) (1) 向 RIP 网络中注入默认路由的方法 ( 二 ) (2) IP default-network 命令特征 ( 三 ) (3) 重分布静态默认路由到 RIP 网络 ( 四 ) (4) default-information originate 命令特征 二 实验拓扑 三 实验步骤 在路由器 R1 路由器 R2 和路由器 R3 之间运行 RIP, 在路由器 R3 和路由器 R4 之间配置静态路由, 路由器 R4 模拟 ISP, 通过对边界路由器 R3 的配置, 使得路由器 R1 和路由器 R2 学习到一条 RIP 的默认路由 Router>ena ( 一 ) 配置路由器 R1 Router#conf t Enter configuration commands, one per line. Router(config)#host R1 R1(config)#int lo0 R1(config-if)#ip addr R1(config-if)#int s0/0/0 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#exit R1(config)#router rip R1(config-router)#version 2 End with CNTL/Z. 51

56 第一部分 路由器实验 R1(config-router)#no au R1(config-router)#network ( 二 ) 配置路由器 R2 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#int s0/0/0 Router(config-if)#ip addr Router(config-if)#clock rate Router(config-if)#no shut Router(config-if)#int s0/0/1 Router(config-if)#ip addr Router(config-if)#clock rate Router(config-if)#no shut Router(config-if)#exit Router(config)#router rip Router(config-router)#version 2 Router(config-router)#no au Router(config-router)#network Router>ena ( 三 ) 配置路由器 R3 Router#conf t Enter configuration commands, one per line. Router(config)#host R3 R3(config)#int s0/0/1 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#int s0/0/0 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#exit R3(config)#router rip R3(config-router)#ver 2 R3(config-router)#no au R3(config-router)#network R3(config-router)#exit R3(config)#ip route s0/0/0 ( 四 ) 配置路由器 R4 End with CNTL/Z. End with CNTL/Z. Router>ena Router#conf t Enter configuration commands, one per line. End with CNTL/Z. 52

57 第一部分 路由器实验 Router(config)#host R4 R4(config)#int lo0 R4(config-if)#ip addr R4(config-if)#int s0/0/0 R4(config-if)#ip addr R4(config-if)#clock rate R4(config-if)#no shut R4(config-if)#exit R4(config)#ip route s0/0/0 四 实验调试 ( 一 ) 通过 IP default-network 向 RIP 网络注入默认路由 R3(config)#ip default-network R1#show ip route rip /24 is subnetted, 3 subnets R [120/1] via , 00:00:14, Serial0/0/0 R* /0 [120/2] via , 00:00:14, Serial0/0/0 Router#sho ip route rip /24 is subnetted, 3 subnets R [120/1] via , 00:00:04, Serial0/0/0 R* /0 [120/1] via , 00:00:18, Serial0/0/1 R3#show ip route /24 is subnetted, 3 subnets R [120/2] via , 00:00:12, Serial0/0/1 R [120/1] via , 00:00:12, Serial0/0/1 C is directly connected, Serial0/0/1 C* /24 is directly connected, Serial0/0/0 // ip default-network 命令在本地路由器产生一条直连 * 的路由 S* /0 is directly connected, Serial0/0/0 ( 二 ) 通过重分布向 RIP 网络注入默认路由 R3(config-router)#redistribute static R1#show ip route rip /24 is subnetted, 3 subnets R [120/1] via , 00:00:18, Serial0/0/0 R* /0 [120/1] via , 00:00:18, Serial0/0/0 Router#sho ip route rip 53

58 第一部分 路由器实验 /24 is subnetted, 3 subnets R [120/1] via , 00:00:27, Serial0/0/0 R* /0 [120/1] via , 00:01:11, Serial0/0/1 ( 三 ) 通过 default-information originate 向 RIP 网络注入默认路由 R3(config-router)#default-information originate R1#show ip route rip /24 is subnetted, 3 subnets R [120/1] via , 00:00:19, Serial0/0/0 R* /0 [120/2] via , 00:00:19, Serial0/0/0 Router#sho ip route rip /24 is subnetted, 3 subnets R [120/1] via , 00:00:08, Serial0/0/0 R* /0 [120/1] via , 00:00:12, Serial0/0/1 ( 四 ) 在路由器 R1 上 ping

59 第一部分 路由器实验 实验 1-15.EIGRP 基本配置 一 实验目的 ( 一 ) 在路由器上启动 EIGRP 路由进程 ( 二 ) 激活参与路由协议的接口, 使之可发生和接受 EIGRP 更新 ( 三 )EIGRP 度量值的计算方法 ( 四 ) 可行距离 (FD) 通告距离 (RD) 以及可行性条件 (FC) ( 五 ) 邻居表 拓扑表和路由表的含义 ( 六 ) 查看和测试 EIGRP 路由协议相关信息二 实验拓扑 三 实验步骤 ( 一 ) 配置路由器 R1 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R1 R1(config)#int f0/0 R1(config-if)#ip addr End with CNTL/Z. 55

60 第一部分 路由器实验 R1(config-if)#no shut R1(config-if)#int s0/0/0 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#exit R1(config)#router eigrp 1 // 启动 EIGRP 进程, 进程号为 1 R1(config-router)#auto-summary //EIGRP 默认开启有类网络边界本地路由自动汇总, 对于穿越本路由器的路由条目,EIGRP 是不能自动汇总的 R1(config-router)#network Router>ena ( 二 ) 配置路由器 R2 Router#conf t Enter configuration commands, one per line. Router(config)#host R2 R2(config)#int s0/0/0 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#int s0/0/1 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#int s0/1/0 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#exit R2(config)#router eigrp 1 R2(config-router)#auto-summary R2(config-router)#network R2(config-router)#network Router>ena ( 三 ) 配置路由器 R3 Router#conf t Enter configuration commands, one per line. Router(config)#host R3 R3(config)#int f0/0 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#int s0/0/1 R3(config-if)#ip addr End with CNTL/Z. End with CNTL/Z. 56

61 第一部分 路由器实验 R3(config-if)#no shut R3(config-if)#int s0/0/0 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#exit R3(config)#router eigrp 1 R3(config-router)#auto-summary R3(config-router)#network Router>ena ( 四 ) 配置路由器 R4 Router#conf t Enter configuration commands, one per line. Router(config)#host R4 R4(config)#int f0/0 R4(config-if)#ip addr R4(config-if)#no shut R4(config-if)#int s0/0/0 R4(config-if)#ip addr R4(config-if)#clock rate R4(config-if)#no shut R4(config-if)#int s0/0/1 R4(config-if)#ip addr R4(config-if)#no shut R4(config-if)#exit R4(config)#router eigrp 1 R4(config-router)#auto-summary R4(config-router)#network 四 实验调试 ( 一 )show ip route R1#show ip route End with CNTL/Z. D C C /16 [90/ ] via , 00:12:52, Serial0/0/ /16 is variably subnetted, 2 subnets, 2 masks /24 is directly connected, FastEthernet0/ /30 is directly connected, Serial0/0/0 R2#show ip route /16 is variably subnetted, 6 subnets, 3 masks D /16 is a summary, 00:14:01, Null0 D /24 [90/ / ] via , 00:13:19, Serial0/0/1 D /24 [90/ / ] via , 00:10:20, Serial0/1/0 57

62 第一部分 路由器实验 C C D /30 is directly connected, Serial0/0/ /30 is directly connected, Serial0/1/ /30 [90/ ] via , 00:11:02, Serial0/0/1 [90/ ] via , 00:10:20, Serial0/1/ /16 is variably subnetted, 3 subnets, 3 masks D /16 is a summary, 00:14:01, Null0 D C 技术要点 /24 [90/ ] via , 00:15:48, Serial0/0/ /30 is directly connected, Serial0/0/0 EIGRP 向路由表中自动加入一条 Null0 总结路由的条件必须同时满足下面 3 点 : a. 至少有两个不同主类的网络在 EIGRP 进程中通告 b. 每个主要网络通过 EIGRP 至少发现了一个网络 c.eigrp 进程中启用了自动总结, 如果关闭了自动总结, 则 Null0 总结路由将被删除, 除非 接口下执行手工路由总结 R3#show ip route /16 is variably subnetted, 5 subnets, 2 masks C /24 is directly connected, FastEthernet0/0 D /24 [90/ ] via , 00:19:33, Serial0/0/0 C D C D /30 is directly connected, Serial0/0/ /30 [90/ ] via , 00:19:58, Serial0/0/1 [90/ ] via , 00:19:33, Serial0/0/ /30 is directly connected, Serial0/0/ /16 [90/ ] via , 00:22:32, Serial0/0/1 注 EIGRP 度量值的计算公式 = [K1xBandwidth+(K2xBandwidth)/(256-Load)+K3xDelay]x[K5/(Reliability+K4)]x256 默认情况下 :K1=K3=1 K1=K3=1,K2=K4=K5=0 K2=K4=K5=0 Bandwidth=[10 7 / 传递路由条目所经由链路中入口带宽 (kbps kbps) 的最小值 ]x256 Delay=[ 传递路由条目所经由链路中入口的延迟之和 (us us)/10]x256 相关术语 :1 级路由 ( 默认路由 超网路由 网络路由 ) 最终路由 1 级父路由 2 级路由 R4#show ip route /16 is variably subnetted, 5 subnets, 2 masks // 一级父路由 D C D C C /24 [90/ ] via , 00:38:38, Serial0/0/ /24 is directly connected, FastEthernet0/ /30 [90/ ] via , 00:38:38, Serial0/0/1 [90/ ] via , 00:38:38, Serial0/0/ /30 is directly connected, Serial0/0/ /30 is directly connected, Serial0/0/0 // 以上五条路由是 2 级路由, 也是最终路由 D /16 [90/ ] via , 00:38:38, Serial0/0/1 // 该路由是一级路由, 也是最终路由 58

63 第一部分 路由器实验 发送出去 发送出去 ( 二 )show ip protocols R2#show ip protocols Routing Protocol is "eigrp 1 " //AS 号码为 1 Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set // 以上两行表明入方向和出方向都没有配置分布列表 Default networks flagged in outgoing updates // 允许出方向发生默认路由信息, 通过路由模式下的 default-information out 命令配置 Default networks accepted from incoming updates // 允许入方向接收默认路由信息, 通过路由模式下的 default-information in 命令配置 EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0 // 显示计算度量值所用的 K 值 EIGRP maximum hopcount 100 // 支持的跳数, 默认为 100, 最大为 255 EIGRP maximum metric variance 1 Redistributing: eigrp 1 // 没有其他协议重分布进来 Automatic network summarization is in effect // 显示自动汇总总结已经开启, 默认是开启的 Automatic address summarization: // 自动地址总结 /16 for Serial0/0/1, Serial0/1/0 Summarizing with metric // 以上两行表明自动总结成 /16 网络, 并从接口 s0/0/1,s0/0/0 以初始度量值 /16 for Serial0/0/0 Summarizing with metric // 以上两行表明自动总结成 /16 网络, 并从接口 s0/0/1,s0/0/0 以初始度量值 Maximum path: 4 Routing for Networks: Routing Information Sources: // 默认支持负载均衡路由的条数, 最大 16 条 //EIGRP 进程中的 network 命令后的网络 // 路由信息源 Gateway Distance Last Update Distance: internal 90 external 170 // 管理距离, 内部 90, 外部 170 ( 三 )show ip eigrp neighbors R2#show ip eigrp neighbors IP-EIGRP neighbors for process 1 H Address Interface Hold Uptime SRTT RTO Q Seq 59

64 第一部分 路由器实验 (sec) (ms) Cnt Num Se0/0/ :08: Se0/0/ :06: Se0/1/ :03: 各自段的含义 : H----- 与邻居建立会话的顺序 Address 邻居路由器的接口地址 Interface 本路由器到邻居路由器的接口 Hold 认为邻居路由器不存在所能等待的最长时间 Uptime 从邻居关系建立到目前的时间 SRTT 向邻居路由器发送一个数据包以及本路由器到确认包的时间 RTO 路由器在重新传输包之前等待 ACK 的时间 Q Cnt 等待发送到队列 Seq 从邻居收到的 EIGRP 数据包的序号 ( 四 )show ip eigrp topology R2#show ip eigrp topology IP-EIGRP Topology Table foras 1 Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply, r - Reply status P /30, 1 successors, FD is via Connected, Serial0/0/0 P /24, 1 successors, FD is via ( /28160), Serial0/0/0 P /30, 1 successors, FD is via Connected, Serial0/0/1 P /16, 1 successors, FD is via Summary ( /0), Null0 P /16, 1 successors, FD is via Summary ( /0), Null0 P /24, 1 successors, FD is via ( /28160), Serial0/0/1 P /30, 2 successors, FD is via ( / ), Serial0/0/1 via ( / ), Serial0/1/0 P /30, 1 successors, FD is via Connected, Serial0/1/0 P /24, 1 successors, FD is via ( /28160), Serial0/1/0 // 路由条目 /24 处于被动状态,1 个后继路由器, 可行距离为 , 通告距离为 28160, 下一跳地址 , 本地出口 S0/0/0 五个状态代码的含义 :P A U Q SIA 60

65 第一部分 路由器实验 ( 五 )show ip eigrp interfaces R2#show ip eigrp interfaces IP-EIGRP interfaces for process 1 Xmit Queue Mean Pacing Time Multicast Pending Interface Peers Un/Reliable SRTT Un/Reliable Flow Timer Routes Se0/0/0 1 0/ / Se0/0/1 1 0/ / Se0/1/0 1 0/ / // 各自段的含义 Interface 运行 EIGRP 协议的接口 Peers 接口的邻居的个数 Xmit Queue Un/Reliable 在不可靠 / 可靠队列中存留的数据包的数量 Mean SRTT 平均的往返时间 ( 六 )show ip eigrp traffic R2#show ip eigrp traffic IP-EIGRP Traffic Statistics for process 1 Hellos sent/received: 3150/3137 // 发送和接收到 Hello 数据包 Updates sent/received: 16/13 Queries sent/received: 0/0 // 发送和接收到 update 数据包 // 发送和接收到 Query 数据包 Replies sent/received: 0/0 // 发送和接收到 Reply 数据包 Acks sent/received: 12/11 // 发送和接收到 Ack 数据包 Input queue high water mark 1, 0 drops SIA-Queries sent/received: 0/0 SIA-Replies sent/received: 0/0 ( 七 )debug eigrp packets EIGRP 的五种类型的数据包 : // 发送和接收到 SIA 数据包 // 发送和接收到 SIA Relay 数据包 Hello 以组播的方式定期发送, 用于建立和维持邻居关系 更新 当路由器收到某个邻居路由器的第一个 Hello 包时, 以单播传送方式回送一个包含 它所知道的路由信息的更新包 ; 当路由信息发生变化时, 以组播的方式发送只包含变化路由信息 的更新包查询 当一条链路失败, 路由器重新进行路由计算, 但在拓扑表中没有可行的后继路由 时, 路由器就以组播的方式向它的邻居发送一个查询包, 以询问它们是否有一条道目的地的后继 路由 答复 以单播的方式回传给查询方, 对查询数据包进行应答 确认 以单播的方式传送, 用来确认更新 查询和答复数据包 61

66 第一部分 路由器实验 实验 1-16.EIGRP 负载均衡 一 实验目的 ( 一 ) EIGRP 等价负载均衡的实现方法 ( 二 ) EIGRP 非等价负载的实现方法 ( 三 ) 修改 EIGRP 度量值的方法 ( 四 ) 可行距离 通告距离以及可行性条件的深层含义二 实验拓扑 三 实验步骤 Router>ena ( 一 ) 配置路由器 R1 Router#conf t Enter configuration commands, one per line. Router(config)#host R1 R1(config)#int f0/0 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#int s0/0/0 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#exit R1(config)#router eigrp 1 End with CNTL/Z. 62

67 第一部分 路由器实验 R1(config-router)#network R1(config-router)#network R1(config-router)#no auto-summary Router>ena ( 二 ) 配置路由器 R2 Router#conf t Enter configuration commands, one per line. Router(config)#host R2 R2(config)#int lo0 R2(config-if)#ip addr R2(config-if)#int s0/0/0 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#int s0/0/1 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#exit R2(config)#router eigrp 1 R2(config-router)#network R2(config-router)#network R2(config-router)#network R2(config-router)#no au Router>ena ( 三 ) 配置路由器 R3 Router#conf t Enter configuration commands, one per line. Router(config)#host R3 R3(config)#int s0/0/0 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#int s0/0/1 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#exit R3(config)#router eigrp 1 R3(config-router)#network R3(config-router)#network R3(config-router)#no au ( 四 ) 配置路由器 R4 End with CNTL/Z. End with CNTL/Z. 63

68 第一部分 路由器实验 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R3 R3(config)#int s0/0/0 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#int s0/0/1 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#exit R3(config)#router eigrp 1 R3(config-router)#network R3(config-router)#network R3(config-router)#no au 四 实验调试 ( 一 ) 查看路由表 R4#show ip route eigrp /24 is subnetted, 6 subnets End with CNTL/Z. D [90/ ] via , 00:01:26, FastEthernet0/0 D D [90/ ] via , 00:01:26, FastEthernet0/ [90/ ] via , 00:01:26, Serial0/0/0 // 虽然路由器 R4 到达路由器 R2 有两条路径, 但是路由器会将 FD 最小的放入路由表, 选择走 F0/0 接口 R4#show ip eigrp topology IP-EIGRP Topology Table foras 1 P /24, 1 successors, FD is via Connected, Loopback0 P /24, 1 successors, FD is via Connected, FastEthernet0/0 P /24, 1 successors, FD is via Connected, Serial0/0/0 P /24, 1 successors, FD is via ( / ), FastEthernet0/0 P /24, 1 successors, FD is via ( / ), FastEthernet0/0 via ( / ), Serial0/0/0 P /24, 1 successors, FD is via ( / ), Serial0/0/0 ( 二 ) 等价负载 64

69 第一部分 路由器实验 EIGRP 即支持等价负载均衡, 又支持非等价负载均衡 R4(config)#router eigrp 1 R4(config-router)#variance 2 ( 三 ) 实习等价负载均衡 R4(config)#int f0/0 R4(config-if)#delay 2000 R4(config-if)#end R4#show ip route eigrp /24 is subnetted, 6 subnets D [90/ ] via , 00:02:52, Serial0/0/0 [90/ ] via , 00:00:08, FastEthernet0/0 D [90/ ] via , 00:00:08, FastEthernet0/0 D [90/ ] via , 00:02:52, Serial0/0/0 65

70 第一部分 路由器实验 实验 向 EIGRP 网络中注入默认路由 一 实验目的 ( 一 ) 向 EIGRP 网络中注入默认路由的方法 ( 二 ) ip default-network 命令使用 ( 三 ) 重分布静态路由到 EIGRP 网络二 实验拓扑 三 实验步骤 在路由器 R1 路由器 R2 和路由器 R3 之间运行 EIGRP, 在路由器 R3 和路由器 R4 之间配置静态路由, 路由器 R4 模拟 ISP, 通过对边界路由器 R3 的配置, 使得路由器 R1 和路由器 R2 学习到一条 EIGRP 的默认路由 Router>ena ( 一 ) 配置路由器 R1 Router#conf t Enter configuration commands, one per line. Router(config)#host R1 R1(config)#int lo0 R1(config-if)#ip addr R1(config-if)#int s0/0/0 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#exit R1(config)#router eigrp 1 R1(config-router)#network R1(config-router)#network R1(config-router)#no auto Router>ena ( 二 ) 配置路由器 R2 End with CNTL/Z. 66

71 第一部分 路由器实验 Router#conf t Enter configuration commands, one per line. Router(config)#host R2 R2(config)#int s0/0/0 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#int s0/0/1 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#exit R2(config)#router eigrp 1 R2(config-router)#network R2(config-router)#network R2(config-router)#no au Router>ena ( 三 ) 配置路由器 R3 Router#conf t Enter configuration commands, one per line. Router(config)#host R3 R3(config)#int s0/0/1 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#int s0/0/0 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#exit R3(config)#router eigrp 1 R3(config-router)#network R3(config-router)#network R3(config-router)#no au R3(config-router)#exit R3(config)#ip route s0/0/0 Router>ena ( 四 ) 配置路由器 R4 Router#conf t Enter configuration commands, one per line. Router(config)#host R4 R4(config)#int lo0 R4(config-if)#ip addr R4(config-if)#int s0/0/0 End with CNTL/Z. End with CNTL/Z. End with CNTL/Z. 67

72 第一部分 路由器实验 R4(config-if)#ip addr R4(config-if)#clock rate R4(config-if)#no shut R4(config-if)#exit R4(config)#ip route s0/0/0 四 实验调试 ( 一 ) 通过 ip default-network 命令向 EIGRP 网络注入默认路由 R3(config)#ip default-network R3(config)#router eigrp 1 R3(config-router)#network R1#show ip route eigrp /24 is subnetted, 3 subnets D [90/ ] via , 00:09:38, Serial0/0/0 D* /24 [90/ ] via , 00:00:50, Serial0/0/0 R2#show ip route eigrp /24 is subnetted, 3 subnets D [90/ ] via , 00:11:15, Serial0/0/0 D* /24 [90/ ] via , 00:01:22, Serial0/0/1 R3#show ip route D D C /24 is subnetted, 3 subnets [90/ ] via , 00:09:47, Serial0/0/ [90/ ] via , 00:09:47, Serial0/0/ is directly connected, Serial0/0/1 C* /24 is directly connected, Serial0/0/0 S* /0 is directly connected, Serial0/0/0 ( 二 ) 通过重分布静态默认路由向 EIGRP 网络注入默认路由 R3(config-router)#no ip default-network R3(config)#router eigrp 1 R3(config-router)#no network R3(config-router)#redistribute static R3(config-router)#exit R1#show ip route eigrp /24 is subnetted, 3 subnets D D [90/ ] via , 00:16:12, Serial0/0/ /24 [90/ ] via , 00:02:12, Serial0/0/0 D*EX /0 [170/ ] via , 00:01:29, Serial0/0/0 68

73 第一部分 路由器实验 R2#show ip route eigrp /24 is subnetted, 3 subnets D [90/ ] via , 00:16:46, Serial0/0/0 D /24 [90/ ] via , 00:01:40, Serial0/0/1 D*EX /0 [170/ ] via , 00:00:57, Serial0/0/1 69

74 第一部分 路由器实验 实验 点到点链路上的 OSPF 一 实验目的 ( 一 ) 在路由器上启动 OSPF 路由进程 ( 二 ) 启用参与路由协议的接口, 使之可发送和接收 OSPF 更新 ( 三 )OSPF 度量值 (cost) 的计算 ( 四 )Hello 相关参数的配置 ( 五 ) 点到点链路上的 OSPF 的特征 ( 六 ) 查看和调试 OSPF 路由协议相关信息二 实验拓扑 三 实验步骤 (1) 配置路由器 R1 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R1 R1(config)#int lo0 End with CNTL/Z. R1(config-if)#ip addr R1(config-if)#int s0/0/0 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#exit 70

75 第一部分 路由器实验 R1(config)#router ospf 1 R1(config-router)#router-id? A.B.C.D // 启动 OSPF 进程 OSPF router-id in IP address format R1(config-router)#router-id 技术要点 OSPF 确定 Router ID 遵循如下顺序 : // 配置路由器 ID (1) 最优先的是在 OSPF 进程中用命令 router-id 指定了 Router ID (2) 若没有指定, 那么选择 IP 地址最大的环回接口的 IP 地址为 Router ID (3) 若没有环回接口, 就选择最大的活动的物理接口的 IP 地址为 Router ID R1(config-router)#network area 0 R1(config-router)#network area 0 (2) 配置路由器 R2 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R2 R2(config)#int lo0 R2(config-if)#ip addr R2(config-if)#int s0/0/0 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#int s0/0/1 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#exit R2(config)#router ospf 1 R2(config-router)#router-id R2(config-router)#network area 0 End with CNTL/Z. R2(config-router)#network area 0 R2(config-router)#network area 0 (3) 配置路由器 R3 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R3 R3(config)#int lo0 R3(config-if)#ip addr R3(config-if)#int s0/0/1 R3(config-if)#ip addr R3(config-if)#no shut End with CNTL/Z. 71

76 第一部分 路由器实验 R3(config-if)#int s0/0/0 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#exit R3(config)#router ospf 1 R3(config-router)#router-id R3(config-router)#network area 0 R3(config-router)#network area 0 R3(config-router)#network area 0 (4) 配置路由器 R4 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R4 R4(config)#int lo0 R4(config-if)#ip addr R4(config-if)#int s0/0/0 R4(config-if)#ip addr R4(config-if)#clock rate R4(config-if)#no shut R4(config-if)#exit R4(config)#router ospf 1 R4(config-router)#rou R4(config-router)#router-id R4(config-router)#network area 0 End with CNTL/Z. R4(config-router)#network area 0 四 实验调试 ( 一 )show ip route R1#show ip route ospf /16 is variably subnetted, 7 subnets, 2 masks // 父路由 O [110/65] via , 00:08:56, Serial0/0/0 // 子路由 O O O O [110/129] via , 00:06:01, Serial0/0/ [110/193] via , 00:02:31, Serial0/0/ [110/128] via , 00:08:56, Serial0/0/ [110/192] via , 00:03:16, Serial0/0/0 R2#show ip route ospf O O O O /16 is variably subnetted, 7 subnets, 2 masks [110/65] via , 00:09:59, Serial0/0/ [110/65] via , 00:07:09, Serial0/0/ [110/129] via , 00:03:34, Serial0/0/ [110/128] via , 00:04:19, Serial0/0/1 72

77 第一部分 路由器实验 R3#show ip route ospf O O O O /16 is variably subnetted, 7 subnets, 2 masks R4#show ip route [110/129] via , 00:07:45, Serial0/0/ [110/65] via , 00:07:45, Serial0/0/ [110/65] via , 00:04:15, Serial0/0/ [110/128] via , 00:07:45, Serial0/0/ /16 is variably subnetted, 7 subnets, 2 masks O /32 [110/193] via , 00:05:24, Serial0/0/0 O O C O O /32 [110/129] via , 00:05:24, Serial0/0/ /32 [110/65] via , 00:05:24, Serial0/0/ /24 is directly connected, Loopback /24 [110/192] via , 00:05:24, Serial0/0/ /24 [110/128] via , 00:05:24, Serial0/0/0 C /24 is directly connected, Serial0/0/0 // 环回接口所在网络的 OSPF 路由条目的掩码长度都是 32 位 ( 二 )show ip protocols R2#show ip protocols Routing Protocol is "ospf 1" // 当前路由器运行的 OSPF 进程 ID Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Router ID // 本地路由器 ID Number of areas in this router is 1. 1 normal 0 stub 0 nssa Maximum path: 4 Routing for Networks: area area area 0 Routing Information Sources: Gateway Distance Last Update :14: :14:23 Distance: (default is 110) ( 三 )show ip ospf R2#show ip ospf Routing Process "ospf 1" with ID // 区域数量和区域类型 // 路由进程 ID 和路由器 ID Supports only single TOS(TOS0) routes // 提供支持的服务类型号, 只为 0 Supports opaque LSA SPF schedule delay 5 secs, Hold time between two SPFs 10 secs Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs Number of external LSA 0. Checksum Sum 0x Number of opaque AS LSA 0. Checksum Sum 0x

78 第一部分 路由器实验 Number of DCbitless external and opaque AS LSA 0 Number of DoNotAge external and opaque AS LSA 0 Number of areas in this router is 1. 1 normal 0 stub 0 nssa External flood list length 0 Area BACKBONE(0) Number of interfaces in this area is 3 Area has no authentication SPF algorithm executed 5 times Area ranges are // 主干区域 Number of LSA 4. Checksum Sum 0x01bb3f Number of opaque link LSA 0. Checksum Sum 0x Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 ( 四 )show ip ospf interface R2#show ip ospf interface Loopback0 is up, line protocol is up Internet address is /24, Area 0 Process ID 1, Router ID , Network Type LOOPBACK, Cost: 1 Loopback interface is treated as a stub Host Serial0/0/0 is up, line protocol is up Internet address is /24, Area 0 Process ID 1, Router ID , Network TypePOINT-TO-POINT, Cost: 64 Transmit Delay is 1 sec, State POINT-TO-POINT, Priority 0 No designated router on this network No backup designated router on this network Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:06 Index 2/2, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length is 1, maximum is 1 Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor Suppress hello for 0 neighbor(s) Serial0/0/1 is up, line protocol is up Internet address is /24, Area 0 Process ID 1, Router ID , Network TypePOINT-TO-POINT, Cost: 64 Transmit Delay is 1 sec, State POINT-TO-POINT, Priority 0 No designated router on this network No backup designated router on this network Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 74

79 第一部分 路由器实验 Hello due in 00:00:00 Index 3/3, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length is 1, maximum is 1 Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor Suppress hello for 0 neighbor(s) ( 五 )show ip ospf neighbor R2# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface FULL/ - 00:00: Serial0/0/ FULL/ - 00:00: Serial0/0/1 技术要点 OSPF 邻居关系不能建立的常见原因 : (1)Hello 间隔和 Dead 间隔不同 (2) 区域 ID 不一样 (3) 特殊区域区域类型不匹配 (4) 验证类型或密码不一致 (5) 路由器 ID 相同 (6)Hello 包被 ACL 拒绝 (7) 链路上的 MTU 不匹配 (8) 接口下 OSPF 网络类型不匹配 ( 六 )show ip ospf database R2#show ip ospf database OSPF Router with ID ( ) (Process ID 1) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count x x x x00d1e x x0035cb x x00feff 3 75

80 第一部分 路由器实验 实验 基于区域的 OSPF 简单口令认证 一 实验目的 ( 一 )OSPF 验证的类型和意义 ( 二 ) 基于区域的 OSPF 简单口令验证的配置和测试二 实验拓扑 三 实验步骤 ( 一 ) 配置路由器 R1 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R1 R1(config)#int s0/0/0 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#int lo0 R1(config-if)#ip addr R1(config-if)#exit R1(config)#router ospf 1 R1(config-router)#router-id End with CNTL/Z. R1(config-router)#network area 0 R1(config-router)#network area 0 R1(config-router)#area 0 authentication R1(config-router)#int s0/0/0 R1(config-if)#ip ospf? authentication authentication-key cost dead-interval hello-interval message-digest-key Enable authentication Authentication password (key) Interface cost // 区域 0 启用简单口令认证 Interval after which a neighbor is declared dead Time between HELLO packets Message digest authentication password (key) 76

81 第一部分 network Network type priority Router priority R1(config-if)#ip ospf authentication-key cisco 路由器实验 // 配置验证密码 ( 二 ) 配置路由器 R2 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R2 R2(config)#int lo0 R2(config-if)#ip addr R2(config-if)#int s0/0/0 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shu R2(config-if)#exit R2(config)#router ospf 1 R2(config-router)#router-id R2(config-router)#network area 0 End with CNTL/Z. R2(config-router)#network area 0 R2(config-router)#area 0 authentication R2(config-router)#int s0/0/0 R2(config-if)#ip ospf authentication-key cisco 四 实验调试 ( 一 )show ip ospf interface R2#show ip ospf interface Loopback0 is up, line protocol is up Internet address is /24, Area 0 Process ID 1, Router ID , Network TypeLOOPBACK, Cost: 1 Loopback interface is treated as a stub Host Serial0/0/0 is up, line protocol is up Internet address is /24, Area 0 Process ID 1, Router ID , Network TypePOINT-TO-POINT, Cost: 781 Transmit Delay is 1 sec, State POINT-TO-POINT, Priority 0 No designated router on this network No backup designated router on this network Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:09 Index 2/2, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length is 1, maximum is 1 Last flood scan time is 0 msec, maximum is 0 msec 77

82 第一部分 路由器实验 Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor Suppress hello for 0 neighbor(s) Simple password authentication enabled // 该信息表明了该接口启用了简单口令认证 ( 二 )show ip ospf R1#show ip ospf Routing Process "ospf 1" with ID Supports only single TOS(TOS0) routes Supports opaque LSA SPF schedule delay 5 secs, Hold time between two SPFs 10 secs Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs Number of external LSA 0. Checksum Sum 0x Number of opaque AS LSA 0. Checksum Sum 0x Number of DCbitless external and opaque AS LSA 0 Number of DoNotAge external and opaque AS LSA 0 Number of areas in this router is 1. 1 normal 0 stub 0 nssa External flood list length 0 Area BACKBONE(0) Number of interfaces in this area is 2 Area has simple password authentication SPF algorithm executed 3 times Area ranges are Number of LSA 2. Checksum Sum 0x00e578 Number of opaque link LSA 0. Checksum Sum 0x Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 78

83 第一部分 路由器实验 实验 基于区域的 OSPF MD5 认证 一 实验目的 ( 一 )OSPF 验证的类型和意义 ( 二 ) 基于区域的 OSPF MD5 验证的配置和测试二 实验拓扑 三 实验步骤 ( 一 ) 配置路由器 R1 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R1 R1(config)#int lo0 R1(config-if)#ip addr R1(config-if)#int s0/0/0 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#exit R1(config)#router ospf 1 R1(config-router)#router-id R1(config-router)#network area 0 End with CNTL/Z. R1(config-router)#network area 0 R1(config-router)#area 0 authentication message-digest R1(config-router)#int s0/0/0 R1(config-if)#ip ospf message-digest-key? <1-255> Key ID R1(config-if)#ip ospf message-digest-key 1? md5 Use MD5 algorithm R1(config-if)#ip ospf message-digest-key 1 md5? LINE The OSPF password (key) (maximum 16 characters) // 区域 0 启用 MD5 验证 79

84 第一部分 路由器实验 R1(config-if)#ip ospf message-digest-key 1 md5 cisco // 配置验证 KEY ID 及密钥 ( 二 ) 配置路由器 R2 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R2 R2(config)#int lo0 R2(config-if)#ip addr R2(config-if)#int s0/0/0 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#exit R2(config)#router ospf 1 R2(config-router)#router-id R2(config-router)#network area 0 End with CNTL/Z. R2(config-router)#network area 0 R2(config-router)#area 0 authentication message-digest R2(config-router)#int s0/0/0 R2(config-if)#ip ospf message-digest-key 1 md5 cisco 四 实验调试 ( 一 )show ip ospf interface R2#show ip ospf interface Loopback0 is up, line protocol is up Internet address is /24, Area 0 Process ID 1, Router ID , Network TypeLOOPBACK, Cost: 1 Loopback interface is treated as a stub Host Serial0/0/0 is up, line protocol is up Internet address is /24, Area 0 Process ID 1, Router ID , Network TypePOINT-TO-POINT, Cost: 781 Transmit Delay is 1 sec, State POINT-TO-POINT, Priority 0 No designated router on this network No backup designated router on this network Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:08 Index 2/2, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length is 1, maximum is 1 Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor

85 第一部分 路由器实验 Suppress hello for 0 neighbor(s) Message digest authentication enabled Youngest key id is 1 ( 二 )show ip ospf R1#show ip ospf Routing Process "ospf 1" with ID Supports only single TOS(TOS0) routes Supports opaque LSA SPF schedule delay 5 secs, Hold time between two SPFs 10 secs Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs Number of external LSA 0. Checksum Sum 0x Number of opaque AS LSA 0. Checksum Sum 0x Number of DCbitless external and opaque AS LSA 0 Number of DoNotAge external and opaque AS LSA 0 Number of areas in this router is 1. 1 normal 0 stub 0 nssa External flood list length 0 Area BACKBONE(0) Number of interfaces in this area is 2 Area has message digest authentication SPF algorithm executed 3 times Area ranges are Number of LSA 2. Checksum Sum 0x00e578 Number of opaque link LSA 0. Checksum Sum 0x Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 ( 三 )debug ip ospf events R2#debug ip ospf events OSPF events debugging is on R2# 02:25:26: OSPF: Rcv hello from area 0 from Serial0/0/ :25:26: OSPF: End of hello processing 02:25:27: OSPF: Send with youngest Key 1 81

86 第一部分 路由器实验 实验 1-21.default-information originate 一 实验目的 通过命令 default-information originate 向 OSPF 网络注入一条默认命 令 二 实验拓扑 三 实验步骤 ( 一 ) 配置路由器 R1 Router#conf t Enter configuration commands, one per line. Router(config)#host R1 R1(config)#int lo0 R1(config-if)#ip addr R1(config-if)#int s0/0/0 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#int s0/0/1 R1(config-if)#no shut R1(config-if)#int lo1 R1(config-if)#ip addr R1(config-if)#ip route lo1 R1(config)#router ospf 1 End with CNTL/Z. R1(config-router)#network area 0 R1(config-router)#network area 0 R1(config-router)#default-information originate ( 二 ) 配置路由器 R2 Router>ena Router#conf t 82

87 第一部分 路由器实验 Enter configuration commands, one per line. Router(config)#host R2 R2(config)#int lo0 R2(config-if)#ip addr R2(config-if)#int s0/0/0 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#int s0/0/1 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#exit R2(config)#router ospf 1 End with CNTL/Z. R2(config-router)#router-id R2(config-router)#network area 0 R2(config-router)#network area 0 R2(config-router)#network area 0 ( 三 ) 配置路由器 R3 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R3 R3(config)#int lo0 R3(config-if)#ip addr R3(config-if)#int s0/0/1 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#int s0/0/0 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#exit R3(config)#router ospf 1 End with CNTL/Z. R3(config-router)#router-id R3(config-router)#network area 0 R3(config-router)#network area 0 R3(config-router)#network area 0 ( 四 ) 配置路由器 R4 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R4 End with CNTL/Z. 83

88 第一部分 路由器实验 R4(config)#int lo0 R4(config-if)#ip addr R4(config-if)#int s0/0/0 R4(config-if)#ip addr R4(config-if)#clock rate R4(config-if)#no shut R4(config-if)#exit R4(config)#router ospf 1 R4(config-router)#router-id R4(config-router)#network area 0 R4(config-router)#network area 0 四 实验调试 ( 一 )show ip route R4#show ip route Gateway of last resort is to network O O O C O O /16 is variably subnetted, 7 subnets, 2 masks /32 [110/193] via , 00:10:52, Serial0/0/ /32 [110/129] via , 00:22:25, Serial0/0/ /32 [110/65] via , 00:22:25, Serial0/0/ /24 is directly connected, Loopback /24 [110/192] via , 00:22:25, Serial0/0/ /24 [110/128] via , 00:22:25, Serial0/0/0 C /24 is directly connected, Serial0/0/0 O*E /0 [110/1] via , 00:10:52, Serial0/0/0 ( 二 )show ip ospf database R4#show ip ospf database OSPF Router with ID ( ) (Process ID 1) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count x x0035cb x x009f x x00e1e x x Type-5 AS External Link States Link ID ADV Router Age Seq# Checksum Tag x x00ebb9 1 84

89 第一部分 路由器实验 实验 多区域 OSPF 基本配置 一 实验目的 ( 一 ) 在路由器上启动 OSPF 路由进程 ( 二 ) 启用参与路由协议的接口, 使之发送和接收 OSPF 路由更新 ( 三 )LSA 的类型和特征 ( 四 ) 不同路由器类型的功能 ( 五 )OSPF 拓扑结构数据库的特征和含义 ( 六 )E1 路由和 E2 路由的区别 ( 七 ) 查看和调试 OSPF 路由协议相关信息二 实验拓扑 三 实验步骤配置时采用环回接口尽量靠近区域 0 的原则, 路由器 R4 的环回接口不再 OSPF 进程中通告, 通过重分布的方法进入 OSPF 网络 ( 一 ) 配置路由器 R1 Router>ena Router#conf t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#host R1 R1(config)#int lo0 R1(config-if)#ip addr R1(config-if)#int s0/0/0 R1(config-if)#ip addr

90 第一部分 路由器实验 R1(config-if)#no shut R1(config-if)#exit R1(config)#router ospf 1 R1(config-router)#router-id R1(config-router)#network area 1 R1(config-router)#network area 1 ( 二 ) 配置路由器 R2 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R2 R2(config)#int lo0 End with CNTL/Z. %LINK-5-CHANGED: Interface Loopback0, changed state to up R2(config-if)# %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up R2(config-if)#ip addr R2(config-if)#int s0/0/0 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#int s0/0/1 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#exit R2(config)#router ospf 1 R2(config-router)#router-id R2(config-router)#network area 1 00:24:22: %OSPF-5-ADJCHG: Process 1, Nbr on Serial0/0/0 from LOADING to FULL, Loading Done R2(config-router)#network area 0 R2(config-router)#network area 0 ( 三 ) 配置路由器 R3 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R3 R3(config)#int lo0 R3(config-if)#ip addr R3(config-if)#int s0/0/1 R3(config-if)#ip addr R3(config-if)#no shut End with CNTL/Z. 86

91 第一部分 路由器实验 R3(config-if)#int s0/0/0 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#exit R3(config)#router ospf 1 R3(config-router)#router-id R3(config-router)#network area 0 R3(config-router)#network area 0 R3(config-router)#network area 2 ( 四 ) 配置路由器 R4 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R4 R4(config)#int lo0 R4(config-if)#ip addr R4(config-if)#int s0/0/0 R4(config-if)#ip addr R4(config-if)#clock rate R4(config-if)#no shut R4(config-if)#exit R4(config)#router ospf 1 R4(config-router)#router-id End with CNTL/Z. R4(config-router)#network area 2 R4(config-router)#redistribute connected subnets // 将直连路由重分布到 OSPF 网络 四 实验调试 ( 一 )show ip route ospf R2#show ip route ospf O O O E2 O IA /16 is variably subnetted, 7 subnets, 2 masks [110/65] via , 00:13:49, Serial0/0/ [110/65] via , 00:10:53, Serial0/0/ [110/20] via , 00:07:42, Serial0/0/ [110/128] via , 00:08:21, Serial0/0/1 R3#show ip route ospf /16 is variably subnetted, 7 subnets, 2 masks O IA [110/129] via , 00:13:37, Serial0/0/1 O [110/65] via , 00:13:37, Serial0/0/1 O E [110/20] via , 00:10:26, Serial0/0/0 O IA [110/128] via , 00:13:37, Serial0/0/1 O 的路由是区域内的路由 87

92 第一部分 路由器实验 O IA 的路由是区域间的路由 O E2 的路由是外部自治系统被重分布到 OSPF 中的路由 ( 二 )show ip ospf database R1#show ip ospf database OSPF Router with ID ( ) (Process ID 1) Router Link States (Area 1) // 区域 1 类型 1 的 LSA Link ID ADV Router Age Seq# Checksum Link count x x003f x x00c259 2 Summary Net Link States (Area 1) // 区域 1 类型 3 的 LSA Link ID ADV Router Age Seq# Checksum x x00a7ed x x004af x x x x004fa5 Type-5 AS External Link States // 区域 1 类型 5 的 LSA Link ID ADV Router Age Seq# Checksum Tag x x004fea 0 R2#show ip ospf database OSPF Router with ID ( ) (Process ID 1) Router Link States (Area 0) // 区域 0 类型 1 的 LSA Link ID ADV Router Age Seq# Checksum Link count x x00f x x008e95 3 Summary Net Link States (Area 0) // 区域 0 类型 3 的 LSA Link ID ADV Router Age Seq# Checksum x x00c x x003d x x00b47f Summary ASB Link States (Area 0) // 区域 0 类型 4 的 LSA Link ID ADV Router Age Seq# Checksum x x00c784 Router Link States (Area 1) // 区域 1 类型 1 的 LSA 88

93 第一部分 路由器实验 Link ID ADV Router Age Seq# Checksum Link count x x003f x x00c259 2 Summary Net Link States (Area 1) // 区域 1 类型 3 的 LSA Link ID ADV Router Age Seq# Checksum x x00a7ed x x004af x x x x004fa5 Type-5 AS External Link States // 区域 1 类型 5 的 LSA Link ID ADV Router Age Seq# Checksum Tag x x004fea 0 R3#show ip ospf database OSPF Router with ID ( ) (Process ID 1) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count x x00f x x008e95 3 Summary Net Link States (Area 0) Link ID ADV Router Age Seq# Checksum x x00c x x003d x x00b47f Summary ASB Link States (Area 0) Link ID ADV Router Age Seq# Checksum x x00c784 Router Link States (Area 2) Link ID ADV Router Age Seq# Checksum Link count x x00d84e x x000d5e 2 Summary Net Link States (Area 2) 89

94 第一部分 路由器实验 Link ID ADV Router Age Seq# Checksum x x002e x x00721c x x x x0024e x x009b73 Type-5 AS External Link States // 区域 2 类型 5 的 LSA Link ID ADV Router Age Seq# Checksum Tag x x004fea 0 R4#show ip ospf database OSPF Router with ID ( ) (Process ID 1) Router Link States (Area 2) // 区域 2 类型 1 的 LSA Link ID ADV Router Age Seq# Checksum Link count x x00d84e x x000d5e 2 Summary Net Link States (Area 2) Link ID ADV Router Age Seq# Checksum x x002e x x00721c x x x x0024e x x009b73 Type-5 AS External Link States Link ID ADV Router Age Seq# Checksum Tag x x004fea 0 ( 三 )show ip ospf R4#show ip ospf 1 Routing Process "ospf 1" with ID Supports only single TOS(TOS0) routes Supports opaque LSA SPF schedule delay 5 secs, Hold time between two SPFs 10 secs Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs Number of external LSA 2. Checksum Sum 0x009fd4 Number of opaque AS LSA 0. Checksum Sum 0x Number of DCbitless external and opaque AS LSA 0 Number of DoNotAge external and opaque AS LSA 0 90

95 第一部分 路由器实验 Number of areas in this router is 1. 1 normal 0 stub 0 nssa External flood list length 0 Area 2 Number of interfaces in this area is 1 Area has no authentication SPF algorithm executed 3 times Area ranges are Number of LSA 7. Checksum Sum 0x024e75 Number of opaque link LSA 0. Checksum Sum 0x Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 91

96 第一部分 路由器实验 实验 1-23.OSPF 末节区域和完全末节区域 一 实验目的 ( 一 ) 末节区域的条件 ( 二 ) 末节区域的特征 ( 三 ) 完全末节区域的特征 ( 四 ) 末节区域的配置 ( 五 ) 完全末节区域的配置二 实验拓扑 三 实验步骤 在路由器 R2 上将环回接口 0 以重分布的方式注入 OSPF 区域, 用来构 造 5 类的 LSA, 故路由器 R2 既是 ABR, 又是 ASBR, 将区域 1 配置成末节区 域, 将区域 2 配置成完全末节区域 ( 一 ) 配置路由器 R1 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R1 R1(config)#int lo0 R1(config-if)#ip addr R1(config-if)#int s0/0/0 End with CNTL/Z. 92

97 第一部分 路由器实验 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#exit R1(config)#router ospf 1 R1(config-router)#router-id R1(config-router)#network area 1 R1(config-router)#network area 1 R1(config-router)#area 1 stub ( 二 ) 配置路由器 R2 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R2 // 区域 1 配置成末节区域 R2(config)#int lo0 R2(config-if)#ip addr R2(config-if)#int s0/0/0 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#int s0/0/1 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#exit R2(config)#router ospf 1 R2(config-router)#router-id End with CNTL/Z. R2(config-router)#network area 1 R2(config-router)#network area 0 R2(config-router)#redistribute connected subnets R2(config-router)#area 1 stub ( 三 ) 配置路由器 R3 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R3 R3(config)#int lo0 R3(config-if)#ip addr R3(config-if)#int s0/0/1 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#int s0/0/0 R3(config-if)#ip addr // 将直连路由重分布到 OSPF 区域 End with CNTL/Z. 93

98 第一部分 路由器实验 R3(config-if)#no shut R3(config-if)#exit R3(config)#router ospf 1 R3(config-router)#router-id R3(config-router)#network area 0 R3(config-router)#network area 0 R3(config-router)#network area 2 R3(config-router)#area 2 stub no-summary ( 四 ) 配置路由器 R4 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R4 R4(config)#int lo0 R4(config-if)#ip addr R4(config-if)#int s0/0/0 R4(config-if)#ip addr R4(config-if)#clock rate R4(config-if)#no shut // 将区域 2 配置成完全末节区域 End with CNTL/Z. R4(config-if)#exit R4(config)#router ospf 1 R4(config-router)#router-id R4(config-router)#network area 2 R4(config-router)#network area 2 R4(config-router)#area 2 stub 技术要点 末节和完全末节区域需要满足的条件 : 区域只有一个出口 区域不需要作为虚链路的过渡区 区域内没有 ASBR 区域不是主干区域 四 实验调试 ( 一 )show ip route ospf R1#show ip route ospf /16 is variably subnetted, 6 subnets, 2 masks O IA O IA O IA [110/129] via , 00:06:49, Serial0/0/ [110/193] via , 00:02:29, Serial0/0/ [110/128] via , 00:08:49, Serial0/0/0 94

99 第一部分 路由器实验 O IA [110/192] via , 00:03:49, Serial0/0/0 O*IA /0 [110/65] via , 00:11:30, Serial0/0/0 // 末节区域可以接收区域间路由, 不接收外部自治系统的路由 R4#show ip route ospf O*IA /0 [110/65] via , 00:04:55, Serial0/0/0 // 完全末节区域不接收外部路由和区域间路由 ( 二 )show ip ospf R1#show ip ospf 1 [ 略 ] Area 1 Number of interfaces in this area is 2 It is a stub area Area has no authentication SPF algorithm executed 8 times Area ranges are Number of LSA 7. Checksum Sum 0x0283d1 Number of opaque link LSA 0. Checksum Sum 0x Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 R3#show ip ospf 1 Routing Process "ospf 1" with ID Supports only single TOS(TOS0) routes Supports opaque LSA It is an area border router SPF schedule delay 5 secs, Hold time between two SPFs 10 secs Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs Number of external LSA 1. Checksum Sum 0x00f207 Number of opaque AS LSA 0. Checksum Sum 0x Number of DCbitless external and opaque AS LSA 0 Number of DoNotAge external and opaque AS LSA 0 Number of areas in this router is 2. 1 normal 1 stub 0 nssa External flood list length 0 Area BACKBONE(0) Number of interfaces in this area is 2 Area has no authentication SPF algorithm executed 5 times Area ranges are Number of LSA 6. Checksum Sum 0x039ea3 Number of opaque link LSA 0. Checksum Sum 0x

100 第一部分 路由器实验 Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 Area 2 Number of interfaces in this area is 1 It is a stub area generates stub default route with cost 1 Area has no authentication SPF algorithm executed 4 times Area ranges are Number of LSA 3. Checksum Sum 0x0142e7 Number of opaque link LSA 0. Checksum Sum 0x Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 96

101 第一部分 路由器实验 实验 1-24.OSPF NSSA 区域 一 实验目的 ( 一 )NSSA 区域的特征 ( 二 )NSSA 区域的配置 ( 三 )NSSA 产生默认路由的方法二 实验拓扑 三 实验步骤 ( 一 ) 配置路由器 R1 R1(config)#router ospf 1 R1(config-router)#router-id R1(config-router)#network area 1 R1(config-router)#redistribute connected subnets R1(config-router)#area 1 nssa // 将区域 1 配置成 NSSA 区域 ( 二 ) 配置路由器 R2 R2(config)#router ospf 1 R2(config-router)#router-id R2(config-router)#network area 0 R2(config-router)#network area 1 R2(config-router)#network area 0 R2(config-router)#area 1 nssa ( 三 ) 配置路由器 R3 R3(config)#router ospf 1 R3(config-router)#router-id R3(config-router)#network area 0 97

102 第一部分 路由器实验 R3(config-router)#redistribute eigrp 1 subnets R3(config-router)#router eigrp 1 R3(config-router)#redistribute ospf 1 metric? < > Bandwidth metric in Kbits per second R3(config-router)#redistribute ospf 1 metric 1000 R3(config-router)#redistribute ospf 1 metric 1000? < > EIGRP delay metric, in 10 microsecond units R3(config-router)#redistribute ospf 1 metric ? <0-255> EIGRP reliability metric where 255 is 100% reliable // 将 EIGRP 路由重分布到 OSPF 区域 R3(config-router)#redistribute ospf 1 metric ? <1-255> EIGRP Effective bandwidth metric (Loading) where 255 is 100% loaded R3(config-router)#redistribute ospf 1 metric ? < > EIGRP MTU of the path R3(config-router)#redistribute ospf 1 metric // 将 OSPF 路由 重分布到 EIGRP 中 R3(config-router)#network R3(config-router)#no auto-summary ( 四 ) 配置路由器 R4 R4(config)#router eigrp 1 R4(config-router)#network R4(config-router)#network R4(config-router)#no auto-summary 四 实验调试 ( 一 ) 查看 R1 路由表 R1#show ip route ospf O IA O IA /16 is variably subnetted, 4 subnets, 2 masks [110/65] via , 00:10:17, Serial0/0/ [110/128] via , 00:10:17, Serial0/0/0 //LSA 类型为 5 的外部路由不能在 NSSA 区域中传播,ABR 也没有能力把类型 5 的 LSA 转变成 类型 7 的 LSA 再 R2 添加一条路由 :R2(config-router)#area 1 nssa no-summary 则 :R1#show ip route ospf O*IA /0 [110/65] via , 00:00:00, Serial0/0/0 ( 二 ) 查看 R2 路由表 R2#show ip route ospf /24 is subnetted, 4 subnets O N [110/20] via , 00:00:59, Serial0/0/0 ( 三 ) 查看 R3 路由表 R3#show ip route ospf 98

103 第一部分 路由器实验 O E2 O O IA /16 is variably subnetted, 6 subnets, 2 masks [110/20] via , 00:04:02, Serial0/0/ [110/65] via , 00:22:56, Serial0/0/ [110/128] via , 00:22:56, Serial0/0/1 ( 四 ) 查看 R2 拓扑表 R2#show ip ospf database OSPF Router with ID ( ) (Process ID 1) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count x x00f92f x x001ddd 2 Summary Net Link States (Area 0) Link ID ADV Router Age Seq# Checksum x x00c588 Summary ASB Link States (Area 0) Link ID ADV Router Age Seq# Checksum x d 0x00c170 Router Link States (Area 1) Link ID ADV Router Age Seq# Checksum Link count x x00c x x0022fb 2 Summary Net Link States (Area 1) Link ID ADV Router Age Seq# Checksum x x00a1f x x0044fa Type-7 AS External Link States (Area 1) Link ID ADV Router Age Seq# Checksum Tag x x002ff9 0 Type-5 AS External Link States Link ID ADV Router Age Seq# Checksum Tag x x00c36d 0 R2# R2#show ip ospf database OSPF Router with ID ( ) (Process ID 1) 99

104 第一部分 路由器实验 Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count x x00feff x x001fd7 2 Summary Net Link States (Area 0) Link ID ADV Router Age Seq# Checksum x x00e20e Summary ASB Link States (Area 0) Link ID ADV Router Age Seq# Checksum x x00af79 Router Link States (Area 1) Link ID ADV Router Age Seq# Checksum Link count x x00c x x0022fb 2 Summary Net Link States (Area 1) Link ID ADV Router Age Seq# Checksum x x00a1f x x0044fa Type-7 AS External Link States (Area 1) Link ID ADV Router Age Seq# Checksum Tag x x00feff 0 Type-5 AS External Link States Link ID ADV Router Age Seq# Checksum Tag x x0046e x x008fb x x00c36d 0 ( 五 )show ip ospf R2#show ip ospf 1 [ 略 ] Area BACKBONE(0) Number of interfaces in this area is 2 Area has no authentication SPF algorithm executed 9 times Area ranges are 100

105 第一部分 路由器实验 Area 1 Number of LSA 4. Checksum Sum 0x02b05d Number of opaque link LSA 0. Checksum Sum 0x Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 Number of interfaces in this area is 1 It is a NSSA area Perform type-7/type-5 LSA translation Area has no authentication SPF algorithm executed 9 times Area ranges are Number of LSA 5. Checksum Sum 0x02cf36 Number of opaque link LSA 0. Checksum Sum 0x Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 // 执行类型 7 到类型 5 的转换 101

106

107 第二部分 交换机实验 第二部分 交换机实验 实验 2-1. 交换机基本配置 一 实验目的 ( 一 ) 交换机的基本配置 ( 二 ) 交换机的启动过程二 实验拓扑 三 实验步骤 ( 一 ) 配置主机名 Switch>enable Switch#conf t Enter configuration commands, one per line. Switch(config)#hostname S1 End with CNTL/Z. ( 二 ) 配置基本安全措施 S1(config)#enable secret cisco S1(config)#service password-encryption S1(config)#line vty 0 4 S1(config-line)#password cisco S1(config-line)#login S1(config)#line console 0 S1(config-line)#password cisco S1(config-line)#login ( 三 ) 接口基本配置 S1(config)#int f0/16 103

108 第二部分 交换机实验 S1(config-if)#duplex? auto Enable AUTO duplex configuration // 自动检测 full Force full duplex operation // 全双工模式 half Force half-duplex operation // 半双工模式 S1(config-if)#duplex full S1(config-if)#speed? 10 Force 10 Mbps operation // 100 Force 100 Mbps operation auto Enable AUTO speed configuration S1(config-if)#speed 100 ( 四 ) 配置管理地址 S1(config)#interface vlan 1 S1(config-if)#ip addr S1(config-if)#no shut S1(config-if)#exit S1(config)#ip default-gateway // 管理 IP 地址 四 实验调试 ( 一 )show ip interface brief S1#show ip interface brief Interface IP-Address OK? Method Status Protocol FastEthernet0/1 unassigned YES manual down down [ 略 ] FastEthernet0/24 unassigned YES manual down down Vlan YES manual up up ( 二 )telnet PC>telnet Trying Open User Access Verification Password: S1>en Password: S1# // 密码 cisco 不可见 ( 三 )show running-config S1#show running-config Building configuration... Current configuration : 1116 bytes 104

109 第二部分 交换机实验! version 12.1 no service timestamps log datetime msec no service timestamps debug datetime msec service password-encryption! hostname S1! enable secret 5 $1$mERr$hx5rVt7rPNoS4wqbXKX7m0! interface FastEthernet0/1! [ 略 ] interface FastEthernet0/16 duplex full! speed 100 [ 略 ] interface FastEthernet0/24! interface Vlan1! ip address ip default-gateway !! line con 0 password D0A16 login! line vty 0 4 password D0A16 login line vty 5 15 login!! End // 以上是查看运行的配置文件 S1#copy running-config startup-config Destination filename [startup-config]? Building configuration... [OK] // 把运行文件保存为启动配置文件 105

110 第二部分 交换机实验 [confirm] ( 四 )show flash: ( 五 ) 清空交换机全部配置 重启观察启动过程 S1#erase startup-config Erasing the nvram filesystem will remove all configuration files! Continue? [OK] Erase of nvram: complete %SYS-7-NV_BLOCK_INIT: Initialized the geometry of nvram S1#delete flash: Delete filename []??File name not specified %Error parsing flash: (No such file or directory) S1#reload Proceed with reload? [confirm] %SYS-5-RELOAD: Reload requested by console. Reload Reason: Reload Command. C2950 Boot Loader (C2950-HBOOT-M) Version 12.1(11r)EA1, RELEASE SOFTWARE (fc1) Compiled Mon 22-Jul-02 18:57 by miwang Cisco WS-C (RC32300) processor (revision C0) with 21039K bytes of memory starting... Base ethernet MAC Address: C88D Xmodem file system is available. Initializing Flash... flashfs[0]: 1 files, 0 directories flashfs[0]: 0 orphaned files, 0 orphaned directories flashfs[0]: Total bytes: flashfs[0]: Bytes used: flashfs[0]: Bytes available: flashfs[0]: flashfs fsck took 1 seconds....done Initializing Flash. Boot Sector Filesystem (bs:) installed, fsid: 3 Parameter Block Filesystem (pb:) installed, fsid: 4 Loading "flash:/c2950-i6q4l2-mz ea4.bin"... ########################################################################## [OK] Restricted Rights Legend Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c) of the Commercial Computer Software - Restricted Rights clause at FAR sec and subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS sec

111 第二部分 交换机实验 cisco Systems, Inc. 170 West Tasman Drive San Jose, California Cisco Internetwork Operating System Software IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA4, RELEASE SOFTWARE(fc1) Copyright (c) by cisco Systems, Inc. Compiled Wed 18-May-05 22:31 by jharirba Cisco WS-C (RC32300) processor (revision C0) with 21039K bytes of memory. Processor board ID FHK0610Z0WC Running Standard Image 24 FastEthernet/IEEE interface(s) 63488K bytes of flash-simulated non-volatile configuration memory. Base ethernet MAC Address: C88D Motherboard assembly number: Power supply part number: Motherboard serial number: FOC061004SZ Power supply serial number: DAB D Model revision number: C0 Motherboard revision number: A0 Model number: WS-C System serial number: FHK0610Z0WC Cisco Internetwork Operating System Software IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA4, RELEASE SOFTWARE(fc1) Copyright (c) by cisco Systems, Inc. Compiled Wed 18-May-05 22:31 by jharirba Press RETURN to get started! ( 六 )show version Switch#show version Cisco Internetwork Operating System Software IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA4, RELEASE SOFTWARE(fc1) Copyright (c) by cisco Systems, Inc. Compiled Wed 18-May-05 22:31 by jharirba 107

112 第二部分 交换机实验 Image text-base: 0x , data-base: 0x ROM: Bootstrap program is is C2950 boot loader Switch uptime is 3 minutes, 14 seconds System returned to ROM by power-on Cisco WS-C (RC32300) processor (revision C0) with 21039K bytes of memory. Processor board ID FHK0610Z0WC Last reset from system-reset Running Standard Image 24 FastEthernet/IEEE interface(s) 63488K bytes of flash-simulated non-volatile configuration memory. Base ethernet MAC Address: C88D Motherboard assembly number: Power supply part number: Motherboard serial number: FOC061004SZ Power supply serial number: DAB D Model revision number: C0 Motherboard revision number: A0 Model number: WS-C System serial number: FHK0610Z0WC Configuration register is 0xF 108

113 第二部分 交换机实验 实验 2-2. 交换机端口安全 一 实验目的 ( 一 ) 管理交换机的 MAC 表 ( 二 ) 配置交换机的端口安全功能二 实验拓扑 三 实验步骤 ( 一 ) 交换机上的 MAC 地址表 Router(config)#host R1 R1(config)#int f0/0 R1(config-if)#no shut R1(config-if)#ip addr Router(config)#host R2 R2(config)#int f0/0 R2(config-if)#no shut R2(config-if)#ip addr S1(config)#int vlan 1 S1(config-if)#ip addr S1(config-if)#no shut R1#show int f0/0 FastEthernet0/0 is up, line protocol is up (connected) Hardware is Lance, address is 00d0.ffe (bia 00d0.ffe2.1701) // 路由器 R1 的 f0/0 接口的 MAC 地址 Internet address is /24 MTU 1500 bytes, BW Kbit, DLY 100 usec, 109

114 第二部分 交换机实验 R2#show int f0/0 FastEthernet0/0 is up, line protocol is up (connected) Hardware is Lance, address is 0030.a3c (bia 0030.a3c7.4901) Internet address is /24 MTU 1500 bytes, BW Kbit, DLY 100 usec, S1#show mac-address-table Mac Address Table Vlan Mac Address Type Ports a3c DYNAMIC Fa0/2 // 路由器 R2 的 MAC 地址 1 00d0.ffe DYNAMIC Fa0/1 // 路由器 R1 的 MAC 地址 ( 二 ) 配置交换机端口安全之静态安全 MAC 地址 S1(config)#int f0/1 S1(config-if)#shutdown S1(config-if)#switchport mode access // 把端口改换为访问模式 S1(config-if)#switchport port-security // 打开交换机的端口安全功能 S1(config-if)#switchport port-security maximum 1 S1(config-if)#switchport port-security violation? protect Security violation protect mode // 当新的计算机接入时, 如果该接口的 MAC 条目超过最大数量, 则这个新的计算机将无法 接入, 而原有的计算机不受影响, 交换机不发送警告信息 restrict Security violation restrict mode // 当新的计算机接入时, 如果该接口的 MAC 条目超过最大数量, 则这个新的计算机将无法 接入, 并且交换机将发送警告信息 shutdown Security violation shutdown mode // 当新的计算机接入时, 如果该接口的 MAC 条目超过最大数量, 则该接口将会被关闭, 这个新的计算机和原有的计算机都无法接入, 需要管理员使用 no shutdown 重新打开 S1(config-if)#switchport port-security violation shutdown S1(config-if)#switchport port-security mac-address 00d0.ffe // 允许路由器 R1 从 f0/1 接口接入 S1(config-if)#no shut S1(config-if)#end S1#sho mac-address-table Mac Address Table

115 第二部分 交换机实验 Vlan Mac Address Type Ports a3c DYNAMIC Fa0/2 1 00d0.ffe STATIC Fa0/1 ( 三 ) 模拟非法接入 R1(config)#int f0/0 R1(config-if)#shutdown R1(config-if)#mac-address R1(config-if)#no shut S1#show interface f0/1 FastEthernet0/1 is down, line protocol is down (err-disabled) Hardware is Lance, address is 00e0.f90b.2201 (bia 00e0.f90b.2201) BW Kbit, DLY 1000 usec, reliability 255/255, txload 1/255, rxload 1/255 ( 四 ) 配置交换机端口安全之动态安全 MAC 地址 S1(config)#int f0/1 S1(config-if)#shutdown S1(config-if)#switchport mode access S1(config-if)#switchport port-security S1(config-if)#switchport port-security maximum 1 S1(config-if)#switchport port-security violation shutdown 111

116 第二部分 交换机实验 实验 2-3. 划分 VLAN 一 实验目的 ( 一 )VLAN 的创建 ( 二 ) 把交换机接口划分到特定 VLAN 二 实验拓扑 三 实验步骤 ( 一 ) 路由器基本配置, 使其之间能够相互通信 Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R1 R1(config)#int f0/0 R1(config-if)#ip addr R1(config-if)#no shut End with CNTL/Z. Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R2 R2(config)#int f0/0 R2(config-if)#ip addr R2(config-if)#no shut ( 二 ) 在交换机 S1 上创建 VLAN Switch>ena Switch#conf t End with CNTL/Z. 112

117 第二部分 交换机实验 Enter configuration commands, one per line. Switch(config)#vlan 2 Switch(config-vlan)#name VLAN2 Switch(config-vlan)#vlan 3 Switch(config-vlan)#name VLAN3 End with CNTL/Z. ( 三 ) 端口划分到 VLAN 中 Switch(config)#int f0/1 Switch(config-if)#switchport mode access // 把交换机端口的模式改为 access 模式 Switch(config-if)#switchport access vlan 2 Switch(config-if)#int f0/2 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 3 四 实验调试 ( 一 )show vlan Switch#show vlan VLAN Name Status Ports default active Fa0/3, Fa0/4, Fa0/5, Fa0/6 Fa0/7, Fa0/8, Fa0/9, Fa0/10 Fa0/11, Fa0/12, Fa0/13, Fa0/14 Fa0/15, Fa0/16, Fa0/17, Fa0/18 Fa0/19, Fa0/20, Fa0/21, Fa0/22 Fa0/23, Fa0/24, Gig1/1, Gig1/2 2 VLAN2 active Fa0/1 3 VLAN3 active Fa0/ fddi-default act/unsup 1003 token-ring-default act/unsup 1004 fddinet-default act/unsup 1005 trnet-default act/unsup VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans enet enet enet fddi tr

118 第二部分 交换机实验 1004 fdnet ieee trnet ibm Remote SPAN VLANs Primary Secondary Type Ports ( 二 )show vlan brief Switch#show vlan brief VLAN Name Status Ports default active Fa0/3, Fa0/4, Fa0/5, Fa0/6 2 VLAN2 active Fa0/1 3 VLAN3 active Fa0/ fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active ( 三 )show interface f0/1 switchport Switch#show interface f0/1 switchport Name: Fa0/1 // 接口的名字 Switchport: Enabled Administrative Mode: static access Operational Mode: static access // 接口是交换接口 Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: native Negotiation of Trunking: Off Access Mode VLAN: 2 (VLAN2) // 接口属于 VLAN2 Trunking Native Mode VLAN: 1 (default) // 本征 VLAN 为 1 Fa0/7, Fa0/8, Fa0/9, Fa0/10 Fa0/11, Fa0/12, Fa0/13, Fa0/14 Fa0/15, Fa0/16, Fa0/17, Fa0/18 Fa0/19, Fa0/20, Fa0/21, Fa0/22 Fa0/23, Fa0/24, Gig1/1, Gig1/2 // 管理员已配置接口为 access 模式 Voice VLAN: none // 没有设置 Voice VLAN Administrative private-vlan host-association: none Administrative private-vlan mapping: none Administrative private-vlan trunk native VLAN: none Administrative private-vlan trunk encapsulation: dot1q 114

119 第二部分 交换机实验 Administrative private-vlan trunk normal VLANs: none Administrative private-vlan trunk private VLANs: none Operational private-vlan: none Trunking VLANs Enabled: ALL Pruning VLANs Enabled: Capture Mode Disabled Capture VLANs Allowed: ALL Protected: false Appliance trust: none ( 四 )VLAN 间的通信 相互之间不能 ping 通 115

120

121 第二部分 交换机实验 实验 2-4.Trunk 配置 一 实验目的 ( 一 ) 配置交换机接口的 Trunk ( 二 )Native VLAN 的含义和配置 二 实验拓扑 三 实验步骤 路由器自配 ( 一 ) 在 S1 和 S2 上创建 VLAN, 并把接口划分到相应的 VLAN 中 Switch>ena Switch#conf t Enter configuration commands, one per line. Switch(config)#host S1 S1(config)#vlan 2 S1(config-vlan)#name VLAN2 S1(config-vlan)#vlan 3 S1(config-vlan)#name VLAN3 S1(config-vlan)#int f0/1 S1(config-if)#switchport mode access S1(config-if)#switchport access vlan 2 S1(config-if)#int f0/2 S1(config-if)#switchport mode access S1(config-if)#switchport access vlan 3 End with CNTL/Z. Switch>ena Switch#conf t Enter configuration commands, one per line. Switch(config)#host S2 End with CNTL/Z. 117

122 第二部分 交换机实验 S2(config)#vlan 2 S2(config-vlan)#name VLAN2 S2(config-vlan)#vlan 3 S2(config-vlan)#name VLAN3 S2(config-vlan)#int f0/3 S2(config-if)#switchport mode access S2(config-if)#switchport access vlan 2 S2(config-if)#int f0/4 S2(config-if)#switchport mode access S2(config-if)#switchport access vlan 3 ( 二 ) 配置 Trunk S1(config)#int f0/13 S1(config-if)#switchport mode trunk // 把端口模式配置为 Trunk S2(config)#int f0/13 S2(config-if)#switchport mode trunk ( 三 ) 检查 Trunk 链路的状态, 测试跨交换机的同一 VLAN 主机间的通信路由器 R1 和路由器 R3 在同一个 VLAN, 所以路由器 R1 应该能 ping 通路由器 R3; 同样, 路 由器 R2 应该能 ping 通路由器 R4 R1#ping Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:!!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 62/83/93 ms R2#ping Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:!!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 78/87/94 ms S1#show int f0/13 switchport Name: Fa0/13 Switchport: Enabled Administrative Mode: trunk Operational Mode: trunk // 接口模式为 Trunk 模式 Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: dot1q Negotiation of Trunking: On Access Mode VLAN: 1 (default) // 封装 802.1q 协议 Trunking Native Mode VLAN: 1 (default) //Trunk 链路的本地 VLAN 为 1 Voice VLAN: none Administrative private-vlan host-association: none 118

123 第二部分 交换机实验 Administrative private-vlan mapping: none Administrative private-vlan trunk native VLAN: none Administrative private-vlan trunk encapsulation: dot1q Administrative private-vlan trunk normal VLANs: none Administrative private-vlan trunk private VLANs: none ( 四 ) 配置 Trunk allowed S1(config)#int f0/13 S1(config-if)#switchport trunk allowed vlan 2,200 // 配置交换机 S1 的 Trunk 链路只能通过 VLAN2 和 VLAN200 数据通过, 这样路由器 R1 可以 ping 通路由器 R3, 路由器 R2 不能 ping 通路由器 R4: R1#ping Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:!!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 78/90/94 ms R2#ping Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:... Success rate is 0 percent (0/5) ( 五 ) 配置 Native VLAN S1(config)#int f0/13 S1(config-if)#switchport trunk native vlan 2 // 配置 Native vlan 为 VLAN2, 默认为 VLAN1. S2(config)#int f0/13 S2(config-if)#switchport trunk native vlan 2 S1#show interface f0/13 switchport Name: Fa0/13 Switchport: Enabled Administrative Mode: trunk Operational Mode: trunk Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: dot1q Negotiation of Trunking: On Access Mode VLAN: 1 (default) Trunking Native Mode VLAN: 2 (VLAN2) //Trunk 链路的本地 VLAN 改为 2 Voice VLAN: none 119

124 第二部分 交换机实验 四 实验调试 在交换机上配置不同的 Native, 如下 : S1(config)#int f0/13 S1(config-if)#switchport trunk native vlan 2 S2(config)#int f0/13 S2(config-if)#switchport trunk native vlan 3 在两个交换机上每隔一分钟就会出现出错提示, 如下 : %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/13 (2), with S2 FastEthernet0/13 (3). %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/13 (3), with S1 FastEthernet0/13 (2). 交换机默认是运行 CDP 协议的, 每分钟发送一次数据包, 可以使用 no cdp run 关闭以上信息 R1#ping Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:!!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 62/87/94 ms 路由器 R1 和路由器 R4 是在不同 VLAN 上, 但竟然 ping 通了,ping 通的原因是 : 由于交换 机 S1 的 f0/13 接口的 Native VLAN 是 VLAN2, 来自 VLAN2 的数据原封不动地从 f0/13 接口发送出 去, 到达交换机 S2; 交换机 S2 的 F0/13 接口的 Native VLAN 是 VLAN3, 交换机 S2 收到了一个没有经过重新封装的数据帧后认为这个帧应该是 VLAN3 的数据帧, 发送给了路由器 R4; 从路由器 R4 返回到路由器 R1 的数据也是类似的 120

125 第二部分 交换机实验 实验 2-5.Voice VLAN 配置 一 实验目的 ( 一 ) Voice VLAN 的含义 ( 二 ) Voice VLAN 的配置二 实验拓扑 三 实验步骤 用路由器 R2 模拟 IP Phone, 可以发出 Voice VLAN 和 Data VLAN 的数据 ( 一 ) 在交换机上创建 VLAN, 并把接口划分到各自的 VLAN 中 Switch>ena Switch#conf t Enter configuration commands, one per line. Switch(config)#host S1 S1(config)#vlan 20 S1(config-vlan)#name Data-VLAN S1(config-vlan)#vlan 150 S1(config-vlan)#name Voice-VLAN S1(config-vlan)#int f0/1 S1(config-if)#switchport mode access S1(config-if)#switchport access vlan 150 S1(config-if)#int f0/3 S1(config-if)#switchport mode access S1(config-if)#switchport access vlan 20 S1(config-if)#int f0/2 S1(config-if)#switchport mode access S1(config-if)#switchport access vlan 20 End with CNTL/Z. ( 二 ) 路由器上配置 IP 地址 Router>ena 121

126 第二部分 交换机实验 Router#conf t Enter configuration commands, one per line. Router(config)#host R1 R1(config)#int f0/0 R1(config-if)#no shut R1(config-if)#ip addr End with CNTL/Z. Router(config)#host R3 R3(config)#int f0/0 R3(config-if)#ip addr R3(config-if)#no shut 以下用 R2 路由器模拟 IP Phone Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R2 R2(config)#int f0/0 R2(config-if)#no shut R2(config-if)#int f0/0.20 R2(config-subif)#encapsulation dot1q 20 native R2(config-subif)#ip addr R2(config-subif)#int f0/0.150 R2(config-subif)#encapsulation dot1q 150 R2(config-subif)#ip addr ( 三 ) 在交换机上配置 Voice VLAN S1(config)#int f0/2 S1(config-if)#switchport voice vlan 150 // 以上配置 f0/2 的 Voice VLAN 为 VLAN 150 ( 四 ) 保证 Voice VLAN 的流量优先 S1(config)#mls qos S1(config)#int f0/2 S1(config-if)#mls qos trust cos 四 实验调试 ( 一 )show vlan S1#show vlan End with CNTL/Z. VLAN Name Status Ports default active Fa0/4, Fa0/5, Fa0/6, Fa0/7 Fa0/8, Fa0/9, Fa0/10, Fa0/11 Fa0/12, Fa0/13, Fa0/14, Fa0/15 Fa0/16, Fa0/17, Fa0/18, Fa0/19 Fa0/20, Fa0/21, Fa0/22, Fa0/23 122

127 第二部分 交换机实验 Fa0/24, Gig1/1, Gig1/2 20 Data-VLAN active Fa0/2, Fa0/3 150 Voice-VLAN active Fa0/1 ( 二 )show int f0/2 switchport S1#show int f0/2 switchport Name: Fa0/2 Switchport: Enabled Administrative Mode: static access Operational Mode: static access Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: native Negotiation of Trunking: Off Access Mode VLAN: 20 (Data-VLAN) // 该接口属于 VLAN 20 Trunking Native Mode VLAN: 1 (default) Voice VLAN: 150 //Voice VLAN 为 VLAN 150 (3)ping 命令 R2#ping Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:.!!!! Success rate is 80 percent (4/5), round-trip min/avg/max = 47/58/63 ms 123

128

129 第二部分 交换机实验 实验 2-6. DTP 的配置 一 实验目的 ( 一 ) DTP 的协商规律 ( 二 ) 配置 DTP 二 实验拓扑 三 实验步骤 ( 一 ) 把交换机 S1 的 f0/13 接口的 Trunk 配置为 desirable, 把交换机 S2 的 f0/13 接口的 Trunk 配置为 auto 模式 Switch>ena Switch#conf t Enter configuration commands, one per line. Switch(config)#host S1 S1(config)#int f0/13 S1(config-if)#shutdown S1(config-if)#switchport mode dynamic desirable S1(config-if)#no shut End with CNTL/Z. Switch>ena Switch#conf t Enter configuration commands, one per line. Switch(config)#host S2 S2(config)#int f0/13 S2(config-if)#shutdown S2(config-if)#switchport mode dynamic auto S2(config-if)#no shut End with CNTL/Z. S1#show interfaces f0/13 switchport Name: Fa0/13 Switchport: Enabled Administrative Mode: dynamic desirable Operational Mode: trunk Administrative Trunking Encapsulation: dot1q 125

130 第二部分 交换机实验 Operational Trunking Encapsulation: dot1q Negotiation of Trunking: On Access Mode VLAN: 1 (default) Trunking Native Mode VLAN: 1 (default) Voice VLAN: none S2#show Name: Fa0/13 int f0/13 switchport Switchport: Enabled Administrative Mode: dynamic auto Operational Mode: trunk Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: dot1q Negotiation of Trunking: On Access Mode VLAN: 1 (default) Trunking Native Mode VLAN: 1 (default) Voice VLAN: none ( 二 ) 把交换机 S1 的 f0/13 接口的 Trunk 配置不变, 把交换机 S2 的 f0/13 接口的 Trunk 配置为 nonegotiate 模式 S2#show int f0/13 switchport Name: Fa0/13 Switchport: Enabled Administrative Mode: trunk Operational Mode: trunk Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: dot1q Negotiation of Trunking: Off Access Mode VLAN: 1 (default) Trunking Native Mode VLAN: 1 (default) Voice VLAN: none 126

131 第二部分 交换机实验 实验 2-7.EtherChannel 配置 一 实验目的 ( 一 )Etherchannel 的工作原理 ( 二 )Etherchannel 的配置二 实验拓扑 三 实验步骤 构成 Etherchannel 的端口必须具有相同的特性 配置 Etherchannel 有 手动配置和自动配置 (PAGP 或者 LAGP) 两种方法 ( 一 ) 手动配置 Etherchannel Switch>ena Switch#conf t Enter configuration commands, one per line. Switch(config)#host S1 S1(config)#int port-channel 1 End with CNTL/Z. // 创建以太通道, 要指定一个唯一的通道组号, 组号的范围是 1~6 的正整数 S1(config-if)#int range f0/13-14 S1(config-if-range)#channel-group 1 mode on S1(config-if-range)#switchport mode trunk S1(config-if-range)#exit S1(config)#port-channel load-balance dst-ip // 将物理接口指定到已创建的通道中 // 配置通道中的物理接口属性 // 配置 Etherchannel 的负载平衡方式 Switch>ena Switch#conf t Enter configuration commands, one per line. Switch(config)#host S2 S2(config)#int port-channel 2 S2(config-if)#int range f0/13-14 S2(config-if-range)#channel-group 2 mode on S2(config-if-range)#switchport mode trunk S2(config-if-range)#exit End with CNTL/Z. // 链路两端的 channel-group 编号可以不一样的 127

132 第二部分 交换机实验 S2(config)#port-channel load-balance dst-ip ( 二 ) 查看 Etherchannel 信息 S1#show etherchannel summary Flags: D - down P - in port-channel I - stand-alone s - suspended H - Hot-standby (LACP only) R - Layer3 U - in use S - Layer2 u - unsuitable for bundling w - waiting to be aggregated d - default port Number of channel-groups in use: 1 Number of aggregators: 1 f - failed to allocate aggregator Group Port-channel Protocol Ports Po1(SU) PAgP Fa0/13(P) Fa0/14(P) S1#show etherchannel load-balance EtherChannel Load-Balancing Operational State (dst-ip): Non-IP: Destination MAC address IPv4: Destination IP address IPv6: Destination IP address // 显示 Etherchannel 负载平衡方式,IPv4 和 IPv6 数据包均基于目的 IP 进行负载平衡, 而对于非 IP 包则基于目的 MAC 进行负载平衡 ( 三 ) 配置 PAGP 或者 LAGP S1(config-if-range)#channel-protocol? lacp Prepare interface for LACP protocol pagp Prepare interface for PAgP protocol S1(config-if-range)#channel-group 1 mode? active auto desirable on passive 四 实验调试 Enable LACP unconditionally Enable PAgP only if a PAgP device is detected Enable PAgP unconditionally Enable Etherchannel only Enable LACP only if a LACP device is detected ( 一 )show etherchannel summary 查看 Etherchannel 的简要信息 S1#show etherchannel summary Flags: D - down P - in port-channel I - stand-alone s - suspended H - Hot-standby (LACP only) R - Layer3 S - Layer2 128

133 第二部分 交换机实验 U - in use u - unsuitable for bundling w - waiting to be aggregated d - default port Number of channel-groups in use: 1 Number of aggregators: 1 f - failed to allocate aggregator Group Port-channel Protocol Ports Po1(SU) PAgP Fa0/13(P) Fa0/14(P) ( 二 )show etherchannel port-channel 查看指定的 Etherchannel 包含的接口 S1#show etherchannel port-channel Group: Channel-group listing: Port-channels in the group: Port-channel: Po Age of the Port-channel = 00d:00h:13m:22s Logical slot/port = 2/1 Number of ports = 2 GC = 0x HotStandBy port = null Port state = Port-channel // 端口的状态 Protocol = PAGP // 使用的协商协议 Port Security = Disabled Ports in the Port-channel: Index Load Port EC state No of bits Fa0/13 On Fa0/14 On 0 // 列出了该通道包含的接口 Time since last port bundled: 00d:00h:10m:18s Fa0/14 (3) 测试 Etherchannel 的冗余功能在交换机 S1 和交换机 S2 的 VLAN 接口上配置 IP 地址 S1(config)#int vlan 1 S1(config-if)#ip addr S1(config-if)#int f0/15 129

134 第二部分 交换机实验 S1(config-if)#shutdown S2(config)#int vlan 1 S2(config-if)#ip addr S2(config-if)#int f0/15 S2(config-if)#shutdown 130

135 第二部分 交换机实验 实验 2-8. VTP 配置 一 实验目的 ( 一 )VTP 三种模式的区别 ( 二 )VTP 的配置二 实验拓扑 三 实验步骤 ( 一 ) 配置交换机 S1 交换机 S2 交换机 S3 之间的链路 Trunk Switch(config)#host S1 S1(config)#int f0/15 S1(config-if)#switchport mode dynamic desirable Switch(config)#host S2 S2(config)#int f0/15 S2(config-if)#switchport mode dy de S3(config)#int f0/1 S3(config-if)#switchport mode dynamic desirable S3(config-if)#int f0/2 S3(config-if)#switchport mode dynamic des S3#show interfaces trunk Port Mode Encapsulation Status Native vlan Fa0/1 auto n-802.1q trunking 1 Fa0/2 auto n-802.1q trunking 1 ( 二 ) 检查默认的 VTP 情况 S1#show vtp status VTP Version : 2 // 该 VTP 支持版本 2 Configuration Revision : 0 // 默认修订号为 0 Maximum VLANs supported locally : 255 //VTP 支持的最大 VLAN 数 Number of existing VLANs : 5 // 当前交换机上有 5 个 VLAN 131

136 第二部分 交换机实验 VTP Operating Mode : Server // 当前交换机上 VTP 模式为 Server VTP Domain Name : // 当前 VTP 域名为空 VTP Pruning Mode : Disabled // 没有启用修剪功能 VTP V2 Mode : Disabled VTP Traps Generation : Disabled // 没有把 VTP 提示信息等发送到 SNMP 服务器 MD5 digest : 0x7D 0x5A 0xA6 0x0E 0x9A 0x72 0xA0 0x3A //MD5 值 Configuration last modified by at :00:00 //VTP 配置的修改者的 IP 地址和修改时间 Local updater ID is (no valid interface found) ( 三 ) 配置交换机 S1 为 VTP Server, 配置 VTP 域名, 创建 VLAN2 S1(config)#vtp mode? client server Set the device to client mode. Set the device to server mode. transparent Set the device to transparent mode. S1(config)#vtp mode server // 配置交换机 S1 为 VTP Server, 即默认值 Device mode already VTP SERVER. S1(config)#vtp domain VTP-TEST // 配置 VTP 域名 Changing VTP domain name from NULL to VTP-TEST S1(config)#do show vtp status VTP Version : 2 Configuration Revision : 0 Maximum VLANs supported locally : 255 Number of existing VLANs : 5 VTP Operating Mode VTP Domain Name VTP Pruning Mode VTP V2 Mode VTP Traps Generation : Server : VTP-TEST : Disabled : Disabled : Disabled MD5 digest : 0x0E 0x44 0x97 0xCD 0xDD 0x77 0x9E 0xA7 Configuration last modified by at :00:00 Local updater ID is (no valid interface found) S1(config)#vlan 2 S1(config-vlan)#name VLAN2-TEST S1(config-vlan)#end S1#show vlan VLAN Name Status Ports default active Fa0/1, Fa0/2, Fa0/3, Fa0/4 Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10, Fa0/11, Fa0/12 Fa0/13, Fa0/14, Fa0/16,Fa0/17 Fa0/18, Fa0/19, Fa0/20,Fa0/21 132

137 第二部分 交换机实验 Fa0/22, Fa0/23, Fa0/24,Gig1/1 Gig1/2 2 VLAN2-TEST active // 刚创建的 VLAN S1#show vtp status VTP Version : 2 Configuration Revision : 2 // 修订号发生变化 Maximum VLANs supported locally : 255 Number of existing VLANs : 6 //VLAN 数量变为了 6 个 VTP Operating Mode VTP Domain Name VTP Pruning Mode VTP V2 Mode VTP Traps Generation : Server : VTP-TEST : Disabled : Disabled : Disabled MD5 digest : 0x40 0xEE 0x0A 0x8B 0xC4 0xE4 0xE6 0xD5 Configuration last modified by at :18:17 Local updater ID is (no valid interface found) S3#show vtp status VTP Version : 2 Configuration Revision : 2 Maximum VLANs supported locally : 255 Number of existing VLANs : 6 VTP Operating Mode VTP Domain Name VTP Pruning Mode VTP V2 Mode VTP Traps Generation MD5 digest : Server : VTP-TEST : Disabled : Disabled : Disabled : 0x40 0xEE 0x0A 0x8B 0xC4 0xE4 0xE6 0xD5 Configuration last modified by at :18:17 Local updater ID is (no valid interface found) S2#show vtp status VTP Version : 2 Configuration Revision : 2 Maximum VLANs supported locally : 255 Number of existing VLANs : 6 VTP Operating Mode VTP Domain Name VTP Pruning Mode VTP V2 Mode VTP Traps Generation MD5 digest : Server : VTP-TEST : Disabled : Disabled : Disabled : 0x40 0xEE 0x0A 0x8B 0xC4 0xE4 0xE6 0xD5 Configuration last modified by at :18:17 Local updater ID is (no valid interface found) 133

138 第二部分 交换机实验 S2#show vlan VLAN Name Status Ports default active Fa0/1, Fa0/2, Fa0/3, Fa0/4 2 VLAN2-TEST active // 自动学习到了在交换机 S1 上创建的 VLAN ( 四 ) 配置交换机 S3 为 VTP Transparent S3>ena S3#vlan database S3(vlan)#vtp transparent Setting device to VTP TRANSPARENT mode. S3(vlan)#exit APPLY completed. Exiting... S3#show vtp status VTP Version : 2 Configuration Revision : 0 Maximum VLANs supported locally : 255 Number of existing VLANs : 6 VTP Operating Mode VTP Domain Name VTP Pruning Mode VTP V2 Mode VTP Traps Generation MD5 digest : Transparent : VTP-TEST : Disabled : Disabled : Disabled Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10, Fa0/11, Fa0/12 Fa0/13, Fa0/14, Fa0/16,Fa0/17 Fa0/18, Fa0/19, Fa0/20,Fa0/21 Fa0/22, Fa0/23, Fa0/24,Gig1/1 Gig1/2 : 0x38 0x47 0x3F 0x40 0xF8 0x7B 0x64 0x4A Configuration last modified by at :18:17 在交换机 S3 上创建 VLAN 3, 检查交换机 S1 和交换机 S2 上的 VLAN 信息 S3(config)#vlan 3 S3(config-vlan)#name TEST-VLAN3 S3(config-vlan)#do show vlan VLAN Name Status Ports default active Fa0/3, Fa0/4, Fa0/5, Fa0/6 Fa0/7, Fa0/8, Fa0/9, Fa0/10 Fa0/11, Fa0/12, Fa0/13,Fa0/14 134

139 第二部分 交换机实验 Fa0/15, Fa0/16, Fa0/17,Fa0/18 Fa0/19, Fa0/20, Fa0/21,Fa0/22 Fa0/23, Fa0/24, Gig1/1,Gig1/2 2 VLAN2-TEST active 3 TEST-VLAN3 active // 新创建的 VLAN3 S1#show vlan VLAN Name Status Ports default active Fa0/1, Fa0/2, Fa0/3, Fa0/4 2 VLAN2-TEST active 在交换机 S1 上没有学习到 VLAN3, 交换机 S2 上也是如此 Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10, Fa0/11, Fa0/12 Fa0/13, Fa0/14, Fa0/16,Fa0/17 Fa0/18, Fa0/19, Fa0/20,Fa0/21 Fa0/22, Fa0/23, Fa0/24,Gig1/1 Gig1/2 在交换机 S2 上创建 VLAN4, 检查交换机 S1 和交换机 S2 上的 VLAN 信息 S2(config)#vlan 4 S2(config-vlan)#name TEST-VLAN4 S2(config-vlan)#end S2#show vlan VLAN Name Status Ports default active Fa0/1, Fa0/2, Fa0/3, Fa0/4 2 VLAN2-TEST active Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10, Fa0/11, Fa0/12 Fa0/13, Fa0/14, Fa0/16,Fa0/17 Fa0/18, Fa0/19, Fa0/20,Fa0/21 Fa0/22, Fa0/23, Fa0/24,Gig1/1 Gig1/2 4 TEST-VLAN4 active // 新创建的 VLAN4 S1#show vlan VLAN Name Status Ports default active Fa0/1, Fa0/2, Fa0/3, Fa0/4 Fa0/5, Fa0/6, Fa0/7, Fa0/8 135

140 第二部分 交换机实验 Fa0/9, Fa0/10, Fa0/11, Fa0/12 Fa0/13, Fa0/14, Fa0/16,Fa0/17 Fa0/18, Fa0/19, Fa0/20,Fa0/21 Fa0/22, Fa0/23, Fa0/24,Gig1/1 Gig1/2 2 VLAN2-TEST active 4 TEST-VLAN4 active // 交换机 S1 自动学习到在交换机 S2 上新创建的 VLAN4 S3#show vlan VLAN Name Status Ports default active Fa0/3, Fa0/4, Fa0/5, Fa0/6 Fa0/7, Fa0/8, Fa0/9, Fa0/10 Fa0/11, Fa0/12, Fa0/13,Fa0/14 Fa0/15, Fa0/16, Fa0/17,Fa0/18 Fa0/19, Fa0/20, Fa0/21,Fa0/22 Fa0/23, Fa0/24, Gig1/1,Gig1/2 2 VLAN2-TEST active 3 TEST-VLAN3 active // 交换机 S3 并没有新创建的 VLAN4 // 以上表明在一个 VTP 域中可以有多个 VTP Server, 在任何一个 VTP Server 都可以创建和 修改 VLAN 信息, 并通告到其他交换机上 Transparent 交换机上会可以转发 VTP 通告, 但是并不 会根据 VTP 通告更新自己的 VLAN 信息. ( 五 ) 配置交换机 S2 和交换机 S3 为 VTP Client S3(config)#vtp mode client Setting device to VTP CLIENT mode. S2(config)#vtp mode client Setting device to VTP CLIENT mode. S2#show vtp status VTP Version : 2 Configuration Revision : 4 Maximum VLANs supported locally : 255 Number of existing VLANs : 7 VTP Operating Mode VTP Domain Name VTP Pruning Mode VTP V2 Mode VTP Traps Generation MD5 digest : Client : VTP-TEST : Disabled : Disabled : Disabled : 0x81 0x28 0x0E 0x07 0x45 0x9B 0x4B 0x3D Configuration last modified by at :40:16 136

141 第二部分 交换机实验 S2(config)#vlan 5 VTP VLAN configuration not allowed when device is in CLIENT mode. // 表明在 Client 模式交换机上不能创建和修改 VLAN 信息 在交换机 S1 上创建 VLAN6, 检查交换机 S2 和交换机 S3 上的 VLAN 信息 S1(config)#vlan 6 S1(config-vlan)#name TEST-VLAN6 S2#show vlan VLAN Name Status Ports default active Fa0/1, Fa0/2, Fa0/3, Fa0/4 2 VLAN2-TEST active 4 TEST-VLAN4 active Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10, Fa0/11, Fa0/12 Fa0/13, Fa0/14, Fa0/16,Fa0/17 Fa0/18, Fa0/19, Fa0/20,Fa0/21 Fa0/22, Fa0/23, Fa0/24,Gig1/1 Gig1/2 6 TEST-VLAN6 active // 自动学习到 VLAN6 S3#show vlan VLAN Name Status Ports default active Fa0/3, Fa0/4, Fa0/5, Fa0/6 2 VLAN2-TEST active 4 TEST-VLAN4 active 6 TEST-VLAN6 active 自己的 VLAN 信息 Fa0/7, Fa0/8, Fa0/9, Fa0/10 Fa0/11, Fa0/12, Fa0/13,Fa0/14 Fa0/15, Fa0/16, Fa0/17,Fa0/18 Fa0/19, Fa0/20, Fa0/21,Fa0/22 Fa0/23, Fa0/24, Gig1/1,Gig1/2 //Client 模式的交换机上不仅会可以转发 VTP 通告, 并且会根据 VTP 通告更新 ( 六 ) 配置 VTP 密码 S1(config)#vtp password cisco Setting device VLAN database password to cisco S2(config)#vtp password cisco S3(config)#vtp password cisco 137

142 第二部分 交换机实验 // 配置 VTP 的密码, 目的是为了安全, 防止不明身份的交换机加入到域中 S1#show vtp password VTP Password: cisco // 显示 VTP 的密码 ( 七 ) 配置 VTP 版本, 只能在 Server 上配置 S1(config)#vtp version? <1-2> Set the adminstrative domain VTP version number S1(config)#vtp version 2 S1#show vtp status VTP Version : 2 Configuration Revision : 7 Maximum VLANs supported locally : 255 Number of existing VLANs : 8 VTP Operating Mode VTP Domain Name VTP Pruning Mode VTP V2 Mode VTP Traps Generation MD5 digest : Server : VTP-TEST : Disabled : Enabled : Disabled : 0x2C 0xCB 0xA2 0xEE 0x97 0x51 0xE6 0x0A Configuration last modified by at :31:53 Local updater ID is (no valid interface found) S2#show vtp status VTP Version : 2 Configuration Revision : 7 Maximum VLANs supported locally : 255 Number of existing VLANs : 8 VTP Operating Mode VTP Domain Name VTP Pruning Mode VTP V2 Mode VTP Traps Generation MD5 digest : Client : VTP-TEST : Disabled : Enabled : Disabled : 0x2C 0xCB 0xA2 0xEE 0x97 0x51 0xE6 0x0A Configuration last modified by at :31:53 // 以上表明,VTP Version 2 只需要在任一 VTP Server 上启用, 其他交换机会自动启用该 功能 ( 八 )VTP 域名问题 相邻的交换机处于不同的 VTP 域中, 将导致交换机之间的链路 Trunk 协商失败 138

143 第二部分 交换机实验 实验 2-9. VLAN 信息覆盖 一 实验目的 ( 一 )VTP 通过修订号作用 ( 二 ) 网络中增添交换机的注意事项二 实验拓扑 三 实验步骤 VTP 通告中的修订号在 VLAN 信息的更新中有着重要的作用, 当交换机收到修订号高的通告后, 会更新自己的 VLAN 信息 ; 然而如果收到低修订号的通告, 将会用自身的 VLAN 信息去更新对方 ( 一 ) 配置交换机 S1 交换机 S2 交换机 S3 之间的链路 Trunk S1(config)#int f0/15 S1(config-if)#switchport mode dynamic desirable S3(config)#int f0/1 S3(config-if)#switchport mode dynamic desirable S3(config-if)#int f0/2 S3(config-if)#switchport mode dynamic desirable S2(config)#int f0/15 S2(config-if)#switchport mode dynamic desirable ( 二 ) 按图配置 VTP S1(config)#vtp mode server Device mode already VTP SERVER. S1(config)#vtp domain VTP-TEST Changing VTP domain name from NULL to VTP-TEST S2(config)#vtp mode server Device mode already VTP SERVER. S2(config)#vtp domain VTP-TEST Changing VTP domain name from NULL to VTP-TEST 139

144 第二部分 交换机实验 S3(config)#vtp mode server Device mode already VTP SERVER. S3(config)#vtp domain VTP-TEST Domain name already set to VTP-TEST. ( 三 )VTP 覆盖问题关闭交换机 S3 和交换机 S2 的链路, 在两交换机上各自修改 VLAN 信息 S3(config)#int f0/2 S3(config-if)#shutdown S3(config-if)#exit S3(config)#vlan 2 S3(config-vlan)#vlan 3 S3(config-vlan)#vlan 4 S3(config-vlan)#vlan 5 S3(config-vlan)#end // 切断和交换机 S2 连接的链路 S3#show vlan VLAN Name Status Ports default active Fa0/2, Fa0/3, Fa0/4, Fa0/5 2 VLAN0002 active 3 VLAN0003 active 4 VLAN0004 active 5 VLAN0005 active 1002 fddi-default act/unsup 1003 token-ring-default act/unsup 1004 fddinet-default act/unsup 1005 trnet-default act/unsup S3#show vtp status VTP Version : 2 Fa0/6, Fa0/7, Fa0/8, Fa0/9 Fa0/10, Fa0/11, Fa0/12,Fa0/13 Fa0/14, Fa0/15, Fa0/16,Fa0/17 Fa0/18, Fa0/19, Fa0/20,Fa0/21 Fa0/22, Fa0/23, Fa0/24,Gig1/1 Gig1/2 Configuration Revision : 4 //VTP 修订号为 4 Maximum VLANs supported locally : 255 Number of existing VLANs : 9 VTP Operating Mode VTP Domain Name VTP Pruning Mode VTP V2 Mode VTP Traps Generation MD5 digest : Server : VTP-TEST : Disabled : Disabled : Disabled : 0x74 0xA0 0x51 0x5D 0xC4 0x94 0x68 0x9D Configuration last modified by at :30:11 Local updater ID is (no valid interface found) 140

145 第二部分 交换机实验 S2(config)#vlan 2 S2(config-vlan)#exit S2(config)#no vlan 2 S2(config)#vlan 2 S2(config-vlan)#exit S2(config)#no vlan 2 S2(config)#vlan 2 S2(config-vlan)#exit S2(config)#no vlan 2 // 反复执行 S2(config)#exit S2#show vtp status VTP Version : 2 Configuration Revision : 6 // 确保它比交换机 S3 上的修订号高 Maximum VLANs supported locally : 255 Number of existing VLANs : 5 VTP Operating Mode VTP Domain Name VTP Pruning Mode VTP V2 Mode VTP Traps Generation MD5 digest : Server : VTP-TEST : Disabled : Disabled : Disabled : 0x01 0x3F 0xBF 0x4C 0x47 0x27 0x71 0x8B Configuration last modified by at :35:21 Local updater ID is (no valid interface found) 打开交换机 S3 和交换机 S2 的链路, 观察 VLAN 信息点覆盖 S3(config)#int f0/2 S3(config-if)#no shut S3(config-if)#end S3#show vtp status VTP Version : 2 Configuration Revision : 6 Maximum VLANs supported locally : 255 Number of existing VLANs : 5 VTP Operating Mode : Server VTP Domain Name VTP Pruning Mode VTP V2 Mode VTP Traps Generation MD5 digest : VTP-TEST : Disabled : Disabled : Disabled : 0x01 0x3F 0xBF 0x4C 0x47 0x27 0x71 0x8B Configuration last modified by at :35:21 Local updater ID is (no valid interface found) S3#show vlan VLAN Name Status Ports 141

146 第二部分 交换机实验 default active Fa0/3, Fa0/4, Fa0/5, Fa0/ fddi-default act/unsup 1003 token-ring-default act/unsup 1004 fddinet-default act/unsup 1005 trnet-default act/unsup // 所有的 VLAN 信息和交换机 S2 的信息同步了 Fa0/7, Fa0/8, Fa0/9, Fa0/10 Fa0/11, Fa0/12, Fa0/13,Fa0/14 Fa0/15, Fa0/16, Fa0/17,Fa0/18 Fa0/19, Fa0/20, Fa0/21,Fa0/22 Fa0/23, Fa0/24, Gig1/1,Gig1/2 142

147 第二部分 交换机实验 实验 STP PVST 配置 一 实验目的 ( 一 ) 理解 STP 的工作原理 ( 二 ) 掌握 STP 树的控制 ( 三 ) 利用 PVST 进行负载平衡二 实验拓扑 三 实验步骤 网络中配置两个不同的 VLAN, 不同 VLAN 的 STP 具有不同的根桥, 实现负载均衡 ( 一 ) 利用 VTP 创建 VLAN2, 链路之间配置 Trunk Switch(config)#host S1 S1(config)#int f0/13 S1(config-if)#switchport trunk encapsulation dot1q S1(config-if)#switchport mode trunk S1(config-if)#int f0/14 S1(config-if)#switchport trunk encapsulation dot1q S1(config-if)#switchport mode trunk S1(config-if)#shutdown // 先关闭该接口, 暂时不用该链路 S1(config-if)#int f0/15 S1(config-if)#switchport trunk encapsulation dot1q S1(config-if)#switchport mode trunk Switch(config)#host S2 S2(config)#int f0/13 S2(config-if)#switchport trunk encapsulation dot1q 143

148 第二部分 交换机实验 S2(config-if)#switchport mode t S2(config-if)#switchport mode trunk S2(config-if)#int f0/14 S2(config-if)#switchport trunk encapsulation dot1q S2(config-if)#switchport mode trunk S2(config-if)#shutdown S2(config-if)#int f0/15 S2(config-if)#switchport trunk encapsulation dot1q S2(config-if)#switchport mode trunk Switch(config)#host S3 S3(config)#int f0/1 S3(config-if)#switchport mode trunk S3(config-if)#int f0/2 S3(config-if)#switchport mode trunk //S3 交换机只支持 dot1q S1(config)#vtp domain VTP-TEST Changing VTP domain name from NULL to VTP-TEST S1(config)#vlan 2 ( 二 ) 检查默认的 STP 树 S2#show spanning-tree VLAN0001 Spanning tree enabled protocol ieee // 表明运行的 STP 协议是 IEEE 的 802.1d Root ID Priority Address CB8 // 根桥的 MAC 地址 Cost 19 // 从本交换机到达根桥的 cost 值 Port 13(FastEthernet0/13) // 根口 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec // 各个计数器的值 (Hello 时间 老化时间和转化时间 ) Bridge ID Priority (priority sys-id-ext 1) Address 000D.BD99.5B8C Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20 // 以上显示该交换机的桥 ID Interface Role Sts Cost Prio.Nbr Type Fa0/13 Root FWD P2p Fa0/15 Desg FWD P2p // Role 列是接口的角色,Desg 是指定口,Altn 是替换接口,Root 是根口 ;Sts 列是接口的 状态,FWD 表示在转发, BLK 表示阻塞,LIS 表示监听,LRN 表示在学习 ;Cost 列是接口的 cost 值 ;Prio.Nbr 列是接口的优先级,Type 列是接口的类型,P2P 是点对点类型,Shr 表示是共享类型 VLAN0002 Spanning tree enabled protocol ieee 144

149 第二部分 交换机实验 Root ID Priority Address CB8 Cost 19 Port 13(FastEthernet0/13) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority (priority sys-id-ext 2) Address 000D.BD99.5B8C Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20 Interface Role Sts Cost Prio.Nbr Type Fa0/13 Root FWD P2p Fa0/15 Desg FWD P2p S2#show spanning-tree vlan 1 VLAN0001 Spanning tree enabled protocol ieee Root ID Priority Address Cost 19 Port CB8 13(FastEthernet0/13) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority (priority sys-id-ext 1) Address 000D.BD99.5B8C Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20 Interface Role Sts Cost Prio.Nbr Type Fa0/13 Root FWD P2p // 该接口是根口 Fa0/15 Desg FWD P2p // 该接口是指定口 S1#show spanning-tree vlan 1 VLAN0001 Spanning tree enabled protocol ieee Root ID Priority Address This bridge is the root CB8 // 该交换机是根桥 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority (priority sys-id-ext 1) 145

150 第二部分 交换机实验 Address CB8 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20 Interface Role Sts Cost Prio.Nbr Type Fa0/15 Desg FWD P2p Fa0/13 Desg FWD P2p ( 三 ) 控制交换机 S2 为 VLAN1 的根桥 S2(config)#spanning-tree vlan 1 priority 4096 S2#show spanning-tree vlan 1 VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 4097 Address 000D.BD99.5B8C This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec // 交换机 S1 成为了 VLAN 1 的根桥了 Bridge ID Priority 4097 (priority 4096 sys-id-ext 1) Address 000D.BD99.5B8C Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20 Interface Role Sts Cost Prio.Nbr Type Fa0/13 Desg FWD P2p Fa0/15 Desg FWD P2p S1#show spanning-tree vlan 1 VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 4097 Address 000D.BD99.5B8C Cost 19 Port 13(FastEthernet0/13) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority (priority sys-id-ext 1) Address CB8 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20 Interface Role Sts Cost Prio.Nbr Type

151 Fa0/15 Fa0/13 第二部分 交换机实验 Desg FWD P2p Root FWD P2p S3#show spanning-tree vlan 1 VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 4097 Address Cost D.BD99.5B8C Port 2(FastEthernet0/2) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority (priority sys-id-ext 1) Address 00E0.8F Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20 Interface Role Sts Cost Prio.Nbr Type Fa0/2 Root FWD P2p Fa0/1 Altn BL K P2p ( 四 ) 配置 PVST, 对于 VLAN2, 交换机 S1 是根桥 S1(config)#spanning-tree vlan 2 priority 4096 S2(config)#spanning-tree vlan 2 root secondary S3#show spanning-tree vlan 1 略 Interface Role Sts Cost Prio.Nbr Type Fa0/2 Root FWD P2p Fa0/1 Altn BLK P2p S3#show spanning-tree vlan 2 略 Interface Role Sts Cost Prio.Nbr Type Fa0/2 Fa0/1 Altn BLK P2p Root FWD P2p ( 五 ) 启用交换机 S1 和交换机 S2 之间的 f0/14 链路 S1(config)#int f0/14 S1(config-if)#no shut S1(config-if)#switchport trunk encapsulation dot1q S1(config-if)#switchport mode trunk 147

152 第二部分 交换机实验 S2(config)#int f0/14 S2(config-if)#no shut S2(config-if)#switchport trunk encapsulation dot1q S2(config-if)#switchport mode trunk S2(config-if)#spanning-tree vlan 1 port-priority

153 第二部分 交换机实验 实验 2-11.RSTP 一 实验目的掌握 RSTP 的配置二 实验拓扑 ( 如上图 ) 三 实验步骤在上述实验的基础上继续本实验 配置 RSTP S1(config)#spanning-tree mode rapid-pvst S2(config)#spanning-tree mode rapid-pvst S3(config)#spanning-tree mode rapid-pvst RSTP 状态 S3#show spanning-tree vlan 1 VLAN0001 Spanning tree enabled protocol rstp Root ID Priority 4097 Address Cost 19 Port EE.6AC9 2(FastEthernet0/2) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority (priority sys-id-ext 1) Address 00E0.8F Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20 Interface Role Sts Cost Prio.Nbr Type Fa0/2 Root FWD P2p 配置链路类型 S1(config)#int rang f0/13-14 S1(config-if-range)#duplex full S1(config-if-range)#spanning-tree link-type point-to-point 149

154 第二部分 交换机实验 S2(config)#int rang f0/13-14 S2(config-if-range)#duplex full S2(config-if-range)#spanning-tree link-type point-to-point S1#show spanning-tree detail Port 14 (FastEthernet0/14) of VLAN0001 is root forwarding Port path cost 19, Port priority 128, Port Identifier Designated root has priority 128, address A35.0D0E Designated bridge has priority 4097, address 000D.BD99.5B8C Timers: message age 16, forward delay 0, hold 0 Number of transitions to forwarding state: 1 Link type is point-to-point S2#show spanning-tree summary Switch is in rapid-pvst mode Root bridge for: default Extended system ID Portfast Default is enabled is disabled PortFast BPDU Guard Default is disabled Portfast BPDU Filter Default is disabled Loopguard Default is disabled EtherChannel misconfig guard is disabled UplinkFast is disabled BackboneFast is disabled Configured Pathcost method used is short Name Blocking Listening Learning Forwarding STP Active VLAN VLAN vlans

155 第二部分 交换机实验 实验 STP 保护 一 实验目的 ( 一 ) 掌握 Root Guard 的使用 ( 二 ) 掌握 Bpdu Guard 的使用二 实验拓扑 三 实验步骤 ( 一 ) 配置交换机 S1 S2 和 S3 之间的 Trunk Switch(config)#host S1 S1(config)#int f0/13 S1(config-if)#switchport trunk encapsulation dot1q S1(config-if)#switchport mode trunk Switch(config)#host S2 S2(config)#int f0/13 S2(config-if)#switchport trunk encapsulation dot1q S2(config-if)#switchport mode trunk S2(config-if)#int f0/15 S2(config-if)#switchport trunk encapsulation dot1q S2(config-if)#switchport mode trunk Switch(config)#host S3 S3(config)#int f0/2 S3(config-if)#switchport trunk encapsulation dot1q S3(config-if)#switchport mode trunk ( 二 ) 配置交换机 S1 成为根桥 S1(config)#spanning-tree vlan 1 priority 8192 ( 三 )S2 的 f0/15 上配置 Guard Root 151

156 第二部分 交换机实验 S2(config)#int f0/15 S2(config-if)#spanning-tree guard root ( 四 ) 把交换机 S3 改为根交换机 S3(config)#spanning-tree vlan 1 priority 4096 S2#show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 8193 Address 0007.EC Cost 19 Port 13(FastEthernet0/13) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority (priority sys-id-ext 1) Address 00D0.BAE7.1AC9 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20 Interface Role Sts Cost Prio.Nbr Type Fa0/13 Root FWD P2p Fa0/15 Desg LSN P2p 152

157 第二部分 交换机实验 实验 单臂路由实现 VLAN 间路由 一 实验目的 ( 一 ) 路由器以太网接口上的子接口 ( 二 ) 单臂路由实现 VLAN 间路由的配置二 实验拓扑 三 实验步骤 ( 一 ) 在交换机 S1 上配置 VLAN Switch>ena Switch#conf t Enter configuration commands, one per line. Switch(config)#host S1 S1(config)#vlan 2 S1(config-vlan)#exit S1(config)#int f0/1 S1(config-if)#switchport mode access S1(config-if)#switchport access vlan 1 S1(config-if)#int f0/2 S1(config-if)#switchport mode access S1(config-if)#switchport access vlan 2 ( 二 ) 把交换机上的以太网接口配置成 Trunk 接口 S1(config)#int f0/3 S1(config-if)#switchport mode trunk End with CNTL/Z. ( 三 ) 在路由器 R1 的物理以太网接口下创建子接口, 并定义封装的 VLAN Router>ena Router#conf t 153

158 第二部分 交换机实验 Enter configuration commands, one per line. Router(config)#host R1 R1(config)#int f0/0 R1(config-if)#no shut R1(config-if)#int f0/0.1 R1(config-subif)#encapsulation dot1q 1 R1(config-subif)#ip addr R1(config-subif)#int f0/0.2 R1(config-subif)#encapsulation dot1q 2 R1(config-subif)#ip addr 四 实验调试 R1#show ip route C C /24 is subnetted, 2 subnets End with CNTL/Z is directly connected, FastEthernet0/ is directly connected, FastEthernet0/0.2 PC>ping Pinging with 32 bytes of data: Reply from : bytes=32 time=125ms TTL=127 Reply from : bytes=32 time=125ms TTL=127 Reply from : bytes=32 time=125ms TTL=127 Reply from : bytes=32 time=125ms TTL=

159 第二部分 交换机实验 实验 三层交换机实现 VLAN 间路由 一 实验目的 ( 一 ) 理解三层交换机的概念 ( 二 ) 配置三层交换 二 实验拓扑 三 实验步骤 ( 一 ) 在交换机 S1 上划分 VLAN Switch>ena Switch#conf t Enter configuration commands, one per line. Switch(config)#host S1 S1(config)#vlan 2 S1(config-vlan)#exit S1(config)#int f0/1 S1(config-if)#switchport mode access S1(config-if)#switchport access vlan 1 S1(config-if)#int f0/2 S1(config-if)#switchport mode access S1(config-if)#switchport access vlan 2 S1(config-if)#exit ( 二 ) 配置三层交换 S1(config)#ip routing S1(config)#int vlan 1 S1(config-if)#no shut // 开启交换机 S1 的路由功能 S1(config-if)#ip addr S1(config-if)#int vlan 2 End with CNTL/Z. 155

160 第二部分 交换机实验 S1(config-if)#no shut S1(config-if)#ip addr 四 实验调试 ( 一 ) 检查 IP 地址 S1#show ip interface brief Interface IP-Address OK? Method Status Protocol FastEthernet0/1 unassigned YES manual up up GigabitEthernet0/2 unassigned YES manual down down Vlan YES manual up up Vlan YES manual up up ( 二 ) 检查交换机 S1 的路由表 S1#show ip route C /24 is subnetted, 2 subnets is directly connected, Vlan1 C is directly connected, Vlan2 ( 三 ) 测试 VLAN 间的通信 Packet Tracer PC Command Line 1.0 PC>ping Pinging with 32 bytes of data: Request timed out. Reply from : bytes=32 time=47ms TTL=127 Reply from : bytes=32 time=62ms TTL=127 Reply from : bytes=32 time=63ms TTL=

161 第二部分 交换机实验 实验 2-15.HDLC 和 PPP 封装 一 实验目的 ( 一 ) 串行链路上的封装概念 ( 二 ) HDLC 封装 ( 三 ) PPP 封装二 实验拓扑 三 实验步骤 ( 一 ) 配置路由器 R1 R1(config)#int s0/0/0 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#encapsulation ppp ( 二 ) 配置路由器 R2 R2(config)#int s0/0/0 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#encapsulation ppp 四 实验调试 ( 一 )show interface s0/0/0 在执行串行接口封装 PPP 之前 R1#show interfaces s0/0/0 Serial0/0/0 is up, line protocol is up (connected) Hardware is HD64570 Internet address is /24 MTU 1500 bytes, BW 1544 Kbit, DLY usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation HDLC, loopback not set, keepalive set (10 sec) // 默认封装 HDLC 协议 157

162 第二部分 交换机实验 封装 PPP 之后 R1#show interface s0/0/0 Serial0/0/0 is up, line protocol is up (connected) Hardware is HD64570 Internet address is /24 MTU 1500 bytes, BW 1544 Kbit, DLY usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation PPP, loopback not set, keepalive set (10 sec) LCP Open Open: IPCP, CDPCP ( 二 )R2#debug ppp negotiation R2#debug ppp negotiation PPP protocol negotiation debugging is on 158

163 第二部分 交换机实验 实验 2-16.PAP 验证 一 实验目的 ( 一 ) PAP 验证配置 ( 二 )PAP 验证调试二 实验拓扑 三 实验步骤 本实验配置路由器 R1 被路由器 R2 验证, 即单向验证 ( 一 ) 配置路由器 R1 Router(config)#host R1 R1(config)#int s0/0/0 R1(config-if)#ip addr R1(config-if)#encapsulation ppp R1(config-if)#ppp pap sent-username R1 password cisco // 配置将要发送的在中心路由器上被验证的用户名和密码 R1(config-if)#no shut ( 二 ) 配置路由器 R2 Router#conf t Enter configuration commands, one per line. Router(config)#host R2 R2(config)#username R1 password cisco R2(config)#int s0/0/0 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#encapsulation ppp R2(config-if)#ppp authentication pap R2(config-if)#no shut 四 实验调试 R2#debug R2#debug ppp authentication ppp authentication End with CNTL/Z. // 建立本地验证数据库 // 配置 PPP 验证 PPP authentication debugging is on 159

164 第二部分 交换机实验 实验 2-17.CHAP 验证 一 实验目的 ( 一 )CHAP 验证配置 ( 二 )CHAP 验证调试二 实验拓扑 三 实验步骤 ( 一 ) 配置路由器 R1 Router(config)#host R1 R1(config)#username R2 password cisco R1(config)#int s0/0/0 R1(config-if)#ip addr R1(config-if)#encapsulation ppp R1(config-if)#ppp authentication chap R1(config-if)#no shut ( 二 ) 配置路由器 R2 Router(config)#host R2 R2(config)#username R1 password cisco R2(config)#int s0/0/0 R2(config-if)#ip addr R2(config-if)#encapsulation ppp R2(config-if)#ppp authentication chap R2(config-if)#clock rate R2(config-if)#no shut 四 实验调试 R1#debug ppp authentication R1#debug ppp authentication PPP authentication debugging is on 160

165 第二部分 交换机实验 实验 帧中继基本配置 一 实验目的 ( 一 ) 帧中继的基本配置 ( 二 ) 帧中继的动态映射 ( 三 ) 帧中继的静态映射 ( 四 ) 帧中继上 RIP 的配置 ( 五 ) 接口水平分割的开启与关闭 二 实验拓扑 三 实验步骤 ( 一 ) 配置路由器 R1 Router(config)#host R1 R1(config)#int s0/0/0 R1(config-if)#ip addr R1(config-if)#encapsulation frame-relay R1(config-if)#frame-relay? interface-dlci lmi-type map // 接口封装帧中继 Define a DLCI on an interface/subinterface Use CISCO-ANSI-CCITT type LMI Map a protocol address to a DLCI address R1(config-if)#frame-relay lmi-type? ansi cisco q933a 161

166 第二部分 R1(config-if)#frame-relay lmi-type cisco R1(config-if)#no shut R1(config)#router rip R1(config-router)#version 2 R1(config-router)#no auto-summary R1(config-router)#network ( 二 ) 配置路由器 R3 Router(config)#host R3 R3(config)#int s0/0/0 交换机实验 R3(config-if)#ip addr R3(config-if)#encapsulation frame-relay R3(config-if)#no shutdown R3(config-if)#exit R3(config)#router rip R3(config-router)#version 2 R3(config-router)#no auto-summary R3(config-router)#network ( 三 ) 配置路由器 R4 Router(config)#host R4 R4(config)#int s0/0/0 R4(config-if)#ip addr R4(config-if)#encapsulation frame-relay R4(config-if)#no shut R4(config-if)#router rip R4(config-router)#version 2 R4(config-router)#no au R4(config-router)#net 四 实验调试 ( 一 )show frame-relay map // 查看帧中继的映射 R1#show frame-relay map // 配置接口的 LMI 类型 Serial0/0/0 (up): ip dlci 103, dynamic, broadcast, CISCO, status defined, active Serial0/0/0 (up): ip dlci 104, dynamic, broadcast, CISCO, status defined, active R3#show frame-relay map Serial0/0/0 (up): ip dlci 301, dynamic, broadcast, CISCO, status defined, active Serial0/0/0 (up): ip dlci 304, dynamic, broadcast, CISCO, status defined, active R4#show frame-relay map Serial0/0/0 (up): ip dlci 401, dynamic, broadcast, CISCO, status defined, active Serial0/0/0 (up): ip dlci 403, dynamic, broadcast, CISCO, status 162

167 第二部分 交换机实验 defined, active ( 二 )sho frame-relay pvc R1#sho frame-relay pvc PVC Statistics for interface Serial0/0/0 (Frame Relay DTE) DLCI = 103, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0 input pkts output pkts in bytes out bytes dropped pkts 0 in FECN pkts 0 in BECN pkts 0 out FECN pkts 0 out BECN pkts 0 in DE pkts 0 out DE pkts 0 out bcast pkts out bcast bytes DLCI = 104, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0 input pkts output pkts in bytes out bytes dropped pkts 0 in FECN pkts 0 in BECN pkts 0 out FECN pkts 0 out BECN pkts 0 in DE pkts 0 out DE pkts 0 out bcast pkts out bcast bytes ( 三 )sho frame-relay lmi R1#sho frame-relay lmi LMI Statistics for interface Serial0/0/0 (Frame Relay DTE) LMI TYPE = CISCO // 接口 s0/0/0 帧中继的 DTE,LMI 类型为 CISCO Invalid Unnumbered info 0 Invalid Prot Disc 0 Invalid dummy Call Ref 0 Invalid Msg Type 0 Invalid Status Message 0 Invalid Lock Shift 0 Invalid Information ID 0 Invalid Report IE Len 0 Invalid Report Request 0 Invalid Keep IE Len 0 Num Status Enq. Sent 145 Num Status msgs Rcvd 144 Num Update Status Rcvd 0 Num Status Timeouts 16 ( 四 )show ip route R1#show ip route C R R C /16 is variably subnetted, 4 subnets, 2 masks /32 is directly connected, Loopback /32 [120/1] via , 00:00:02, Serial0/0/ /32 [120/1] via , 00:00:12, Serial0/0/ /24 is directly connected, Serial0/0/0 ( 五 ) 配置帧中继静态映射 Router(config)#host R1 R1(config)#int s0/0/0 163

168 第二部分 R1(config-if)#encapsulation frame-relay // 配置帧中继静态映射 交换机实验 R1(config-if)#frame-relay map ip broadcast R1(config-if)#frame-relay map ip broadcast R1(config-if)#frame-relay map ip broadcast // 配置到自己接口的 IP 地址的映射, 目的是允许 ping 路由器该接口的 IP 地址 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#int lo0 R1(config-if)#ip addr R1(config)#router rip R1(config-router)#version 2 R1(config-router)#no au R1(config-router)#ne Router(config)#host R3 R3(config)#int s0/0/0 R3(config-if)#encapsulation frame-relay R3(config-if)#frame-relay map ip broadcast R3(config-if)#frame-relay map ip broadcast R3(config-if)#frame-relay map ip broadcast R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#int lo0 R3(config-if)#ip addr R3(config)#router rip R3(config-router)#version 2 R3(config-router)#no au R3(config-router)#ne Router(config)#host R4 R4(config)#int s0/0/0 R4(config-if)#encapsulation frame-relay R4(config-if)#frame-relay map ip broadcast R4(config-if)#frame-relay map ip broadcast R4(config-if)#frame-relay map ip broadcast R4(config-if)#ip addr R4(config-if)#no shut R4(config-if)#int lo0 R4(config-if)#ip addr R4(config)#router rip R4(config-router)#version 2 R4(config-router)#network R4(config-router)#no au R1#show frame-relay map 164

169 active 第二部分 交换机实验 Serial0/0/0 (up): ip dlci 103, static, broadcast, CISCO, defined, Serial0/0/0 (up): ip dlci 104, static, broadcast, CISCO, status defined, active Serial0/0/0 (up): ip dlci 104, static, broadcast, CISCO, status defined, active R3#show frame-relay map Serial0/0/0 (up): ip dlci 301, static, broadcast, CISCO, status defined, active Serial0/0/0 (up): ip dlci 301, static, broadcast, CISCO, status defined, active Serial0/0/0 (up): ip dlci 301, static, broadcast, CISCO, status defined, active R1#show ip route rip /16 is variably subnetted, 4 subnets, 2 masks R /32 [120/1] via , 00:00:16, Serial0/0/0 R /32 [120/1] via , 00:00:05, Serial0/0/0 165

170 第二部分 交换机实验 实验 帧中继多点子接口配置 OSPF 一 实验目的 ( 一 ) 帧中继多点子接口的特征 ( 二 ) 帧中继多点子接口的配置 ( 三 ) NBMA 模式下 OSPF 的配置与测试 ( 四 ) NBMA 模式下的 DR 选举二 实验拓扑 三 实验步骤 ( 一 ) 配置和路由器 R1 Router(config)#host R1 R1(config)#int lo0 R1(config-if)#ip addr R1(config-if)#int s0/0/0 R1(config-if)#no ip address R1(config-if)#encapsulation frame-relay R1(config-if)#no shut R1(config-if)#exit // 物理接口下不要配置 IP 地址 // 接口封装帧中继 R1(config)#int s0/0/0.1 multipoint // 创建帧中继多点子接口 R1(config-subif)#ip addr

171 第二部分 交换机实验 R1(config-subif)#frame-relay map ip broadcast R1(config-subif)#frame-relay map ip broadcast R1(config-subif)#frame-relay map ip R1(config-subif)#exit R1(config)#router ospf 1 R1(config-router)#router-id R1(config-router)#network area 0 R1(config-router)#network area 0 ( 二 ) 配置路由器 R3 Router(config)#host R3 R3(config)#int lo0 R3(config-if)#ip addr R3(config-if)#int s0/0/0 R3(config-if)#no ip addr R3(config-if)#encapsulation frame-relay R3(config-if)#no shut R3(config-if)#exit R3(config)#int s0/0/0.1 mu R3(config-subif)#ip addr R3(config-subif)#ip ospf priority 0 // 配置端口优先级, 确保路由器 R1 成为 DR R3(config-subif)#frame-relay map ip broadcast R3(config-subif)#frame-relay map ip broadcast R3(config-subif)#frame-relay map ip R3(config-subif)#exit R3(config)#router ospf 1 R3(config-router)#router-id R3(config-router)#net area 0 R3(config-router)#net area 0 ( 三 ) 配置路由器 R4 Router(config)#host R4 R4(config)#int lo0 R4(config-if)#ip addr R4(config-if)#int s0/0/0 R4(config-if)#no ip addr R4(config-if)#encapsulation frame-relay R4(config-if)#no shut R4(config-if)#exit R4(config)#int s0/0/0.1 mu R4(config-subif)#ip addr R4(config-subif)#ip ospf priority 0 R4(config-subif)#frame-relay map ip broadcast R4(config-subif)#frame-relay map ip broadcast 167

172 第二部分 交换机实验 R4(config-subif)#frame-relay map ip R4(config-subif)#exit R4(config)#router ospf 1 R4(config-router)#router-id R4(config-router)#net area 0 R4(config-router)#net area 0 四 实验调试 ( 一 )show frame-relay map R1#show frame-relay map Serial0/0/0.1 (up): ip dlci 103, static, broadcast, CISCO, status defined, active Serial0/0/0.1 (up): ip dlci 104, static, broadcast, CISCO, status defined, active Serial0/0/0.1 (up): ip dlci 103, static, CISCO, status defined, active ( 二 )show ip ospf interface R1#show ip ospf interface s0/0/0.1 Serial0/0/0.1 is up, line protocol is up Internet address is /24, Area 0 Process ID 1, Router ID , Network Type MULTI-POINT, Cost: 64 Transmit Delay is 1 sec, State DR, Priority 1 Designated Router (ID) , Interface address No backup designated router on this network Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5 Hello due in 00:00:01 Index 2/2, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length is 1, maximum is 1 Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 0, Adjacent neighbor count is 0 Suppress hello for 0 neighbor(s) ( 不能建立邻居列表 ) 168

173 第二部分 交换机实验 实验 帧中继点到点子接口下配置 OSPF 一 实验目的 ( 一 ) 帧中继点到点子接口的特征 ( 二 ) 帧中继点到点子接口的配置 ( 三 ) 帧中继点到点子接口模式下 OSPF 的配置和调试二 实验拓扑 三 实验步骤 ( 一 ) 配置 DLCI 号点击 R2, 选择 配置 选项, 点击 S0 接口, 在 DLCI 输入 103, 名称输入 to R3, 其他类 似, 在点击帧中继, 选择对应的号就可以了 169

174 ( 二 ) 配置路由器 R1 Router(config)#host R1 R1(config)#int lo0 第二部分 R1(config-if)#ip addr R1(config-if)#int s0/0/0 R1(config-if)#no ip address R1(config-if)#encapsulation frame-relay R1(config)#int s0/0/0.13 point-to-point // 创建帧中继点到点子接口 R1(config-subif)#ip addr R1(config-subif)#frame-relay interface-dlci 103 R1(config-subif)#exit R1(config)#int s0/0/0.14 point-to-point R1(config-subif)#ip addr R1(config-subif)#frame-relay interface-dlci 104 R1(config-subif)#router ospf 1 R1(config-router)#router-id 交换机实验 R1(config-router)#network area 0 R1(config-router)#network area 0 R1(config-router)#network area 0 ( 三 ) 配置路由器 R3 Router(config)#host R3 R3(config)#int lo0 R3(config-if)#ip addr R3(config-if)#int s0/0/1 R3(config-if)#no ip add R3(config-if)#encapsulation frame-relay R3(config-if)#no shut R3(config)#int s0/0/1.13 point-to-point R3(config-subif)#ip addr R3(config-subif)#frame-relay interface-dlci 301 R3(config-subif)#exit R3(config)#router ospf 1 R3(config-router)#route R3(config-router)#router-id R3(config-router)#network area 0 R3(config-router)#network area 0 ( 四 ) 配置路由器 R4 Router(config)#host R4 R4(config)#int lo0 R4(config-if)#ip addr R4(config)#int s0/0/1 R4(config-if)#no ip add R4(config-if)#encapsulation frame-relay R4(config-if)#no shut R4(config-if)#exit 170

175 第二部分 交换机实验 R4(config)#int s0/0/1.14 point-to-point R4(config-subif)#ip addr R4(config-subif)#frame-relay interface-dlci 401 R4(config-subif)#exit R4(config)#router ospf 1 R4(config-router)#router-id R4(config-router)#network area 0 R4(config-router)#network area 0 四 实验调试 ( 一 )show frame-relay map R1#show frame-relay map Serial0/0/0.13 (up): point-to-point dlci, dlci 103, broadcast, status defined, active Serial0/0/0.14 (up): point-to-point dlci, dlci 104, broadcast, status defined, active R3#show frame-relay map Serial0/0/1.13 (up): point-to-point dlci, dlci 301, broadcast, status defined, active R4#show frame-relay map Serial0/0/1.14 (up): point-to-point dlci, dlci 401, broadcast, status defined, active // 输出表面路由器使用了点到点子接口, 每条映射条目只可看到该子接口下的 DLCI, 但没有对 端的 IP 地址 ( 二 )R1#show ip ospf interface R1#show ip ospf interface s0/0/0.13 Serial0/0/0.13 is up, line protocol is up Internet address is /24, Area 0 Process ID 1, Router ID , Network Type POINT-TO-POINT, Cost: 64 //OSPF 网络类型为点到点 Transmit Delay is 1 sec, State POINT-TO-POINT, Priority 0 No designated router on this network No backup designated router on this network Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 // 点到点模式下,Hello 周期为 10s. Hello due in 00:00:05 Index 2/2, flood queue length 0 略 ( 三 )show ip route R1#show ip route ospf O O /16 is variably subnetted, 5 subnets, 2 masks [110/65] via , 00:30:48, Serial0/0/ [110/65] via , 00:22:32, Serial0/0/0.14 R3#show ip route ospf /16 is variably subnetted, 5 subnets, 2 masks O [110/65] via , 00:32:37, Serial0/0/

176 第二部分 交换机实验 O O [110/129] via , 00:24:11, Serial0/0/ [110/128] via , 00:32:37, Serial0/0/1.13 R4#show ip route ospf O O O ( 四 ) /16 is variably subnetted, 5 subnets, 2 masks [110/65] via , 00:25:21, Serial0/0/ [110/129] via , 00:25:21, Serial0/0/ [110/128] via , 00:25:21, Serial0/0/1.14 R3#show ip ospf neighbor detail Neighbor , interface address In the area 0 via interface Serial0/0/1.13 Neighbor priority is 0, State is FULL, 6 state changes DR is BDR is // 点到点模式的 DR 和 BDR 事 Options is 0x00 Dead timer due in 00:00:36 Neighbor is up for 00:34:25 Index 1/1, retransmission queue length 0, number of retransmission 0 First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0) Last retransmission scan length is 0, maximum is 0 Last retransmission scan time is 0 msec, maximum is 0 msec 172

177 第二部分 交换机实验 实验 路由器的访问安全 一 实验目的 ( 一 ) 掌握路由器访问安全的配置 ( 二 ) 掌握用 SSH 协议访问路由器的配置二 实验拓扑 三 实验步骤 ( 一 ) 配置 IP 地址 Router(config)#host R1 R1(config)# R1(config)#int f0/0 R1(config-if)#no shut R1(config-if)#ip addr R1(config-if)#int s0/0/0 R1(config-if)#no shut R1(config-if)#ip addr Router(config)#host R2 R2(config)#int s0/0/0 R2(config-if)#no shut R2(config-if)#ip addr R2(config-if)#clock rate //PC 的网卡配置为 , 并测试和路由器 R1 的连通性 ( 二 ) 在路由器 R1 上配置密码和 login 安全等 R1(config)#enable secret cisco R1(config)#service password-encryption R1(config)#line console 0 R1(config-line)#password cisco // 配置 enable 密码 // 启用密码加密服务 173

178 第二部分 交换机实验 R1(config-line)#login R1(config-line)#line vty 0 4 R1(config-line)#password cisco R1(config-line)#login // 配置 Console 口密码 // 配置 Telnet 的密码和登录, 如果需要有不同用户有各自的密码, 采用如下配置 : R1(config)#aaa? authentication authorization new-model Authentication configurations parameters. Authorization configurations parameters. Enable NEW access control commands and functions.(disables OLD commands.) R1(config)#aaa new-model // 启用 AAA 功能 R1(config)#aaa authentication login aaa_local? enable group local none Use enable password for authentication. Use Server-group. Use local username authentication. NO authentication. R1(config)#aaa authentication login aaa_local local // 定义一个 login 的认证方法, 名为 aaa_local R1(config)#username user1 secret cisco R1(config)#username user2 secret R1(config)#security passwords min-length 5 R1(config)#line con 0 R1(config-line)#login authentication aaa_local // 配置从 console 口登录时要进行认证 R1(config-line)#exec-timeout? < > Timeout in minutes R1(config-line)#exec-timeout 5? < > Timeout in seconds <cr> R1(config-line)#exec-timeout 5 30 // 配置超时时间 R1(config)#access-list 5 permit R1(config)#line vty 0 4 R1(config-line)#acc R1(config-line)#access-class 5 in R1(config-line)#exec R1(config-line)#exec-timeout 5 30 R1(config-line)#login authentication aaa_local User Access Verification Username: // 配置密码的最小长度 为了防止黑客暴力破解密码, 可以对用户频繁登录进行限制 : R1(config)#login block-for 60 attempts 3 within 30 // 配置用户 30s 内连续登录失败 3 次后, 等待 60s 后, 才能再次登录 R1(config)#login on-failure log // 登录失败会在日志中记录 R1(config)#login on-success log // 登录成功会在日志中记录 R1#show login 174

179 第二部分 交换机实验 No login delay has been applied. No Quiet-Mode access list has been configured. All failed login is logged. All successful login is logged. Router enabled to watch for login Attacks. If more than 3 login failures occur in 30 seconds or less, logins will be disabled for 60 seconds. Router presently in Normal-Mode. Current Watch Window Time remaining: 16 seconds. Login failures for current window: 0. Total login failures: 0. 常常配置一些提示信息, 在用户登录时显示给用户 R1(config)#banner motd $ Enter TEXT message. End with the character '$'. without authorization,shall not be visited $ Banner motd 在路由器提示输入用户和密码前出现 Banner login 提示输入用户和密码前出现, 但是在 banner motd 之后, 该信息只在从 console 口登录时才出现 Banner exec 在进入 exec 模式之前提示的信息, 即用户通过了认证后 R1(config)#banner login # Enter TEXT message. End with the character '#'. LLLLLLLLLLLLLLL # ( 三 ) 配置 SSH R1(config)#clock timezone GMT 8 R1(config)#exit // 配置路由器的时区 R1#clock set 16:42:50 29 march 2010 // 配置路由器的时间 R1(config)#ip domain-name cisco.com R1(config)#crypto key generate rsa // 配置域名 The name for the keys will be: R1.cisco.com Choose the size of the key modulus in the range of 360 to 2048 for your General Purpose Keys. Choosing a key modulus greater than 512 may take a few minutes. How many bits in the modulus [512]: // 密钥的长度 % Generating 512 bit RSA keys, keys will be non-exportable...[ok] R1(config)#line vty 0 4 R1(config-line)#transport input? all All protocols none No protocols 175

180 第二部分 交换机实验 ssh TCP/IP SSH protocol telnet TCP/IP Telnet protocol R1(config-line)#transport input ssh // 只允许用户通过 SSH 远程登录到路由器 R2#ssh? -l Log in using this user name // 指明用户名 -v Specify SSH Protocol Version // 指明 SSH 版本 R2#ssh -l user Open Password: ( 密码 12345) R1> ( 四 ) 关闭不必要的服务 (no...) ( 五 )R1#auto secure 176

181 第二部分 交换机实验 实验 路由器日志 一 实验目的 ( 一 ) 掌握日志服务器软件的使用 ( 二 ) 掌握把路由器日志发送到服务器的配置 二 实验拓扑 三 实验步骤 R1(config)#logging? A.B.C.D buffered console host on trap 如上实验拓扑图 IP address of the logging host Set buffered logging parameters Set console logging parameters Set syslog server IP address and parameters Enable logging to all enabled destinations Set syslog server logging level userinfo Enable logging of user info on privileged mode enabling R1(config)#logging on // 打开路由器的日志功能 R1(config)#logging console R1(config)#logging buffered R1(config)#logging host // 把日志在控制台上显示出来 // 把日志记录在内存中 %SYS-6-LOGGINGHOST_STARTSTOP: Logging to host port 514 started - CLI initiated // 把日志发送到专门的日志服务器, 服务器地址为 R1(config)#logging trap debugging R1(config)#service? nagle password-encryption timestamps R1(config)#service timestamps? debug Timestamp debug messages Enable Nagle's congestion control algorithm Encrypt system passwords Timestamp debug/log messages log Timestamp log messages R1(config)#service timestamps log datetime msec R1#show logging Syslog logging: enabled (0 messages dropped, 0 messages rate-limited, 0 flushes, 0 overruns, xml disabled, filtering disabled) // 发送到 syslog 服务器上的日志情况 No Active Message Discriminator. 177

182 第二部分 No Inactive Message Discriminator. 交换机实验 Console logging: level debugging, 13 messages logged, xml disabled, filtering disabled // 发送到控制台的日志情况 Monitor logging: level debugging, 0 messages logged, xml disabled, filtering disabled // 发送到终端的日志情况 Buffer logging: filtering disabled // 发送到内存的日志情况 Logging Exception size (4096 bytes) level debugging, 0 messages logged, xml disabled, Count and timestamp logging messages: disabled Persistent logging: disabled No active filter modules. ESM: 0 messages dropped Trap logging: level debugging, 14 message lines logged Logging to (udp port 514, audit disabled, authentication disabled, encryption disabled, link up), 3 message lines logged, 0 message lines rate-limited, 0 message lines dropped-by-md, xml disabled, sequence number disabled filtering disabled Log Buffer (4096 bytes): 四 实验调试 178

183 第二部分 交换机实验 实验 标准 ACL 一 实验目的 ( 一 )ACL 工作方式和工作过程 ( 二 ) 定义标准 ACL ( 三 ) 应用标准 ACL ( 四 ) access-class 命令应用 ( 五 ) 定义命令标准 ACL 二 实验拓扑 三 实验步骤 要求 : 拒绝 PC2 所在网段访问 Server( ) 只允许 PC1 访问路由器 R1 路由器 R2 和路由器 R3 的 Telnet 服务 ( 一 ) 配置路由器 R1 Router(config)#host R1 R1(config)#int f0/0 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#int f0/1 R1(config-if)#ip addr R1(config-if)#no shut 179

184 R1(config-if)#int s0/0/0 第二部分 交换机实验 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#exit R1(config)#router eigrp 1 R1(config-router)#net R1(config-router)#net R1(config-router)#net R1(config-router)#no au R1(config-router)#exit R1(config)#access-list 2? deny permit remark Specify packets to reject Specify packets to forward Access list entry comment R1(config)#access-list 2 remark only host pc1 can telnet // 添加备注增加列表的可读性 R1(config)#access-list 2 permit host R1(config)#line vty 0 4 R1(config-line)#access-class 2 in R1(config-line)#password cisco R1(config-line)#login ( 二 ) 配置路由器 R2 Router(config)#host R2 R2(config)#int s0/0/0 // 在 VTY 下应用 ACL R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#int s0/0/1 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#exit R2(config)#router eigrp 1 R2(config-router)#net // 定义 ACL %DUAL-5-NBRCHANGE: IP-EIGRP 1: Neighbor (Serial0/0/0) is up: new adjacency R2(config-router)#net R2(config-router)#no au R2(config-router)#exit R2(config)#access-list 2 remark ony host pc1 can telnet R2(config)#access-list 2 permit host R2(config)#line vty 0 4 R2(config-line)#access-class 2 in R2(config-line)#password cisco R2(config-line)#login ( 三 ) 配置路由器 R3

185 第二部分 交换机实验 Router(config)#host R3 R3(config)#int f0/0 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#int s0/0/1 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#exit R3(config)#router eigrp 1 R3(config-router)#net R3(config-router)#net R3(config-router)#no au R3(config-router)#exit R3(config)#access-list 2 remark only host pc1 can telnet R3(config)#access-list 2 permit R3(config)#access-list 1 remark deny network from R1 R3(config)#access-list 1 deny R3(config)#access-list 1 permit any R3(config)#int s0/0/1 R3(config-if)#ip access-group 1 in R3(config-if)#line vty 0 4 R3(config-line)#access-class 2 in R3(config-line)#password cisco R3(config-line)#login 四 实验调试 ( 一 )Telnet 测试 // 接口下应用 ACL 只用 PC1 可以成功 Telnet 到各个路由器, 其他地址登录将不能成功, 显示信息如下 : % Connection refused by remote host ( 二 )Ping 和 tracerouter 测试在路由器 R1 上 ping 主机 R1#ping Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:!!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 78/88/94 ms R1#traceroute Type escape sequence to abort. Tracing the route to msec 15 msec 31 msec msec 63 msec 62 msec msec 94 msec 94 msec 通的原因是它是以路由器 s0/0/0 接口的地址 ( ) 发起的, 没有被 ACL 拒绝 使用扩展 ping 和扩展 tracerouter 命令 181

186 R1#ping Protocol [ip]: 第二部分 Target IP address: Repeat count [5]: Datagram size [100]: Timeout in seconds [2]: Extended commands [n]: y Source address or interface: Type of service [0]: Set DF bit in IP header? [no]: Validate reply data? [no]: Data pattern [0xABCD]: 交换机实验 Loose, Strict, Record, Timestamp, Verbose[none]: Sweep range of sizes [n]: Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds: Packet sent with a source address of Success rate is 0 percent (0/5) R1#traceroute Protocol [ip]: Target IP address: Source address: Numeric display [n]: Timeout in seconds [3]: Probe count [3]: Minimum Time to Live [1]: Maximum Time to Live [30]: Type escape sequence to abort. Tracing the route to msec 32 msec 31 msec 2 * * * 3 * * * 4 * * * 5 * * * ( 三 )show ip access-lists R3#show ip access-lists Standard IP access list 2 // 标准 IP ACL permit host (2 match(es)) Standard IP access list 1 deny (184 match(es)) permit any (406 match(es)) // 这么多数据包匹配的原因与 EIGRP 的 Hello 包有关 ( 四 )show ip interface 182

187 R3#show ip interface s0/0/1 第二部分 交换机实验 Serial0/0/1 is up, line protocol is up (connected) Internet address is /24 Broadcast address is Address determined by setup command MTU is 1500 Helper address is not set Directed broadcast forwarding is disabled Outgoing access list is not set Inbound access list is 1 Proxy ARP is enabled Security level is default ( 五 ) 配置命令标准 ACL R3(config)#ip access-list standard acl1 // 定义标准命令 ACL R3(config-std-nacl)#remark deny network from r1 R3(config-std-nacl)#deny R3(config-std-nacl)#permit any R3(config-std-nacl)#int s0/0/1 R3(config-if)#ip ac R3(config-if)#ip access-group acl1 in // 接口下应用命令 ACL 183

188 第二部分 交换机实验 实验 扩展 ACL 1433 一 实验目的 ( 一 ) 定义扩展 ACL ( 二 ) 应用扩展 ACL ( 三 ) 扩展 ACL 测试 ( 四 ) 定义命名扩展 ACL 二 实验拓扑 如上图实验 三 实验步骤 要求 : 拒绝 PC1 所在网段访问 Server 的 Web 服务 拒绝 PC2 所在网段访问 Server 的 Ftp 服务 拒绝 PC1 所在网段访问 Server 的 SQL 服务 拒绝 PC1 所在网段访问路由器 R3 的 Telnet 服务 拒绝 PC2 所在网段访问路由器 R2 的 Web 服务 拒绝 PC1 和 PC2 所在网段 ping Server 服务器 只允许路由器 R3 以接口 s0/0/1 为源 ping 路由器 R2 的接口 s0/0/1 地址, 而不允许路由器 R2 以接口 s0/0/1 为源 ping 路由器 R3 的接口 s0/0/1 地址, 即单向 ping. ( 一 ) 配置路由器 R1(config)#access-list 110 remark this is an example for extended acl // 添加备注, 增加可读性 R1(config)#access-list 110 deny tcp host eq 80 // 拒绝 PC1 所在网段访问 Server 的 Web 服务 R1(config)#access-list 110 deny tcp host eq 21 R1(config)#access-list 110 deny tcp host eq 20 // 拒绝 PC2 所在网段访问 Server 的 Ftp 服务 R1(config)#access-list 110 deny tcp host eq // 拒绝 PC1 所在网段访问 Server 的 SQL 服务 R1(config)#access-list 110 deny tcp host eq 23 R1(config)#access-list 110 deny tcp host eq 23 // 拒绝 PC1 所在网段访问路由器 R3 的 Telnet 服务 R1(config)#access-list 110 deny tcp host eq 80 R1(config)#access-list 110 deny tcp host eq 80 // 拒绝 PC2 所在网段访问路由器 R2 的 Web 服务 R1(config)#access-list 110 deny icmp host

189 第二部分 交换机实验 R1(config)#access-list 110 deny icmp host // 拒绝 PC1 和 PC2 所在网段 ping Server 服务器 R1(config)#access-list 110 permit ip any any R1(config)#int s0/0/0 R1(config-if)#i ac R1(config-if)#i acc R1(config-if)#ip ac R1(config-if)#ip access-group 110 out // 接口下应用 ACL ( 二 ) 配置路由器 R3 R3(config)#access-list 120 deny icmp host host echo R3(config)#access-list 120 permit ip any any R3(config)#int s0/0/1 R3(config-if)#ip access-group 120 in 四 实验调试 ( 一 ) 路由器 R1 上查看 ACL110 R1#show ip access-lists 110 Extended IP access list 110 deny tcp host eq www deny tcp host eq ftp deny tcp host eq 20 deny tcp host eq 1433 deny tcp host eq telnet deny tcp host eq telnet deny tcp host eq www deny tcp host eq www deny icmp host deny icmp host permit ip any any ( 二 ) 路由器 R3 和路由器 R2 互相 ping R3#ping Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:!!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 15/31/47 ms R2#ping Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:... Success rate is 0 percent (0/5) ( 三 ) 路由器 R3 查看 ACL

190 R3#show ip access-lists 120 Extended IP access list 120 第二部分 交换机实验 deny icmp host host echo (5 match(es)) permit ip any any (65 match(es)) ( 四 ) 配置命令扩展 ACL R3(config)#ip access-list extended acl120 R3(config-ext-nacl)#deny icmp host host echo R3(config-ext-nacl)#permit ip any any R3(config-ext-nacl)#int s0/0/1 R3(config-if)#ip access-group acl120 in R3#show ip access-lists Extended IP access list acl120 deny icmp host host echo (5 match(es)) permit ip any any (16 match(es)) 186

191 第二部分 交换机实验 实验 通过 ADSL 连接到 Internet( ( 使用 ADSL Modem) 一 实验目的 掌握在路由器上使用 ADSL Modem 连接到 Internet 的配置 二 实验拓扑 三 实验步骤 ( 一 )DSL Modem 配置和计算机的网卡配置 ( 二 )R1 的配置 187

192 Router(config)#host R1 R1(config)#int f0/0 第二部分 交换机实验 R1(config-if)#ip addr R1(config-if)#no shut R1(config)#int f0/1 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#exit R1(config)#ip dhcp pool feiniao0 R1(dhcp-config)#network R1(dhcp-config)#default-router R1(dhcp-config)#dns-server R1(dhcp-config)#exit R1(config)#ip dhcp pool feiniao1 R1(dhcp-config)#network R1(dhcp-config)#default-router R1(dhcp-config)#dns-server

193 第二部分 交换机实验 实验 2-26.GRE Tunnel 一 实验目的 ( 一 ) 理解 GRE Tunnel 的概念 ( 二 ) 掌握 GRE Tunnel 的配置二 实验拓扑 三 实验步骤 路由器 R2 和路由器 R3 模拟 Internet, 路由器 R1 的 f0/0 接口模拟为远程办公室所在的局 域网, 路由器 R4 模拟为企业总部所在的局域网 把远程办公室和企业总部进行连接 ( 一 )IP 地址和路由配置, 测试公网接口网络的连通性 Router(config)#host R1 R1(config)#int f0/0 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#int s0/0/0 R1(config-if)#ip addr R1(config-if)#no shut R1(config)#ip route s0/0/0 //R1 通常由默认路由指向 Internet Router(config)#host R2 R2(config)#int s0/0/0 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#int s0/0/1 R2(config-if)#ip addr R2(config-if)#clock rate

194 R2(config-if)#no shut R2(config-if)#exit 第二部分 交换机实验 R2(config)#ip route s0/0/1 Router(config)#host R3 R3(config)#int s0/0/1 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#int s0/0/0 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#exit R3(config)#ip route s0/0/1 //Internet 上不会有企业内部网络的路由 Router(config)#host R4 R4(config)#int f0/0 R4(config-if)#ip addr R4(config-if)#no shut R4(config-if)#int s0/0/0 R4(config-if)#ip addr R4(config-if)#clock rate R4(config-if)#no shut R4(config-if)#exit R4(config)#ip route s0/0/0 ( 二 ) 配置 GRE Tunnel R1(config)#int tunnel 0 // 创建 Tunnel 接口, 编号为 0 R1(config-if)#tunnel source s0/0/0 //Tunnel 的源接口, 路由器将以此接口的地址作为源地址重新封装 VPN 数据包 R1(config-if)#tunnel destination //Tunnel 的目的地址 R1(config-if)#ip addr // 创建隧道接口上的 IP 地址 R4(config)#int tunnel 0 R4(config-if)#tunnel source s0/0/0 R4(config-if)#tunnel destination R4(config-if)#ip addr R1#show interfaces tunnel 0 Tunnel0 is up, line protocol is up (connected) Hardware is Tunnel Internet address is /24 MTU bytes, BW 100 Kbit/sec, DLY usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation TUNNEL, loopback not set 190

195 第二部分 交换机实验 Keepalive not set Tunnel source (Serial0/0/0), destination Tunnel protocol/transport GRE/IP R4#show interfaces tunnel 0 Tunnel0 is up, line protocol is up (connected) Hardware is Tunnel Internet address is /24 MTU bytes, BW 100 Kbit/sec, DLY usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation TUNNEL, loopback not set Keepalive not set Tunnel source (Serial0/0/0), destination Tunnel protocol/transport GRE/IP R1#ping Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:!!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 93/96/109 ms ( 三 ) 配置路由协议 R1(config)#router rip R1(config-router)#version 2 R1(config-router)#network R4(config)#router rip R4(config-router)#version 2 R4(config-router)#network 四 实验调试 ( 一 ) 测试两地网络的通信 R1#show ip route /24 is subnetted, 3 subnets C R C is directly connected, FastEthernet0/ [120/1] via , 00:00:09, Tunnel is directly connected, Tunnel0 C /24 is directly connected, Serial0/0/0 S* /0 is directly connected, Serial0/0/0 扩展 ping 命令 R1#ping Protocol [ip]: Target IP address: Repeat count [5]: 191

196 Datagram size [100]: Timeout in seconds [2]: Extended commands [n]: y 第二部分 Source address or interface: Type of service [0]: Set DF bit in IP header? [no]: Validate reply data? [no]: Data pattern [0xABCD]: 交换机实验 Loose, Strict, Record, Timestamp, Verbose[none]: Sweep range of sizes [n]: Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds: Packet sent with a source address of !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 78/88/94 ms ( 二 )NAT 配置 企业内部网络和 Internet 仍无法通信, 需配置 NAT R1(config)#int s0/0/0 R1(config-if)#ip nat outside R1(config-if)#int f0/0 R1(config-if)#ip nat inside R1(config-if)#exit R1(config)#access-list 10 permit R1(config)#ip nat inside source list 10 int s0/0/0 overload R4(config)#int s0/0/0 R4(config-if)#ip nat outside R4(config-if)#int f0/0 R4(config-if)#ip nat inside R4(config-if)#exit R4(config)#access-list 10 permit R4(config)#ip nat inside source list 10 int s0/0/0 overload 从 PC1( ) 测试连通性 PC>ping Pinging with 32 bytes of data: Reply from : bytes=32 time=140ms TTL=126 Reply from : bytes=32 time=156ms TTL=126 Reply from : bytes=32 time=141ms TTL=126 Reply from : bytes=32 time=156ms TTL=126 Ping statistics for : Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 140ms, Maximum = 156ms, Average = 148ms 192

197 第二部分 交换机实验 实验 2-27.DHCP 配置 一 实验目的 ( 一 )DHCP 的工作原理和工作过程 ( 二 )DHCP 服务器的配置和测试 ( 三 )DHCP 中继配置 ( 四 )DHCP 客户端配置二 实验拓扑 三 实验步骤 路由器 R1 是 DHCP 服务器, 负责向 PC11 所在网段和 PC12 所在网段的主机动态分配 IP 地 址, 所以 R1 上需要定义两个地址池 ( 一 ) 配置路由器 R1 R1#show run Building configuration... Current configuration : 934 bytes! version 12.4 no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption! 193

198 hostname R1! 第二部分 交换机实验 interface FastEthernet0/0 ip address duplex auto speed auto interface Serial0/0/0 ip address ! router rip version 2 network no auto-summary! ip dhcp excluded-address ip dhcp excluded-address ! ip dhcp pool pool_1 network default-router dns-server ip dhcp pool pool_2 network ! default-router dns-server ( 二 ) 配置路由器 R2 R2#show run Building configuration... hostname R2! interface FastEthernet0/0 ip address ip helper-address duplex auto speed auto! interface Serial0/0/0 ip address clock rate ! router rip 194

199 version 2 network no auto-summary 第二部分 交换机实验 ( 三 ) 设置 windows 客户端 四 实验调试 R1#show ip dhcp binding IP address Client-ID/ Lease expiration Type Hardware address C Automatic C.038B -- Automatic F89.3C02 -- Automatic E Automatic D0.BC09.9DA3 -- Automatic A.415A.D Automatic R2#show ip interface FastEthernet0/0 is up, line protocol is up (connected) Internet address is /24 Broadcast address is Address determined by setup command MTU is 1500 Helper address is

200 第二部分 交换机实验 实验 静态 NAT 配置 一 实验目的 ( 一 ) 静态 NAT 的特征 ( 二 ) 静态 NAT 基本配置和调试二 实验拓扑 三 实验步骤 路由器 R1 为内网提供 NAT 服务的路由器, 外网运行 EIGRP 协议 ( 一 ) 配置路由器 R1 Router(config)#host R1 R1(config)#int f0/0 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#int s0/0/0 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#exit R1(config)#router eigrp 1 R1(config-router)#network R1(config-router)#network R1(config-router)#no au R1(config-router)#exit R1(config)#ip nat inside source static R1(config)#ip nat inside source static R1(config)#ip nat inside source static R1(config)#int f0/0 R1(config-if)#ip nat inside 196

201 R1(config-if)#int f0/0 R1(config-if)#ip nat outside ( 二 ) 配置路由器 R2 Router(config)#host R2 第二部分 交换机实验 R2(config)#int s0/0/0 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#int s0/0/1 R2(config-if)#ip addr R2(config-if)#clock rate R2(config-if)#no shut R2(config-if)#exit R2(config)#router eigrp 1 R2(config-router)#network R2(config-router)#network R2(config-router)#no au ( 三 ) 配置路由器 R3 Router(config)#host R3 R3(config)#int f0/0 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#int s0/0/1 R3(config-if)#ip addr R3(config-if)#no shut R3(config-if)#exit R3(config)#router eigrp 1 R3(config-router)#netwo R3(config-router)#netwo R3(config-router)#no au 四 实验调试 ( 一 )debug ip packet R1#debug ip packet ( 二 )show ip nat translations R1#show ip nat translations Pro Inside global Inside local Outside local Outside global

202 第二部分 交换机实验 实验 动态 NAT 配置 一 实验目的 ( 一 ) 动态 NAT 的特征 ( 二 ) 动态 NAT 的配置和调试 二 实验拓扑 上图实验拓扑 三 实验步骤 删除 PC1 和 PC2 主机的静态 NAT,Server 主机的静态 NAT 保留 R1(config)#no ip nat inside source static R1(config)#no ip nat inside source static R1(config)#ip nat pool d_nat netmask // 配置动态地址池 R1(config)#access-list 1 permit // 配置允许动态 NAT 的内部地址 R1(config)#ip nat inside source list 1 pool d_nat // 配置动态映射 将 NAT 地址与 ACL 绑定 R1(config)#int f0/0 R1(config-if)#ip nat inside R1(config-if)#int s0/0/0 R1(config-if)#ip nat outside 四 实验调试 清除 NAT 表, 在 PC1 和 PC2 上分别 ping 服务器 , 并且访问其 Web 服务 (1)show ip nat translations R1#clear ip nat translation * // 清除动态 NAT 表 R1#show ip nat translations Pro Inside global Inside local Outside local Outside global icmp : : : :36 icmp : : : :37 icmp : : : :38 icmp : : : :39 icmp : : : :5 icmp : : : :6 icmp : : : :7 icmp : : : :8 198

203 第二部分 交换机实验 tcp : : : :80 tcp : : : :80 (2)debug ip nat R1#debug ip nat IP NAT debugging is on R1# NAT: s= > , d= [23] NAT*: s= , d= > [59] NAT: s= > , d= [24] NAT*: s= , d= > [60] NAT: s= > , d= [25] NAT*: s= , d= > [61] NAT: s= > , d= [26] NAT*: s= , d= > [62] (3)show ip nat statistics R1#show ip nat statistics Total translations: 10 (1 static, 9 dynamic, 9 extended) // 活动转换条目的总数, 其中 1 条静态,9 条动态,9 条扩展 Outside Interfaces: Serial0/0/0 //NAT 外部接口 Inside Interfaces: FastEthernet0/0 //NAT 内部接口 Hits: 79 Misses: 64 // 共计转换 79 个数据包, 有 64 个转换失败 Expired translations: 32 // 超时的转换条目是 32 条 Dynamic mappings: // 动态映射情况 -- Inside Source access-list 1 pool d_nat refcount 9 pool d_nat: netmask start end type generic, total addresses 91, allocated 2 (2%), misses 0 199

204 第二部分 交换机实验 实验 2-30.NAT 过载配置 一 实验目的 ( 一 )NAT 过载的特征 ( 二 )overload 的使用 ( 三 )NAT 过载配置和测试 二 实验拓扑 上图实验拓扑 三 实验步骤 (1) 配置路由器 R1 保留实验 3 的配置, 在路由器上进心修改 R1(config)#ip nat inside source list 1 pool d_nat overload 四 实验调试 清除 NAT 表, 在 PC1 PC2 上分别 ping 服务器 , 并且访问 Web 服务 R1#clear ip nat translation * R1#show ip nat translations Pro Inside global Inside local Outside local Outside global icmp : : : :48 icmp : : : :49 icmp : : : :50 icmp : : : :51 icmp : : : :21 icmp : : : :22 icmp : : : :23 icmp : : : : tcp : : : :80 tcp : : : :80 R1#show ip nat statistics Total translations: 3 (1 static, 2 dynamic, 2 extended) Outside Interfaces: Serial0/0/0 Inside Interfaces: FastEthernet0/0 Hits: 101 Misses:

205 Expired translations: 48 Dynamic mappings: -- Inside Source 第二部分 access-list 1 pool d_nat refcount 2 pool d_nat: netmask start end 交换机实验 type generic, total addresses 91, allocated 1 (1%), misses 0 201

206

207 第三部分 无线网实验 第三部分 无线网实验 实验 3-1.WRT300N 无线路由器配置 一 实验目的 ( 一 )WRT300N 的基本配置 ( 二 )WRT300N 的无线配置二 实验拓扑 三 实验步骤 使用 Linksys WRT300N 进行实验 ( 一 ) 基本配置打开计算机浏览器输入 : 弹出密码输入提示页面 用户名 和 密码 默认的 admin, 单击 确定 按钮, 进入图示界面, 可以进行基本配置 203

208 第三部分 无线网实验 互联网连接类型 部分用于设置如何将路由器连接到 Internet Internet 连接类型主要有 : 1 DHCP 路由器 Internet 接口的 IP 地址自动获得 2 静态 IP 如果要使用永久性 IP 地址与 Internet 进行连接, 则选择此项, 并且还要填入 ISP 提供的 IP 地址, 网关和 DNS 等 3 PPPoE 如果使用 ADSL 上网, 则选择此项, 并填入 ISP 提供的用户名和密码 备选设置 部分用于设置路由器的名称等 : 1 主机名和域名 2 MTU 路由器 IP 地址 设置路由器 IP 地址以及子网掩码 "DHCP" 用于对路由器的动态主机配置协议服务器功能进行配置 1 DHCP 服务器 出厂时默认启用 2 开始 IP 地址 用于在发放 IP 地址时 DHCP 服务器的起始值 默认为 最大用户数 分配 IP 地址的最大电脑数量, 不能超过 253, 默认为 50 4 客户租用时间 允许配有动态 IP 地址的网络用户连接到路由器的时间 5 6 静态 DNS(1~3) 域名系统用于 Internet 将域名翻译成为 IP 地址 WINS 204

209 ( 二 ) 基本无线设置 第三部分 无线网实验 1 无线网络模式 : 可以选择在你的网络中运行的无线标准 2 无线网络名称 (SSID): 无线网络中所有设备共享的网络名称 区分大小写, 不得超过 32 个字符 3 4 无线信道 : 从提供的列表中选择合适的信道 无线 SSID 广播 ( 三 ) 无线安全 无线安全选项 :WPA 个人 WPA 企业 WPA2 个人 WPA2 企业 WEP 1 WAP 个人 : 提供 TKIP 和 AES 两种加密方法, 采用动态加密密钥 205

210 2 WPA 企业 第三部分 无线网实验 3 WEP ( 四 ) 无线 MAC 过滤 ( 五 ) 安全 防火墙 206

211 第三部分 无线网实验 ( 六 ) 访问限制 ( 七 ) 端口重定向 207

212 第三部分 无线网实验 ( 八 ) 管理控制 208

213 第三部分 无线网实验 实验 3-2.IPv6 静态路由配置 一 实验目的 ( 一 ) 启用 IPv6 路由 ( 二 ) 配置 IPv6 地址 ( 三 )IPv6 静态路由配置和调试 ( 四 )IPv6 默认静态路由配置和调试二 实验拓扑 三 实验步骤 ( 一 ) 配置路由器 R1 Router(config)#host R1 R1(config)#ipv6 unicast-routing R1(config)#int lo0 R1(config-if)#ipv6 addr 2010:1111::1/64 R1(config-if)#int lo1 R1(config-if)#ipv6 addr 2011:1111::1/64 R1(config-if)#int s0/0/0 R1(config-if)#ipv6 addr 2009:1212::1/64 R1(config-if)#no shut R1(config-if)#exit R1(config)#ipv6 route 2009:2323::/64 s0/0/0 R1(config)#ipv6 route 2012:3333::/64 s0/0/0 ( 二 ) 配置路由器 R2 Router(config)#host R2 R2(config)#ipv6 unicast-routing R2(config)#int s0/0/0 R2(config-if)#ipv6 addr 2009:1212::2/64 R2(config-if)#clock rate R2(config-if)#no shut 209

214 R2(config-if)#int s0/0/1 第三部分 R2(config-if)#ipv6 addr 2009:2323::2/64 R2(config-if)#clock rate R2(config-if)#no shut 无线网实验 R2(config-if)#exit R2(config)#ipv6 route 2010:1111::/64 s0/0/0 R2(config)#ipv6 route 2011:1111::/64 s0/0/0 R2(config)#ipv6 route 2012:3333::/64 s0/0/1 ( 三 ) 配置路由器 R3 Router(config)#host R3 R3(config)#ipv6 unicast-routing R3(config)#int lo0 R3(config-if)#ipv6 addr 2012:3333::3/64 R3(config-if)#int s0/0/1 R3(config-if)#ipv6 addr 2009:2323::3/64 R3(config-if)#no shut R3(config-if)#exit R3(config)#ipv6 route ::/0 s0/0/1 四 实验调试 ( 一 )show ipv6 interface R1#show ipv6 interface s0/0/0 Serial0/0/0 is up, line protocol is up // 配置 IPv6 默认静态路由 IPv6 is enabled, link-local address is FE80::201:63FF:FEA6:1201 // 本接口启用 IPv6, 本地链路地址自动配置 No Virtual link-local address(es): Global unicast address(es): 2009:1212::1, subnet is 2009:1212::/64 Joined group address(es): FF02::1 FF02::2 FF02::1:FF00:1 FF02::1:FFA6:1201 MTU is 1500 bytes ICMP error messages limited to one every 100 milliseconds ICMP redirects are enabled ICMP unreachables are sent ND DAD is enabled, number of DAD attempts: 1 ND reachable time is milliseconds Hosts use stateless autoconfig for addresses. ( 二 )show ipv6 route R1#show ipv6 route IPv6 Routing Table - 9 entries C 2009:1212::/64 [0/0] via ::, Serial0/0/0 L 2009:1212::1/128 [0/0] 210

215 via ::, Serial0/0/0 S 2009:2323::/64 [1/0] via ::, Serial0/0/0 C 2010:1111::/64 [0/0] via ::, Loopback0 L 2010:1111::1/128 [0/0] via ::, Loopback0 C 2011:1111::/64 [0/0] via ::, Loopback1 L 2011:1111::1/128 [0/0] via ::, Loopback1 S 2012:3333::/64 [1/0] via ::, Serial0/0/0 L FF00::/8 [0/0] via ::, Null0 第三部分 无线网实验 R3#show ipv6 route IPv6 Routing Table - 6 entries S ::/0 [1/0] via ::, Serial0/0/1 C 2009:2323::/64 [0/0] via ::, Serial0/0/1 L 2009:2323::3/128 [0/0] via ::, Serial0/0/1 C 2012:3333::/64 [0/0] via ::, Loopback0 L 2012:3333::3/128 [0/0] via ::, Loopback0 L FF00::/8 [0/0] via ::, Null0 (3) R1#ping 2012:3333::3 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2012:3333::3, timeout is 2 seconds:!!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 62/62/63 ms 211

216 第三部分 无线网实验 实验 3-3. IPv6 的 RIPng 配置 一 实验目的 二 实验拓扑 三 实验步骤 四 实验调试 212

217 第三部分 无线网实验 213

218

219 第四部分 扩张性实验 第四部分 扩展性实验 实验 4-1. Easy VPN 实验指南 实验要求 : 一台路由器做总部 VPN 网关, 一台路由模拟 Internet 网 ( 就是没私有 IP 路由的路由器 ), 一台路由路模拟能上 Internet 网的路由器 ( 也就是做了 NAT 上网 ) 外出移动办公的笔记本通过能上 Internet 网的路由器 Easy VPN 连接到总部, 并访问总部的 web 服务器 实验拓扑 : IP 地址规划如下 : 总部服务器 : /24 总部路由器 :fa 0/0: /24 fa0/1: /24 215

220 第四部分 扩张性实验 Internet 网路由器 :fa 0/1: /24 fa0/0: /24 远端路由器 :fa0/0: /24 fa0/1: /24 办公笔记本 : /24 实验配置 : 总部路由器 : Router(config)#host zongbu zongbu(config)#int f0/0 zongbu(config-if)#ip addr zongbu(config-if)#no shutdown zongbu(config-if)#int f0/1 zongbu(config-if)#ip addr zongbu(config-if)#no shut zongbu(config-if)#ip route Internet 路由器 : Router(config)#host Internet Internet(config)#int f0/0 Internet(config-if)#ip addr Internet(config-if)#no shut Internet(config-if)#int f0/1 Internet(config-if)#ip addr Internet(config-if)#no shut 远端路由器的配置 : Router(config)#host yuanduan yuanduan(config)#int f0/0 yuanduan(config-if)#ip addr yuanduan(config-if)#no shutdown yuanduan(config-if)#int f0/1 yuanduan(config-if)#ip addr yuanduan(config-if)#no shut yuanduan(config-if)#exit yuanduan(config)#access-list 1 permit yuanduan(config)#ip nat inside source list 1 interface f0/0 overload yuanduan(config)#int f0/0 yuanduan(config-if)#ip nat outside 216

221 第四部分扩张性实验 yuanduan(config-if)#int f0/1 yuanduan(config-if)#ip nat inside yuanduan(config-if)#exit yuanduan(config)#ip route 此时, 远端的笔记本能上网, 但不能访问总部内的 Web 服务器 现在在 zongbu 做 Easy VPN 的配置 其配置如下 : zongbu(config)#aaa new-model ( 开启 AAA 认证 ) zongbu(config)#aaa authentication login eza local ( 命名 eza, 对 eza 认证 ) zongbu(config)#aaa authorization network ezo local ( 命名 ezo, 对 ezo 的事件授权 ) zongbu(config)#username tang password 123( 创建用户名密码 ) zongbu(config)#crypto isakmp policy 10(IPSec 阶段一的安全参数配置 ) zongbu(config-isakmp)#hash md5 zongbu(config-isakmp)#authentication pre-share zongbu(config-isakmp)#group 2 zongbu(config-isakmp)#exit zongbu(config)#ip local pool ez (Easy VPN 接入后所分配的地址 ) zongbu(config)#crypto isakmp client configuration group myez (Easy VPN 的组和密码配置 ) zongbu(config-isakmp-group)#key 123 zongbu(config-isakmp-group)#pool ez zongbu(config-isakmp-group)#exit zongbu(config)#crypto ipsec transform-set tim esp-3des esp-md5-hmac (IPSec 阶段二的配置 ) zongbu(config)#crypto dynamic-map ezmap 10( 动态加密图 ) zongbu(config-crypto-map)#set transform-set tim zongbu(config-crypto-map)#reverse-route ( 反向路由注入 ) zongbu(config-crypto-map)#exit ( 以下是对 Easy VPN 的认证, 授权配置,list 是调用上面的 AAA 配置名 ) zongbu(config)#crypto map tim client authentication list eza zongbu(config)#crypto map tim isakmp authorization list ezo zongbu(config)#crypto map tim client configuration address respond zongbu(config)#crypto map tim 10 ipsec-isakmp dynamic ezmap ( 动态加密图必须有静态绑定 ) zongbu(config)#int f0/1 zongbu(config-if)#crypto map tim( 绑定到接口 ) Easy VPN 的测试 : 首先, 双击笔记本, 打开图, 选择 Desktop( 桌面 ), 再下面选择 command Pormpt( 命令提示符 ),ping 一下总部的公网地址 , 通了后再 ping 内部服务器 , 此时是 ping 不通的, 因为我们来没 Easy VPN 接入 217

222 第四部分 扩张性实验 其次, 我们依然选择 Desktop 下的 VPN, 依次输入如下信息 : GroupName:myez Group key:123 Host IP(server IP): Username:tang Password:123 点击 connect, 就会提示连接上去, 此时会显示下发的 IP 地址 ( 若没马上连上去, 在配置没错的前提下, Ipsec VPN 协商时, 前面几个包是不通的, 解决方法, 在 ping 一下 , 再连接 Easy VPN) 最后, 我们访问 web 服务器, 选择 Desktop 下的 Web Browser, 输入 IP: 即可访问到 web 服务器. 218

223 第四部分 扩张性实验 实验 4-2. 最真实的模拟 VPN 综合实验 实验拓扑 : 实验的 IP 规划 : PC0 PC1 :DHCP 获取笔记本 :laptop0 和 wuxian:dhcp 获取内部服务器 :Web /24 TFTP /24 ISP 服务器 :ISP DNS /24 ISP Web /24 总部 fa0/0: /24 fa0/1: /24 Internet 网 :fa0/1 : /24 fa 0/0: /24 E1/0: /24( 移动笔记本 wuxian 所获得公网地址段 ) E1/1: /24(ISP DNS 和 ISP Web 服务器的网关 ) 分部 :f0/0: /24 fa 0/1: /24 服务器 DNS 和 Web 的配置 : 双击服务器的图标, 选择桌面, 在选择 IP 配置设置 IP 地址 : 219

224 第四部分 扩张性实验 220

225 第四部分 扩张性实验 DNS 的配置 :(ISP 的 Web 服务器和总部的 Web 服务器做的 DNS 映射 ) 选择 ISP DNS 的 config, 在选择 DNS,name 是域名,address 是 IP 地址, 做好就 add 添加 实验配置 : Internet 网配置 : Router(config)#host Internet Internet(config)#line console 0 Internet(config-line)#logging synchronous Internet(config-line)#exec-timeout 0 0 Internet(config-line)#exit Internet(config)#no ip domain-lookup Internet(config)#int f0/1 Internet(config-if)#ip addr Internet(config-if)#no shut Internet(config-if)#int f0/0 Internet(config-if)#ip addr Internet(config-if)#no shut Internet(config-if)#int e1/1 Internet(config-if)#ip addr Internet(config-if)#no shut Internet(config-if)#int e1/0 Internet(config-if)#ip addr Internet(config-if)#no shut Internet(config-if)#exit 221

226 第四部分 扩张性实验 Internet(config)#ip dhcp excluded-address Internet(config)#ip dhcp pool wifi Internet(dhcp-config)#network Internet(dhcp-config)#default-router Internet(dhcp-config)#dns-server zongbu 配置 : Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host zongbu zongbu(config)#line console 0 zongbu(config-line)#logg sy zongbu(config-line)#exec-timeout 0 0 zongbu(config)#no ip domain-lookup zongbu(config)#int f0/1 zongbu(config-if)#ip addr zongbu(config-if)#no shut zongbu(config-if)#int f0/0 End with CNTL/Z. zongbu(config-if)#ip addr zongbu(config-if)#no shut zongbu(config-if)#exit zongbu(config)#ip route zongbu(config)#ip dhcp excluded-address zongbu(config)#ip dhcp pool zongbu zongbu(dhcp-config)#network zongbu(dhcp-config)#default-router zongbu(dhcp-config)#dns-server zongbu(dhcp-config)#exit zongbu(config)#access-list 100 deny ip zongbu(config)#access-list 100 permit ip any zongbu(config)#int f0/1 zongbu(config-if)#ip nat outside zongbu(config-if)#int f0/0 zongbu(config-if)#ip nat inside zongbu(config-if)#exit zongbu(config)#ip nat inside source list 100 int f0/1 overload zongbu(config)#ip nat inside source static tcp fenbu 配置 : Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host fenbu fenbu(config)#line console 0 End with CNTL/Z. 222

227 fenbu(config-line)#logg sy fenbu(config-line)#exec-time 0 0 fenbu(config-line)#exit fenbu(config)#no ip domain-l 第四部分 fenbu(config)#int f0/0 fenbu(config-if)#ip addr fenbu(config-if)#no shut fenbu(config-if)#ip nat outside fenbu(config-if)#int f0/1 扩张性实验 fenbu(config-if)#ip addr fenbu(config-if)#no shut fenbu(config-if)#ip nat inside fenbu(config-if)#exit fenbu(config)#ip route fenbu(config)#ip dhcp excluded-address fenbu(config)#ip dhcp pool fenbu fenbu(dhcp-config)#network fenbu(dhcp-config)#default-router fenbu(dhcp-config)#dns-server fenbu(dhcp-config)#exit fenbu(config)#access-list 100 deny ip fenbu(config)#access-list 100 permit ip any fenbu(config)#ip nat inside source list 100 int f0/0 overload 但由于 VPN 没有做, 外网和分部的 PC 是 Ping 不通内部的 PC 和服务器的 现在进行 VPN 配置 : 总部配置 : zongbu(config)#crypto isakmp policy 10 zongbu(config-isakmp)#encryption 3des zongbu(config-isakmp)#hash md5 zongbu(config-isakmp)#authentication pre-share zongbu(config-isakmp)#exit zongbu(config)#crypto isakmp key tom address zongbu(config)#crypto ipsec transform-set tom esp-3des esp-md5-hmac zongbu(config)#access-list 101 permit ip zongbu(config)#crypto map tom 11 ipsec-isakmp % NOTE: This new crypto map will remain disabled until a peer and a valid access list have been configured. zongbu(config-crypto-map)#set peer zongbu(config-crypto-map)#set transform-set tom zongbu(config-crypto-map)#match address 101 zongbu(config-crypto-map)#exit zongbu(config)#int f0/1 zongbu(config-if)#crypto map tom 223

228 *Jan 第四部分 扩张性实验 3 07:16:26.785: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is ON zongbu(config-if)#exit zongbu(config)#aaa new-model zongbu(config)#aaa authentication login eza local zongbu(config)#aaa authorization network ezo local zongbu(config)#username tang password 123 zongbu(config)#ip local pool ez zongbu(config)#crypto isakmp client configuration group myez zongbu(config-isakmp-group)#key 123 zongbu(config-isakmp-group)#pool ez zongbu(config-isakmp-group)#exit zongbu(config)#crypto dynamic-map ezmap 10 zongbu(config-crypto-map)#set transform-set tom zongbu(config-crypto-map)#reverse-route zongbu(config-crypto-map)#exit zongbu(config)#crypto map tom client authentication list eza zongbu(config)#crypto map tom isakmp authorization list ezo zongbu(config)#crypto map tom client configuration address respond zongbu(config)#crypto map tom 10 ipsec-isakmp dynamic ezmap (Easy VPN 是 IPSEC VPN 的两个阶段之间的 2.5 阶段, 固阶段一喝阶段二都可以条用一样的策略 ) 分部配置 : fenbu(config)#crypto isakmp policy 10 fenbu(config-isakmp)#encryption 3des fenbu(config-isakmp)#hash md5 fenbu(config-isakmp)#authentication pre-share fenbu(config-isakmp)#exit fenbu(config)#crypto isakmp key tom address fenbu(config)#crypto ipsec transform-set tom esp-3des esp-md5-hmac fenbu(config)#crypto map tom 10 ipsec-isakmp % NOTE: This new crypto map will remain disabled until a peer and a valid access list have been configured. fenbu(config-crypto-map)#set peer fenbu(config-crypto-map)#set transform-set tom fenbu(config-crypto-map)#match address 101 fenbu(config-crypto-map)#exit fenbu(config)#access-list 101 permit ip fenbu(config)#int f0/0 fenbu(config-if)#crypto map tom 测试 : Ipsec VPN 就是分部的 ping 总部的 PC, 来检测连通性, 当 VPN 都连通后, 就能 ping 通内部的 TFTP 服务器了! 224

229 第四部分 扩张性实验 实验 4-3. 交换机和路由器的维护实验 网络设备维护基本知识 : 备份和还原网络设备的操作系统, 备份和还原设备的配置文件, 网络设备密码遗忘了如何恢复, 对 telnet SSH Web 等管理设置密码及身份认证, 根据新增的需求配置网络设备. 实验拓扑 : IP 的规划 : PC0: /24 PC1: /24 TFTP: /24 交换机管理 IP: /24 路由器的配置 : Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#line console 0 Router(config-line)#logg sy Router(config-line)#exec-timeout 0 0 Router(config-line)#exit Router(config)#host R1 R1(config)#int f0/0 R1(config-if)#ip addr R1(config-if)#no shut End with CNTL/Z. 225

230 第四部分 扩张性实验 R1(config-if)#int f0/0.1 R1(config-subif)#encapsulation dot1q 2 R1(config-subif)#ip addr R1(config-subif)#no shut R1(config-subif)#int f0/0.3 R1(config-subif)#encapsulation dot1q 3 R1(config-subif)#ip addr R1(config-subif)#no shut 交换机配置 : Switch>ena Switch#conf t Enter configuration commands, one per line. Switch(config)#line console 0 Switch(config-line)#logg sy Switch(config-line)#exec-timeout 0 0 Switch(config-line)#exit Switch(config)#vlan 2 Switch(config-vlan)#name vlan2 Switch(config-vlan)#vlan 3 Switch(config-vlan)#name vlan3 Switch(config-vlan)#exit Switch(config)#int range f0/1-5 Switch(config-if-range)#switchport mode access Switch(config-if-range)#switchport access vlan 2 Switch(config-if-range)#spanning-tree portfast End with CNTL/Z. %Warning: portfast should only be enabled on ports connected to a single host. Connecting hubs, concentrators, switches, bridges, etc... to this interface when portfast is enabled, can cause temporary bridging loops. Use with CAUTION %Portfast will be configured in 5 interfaces due to the range command but will only have effect when the interfaces are in a non-trunking mode. Switch(config-if-range)#exit Switch(config)#int range f0/6-10 Switch(config-if-range)#switchport mode access Switch(config-if-range)#switchport access vlan 3 Switch(config-if-range)#spanning-tree portfast Switch(config-if-range)#exit Switch(config)#int f0/24 Switch(config-if)#switchport mode trunk Switch(config-if)#exit Switch(config)#int vlan 1 Switch(config-if)#ip addr Switch(config-if)#no shut 226

231 第四部分扩张性实验 Switch(config-if)#exit Switch(config)#ip default-gateway ( 不同网段要想能 ping 和访问必须为交换机配置网关 ) 登入 cisco 网络设备, 常用的是通过 console 口直接连接, 远程 telnet, 安全的远程 SSH, 以及 web 访问 一 密码访问登入 Console: R1(config)#line console 0 R1(config-line)#password xiaot R1(config-line)#login 当你配置上这些命令的时候, 你 console 口登入就会如下提示输入密码 Password: ( 密码隐藏 ) R1> Telnet: R1(config)#line vty 0 4 ( 这表示从 0-4, 有五个用户可以同时登入 ) R1(config-line)#password xiaot R1(config-line)#login R1(config-line)#exit R1(config)#enable password 123( 此密码必须配置, 不然你就只能停留在用户模式 ) 测试在 PC 的 CMD 中 telnet, 效果如下图 : 227

232 第四部分 扩张性实验 二 基于用户名密码认证 : Console: R1(config)#username xiaot password tang R1(config)#line con 0 R1(config-line)#login local 这是你从 console 登入, 将会看到如下的提示 : Username: xiaot Password: R1> Telnet: R1(config)#username xiaot password tang R1(config)#line vty 0 4 R1(config-line)#login local R1(config-line)#enab R1(config-line)#exit R1(config)#eanb R1(config)#enab R1(config)#enable pas R1(config)#enable password 123 测试的效果图如下 : 228

233 第四部分 扩张性实验 SSH 登入 : Router(config)#hostname R1 R1(config)#ip domain-name cisco.com ( 这两条语句很关键, 因为路由要以设备名称和这个域名为材料进行 RSA 算法, 产生一对公私密钥对, 客户机 SSH 登入时, 路由器会将公钥发给客户机, 客户机用公钥加密, 路由器用私钥解密 ) R1(config)#crypto key generate rsa The name for the keys will be: R1.cisco.com Choose the size of the key modulus in the range of 360 to 2048 for your General Purpose Keys. Choosing a key modulus greater than 512 may take a few minutes. How many bits in the modulus [512]: ( 产生密钥对的长度 ) % Generating 512 bit RSA keys, keys will be non-exportable...[ok] R1(config)#line vty 0 4 *?? 1 1:23:6.530: RSA key size needs to be at least 768 bits for ssh version 2 *?? 1 1:23:6.530: %SSH-5-ENABLED: SSH 1.5 has been enabled ( 当出现这个提示的 SSH 服务也随之开启了!) R1(config-line)#login loca R1(config-line)#transport input ssh R1(config-line)#en R1(config-line)#exit R1(config)#enable password 123 SSH 的测试结果如下 : PC>ssh -l xiaot Open Password: (tang) R1>ena Password: (123) 229

234 第四部分 扩张性实验 实验 4-4.SNMP 实验指南 实验拓扑 : IP 规划 : 路由器 :fa0/ /24 交换机管理地址 : VLAN /24 PC: /24 网络设备配置 : 路由器配置 : Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R1 R1(config)#int f0/0 R1(config-if)#ip addr R1(config-if)#no shut R1(config-if)#exit R1(config)#snmp-server community xiaoro RO End with CNTL/Z. %SNMP-5-WARMSTART: SNMP agent on host R1 is undergoing a warm start R1(config)#snmp-server community xiaorw RW ( 开启 SNMP,community 是一中简单的身份认证,ro 是只读文件, rw 是可读可写文件 ) 交换机配置 : Switch(config)#int vlan 1 Switch(config-if)#ip addr Switch(config-if)#no shut Switch(config-if)#exit 230

235 第四部分 扩张性实验 Switch(config)#snmp-server community xiaorw RW 操作 : 首先, 点进 PC, 选着 Destop 的中 MIB 231

236 第四部分 扩张性实验 上图就是 MIB 的窗口, 网络管理软件中的 MIB 跟上图左下角的 SNMP Tree 差不多,OID 就是 MIB 的信息节点精确路径,operations 就是对 MIB 的操作然后通过 SNMP 传递到网络设备上 首先, 选者 Advanced, 填入需要管理网络设备的 IP 地址, 填入设备上 community 值, 这是网络设备与网络管理设备身份认证 如图 : 这是路由器的管理 IP,read community 是 xiaoro,write community 是 xiaorw 我们通过查找 MIB 数据库中精确查找我们需要的信息节点路径, 在通过 Get 操作以 SNMP 数据到网络设备获取网络设备的信息 如下图, 在左下角的 MIB 中找到相应的节点路径 (OID: 或者 iso.org.dod.interface.mgmt.mib-2.system.sysdescr), 执行 Get 操作, 所获得到的路由器的系统信息描述信息, 包括了路由器的型号和 IOS 型号等 232

237 第四部分 扩张性实验 注意 : 在右下角的方框中显示了 read-only, 说明该信息是只读信息, 不能通过 SNMP 来配置网络设备 只有 write-read 就可配置 接下来, 演示通过 SNMP 来配置网络的 hostname. 同样, 我们上面一样先获取方法一样, 我们要找到 MIB 中 sysname 的位置, 点击 go, 先获取网络设备的 hostname, 效果如下图 : 我们看到他的值跟路由上命名是一样的 现在我们来修改一下网络设备的 hostname, 把 R1 改成 xiaotrouter 如图操作 : 将 operations 改为 set, 然后所要 OID 位置, 数据类型是字符串的 ( SNMP 在表示层用的 ASN.1 抽象语法表示,Value 就是我们要修改的值 xiaotrouter, 然后点击 OK, 再点击 GO 我们再路由器上看看, 在路由器的命令行中敲几个回车你就看到效果了 233

238 第四部分 扩张性实验 实验 4-5. 基于 AAA 的 Easy VPN 实验 所谓,AAA 就是认证 (Authentication), 授权 (Authorization ), 审计 ( Accounting) 这三个英文单词的缩写 AAA 的基本工作原理就是, 一个事件先必须通过认证才能接入进来 ; 然后根据相应的授权策略, 下发相应的权限 ; 审计则记录发生的每件事情 网络拓扑 : 网路配置 : AAA 服务器配置如下 : 双击服务器图标, 选择 Config, 在选择 AAA: 234

239 第四部分 扩张性实验 AAA 服务器配置简单说明 :Clientname 是随意的,Client IP 是你所要管理的路由器或交换机等网络设备的 IP 地址 Secret 是 AAA 服务器与管理的网络设备之间的密钥 ServiceType 是协议内型,Radius 是国际标准,Tacacs 是 cisco 专有协议 本实验使用的 Radius 配置用户名和密码如图所示, 点 + 添加 zongbu 路由的 AAA Easy VPN 配置 : Router>ena Router#conf t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#host zongbu zongbu(config)#int f0/1 zongbu(config-if)#ip addr zongbu(config-if)#no shut zongbu(config-if)#int f0/0 zongbu(config-if)#ip addr zongbu(config-if)#no shut zongbu(config-if)#exit zongbu(config)#ip route zongbu(config)#aaa new-model ( 使用 AAA 认证 ) zongbu(config)#aaa authentication login eza group radius 235

240 第四部分 扩张性实验 zongbu(config)#aaa authorization network ezo group radius zongbu(config)#radius-server host auth-port 1645 key 123 ( 指点 AAA 服务器的 IP 地址和密钥,1645 是 Radius 的默认端口号 ) zongbu(config)#crypto isakmp policy 10 zongbu(config-isakmp)#encryption 3des zongbu(config-isakmp)#hash md5 zongbu(config-isakmp)#authentication pre-share zongbu(config-isakmp)#group 2 zongbu(config-isakmp)#exit zongbu(config)#crypto ipsec transform-set tim esp-3des esp-md5-hmac zongbu(config)#ip local pool ez zongbu(config)#crypto isakmp client configuration group myez zongbu(config-isakmp-group)#key 123 zongbu(config-isakmp-group)#pool ez zongbu(config-isakmp-group)#exit zongbu(config)#crypto dynamic-map ezmap 10 zongbu(config-crypto-map)#set transform-set tim zongbu(config-crypto-map)#reverse-route zongbu(config-crypto-map)#exit zongbu(config)#crypto map tim client authentication list eza zongbu(config)#crypto map tim isakmp authorization list ezo zongbu(config)#crypto map tim client configuration address respond zongbu(config)#crypto map tim 10 ipsec-isakmp dynamic ezmap zongbu(config)#int f0/1 zongbu(config-if)#crypto map tim *Jan 3 07:16:26.785: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is ON Internet 配置 : Router>ena Router#conf t Router(config)#host Internet Internet(config)#int f0/0 Internet(config-if)#ip addr Internet(config-if)#no shut Internet(config-if)#int f0/1 Internet(config-if)#ip addr Internet(config-if)#no shut Yuancheng 配置 : Router>ena Router#conf t Router(config)#host yuancheng 236

241 测试 : 第四部分 扩张性实验 yuancheng(config)#int f0/0 yuancheng(config-if)#ip addr yuancheng(config-if)#no shut yuancheng(config-if)#ip nat yuancheng(config-if)#exit yuancheng(config)#int f0/1 yuancheng(config-if)#ip addr yuancheng(config-if)#no shut yuancheng(config-if)#exit yuancheng(config)#access-list 1 permit yuancheng(config)#ip nat inside source list 1 interface f0/0 overload yuancheng(config)#int f0/0 yuancheng(config-if)#ip nat outside yuancheng(config-if)#int f0/1 yuancheng(config-if)#ip nat inside yuancheng(config-if)#exit yuancheng(config)#ip route 在远端笔记本的 VPN 中输入如下信息 : 点击 connect, 就会提示连接上去, 此时会显示下发的 IP 地址 ( 若没马上连上去, 在配置没错的前提下,Ipsec VPN 协商时, 前面几个包是不通的, 解决方法, 在 ping 一下 , 再连接 Easy VPN) Easy VPN 接入后, 就可 ping 总部的任何地址了 这时可以查看笔记本的 ip 地址, 同时查看 zongbu 路由器的路由表 237

242

243 第四部分 扩张性实验 实验 4-6.GRE 实验 ( 一 ) GRE: 通用路由封装, 全称 Generic Routing Encapsulation, 也算是 VPN 技术的一种 它能快速 简单地跨越 Internet( 公网 ) 实现私网之间连通, 特别是在跨越公网组建大的网络 但 GRE 致命的缺点就是, 他是明文传输数据 所以在部署 GRE 的时候, 往往结合各种安全措施来保护数据, 如利用 Ipsec 对其数加密 网络拓扑 : IP 规划表 : Internet< >zongbu Internet /24 zongbu /24 Internet< >fenbu_2 Internet /24 fenbu_ /24 Internet< >fenbu_1 Internet /24 fenbu_ /24 Zongbu < >Server zongbu /24 server /24 239

244 第四部分扩张性实验 fenbu_2< >PC1 zongbu /24 PC /24 fenbu_1< >PC0 zongbu /24 PC /24 实验配置 : Zongbu 配置 : Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host zongbu zongbu(config)#no ip domain-lookup zongbu(config)#int f0/0 zongbu(config-if)#ip addr zongbu(config-if)#no shut zongbu(config-if)#int f0/1 End with CNTL/Z. zongbu(config-if)#ip addr zongbu(config-if)#no shut zongbu(config-if)#exit zongbu(config)#line console 0 zongbu(config-line)#logg sy zongbu(config-line)#exit zongbu(config)#ip route zongbu(config)#ip route ( 配置通过 GRE 到达 /24 的静态路由 ) zongbu(config)#ip route ( 配置通过 GRE 到达 /24 的静态路由 ) zongbu(config)#int tunnel 0( 创建 Tunnel 接口 0, 此接口在本实验中是与 fenbu_1 建立 GRE) zongbu(config-if)#ip addr ( 设置 Tunnel 0 的 IP, 此 IP 与 fenbu_1 同一网段 ) zongbu(config-if)#tunnel source f0/0 (GRE 封装时公网源 IP 为 fa 0/0 的 IP) zongbu(config-if)#tunnel destination (GRE 封装是公网目标 IP 为 的 IP) zongbu(config-if)#exit zongbu(config)#int tunnel 1( 创建 Tunnel 接口 1, 此接口在本实验中是与 fenbu_2 建立 GRE) zongbu(config-if)#ip addr ( 设置 Tunnel 1 的 IP, 此 IP 与 fenbu_2 同一网段 ) zongbu(config-if)#tunnel source f0/0 (GRE 封装时公网源 IP 为 fa 0/0 的 IP) zongbu(config-if)#tunnel destination (GRE 封装时公网目标 IP 为 的 IP) Internet 配置 : Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host Internet Internet(config)#int e1/0 End with CNTL/Z. 240

245 第四部分 扩张性实验 Internet(config-if)#ip addr Internet(config-if)#no shut Internet(config-if)#int e1/1 Internet(config-if)#ip addr Internet(config-if)#no shut Internet(config-if)#int e1/2 Internet(config-if)#ip addr Internet(config-if)#no shut Fenbu_1 配置 : Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host fenbu_1 fenbu_1(config)#no ip domain-lookup fenbu_1(config)#line console 0 fenbu_1(config-line)#exec-timeout 0 0 fenbu_1(config-line)#logg sy fenbu_1(config-line)#int f0/0 fenbu_1(config-if)#ip addr fenbu_1(config-if)#no shut End with CNTL/Z. fenbu_1(config-if)#int f0/1 fenbu_1(config-if)#ip addr fenbu_1(config-if)#no shut fenbu_1(config-if)#exit fenbu_1(config)#int tunnel 0 fenbu_1(config-if)#ip addr fenbu_1(config-if)#tunnel source f0/0 fenbu_1(config-if)#tunnel destination fenbu_1(config-if)#exit fenbu_1(config)#ip route fenbu_1(config)#ip route fenbu_1(config)#ip route Fenbu_2 配置 : Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#no ip domain-lookup Router(config)#int tunnel 0 Router(config-if)#ip addr Router(config-if)#tunnel source f0/0 Router(config-if)#tunnel destination Router(config-if)#int f0/0 End with CNTL/Z. 241

246 第四部分 扩张性实验 Router(config-if)#ip addr Router(config-if)#no shut Router(config-if)#int f0/1 Router(config-if)#ip addr Router(config-if)#no shut Router(config-if)#exit Router(config)#ip route Router(config)#ip route Router(config)#ip route zongbu#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - 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 - ODR P - periodic downloaded static route Gateway of last resort is to network C C C /24 is subnetted, 1 subnets is directly connected, Tunnel /24 is subnetted, 1 subnets is directly connected, Tunnel /24 is subnetted, 1 subnets is directly connected, FastEthernet0/0 S /24 [1/0] via S /24 [1/0] via C /24 is directly connected, FastEthernet0/1 S* /0 [1/0] via fenbu_1#show ip route Gateway of last resort is to network /24 is subnetted, 1 subnets C C is directly connected, Tunnel /24 is subnetted, 1 subnets is directly connected, FastEthernet0/0 C /24 is directly connected, FastEthernet0/1 S /24 [1/0] via S /24 [1/0] via S* /0 [1/0] via 测试方法 : 总部和各分部 PC 相互 ping 242

247 第四部分 扩张性实验 Fenbu_1 中的 PC0( /24) 到 zongbu 的 server( /24),pc0 的数据到达 fenbu_1 的路由器, 查看路由表到达 /24 的下一跳 IP 是 , 路由器再次查找路由 如何到 的, 到达 是要从 Tunnel0 接口出去, 此时路由器判断要对数据进行 GRE 封装处理, 于是在原有的私有 IP 包报头前封装已经配置好的原公网 IP(fa 0/0 接口 IP) 和目标公网 IP( 即 zongbu 的 fa 0/0 接口 IP), 封装好后, 路由器再次查找路由表发现到达 zongbu 的 fa 0/0 从缺省路由出去 就这样数据被送入 Internet( 公网 ),Internet( 公网 ) 的路由器直能查看公网 IP 报头, 根据公网的目标 IP 转发数据 数据到达 zongbu 后, 总部路由器首先看到路由器的目标 IP 是 自己的, 接受去除公网 IP 报头, 发现是一个 GRE 数据, 再根据私有 IP 报头中的私有目标 IP 再次查找数据, 根据路由表将数据包从 fa 0/1 送至到 server Server 接受数据, 拆封数据查看内容, 并 产生回应 IP 包到 fenbu_1 的 PC0 此后的过程跟从 PC0 到 server 是一样的 GRE 操作 243

248

249 第五部分 综合性实验 第五部分 综合性实验 实验 5-1. 综合实验 1 背景描述 : 该企业的具体环境如下 : 1 企业具有 2 个办公地点, 且相距较远, 公司总共大约有 200 台主机 ; 2 A 办公地点具有的部门较多, 例如业务部 财务部 综合部等, 为主要的办公场所, 因此 这部分的交换网络对可用性和可靠性要求较高 ; 3 B 办公地点只有较少办公人员, 但是 Internet 的接入点在这里 ; 4 公司只申请到了一个公网 IP 地址, 供企业内网接入使用 ; 5 公司内部使用私网地址. 实验工具 :PT5.3 网络拓扑 : 245

250 第五部分 综合性实验 IP 地址分配 : 设备名 IP 地址接口连接设备备注 R_A R_B SW_A SW_B 业务部财务部综合部 /24 F0/0 SW_A /24 F0/1 SW_B /24 S0/0/0 R_B /24 Fa0/0 互联网 /24 S0/0/0 R_A DCE 端 ( ) /24 F0/24 R_A F0/22~F0/23 SW_B 端口聚合 /24 虚拟 vlan( 管理 ) /24 IP 地址 / /24 F0/24 R_A F0/22~F0/23 SW_B 端口聚合 /24 虚拟 vlan( 管理 ) /24 IP 地址 / / SW_A 的 F0/1 Pc / SW_B 的 F0/1 Pc / SW_A 的 F0/2 Pc / SW_B 的 F0/2 Pc / SW_A 的 F0/3 Pc / SW_B 的 F0/3 Pc302 需求分析 : 需求 1: 采取一定方式分隔广播域 分析 1: 在交换机上划分 VLAN 可以实现对广播域的分隔 划分业务部 VLAN10 财务部 VLAN20 综合部 VLAN30, 并分配接口 需求二 : 核心交换机采用高性能的三层交换机, 且采用双核心互为备份的形势, 接入层交换机分别通过 2 条上行链路连接到 2 台核心交换机, 由三层交换机实现 VLAN 之间的路由 分析二 交换机之间的链路配置为 Trunk 链路 三层交换机上采用 SVI 方式 (switch virtual interface) 实现 VLAN 之间的路由 需求三 :2 台核心交换机之间也采用双链路连接, 并提高核心交换机之间的链路带宽分析三 在 2 台三层交换机之间配置端口聚合, 以提高带宽 需求四 : 接入交换机的 access 端口上实现对允许的连接数量为 4 个, 以提高网络的安全性 分析四 采用端口安全的方式实现 需求五 : 三层交换机配置路由接口, 与 RA RB 之间实现全网互通分析五 两台三层交换机上配置路由接口, 连接 A 办公地点的路由器 RA 246

251 第五部分 综合性实验 通 RA 和 RB 分别配置接口 IP 地址 在三层交换机的路由接口和 RA, 及 RB 的内网接口上启用 RIP 路由协议, 实现全网互 需求六 :RA 和 B 办公地点的路由器 RB 之间通过广域网链路连接, 并提供一定的安全性 分析六 RA 和 RB 的广域网接口上配置 PPP( 点到点 ) 协议, 并用 PAP 认证提高安全性 需求七 :RB 配置静态路由连接到 Internet 分析七 两台三层交换上配置缺省路由, 指向 RA RA 上配置缺省路由指向 RB RB 上配置缺省路由指向连接到互联网的下一跳地址 需求八 : 在 RB 上用一个公网 IP 地址实现企业内网到互联网的访问分析八 用 PAT( 网络地址转换 ) 方式, 实现企业内网仅用一个公网 IP 地址到互联网的访问 需求九 : 在 RB 上对内网到外网的访问进行一定控制, 要求不允许财务部访问互联网, 业务部只能访问 WWW 和 FTP 服务, 而综合部只能访问 WWW 服务, 其余访问不受控制 分析九 通过 ACL( 访问控制列表 ) 实现 实验配置 : 路由器 R_B 的配置 : Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R_B R_B(config)#int f0/0 R_B(config-if)#ip addr R_B(config-if)#no shut R_B(config-if)#int s0/0/0 R_B(config-if)#ip addr R_B(config-if)#clock rate R_B(config-if)#no shut End with CNTL/Z. 上面只是路由器 R_B 的基本配置, 下面在 R_B 上启用动态路由协议 Ripv2, 同时配置一条连接到 Internet 的默认路由, 并且配置 pap 验证, 配置信息如下 : R_B(config-if)#exit R_B(config)#router rip R_B(config-router)#version 2 R_B(config-router)#no au R_B(config-router)#network R_B(config-router)#network R_B(config-router)#exit R_B(config)#ip route f0/0 R_B(config)#username R_A password cisco R_B(config)#int s0/0/0 // 配置默认路由 // 建立用户 R_A, 密码 cisco 247

252 第五部分 R_B(config-if)#encapsulation ppp R_B(config-if)#ppp authentication pap 综合性实验 // 用 PPP 封装 //PPP 验证方式为 pap R_B(config-if)#ppp pap sent-username R_B password cisco // 发送用户名 R-B, 密码 cisco 到 R-A 上验证 下面通过 ACL( 访问控制列表 ) 配置来实现财务部不能访问访问互联网, 业务部只能访问 WWW 和 FTP 服务, 而综合部只能访问 WWW 服务, 其余访问不受控制, 配置信息如下 : R_B(config-if)#exit R_B(config)#access-list 100 deny ip any R_B(config)#access-list 100 permit tcp any eq www R_B(config)#access-list 100 permit tcp any eq ftp R_B(config)#access-list 100 permit tcp any eq www R_B(config)#access-list 100 permit ip any any R_B(config)#int s0/0/0 R_B(config-if)#ip ac R_B(config-if)#ip access-group 100 in 上面通过访问控制列表实现了网络的安全, 下面进行 NAT 转换的配置, 由于申请的只有一个公网 IP 地址, 所以就用基于端口转换的 NAT, 即所说的 PAT, 其配置如下 : R_B#conf t Enter configuration commands, one per line. End with CNTL/Z. R_B(config)#access-list 10 permit any R_B(config)#ip nat inside source list 10 int f0/0 overload ( 将局域网内的所有 IP 地址转换成 interface fa0/0 上对应的 这个内部全局地址 ) R_B(config)#int f0/0 R_B(config-if)#ip nat outside R_B(config-if)#int s0/0/0 R_B(config-if)#ip nat inside R_B(config-if)#exit 路由器 R_A 的配置 : Router>ena Router#conf t Enter configuration commands, one per line. Router(config)#host R_A R_A(config)#int f0/0 R_A(config-if)#ip addr R_A(config-if)#no shut R_A(config-if)#int f0/1 R_A(config-if)#ip addr R_A(config-if)#no shut R_A(config-if)#int s0/0/0 R_A(config-if)#ip addr R_A(config-if)#no shut End with CNTL/Z. 上面只是路由器 R-A 的基本配置, 下面在 R-A 上启用动态路由协议 Ripv2, 同时配置 ppp 中的 pap 验证, 还要一条默认路由, 配置信息如下 : 248

253 第五部分 综合性实验 R_A(config-if)#exit R_A(config)#router rip R_A(config-router)#version 2 R_A(config-router)#no au R_A(config-router)#network R_A(config-router)#network R_A(config-router)#network R_A(config-router)#exit R_A(config)#ip route ( 配置一条到 R-B 默认路由 R_A(config)#username R_B password cisco R_A(config)#int s0/0/0 R_A(config-if)#encapsulation ppp R_A(config-if)#ppp authentication pap // 用 PPP 封装 // 建立用户 R-B, 密码 cisco 验证方式为 pap R_A(config-if)#ppp pap sent-username R_A password cisco // 发送用户名 R-A, 密码 cisco 到 R-B 上验证 交换机 SW-A 的配置 : Switch>ena Switch#conf t Enter configuration commands, one per line. Switch(config)#host SW_A SW_A(config)#int f0/24 SW_A(config-if)#no switchport End with CNTL/Z. ( 注释 : 由于是三层交换机, 没有启用第三层的功能的, 所以这里需要启用第三层, 用 no switchport 来实现, 下面配置 IP 地址才会成功 ) SW_A(config-if)#ip addr SW_A(config-if)#no shut SW_A(config-if)#exit SW_A(config)#ip route ( 注释 : 配置一条默认路由到 R-A, 下一跳 IP 地址为 R-A 上 fa0/0 上的 IP 地址 ) 下面进行 vlan 的划分, 指派属于 VLAN 的端口, 配置如下 : SW_A(config)#vlan 10 SW_A(config-vlan)#name 10 SW_A(config-vlan)#vlan 20 SW_A(config-vlan)#name 20 SW_A(config-vlan)#vlan 30 SW_A(config-vlan)#name 30 SW_A(config-vlan)#exit SW_A(config)#int f0/1 SW_A(config-if)#switchport mode access SW_A(config-if)#switchport access vlan 10 SW_A(config-if)#int f0/2 SW_A(config-if)#switchport mode access SW_A(config-if)#switchport access vlan 20 SW_A(config-if)#int f0/3 249

254 第五部分 SW_A(config-if)#switchport mode access SW_A(config-if)#switchport access vlan 30 综合性实验 下面为各个 Vlan 配置 IP 地址, 并配置 Thunk 链路以实现相同 Vlan 之间跨越交换机也是可以通信的, 最后配置端口聚合配置如下 : SW_A(config)#int vlan 10 SW_A(config-if)#ip addr SW_A(config-if)#no shut SW_A(config-if)#exit SW_A(config)#int vlan 20 SW_A(config-if)#ip addr SW_A(config-if)#no shut SW_A(config-if)#exit SW_A(config)#int vlan 30 SW_A(config-if)#ip addr SW_A(config-if)#no shut SW_A(config-if)#exit SW_A(config)#int port-channel 1 SW_A(config-if)#switchport mode trunk // 设置 trunk 链路 SW_A(config-if)#switchport trunk allowed vlan all // 允许所有 Vlan 通过 trunk 链路 SW_A(config-if)#int range f0/22-23 SW_A(config-if-range)#channel-group 1 mode on // 端口聚合 SW_A(config-if-range)#end 在三层交换机上启用 Ripv2 协议, 同时启用端口安全, 配置如下 SW_A(config)#router rip SW_A(config-router)#version 2 SW_A(config-router)#no au SW_A(config-router)#network SW_A(config-router)#network SW_A(config-router)#network SW_A(config-router)#network SW_A(config-router)#exit SW_A(config)#int range f0/1-3 SW_A(config-if-range)#switchport mode access SW_A(config-if-range)#int f0/1 SW_A(config-if)#switchport port-security maximum 4 SW_A(config-if)#int f0/2 SW_A(config-if)#switchport port-security maximum 4 SW_A(config-if)#int f0/3 SW_A(config-if)#switchport port-security maximum 4 交换机 SW-B 的配置 : Switch>ena 250

255 Switch#conf t 第五部分 综合性实验 Enter configuration commands, one per line. Switch(config)#host SW_B SW_B(config)#int f0/24 SW_B(config-if)#no switchport SW_B(config-if)#ip addr SW_B(config-if)#no shut SW_B(config-if)#exit SW_B(config)#ip route SW_B(config)#vlan 10 SW_B(config-vlan)#name 10 SW_B(config-vlan)#vlan 20 SW_B(config-vlan)#name 20 SW_B(config-vlan)#vlan 30 SW_B(config-vlan)#name 30 SW_B(config-vlan)#exit SW_B(config)#int f0/1 SW_B(config-if)#switchport mode access SW_B(config-if)#switchport access vlan 10 SW_B(config-if)#int f0/2 SW_B(config-if)#switchport mode access SW_B(config-if)#switchport access vlan 20 SW_B(config-if)#int f0/3 SW_B(config-if)#switchport mode access SW_B(config-if)#switchport access vlan 30 SW_B(config-if)#exit SW_B(config)#int vlan 10 SW_B(config-if)#ip addr SW_B(config-if)#no shut SW_B(config-if)#int vlan 20 SW_B(config-if)#ip addr SW_B(config-if)#no shut SW_B(config-if)#int vlan 30 SW_B(config-if)#ip addr SW_B(config-if)#no shut SW_B(config-if)#exit SW_B(config)#int port-channel 1 SW_B(config-if)#switchport mode trunk SW_B(config-if)#switchport trunk allowed vlan all SW_B(config-if)#int range f0/22-23 SW_B(config-if-range)#channel-group 1 mode on SW_B(config)#router rip SW_B(config-router)#version 2 SW_B(config-router)#no au SW_B(config-router)#network SW_B(config-router)#network End with CNTL/Z.

256 第五部分 SW_B(config-router)#network SW_B(config-router)#network SW_B(config-router)#exit SW_B(config)#int range f0/1-3 综合性实验 SW_B(config-if-range)#switchport mode access SW_B(config-if-range)#int f0/1 SW_B(config-if)#switchport port-security maximum 4 SW_B(config-if)#int f0/2 SW_B(config-if)#switchport port-security maximum 4 SW_B(config-if)#int f0/3 SW_B(config-if)#switchport port-security maximum 4 PC 机的配置如下 : 业务部 PC 机 IP 地址范围为 : 网关为 : 财务部 PC 机 IP 地址范围为 : 网关为 : 综合部 PC 机 IP 地址范围为 : 网关为 :

257 第五部分 实验 5-2. 综合性实验 CCNA 大综合实验 转自博客 spccie.blog.51cto.com 环境背景 : 中小型企业. 有两个部门, 销售部 (vlan 10) 与行政部 (vlan 20). 同部门之间采用二层交换网络相连 ; 不同部门之间采用单臂路由方式互访. 企业有一台内部 web 服务器, 承载着内部网站, 方便员工了解公司的即时信息. 局域网路由器启用多种路由协议 ( 静态路由 动态路由协议 ), 并实施路由控制 负载均衡 链路认证 访问限制等功能. 企业有一条专线接到运营商用以连接互联网, 采用 Frame-Relay 封装, 需要手工设置 DLCI 与 IP 的映射. 由于从运营商只获取到一个公网 IP 地址, 所以企业员工上网需要做 NAT 网络地址转换. 网络配置 : 一 基础配置 253

路由器基本配置

路由器基本配置 路由器基本配置 本章内容 路由器的基本操作 实验练习 常用的路由器配置方法 TFTP Console MODEM AUX telnet web 任何 Interface AUX 备份接口, 一般用于路由器的管理备份接口 路由器的操作模式 : 配置模式 1. 线路配置模式 Router(config-line)# 配置路由器的线路参数 2. 路由协议配置模式 Router(config-router)#

More information

Cisco Cisco Cisco (ROM) (FLASH) (RAM) RAM(NVRAM) Cisco

Cisco Cisco Cisco (ROM) (FLASH) (RAM) RAM(NVRAM) Cisco Ch2 Cisco IOS Cisco Cisco Cisco (ROM) (FLASH) (RAM) RAM(NVRAM) Cisco Cisco ROM ROM Cisco ROM(BIOS) ROM 1. POST Cisco 2. BootStrap Cisco IOS 3. IOS IOS IOS Cisco ROM ROM Cisco Flash Flash Flash IOS Cisco

More information

ch08.PDF

ch08.PDF 8-1 CCNA 8.1 CLI 8.1.1 8-2 8-3 8.1.21600 2500 1600 2500 / IOS 8-4 8.2 8.2.1 A 5 IP CLI 1600 2500 8-5 8.1.2-15 Windows 9598NT 2000 HyperTerminal Hilgraeve Microsoft Cisco HyperTerminal Private Edition (PE)

More information

通过动态路由协议实现链路备份

通过动态路由协议实现链路备份 通过动态路由协议实现链路备份 实验名称 通过动态路由协议实现链路备份 实验目的 掌握通过在不同链路上配置不同的路由协议实现链路备份 背景描述 你是公司高级网络管理员, 公司内部有一个很重要的服务器所在网段为 192.168.12.0/24, 平常访问通过 R1,R3 的 OSPF 路由协议, 为了保证该网段随时能够访问, 不能因为链路故障出问题, 要求你实现一个备份冗余的功能, 请给予支持 实现功能

More information

D. 192.168.5.32 E. 192.168.5.14 答 案 :C 3. 工 作 站 A 配 置 的 IP 地 址 为 192.0.2.24/28. 工 作 站 B 配 置 的 IP 地 址 为 192.0.2.100/28. 两 个 工 作 站 之 间 有 直 通 线 连 接, 两 台

D. 192.168.5.32 E. 192.168.5.14 答 案 :C 3. 工 作 站 A 配 置 的 IP 地 址 为 192.0.2.24/28. 工 作 站 B 配 置 的 IP 地 址 为 192.0.2.100/28. 两 个 工 作 站 之 间 有 直 通 线 连 接, 两 台 CCNP 学 前 测 试 题 都 选 自 官 方 的 全 真 考 试 题, 共 100 道 题 实 际 测 试 选 60 道 题, 同 官 方 正 式 考 题 数 目 基 本 一 致, 因 此 等 于 是 模 拟 考 试, 采 用 网 上 形 式 进 行 测 评 学 前 测 评 目 的 是 为 了 检 验 大 家 对 CCNA 阶 段 知 识 掌 握 的 程 度, 同 时 对 CCNA 最 核 心

More information

Microsoft Word - chp21路由优化.doc

Microsoft Word - chp21路由优化.doc 第 21 章路由优化 在当今高性能的网络中, 为了保证网络的伸缩性 稳定性 安全性和快速收敛, 必须对网络进行优化 路由过滤和策略路由是路由优化的常用方法 21.1 路由优化概述 路由过滤是指在路由更新中抑制某些路由不被发送和接收, 被动接口 分布控制列表 重分布结合路由策略等都可以实现路由过滤 策略路由提供了根据网络管理者制定的标准来进行数据包转发的一种机制 基于策略的路由比传统路由能力更强, 使用更灵活,

More information

Microsoft Word - chp20路由重分布.doc

Microsoft Word - chp20路由重分布.doc 第 20 章路由重分布 当许多运行多路由的网络要集成到一起时, 必须在这些不同的路由选择协议之间共享路由信息 在路由选择协议之间交换路由信息的过程被称为路由重分布 (Route Redistribution) 20.1 路由重分布概述 路由重分布为在同一个互联网络中高效地支持多种路由协议提供了可能, 执行路由重分布的路由器被称为边界路由器, 因为它们位于两个或多个自治系统的边界上 路由重分布时计量单位和管理距离是必须要考虑的

More information

IP505SM_manual_cn.doc

IP505SM_manual_cn.doc IP505SM 1 Introduction 1...4...4...4...5 LAN...5...5...6...6...7 LED...7...7 2...9...9...9 3...11...11...12...12...12...14...18 LAN...19 DHCP...20...21 4 PC...22...22 Windows...22 TCP/IP -...22 TCP/IP

More information

epub

epub 3 Cisco 3.1 S e t u p C i s c o C i s c o Cisco IOS C i s c o 3.2 Te l n e t T F T P 3-1 3-1 configure terminal configure memory Configure network t e l n e t < C t r l - Z > conf t N V R A M T F T P I

More information

幻灯片 1

幻灯片 1 Lab 2 路由器的基本管理 1 实验目的 1. 理解 TFTP 服务的特点与作用与配置 2. 掌握 TFTP 服务的配置 3. 掌握使用 TFTP 上传进行 IOS 备份的方法 4. 掌握使用 TFTP 下载进行 IOS 恢复 / 更新的方法 5. 掌握使用 TFTP 进行配置文件的备份与恢复的方法 6. 掌握路由器密码恢复的基本方法 R&S 1-2 实验内容 1 通过 TFTP 进行 IOS 备份

More information

IP-Routing-05.pdf

IP-Routing-05.pdf RI P R I P - 2 RIP -1 R I P - 2 DV RIP -1 RIP-2 16... RIP-2 RIP-2 RIP -1 R I P - 2 RIP-2 RIP-2 RIP-2 V L S M disc ontiguous addr ess sp ace C I D R Cla ssless In ter -Dom ain Routing 121 1 2 2 IP RIP-2

More information

Simulator By SunLingxi 2003

Simulator By SunLingxi 2003 Simulator By SunLingxi sunlingxi@sina.com 2003 windows 2000 Tornado ping ping 1. Tornado Full Simulator...3 2....3 3. ping...6 4. Tornado Simulator BSP...6 5. VxWorks simpc...7 6. simulator...7 7. simulator

More information

mppp-ddr.pdf

mppp-ddr.pdf DDR 多 链 路 PPP - 基 本 配 置 和 验 证 目 录 简 介 开 始 使 用 前 规 则 先 决 条 件 使 用 的 组 件 多 链 路 PPP 干 什 么 配 置 多 链 路 PPP 命 令 传 统 DDR 拨 号 原 型 (Dialer Profile) 验 证 MPPP 操 作 相 关 信 息 简 介 多 链 路 PPP ( 也 指 MP MPPP MLP 或 多 链 路 ) 提

More information

¶C¶L§§¬_™¨ A.PDF

¶C¶L§§¬_™¨ A.PDF 1 9 3 1 9 4 / 7.1 / 1 9 5 7.2 % netstat -rn Routing tables Destination Gateway Flags Refcnt Use Interface 127.0.0.1 127.0.0.1 UH 1 132 lo0 172.16.12.0 172.16.12.2 U 26 49041 le0 1 9 6 / % ping -s almond

More information

<4D F736F F D CAB5D1E9CDD8C6CBA1A2D6D5B6CBB7FECEF1C6F7C5E4D6C32E646F63>

<4D F736F F D CAB5D1E9CDD8C6CBA1A2D6D5B6CBB7FECEF1C6F7C5E4D6C32E646F63> 第 1 章实验拓扑 终端服务器配置 本章将首先简要介绍如何从计算机上访问路由器以对它们进行配置, 通常可以通过 console 口或者 telnet 来连接路由器 随后还要介绍本书中一直要用到的网络拓扑, 并将详细介绍如何配置终端服务器以达到方便控制各个路由器和交换机的目的 1.1 访问 CISCO 路由器的方法 路由器没有键盘和鼠标, 要初始化路由器需要把计算机的串口和路由器的 console 口进行连接

More information

AL-M200 Series

AL-M200 Series NPD4754-00 TC ( ) Windows 7 1. [Start ( )] [Control Panel ()] [Network and Internet ( )] 2. [Network and Sharing Center ( )] 3. [Change adapter settings ( )] 4. 3 Windows XP 1. [Start ( )] [Control Panel

More information

active phisical rp address: backup phisical rp address: 截取部分 TOPO 图说明到 不通的问题 : internet internet tengige 0/0/0/0 tengige

active phisical rp address: backup phisical rp address: 截取部分 TOPO 图说明到 不通的问题 : internet internet tengige 0/0/0/0 tengige ASR9000 ping 丢包 troubleshooting 目录 硬件平台软件版本案例介绍问题分析思路问题总结经验总结相关命令 硬件平台 ASR9000 软件版本 4.2.0 案例介绍 拓扑示例 : 问题, 客户从外网 internet ping 3 个 vrrp subnet 的地址时候始终只能通一个 IP 地址 : vrrp virtual IP :2.2.2.129 其他不能 ping 通的

More information

计算机网络 实验指导书 / 实验四 : 动态路由协议 实验四 : 动态路由协议 一 实验目的 1 进一步理解路由器的工作原理; 2 掌握 RIP 的基本原理和实现 ; 3 掌握 OSPF 的基本原理和实现 二 实验学时 2 学时 三 实验类型 综合性 四 实验需求 1 硬件每人配备计算机 1 台 2

计算机网络 实验指导书 / 实验四 : 动态路由协议 实验四 : 动态路由协议 一 实验目的 1 进一步理解路由器的工作原理; 2 掌握 RIP 的基本原理和实现 ; 3 掌握 OSPF 的基本原理和实现 二 实验学时 2 学时 三 实验类型 综合性 四 实验需求 1 硬件每人配备计算机 1 台 2 实验四 : 动态路由协议 一 实验目的 1 进一步理解路由器的工作原理; 2 掌握 RIP 的基本原理和实现 ; 3 掌握 OSPF 的基本原理和实现 二 实验学时 2 学时 三 实验类型 综合性 四 实验需求 1 硬件每人配备计算机 1 台 2 软件 Windows 7 以上操作系统, 安装 GNS3 网络仿真与 VirtualBox 虚拟化软件, 安装 Putty 软件 3 网络实验室局域网支持,

More information

Microsoft Word - chp3静态路由.doc

Microsoft Word - chp3静态路由.doc 第 3 章静态路由 转发数据包是路由器的最主要功能 路由器转发数据包时需要查找路由表, 管理员可以通过手工的方法在路由器中直接配置路由表, 这就是静态路由 虽然静态路由不适合于在大的网络中使用, 但是由于静态路由简单 路由器负载小 可控性强等原因, 在许多场合中还经常被使用 本章将介绍静态路由的配置, 同时为以后配置动态路由奠定基础 3.1.1 静态路由介绍 3.1 静态路由与默认路由 路由器在转发数据时,

More information

TCP/IP TCP/IP OSI IP TCP IP IP TCP/IP TCP/IP

TCP/IP TCP/IP OSI IP TCP IP IP TCP/IP TCP/IP TCP/IP : TCP/IP TCP/IP OSI IP TCP IP IP TCP/IP TCP/IP 1. ASCII EBCDIC Extended Binary-Coded Decimal Interchange Code 2. / (1) (2) Single System Image SSI) (3) I/O (4) 3.OSI OSI Open System Interconnection

More information

版权声明

版权声明 SG3124 http://www.utt.com.cn 2000-2008 URL Internet Web EULA EULA UTT HiPER PN 0901-0003-001 DN PR-PMMU-1180.03-PPR-CN-1.0A ...1 1...2 1.1...2 1.2...2 1.3...3 1.4...3 2 1.4.1...3 1.4.2...4...5 2.1...5

More information

Microsoft Word - CCNA2_Exploration_instructor_40_CoverSheet.DOC

Microsoft Word - CCNA2_Exploration_instructor_40_CoverSheet.DOC 本 文 档 是 Cisco Systems, Inc. 的 专 有 财 产, 为 Cisco Networking Academy 讲 授 CCNA Exploration 路 由 协 议 和 概 念 课 程 的 教 师 专 用, 允 许 打 印 或 复 制 作 非 商 业 用 途 实 验 1.5.1: 网 络 布 线 和 基 本 路 由 器 配 置 ( 教 师 版 ) 拓 扑 图 地 址 分 配

More information

ebook140-8

ebook140-8 8 Microsoft VPN Windows NT 4 V P N Windows 98 Client 7 Vintage Air V P N 7 Wi n d o w s NT V P N 7 VPN ( ) 7 Novell NetWare VPN 8.1 PPTP NT4 VPN Q 154091 M i c r o s o f t Windows NT RAS [ ] Windows NT4

More information

F5270

F5270 Cisco 路 由 器 設 定 主 講 : 陳 建 民 本 章 提 要 4-1 Cisco 路 由 器 使 用 者 界 面 4-2 命 令 列 界 面 4-3 路 由 器 與 交 換 器 的 管 理 功 能 4-4 路 由 器 界 面 4-5 檢 視 儲 存 與 清 除 組 態 設 定 2 Cisco 路 由 器 3 4 5 6 Router physical characteristics 7 4-1

More information

12.pdf

12.pdf 对 帧 中 继 配 置 与 故 障 排 除 的 全 面 的 指 南 交 互 : 本 文 档 对 您 的 Cisco 设 备 进 行 自 定 义 分 析 目 录 简 介 开 始 使 用 前 规 则 先 决 条 件 使 用 的 组 件 背 景 理 论 配 置 基 本 的 帧 中 继 网 络 图 配 置 debug 和 show 命 令 配 置 星 形 帧 中 继 网 络 图 配 置 显 示 命 令 分

More information

User ID 150 Password - User ID 150 Password Mon- Cam-- Invalid Terminal Mode No User Terminal Mode No User Mon- Cam-- 2

User ID 150 Password - User ID 150 Password Mon- Cam-- Invalid Terminal Mode No User Terminal Mode No User Mon- Cam-- 2 Terminal Mode No User User ID 150 Password - User ID 150 Password Mon- Cam-- Invalid Terminal Mode No User Terminal Mode No User Mon- Cam-- 2 Mon1 Cam-- Mon- Cam-- Prohibited M04 Mon1 Cam03 Mon1 Cam03

More information

Microsoft Word - vlsm and ip unnumbered.doc

Microsoft Word - vlsm and ip unnumbered.doc Part1:VLSM VLSM AND IP unnumbered 实验讲义 实验目的 : 使用两种不同的路由选择协议,IPv1 和 IPv2 来配置 VLSM, 并测试其功能 实验拓扑 : HUB2 department2 192.168.1.128/26 1602 1601 192.168.1.192/26 192.168.1.64/26 1720 2514/1703 192.168.1.0/26

More information

CCNA 講義

CCNA 講義 CCNA 筆 記 王 振 民 目 錄 第 1 章 Packet Tracer 的 使 用... 2 第 1 節 安 裝... 2 第 2 節 建 置 網 路 環 境 _01( 二 台 PC+ 一 台 HUB)... 8 第 3 節 Pc 的 設 定 :IP, cmd...... 10 第 4 節 傳 送 封 包 (ICMP 封 包 檢 視...)... 13 第 2 章 基 礎 知 識... 14

More information

工程师培训

工程师培训 .1 TCP/IP TCP/IP 1 .2.2.1 Host 1960 S 1970 S Host Low Speed Lines 1970 S 1980 S pc Server Local Interneting 1980 S 1990 S Branch. pc Branch. WAN Branch. pc pc IBM SNA IBM X.25 2 .2.2 OSI OSI Application

More information

计算机网络概论

计算机网络概论 1 repeater bridge router gateway V.S OSI Repeater(Hub) 1 Repeater 2 3 ( Hub 4 Bridge 1 Bridge 2 N N DL1 DL1 DL2 DL2 Ph1 Ph1 Ph2 Ph2 1 2 Bridge 3 MAC Ethernet FDDI MAC MAC Bridge 4 5 6 7 50873EA6, 00123456

More information

09.实验九:内部网关协议RIP与OSPF

09.实验九:内部网关协议RIP与OSPF 计算机网络 实验指导 实验九 : 内部网关协议 RIP 与 OSPF 一 实验目的 1 进一步理解路由器的工作原理; 2 掌握 RIP 的基本原理和概念 ; 3 掌握 OSPF 的基本原理和概念 ; 4 掌握基于 GNS3 仿真平台进行网络实验的方法 二 实验学时 2 学时 三 实验类型 综合性 四 实验需求 1 硬件每人配备计算机 1 台, 计算机接入实验室局域网, 每小组配备交换机 2 台, 路由器

More information

ebook140-9

ebook140-9 9 VPN VPN Novell BorderManager Windows NT PPTP V P N L A V P N V N P I n t e r n e t V P N 9.1 V P N Windows 98 Windows PPTP VPN Novell BorderManager T M I P s e c Wi n d o w s I n t e r n e t I S P I

More information

<4D F736F F D C2B7D3C9C6F7BBF9B1BEC5E4D6C32E646F63>

<4D F736F F D C2B7D3C9C6F7BBF9B1BEC5E4D6C32E646F63> 第 2 章路由器基本配置 本章将先简要介绍路由器的硬件组成, 而重点介绍路由器中最重要的部分 IOS, 对路由器的配置实际上就是对 IOS 软件进行配置 IOS 提供了大量的命令, 熟悉这些命令才能很好地发挥路由器的功能, 本章介绍的是路由器的一些基础性命令 2.1.1 路由器简介 2.1 路由器简介和 IOS 简介 路由器能起到隔离广播域的作用, 还能在不同网络间转发数据包 路由器实际上是一台特殊用途的计算机,

More information

IS-IS路由协议中文教程v1

IS-IS路由协议中文教程v1 IS-IS v1.0 Chapter 0 Preface Statement BSCI Building Scalable Cisco Internetworks Configuring IS-IS Protocol IS-IS IS-IS OSI TCP/IP IS-IS OSPF Cisco System BSCI Student Guide Outline 1 OSI IS-IS 2 IS-IS

More information

財金資訊-80期.indd

財金資訊-80期.indd IPv6 / LINE YouTube TCP/IP TCP (Transmission Control Protocol) IP (Internet Protocol) (node) (address) IPv4 168.95.1.1 IPv4 1981 RFC 791 --IP IPv4 32 2 32 42 IP (Internet Service Provider ISP) IP IP IPv4

More information

ebook20-7

ebook20-7 7 Catalyst 5000 Catalyst 5000 Cisco Works for Switched Internetworks (CWSI) C L I C L I G U I C L C W S I C i s c o C W S I C L I I P Te l n e t C L I 9600 8 6 7.1 Catalyst C a t a l y s t Cisco IOS C

More information

R3105+ ADSL

R3105+ ADSL ... 1 1 1... 1 1 2... 1... 3 2 1... 3 2 2... 3 2 3... 5 2 4... 5 2 4 1... 5... 7 3 1... 7 3 2... 8 3 2 1... 8 3 2 2... 9 3 3... 12 3 3 1... 13 3 3 2 WAN... 16 3 3 3 LAN... 21 3 3 4 NAT... 22 3 3 5... 24

More information

目录 目录... I BOSON NETSIM 入门进阶 实战 BOSON NETSIM 基本实验 路由器基本实验 - 静态路由 缺省路由配置 交换机基本实验 -VLAN VTP TRUNK 远程访问基本实验 -PPP CHAP...11

目录 目录... I BOSON NETSIM 入门进阶 实战 BOSON NETSIM 基本实验 路由器基本实验 - 静态路由 缺省路由配置 交换机基本实验 -VLAN VTP TRUNK 远程访问基本实验 -PPP CHAP...11 目录 目录... I BOSON NETSIM 入门进阶 实战...1 1 BOSON NETSIM 基本实验...1 1.1 路由器基本实验 - 静态路由 缺省路由配置...1 1.2 交换机基本实验 -VLAN VTP TRUNK...7 1.3 远程访问基本实验 -PPP CHAP...11 2 BOSON NETSIM 进阶实验...15 2.1 ISDN 传统 DDR 配置 (Legacy

More information

Symantec™ Sygate Enterprise Protection 防护代理安装使用指南

Symantec™ Sygate Enterprise Protection 防护代理安装使用指南 Symantec Sygate Enterprise Protection 防 护 代 理 安 装 使 用 指 南 5.1 版 版 权 信 息 Copyright 2005 Symantec Corporation. 2005 年 Symantec Corporation 版 权 所 有 All rights reserved. 保 留 所 有 权 利 Symantec Symantec 徽 标 Sygate

More information

Procedural Lab Template, Student Version, Required Components

Procedural Lab Template, Student Version, Required Components 拓 樸 圖 位 址 配 置 表 設 備 介 面 IP 位 址 子 網 路 遮 罩 預 設 閘 道 R1 Fa0/0 192.168.1.1 255.255.255.0 不 適 用 S0/0/0 192.168.2.1 255.255.255.0 不 適 用 R2 Fa0/0 192.168.3.1 255.255.255.0 不 適 用 S0/0/0 192.168.2.2 255.255.255.0

More information

指定静态路由的下一跳IP地址

指定静态路由的下一跳IP地址 指定静态路由的下一跳 IP 地址 目录 简介背景信息对广播接口的静态路由浮动静态路由示例问题解决方案结论 简介 本文描述静态路由基本概念 问题场景用于为了展示指定接口下一跳 IP 地址可以被到达的情况变得理想, 当您配置静态路由时 失败可能导致不需要的行为和一个残破的网络状况 背景信息 由于各种各样的原因使用静态路由并且是常用的, 当没有动态路由对目的 IP 地址时, 或者, 当您要动态地改写获取的路由时

More information

一.NETGEAR VPN防火墙产品介绍

一.NETGEAR VPN防火墙产品介绍 NETGEAR VPN NETGEAR 6 http://www.netgear.com.cn - 1 - NETGEAR VPN... 4 1.1 VPN...4 1.2 Dynamic Domain Name Service...4 1.3 Netgear VPN...4 Netgear VPN... 6 2.1 FVS318 to FVS318 IKE Main...7 2.1.1 A VPN

More information

一、选择题

一、选择题 计 算 机 网 络 基 础 第 7 章 练 习 思 考 与 认 识 活 动 一 选 择 题 1. 下 面 命 令 中, 用 于 检 查 WINDOWS2000 下 TCP/IP 配 置 信 息 的 是 ( ) A. cmd B. nslookup C. ipconfig D. ping 2. 内 部 网 关 协 议 RIP 是 一 种 广 泛 使 用 的 基 于 距 离 矢 量 算 法 的 协 议

More information

ARP ICMP

ARP ICMP ARP ICMP 2 9-1 ARP 9-2 ARP 9-3 ARP 9-4 ICMP 9-5 ICMP 9-6 ICMP 9-7 ICMP 3 ARP ICMP TCP / IP, IP ARP ICMP 3 IP, ARP ICMP IP ARP ICMP 2, 4 9-1 ARP, MAC, IP IP, MAC ARP Address Resolution Protocol, OSI ARP,,

More information

Chapter #

Chapter # 第三章 TCP/IP 协议栈 本章目标 通过本章的学习, 您应该掌握以下内容 : 掌握 TCP/IP 分层模型 掌握 IP 协议原理 理解 OSI 和 TCP/IP 模型的区别和联系 TCP/IP 介绍 主机 主机 Internet TCP/IP 早期的协议族 全球范围 TCP/IP 协议栈 7 6 5 4 3 应用层表示层会话层传输层网络层 应用层 主机到主机层 Internet 层 2 1 数据链路层

More information

IP Access Lists IP Access Lists IP Access Lists

IP Access Lists IP Access Lists IP Access Lists Chapter 10 Access Lists IP Access Lists IP Access Lists IP Access Lists Security) IP Access Lists Access Lists (Network router For example, RouterA can use an access list to deny access from Network 4

More information

ebook20-8

ebook20-8 8 Catalyst 5000 7 V L A N C a t a l y s t V L A N V L A N 8.1 VLAN VTP V L A N A VLAN VLAN 10 VLAN 20 VLAN 10 VLAN 20 B VLAN VLAN 10 VLAN 20 VLAN 10 C VLAN VLAN 10 VLAN 20 VLAN 10 VLAN 20 8-1 VLAN 8 Catalyst

More information

ebook140-11

ebook140-11 11 VPN Windows NT4 B o r d e r M a n a g e r VPN VPN V P N V P N V P V P N V P N TCP/IP 11.1 V P N V P N / ( ) 11.1.1 11 V P N 285 2 3 1. L A N LAN V P N 10MB 100MB L A N VPN V P N V P N Microsoft PPTP

More information

Bus Hound 5

Bus Hound 5 Bus Hound 5.0 ( 1.0) 21IC 2007 7 BusHound perisoft PC hound Bus Hound 6.0 5.0 5.0 Bus Hound, IDE SCSI USB 1394 DVD Windows9X,WindowsMe,NT4.0,2000,2003,XP XP IRP Html ZIP SCSI sense USB Bus Hound 1 Bus

More information

SL2511 SR Plus 操作手冊_單面.doc

SL2511 SR Plus 操作手冊_單面.doc IEEE 802.11b SL-2511 SR Plus SENAO INTERNATIONAL CO., LTD www.senao.com - 1 - - 2 - .5 1-1...5 1-2...6 1-3...6 1-4...7.9 2-1...9 2-2 IE...11 SL-2511 SR Plus....13 3-1...13 3-2...14 3-3...15 3-4...16-3

More information

动态路由选择协议、RIP

动态路由选择协议、RIP 学习沉淀成长分享 动态路由协议 RIP 红茶三杯 ( 朱 SIR) 微博 : t.sina.com/vinsoney Latest update: 2012-06-01 课程目标 动态路由协议概述 RIP RIP 基础实验 动态路由协议概述 什么是路由 什么是动态路由协议 动态路由协议的分类 什么是路由 192.168.10.0/24 172.16.1.0/24 e0 s0 Protocol Connected

More information

ebook71-13

ebook71-13 13 I S P Internet 13. 2. 1 k p p p P P P 13. 2. 2 1 3. 2. 3 k p p p 1 3. 2. 4 l i n u x c o n f P P P 13. 2. 5 p p p s e t u p 13. 2. 6 p p p s e t u p P P P 13. 2. 7 1 3. 2. 8 C a l d e r a G U I 13.

More information

P4i45GL_GV-R50-CN.p65

P4i45GL_GV-R50-CN.p65 1 Main Advanced Security Power Boot Exit System Date System Time Floppy Drives IDE Devices BIOS Version Processor Type Processor Speed Cache Size Microcode Update Total Memory DDR1 DDR2 Dec 18 2003 Thu

More information

第3章

第3章 本 章 涵 盖 以 下 主 题 全 局 单 播 地 址 路 由 和 子 网 划 分 : 本 节 通 过 与 IPv4 相 比 较, 介 绍 了 IPv6 地 址 IPv4 路 由 的 概 念, 以 及 怎 样 进 行 IPv6 子 网 划 分 IPv6 全 局 单 播 地 址 的 分 配 : 本 节 探 讨 了 怎 样 将 全 局 单 播 地 址 分 配 到 主 机 或 其 他 设 备 上 IPv6

More information

Microsoft Word - CCNA Lab Exercise Guide.doc

Microsoft Word - CCNA Lab Exercise Guide.doc CISCO CERTIFIED NETWORK ASSOCIATE LAB GUIDE 思科认证网络工程师完全实验手册 作者红头发 CCIE#15101-1- -2- -3- -4- -5- 第一章基础篇 实验一 - 路由器基本设置 Lab Exercise 1.1 熟练掌握如何进入路由器各种模式并设置主机名. Cisco 2501 路由器一台. 1. 从路由器用户模式进入特权模式 : Aiko>enable

More information

untitled

untitled 7.1 7.1.1 IP R1 N N,R1,M IP 1 7.1.2 [Quidway]display ip routing Routing Tables: Destination/Mask proto pref Metric Nexthop Interface 0.0.0.0/0 Static 60 0 120.0.0.2 Serial0 8.0.0.0/8 RIP 100 3 120.0.0.2

More information

Windows RTEMS 1 Danilliu MMI TCP/IP QEMU i386 QEMU ARM POWERPC i386 IPC PC104 uc/os-ii uc/os MMI TCP/IP i386 PORT Linux ecos Linux ecos ecos eco

Windows RTEMS 1 Danilliu MMI TCP/IP QEMU i386 QEMU ARM POWERPC i386 IPC PC104 uc/os-ii uc/os MMI TCP/IP i386 PORT Linux ecos Linux ecos ecos eco Windows RTEMS 1 Danilliu MMI TCP/IP 80486 QEMU i386 QEMU ARM POWERPC i386 IPC PC104 uc/os-ii uc/os MMI TCP/IP i386 PORT Linux ecos Linux ecos ecos ecos Email www.rtems.com RTEMS ecos RTEMS RTEMS Windows

More information

1 1 2 OSPF RIP 2

1 1 2 OSPF RIP 2 MPLS VPN 1. TCP/IP IP IP IP IP 1 1 2 OSPF RIP 2 2 RIP OSPF BGP DVMRP IS- IS IP 1. Unicast Routing Protocol Multicast Routing Protocol RIP OSPF BGP IS-IS DVMRP PIM-SM PIM-DM 2. IGP EGP IGPRIP OSPF IS-ISEGP

More information

(UTM???U_935_938_955_958_959 V2.1.9.1)

(UTM???U_935_938_955_958_959 V2.1.9.1) 192.16 www.sharetech.com.tw UTM 多 功 能 防 火 牆 管 理 者 手 冊 V 2.1.9.1 目 錄 第 一 章 安 裝 與 訊 息... 7 1-1 建 議 的 安 裝 設 定 圖... 8 1-2 軟 體 安 裝 設 定... 9 1-3 首 頁 訊 息... 14 1-4 型 號 與 功 能 對 照 表... 17 第 二 章 系 統 設 定... 19 2-1

More information

AL-MX200 Series

AL-MX200 Series PostScript Level3 Compatible NPD4760-00 TC Seiko Epson Corporation Seiko Epson Corporation ( ) Seiko Epson Corporation Seiko Epson Corporation Epson Seiko Epson Corporation Apple Bonjour ColorSync Macintosh

More information

目录 简介... 3 BGP 重发布进 OSPF 环境拓扑图... 3 BGP 重发布进 OSPF 路由过滤... 4 FGT200B 关键配置... 4 接口 IP 配置... 4 Route-Map... 4 BGP 的配置... 5 FGT100E 关键配置... 5 接口 IP 及 BGP

目录 简介... 3 BGP 重发布进 OSPF 环境拓扑图... 3 BGP 重发布进 OSPF 路由过滤... 4 FGT200B 关键配置... 4 接口 IP 配置... 4 Route-Map... 4 BGP 的配置... 5 FGT100E 关键配置... 5 接口 IP 及 BGP BGP 与 OSPF 之间重发布时使用 Route-Map 进行路由过滤 版本 1.0 时间 2017 年 9 月 5 日星期二 支持的版本 FortiGate v5.0 v5.2 v5.4 v5.6 作者 状态 反馈 刘康明 已审核 support_cn@fortinet.com 目录 简介... 3 BGP 重发布进 OSPF 环境拓扑图... 3 BGP 重发布进 OSPF 路由过滤... 4

More information

IC-900W Wireless Pan & Tilt Wireless Pan & Tilt Remote Control / Night Vision FCC ID:RUJ-LR802UWG

IC-900W Wireless Pan & Tilt Wireless Pan & Tilt Remote Control / Night Vision FCC ID:RUJ-LR802UWG IC-900W Wireless Pan & Tilt Wireless Pan & Tilt Remote Control / Night Vision FCC ID:RUJ-LR802UWG --------------------------------------------TABLE OF CONTENTS------------------------------------------

More information

VIDEOJET connect 7000 VJC-7000-90 zh- CHS Operation Manual VIDEOJET connect 7000 zh-chs 3 目 录 1 浏 览 器 连 接 7 1.1 系 统 要 求 7 1.2 建 立 连 接 7 1.2.1 摄 像 机 中 的 密 码 保 护 7 1.3 受 保 护 的 网 络 7 2 系 统 概 述 8 2.1 实 况

More information

NSC-161

NSC-161 IP Session IP? IP Cisco IP IP IP IP IP? LAN Software Bluetooth,, 802.11 IP IP IP QoS IP Trust Domain (TD 1 ) TD 2 AR AR AP AP (MN) (MN) IP IP ( ) (MR) IP LAN MR (AP) IP 802.11 (AL) LAN/PAN 802.11, 802.15,

More information

KillTest 质量更高 服务更好 学习资料 半年免费更新服务

KillTest 质量更高 服务更好 学习资料   半年免费更新服务 KillTest 质量更高 服务更好 学习资料 http://www.killtest.cn 半年免费更新服务 Exam : JN0-100 Title : Juniper Networks Certified Internet Associate (JNCIA-JUNOS) Version : Demo 1 / 10 1. Which major J-Web menu should you use

More information

Chapter 2

Chapter 2 2 (Setup) ETAP PowerStation ETAP ETAP PowerStation PowerStation PowerPlot ODBC SQL Server Oracle SQL Server Oracle Windows SQL Server Oracle PowerStation PowerStation PowerStation PowerStation ETAP PowerStation

More information

Serial ATA ( Silicon Image SiI3114)...2 (1) SATA... 2 (2) B I O S S A T A... 3 (3) RAID BIOS RAID... 5 (4) S A T A... 8 (5) S A T A... 10

Serial ATA ( Silicon Image SiI3114)...2 (1) SATA... 2 (2) B I O S S A T A... 3 (3) RAID BIOS RAID... 5 (4) S A T A... 8 (5) S A T A... 10 Serial ATA ( Silicon Image SiI3114)...2 (1) SATA... 2 (2) B I O S S A T A... 3 (3) RAID BIOS RAID... 5 (4) S A T A... 8 (5) S A T A... 10 Ác Åé å Serial ATA ( Silicon Image SiI3114) S A T A (1) SATA (2)

More information

飞鱼星多WAN防火墙路由器用户手册

飞鱼星多WAN防火墙路由器用户手册 WAN VER: 20110218 Copyright 2002-2011 VOLANS WAN VR4600 VR4900 VR7200 VR7500 VR7600 1.1 1.2 IP 1.3 2.1 2.2 2.2.1 2.2.2 3.1 3.2 3.2.1 3.2.2 3.2.3 4.1 4.2 4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.3 4.3.1 4.3.2

More information

Microsoft PowerPoint - Aqua-Sim.pptx

Microsoft PowerPoint - Aqua-Sim.pptx Peng Xie, Zhong Zhou, Zheng Peng, Hai Yan, Tiansi Hu, Jun-Hong Cui, Zhijie Shi, Yunsi Fei, Shengli Zhou Underwater Sensor Network Lab 1 Outline Motivations System Overview Aqua-Sim Components Experimental

More information

EK-STM32F

EK-STM32F STMEVKIT-STM32F10xx8 软 件 开 发 入 门 指 南 目 录 1 EWARM 安 装... 1 1.1 第 一 步 : 在 线 注 册... 1 1.2 第 二 步 : 下 载 软 件... 2 1.3 第 三 步 : 安 装 EWARM... 3 2 基 于 STMEVKIT-STM32F10xx8 的 示 例 代 码 运 行... 6 2.1 GPIO Demo... 6 2.2

More information

課程大綱

課程大綱 CCNA 筆記 王振民 目錄 第 1 章 Packet Tracer 的使用... 2 第 1 節安裝... 2 第 2 節建置網路環境 _01( 二台 PC+ 一台 HUB)... 8 第 3 節 Pc 的設定 :IP, cmd...... 10 第 4 節傳送封包 (ICMP 封包檢視...)... 13 第 2 章基礎知識... 14 第 1 節開機流程... 14 第 2 節不同的模式...

More information

基于点到点链路的 OSPF 的初始配置

基于点到点链路的 OSPF 的初始配置 基于点到点链路的 OSPF 的初始配置 目录 简介先决条件要求使用的组件规则带有串行接口 IP 地址的点对点链路上的 OSPF 网络图配置带有未编号接口的点对点链路上的 OSPF 网络图配置验证验证带有串行接口 IP 地址的 OSPF 的配置验证带有未编号接口的 OSPF 的配置故障排除相关信息 简介 在高级数据链路控制 (HDLC) 和点对点协议 (PPP) 等点对点链路上, 开放最短路径优先 (OSPF)

More information

DOS下常用的网络命令.PDF

DOS下常用的网络命令.PDF DOS .... 1.1... 1.2... DOS... 2.1 ARP... 2.2 Finger... 2.3 Ftp... 2.4 Nbtstat... 2.5 Netstat... 2.6 Ping... 2.7 Rcp... 2.8 Rexec... 2.9 Route... 2.10 Rsh... 2.11 Tftp... 2.12 Tracert... 1 1 1 1 1 2 3 4

More information

PTS7_Manual.PDF

PTS7_Manual.PDF User Manual Soliton Technologies CO., LTD www.soliton.com.tw - PCI V2.2. - PCI 32-bit / 33MHz * 2 - Zero Skew CLK Signal Generator. - (each Slot). -. - PCI. - Hot-Swap - DOS, Windows 98/2000/XP, Linux

More information

Microsoft Word - chp22.doc

Microsoft Word - chp22.doc 第 22 章 IPv6 无论是 NAT, 还是 CIDR 等都是缓解 IP 地址短缺的手段, 而 IPv6 才是解决地址短缺的最终方法 IPv6 是由 IETF 设计的下一代互联网协议, 目的是取代现有的互联网协议 IPv4 22.1.1 IPv6 优点 22.1 IPv6 概述 IPv4 的设计思想成功地造就了目前的国际互联网, 其核心价值体现在简单 灵活和开放性 但随着新应用的不断涌现, 传统的

More information

第 1 章 实验拓扑 终端服务器配置 访问 Cisco 路由器的方法 通过 Console 口访问路由器 通过 Telnet 访问路由器 终端访问服务器 本书实验拓扑 实验 1: 通过 Console 口访问路由

第 1 章 实验拓扑 终端服务器配置 访问 Cisco 路由器的方法 通过 Console 口访问路由器 通过 Telnet 访问路由器 终端访问服务器 本书实验拓扑 实验 1: 通过 Console 口访问路由 第 1 章 实验拓扑 终端服务器配置 5 1.1 访问 Cisco 路由器的方法 6 1.1.1 通过 Console 口访问路由器 6 1.1.2 通过 Telnet 访问路由器 6 1.1.3 终端访问服务器 7 1.1.4 本书实验拓扑 7 1.2 实验 1: 通过 Console 口访问路由器 8 1.3 实验 2: 通过 Telnet 访问路由器 13 1.4 实验 3: 配置终端访问服务器

More information

Session Dan Gill 2 IP WAN WAN? Networker NSC-114 RST-271 NSC-211 : MTBF: MTTR: MTBF MTTR : MTBF? MTTR? MTTR MTTR MTTR MTBF MTTR Mom-and-apple-pie MTBF MTBF (UPS, ) Mom-and-apple-pie Increase MTBF MTBF?

More information

Cadence SPB 15.2 VOICE Cadence SPB 15.2 PC Cadence 3 (1) CD1 1of 2 (2) CD2 2of 2 (3) CD3 Concept HDL 1of 1

Cadence SPB 15.2 VOICE Cadence SPB 15.2 PC Cadence 3 (1) CD1 1of 2 (2) CD2 2of 2 (3) CD3 Concept HDL 1of 1 Cadence SPB 15.2 VOICE 2005-05-07 Cadence SPB 15.2 PC Cadence 3 (1) CD1 1of 2 (2) CD2 2of 2 (3) CD3 Concept HDL 1of 1 1 1.1 Cadence SPB 15.2 2 Microsoft 1.1.1 Windows 2000 1.1.2 Windows XP Pro Windows

More information

Microsoft Word - chp11NAT.doc

Microsoft Word - chp11NAT.doc 第 11 章 NAT Internet 技术的飞速发展, 使越来越多的用户加入到互联网, 因此 IP 地址短缺已成为一个十分突出的问题 NAT(Network Address Translation, 网络地址翻译 ) 是解决 IP 地址短缺的重要手段 11.1 NAT 概述 NAT 是一个 IETF 标准, 允许一个机构以一个地址出现在 Internet 上 NAT 技术使得一个私有网络可以通过

More information

GPRS IP MODEM快速安装说明

GPRS IP MODEM快速安装说明 GF-3026D CDMA 无 线 路 由 器 用 户 手 册 北 京 嘉 复 欣 科 技 有 限 公 司 地 址 : 北 京 市 海 淀 区 阜 成 路 115 号 北 京 印 象 2 号 楼 213 室 电 话 :86-10-88122130 88153193 88153197 传 真 :86-10-88122129 网 站 :http://www.garefowl.com/ 目 录 一 产 品

More information

SAPIDO GR-1733 無線寬頻分享器

SAPIDO GR-1733 無線寬頻分享器 1 版 權 聲 明... 4 產 品 保 固 說 明... 4 保 固 期 限... 4 維 修 辦 法... 5 服 務 條 款... 5 注 意 事 項... 6 低 功 率 電 波 輻 射 性 電 機 管 理 辦 法... 6 CE 標 誌 聲 明... 6 無 線 功 能 注 意 事 項... 6 1 產 品 特 點 介 紹... 7 1.1 LED 指 示 燈 功 能 說 明... 8 1.2

More information

FortiGate-v5.2-PPPOE 拨号协商时的 AC-name 和 Service-name 版本 1.0 时间 2015 年 3 月 支持的版本 FortiOS v5.2.x 作者 黄豪赫 状态 已审核 反馈

FortiGate-v5.2-PPPOE 拨号协商时的 AC-name 和 Service-name 版本 1.0 时间 2015 年 3 月 支持的版本 FortiOS v5.2.x 作者 黄豪赫 状态 已审核 反馈 FortiGate-v5.2-PPPOE 拨号协商时的 AC-name 和 Service-name 版本 1.0 时间 2015 年 3 月 支持的版本 FortiOS v5.2.x 作者 黄豪赫 状态 已审核 反馈 support_cn@fortinet.com 1 目 录 简介...3 PPPoE 发现阶段简介...3 相关组件...4 参考文档...4 FortiGate 相关命令介绍...

More information

自由軟體教學平台

自由軟體教學平台 NCHC Opensource task force Steven Shiau steven@nchc.gov.tw National Center for High-Performance Computing Sep 10, 2002 1 Outline 1. 2. 3. Service DHCP, TFTP, NFS, NIS 4. 5. 2 DRBL (diskless remote boot

More information

QL1880new2.PDF

QL1880new2.PDF ADSL Modem 1 MODEM 56K MODEM 128K ISDN INTERNET ADSL Modem VOD ADSL ADSL 2 1.1 ADSL 1.2 1.3 KM300A 2.1 2.2 2.3 2.4 2.5 KM300A 2.6 web 2.7 1.1ADSL 1.2 1.3 2.1 ADSL 2.2 ADSL 3 ADSL KM300A ADSL KM300A DIY

More information

局域网技术课程设计报告.doc

局域网技术课程设计报告.doc 湖 南 第 一 师 范 学 院 信 息 科 学 与 工 程 学 院 局 域 网 络 设 计 方 案 1 目 录 一 系 统 概 述...6 1 课 程 设 计 目 的 :...6 2 课 程 设 计 要 求 :...6 3 需 求 分 析 :...6 二 系 统 分 析 与 设 计...7 1 拓 扑 图 设 计...7 2 ip, 掩 码 及 vlan 规 划...7 3 物 理 布 线 设 计...8

More information

RAID RAID 0 RAID 1 RAID 5 RAID * ( -1)* ( /2)* No Yes Yes Yes A. B. BIOS SATA C. RAID BIOS RAID ( ) D. SATA RAID/AHCI ( ) SATA M.2 SSD ( )

RAID RAID 0 RAID 1 RAID 5 RAID * ( -1)* ( /2)* No Yes Yes Yes A. B. BIOS SATA C. RAID BIOS RAID ( ) D. SATA RAID/AHCI ( ) SATA M.2 SSD ( ) RAID RAID 0 RAID 1 RAID 5 RAID 10 2 2 3 4 * (-1)* (/2)* No Yes Yes Yes A. B. BIOS SATA C. RAID BIOS RAID ( ) D. SATA RAID/AHCI ( ) SATA M.2 SSD ( ) ( ) ( ) Windows USB 1 SATA A. SATASATAIntel SATA (SATA3

More information

计算机网络 实验指导书 / 实验三 : 使用路由器组网 实验三 : 使用路由器组网 一 实验目的 1 理解路由器的基本工作原理; 2 掌握路由器的基本管理和配置方法; 3 理解路由组网的方法和静态路由的具体使用; 4 理解基于路由器的园区网的结构, 并进一步体会园区网的设计思路 二 实验学时 2 学

计算机网络 实验指导书 / 实验三 : 使用路由器组网 实验三 : 使用路由器组网 一 实验目的 1 理解路由器的基本工作原理; 2 掌握路由器的基本管理和配置方法; 3 理解路由组网的方法和静态路由的具体使用; 4 理解基于路由器的园区网的结构, 并进一步体会园区网的设计思路 二 实验学时 2 学 实验三 : 使用路由器组网 一 实验目的 1 理解路由器的基本工作原理; 2 掌握路由器的基本管理和配置方法; 3 理解路由组网的方法和静态路由的具体使用; 4 理解基于路由器的园区网的结构, 并进一步体会园区网的设计思路 二 实验学时 2 学时 三 实验类型 综合性 四 实验需求 1 硬件每人配备计算机 1 台 2 软件 Windows 7 以上操作系统, 安装 GNS3 网络仿真与 VirtualBox

More information

自由軟體教學平台

自由軟體教學平台 NCHC Opensource task force DRBL steven@nchc.gov.tw, c00hkl00@nchc.gov.tw National Center for High-Performance Computing http://www.nchc.gov.tw Jan, 2003 1 2003/1/28 ( ) 09:00-10:30 10:40-12:00 Linux 13:00-14:30

More information

中国计算机软件专业技术资格和水平考试

中国计算机软件专业技术资格和水平考试 全 国 计 算 机 技 术 与 软 件 专 业 技 术 资 格 ( 水 平 ) 考 试 2009 年 下 半 年 网 络 工 程 师 上 午 试 卷 ( 考 试 时 间 9 : 00~11 : 30 共 150 分 钟 ) 请 按 下 述 要 求 正 确 填 写 答 题 卡 1. 在 答 题 卡 的 指 定 位 置 上 正 确 写 入 你 的 姓 名 和 准 考 证 号, 并 用 正 规 2B 铅

More information

Olav Lundström MicroSCADA Pro Marketing & Sales 2005 ABB - 1-1MRS755673

Olav Lundström MicroSCADA Pro Marketing & Sales 2005 ABB - 1-1MRS755673 Olav Lundström MicroSCADA Pro Marketing & Sales 2005 ABB - 1 - Contents MicroSCADA Pro Portal Marketing and sales Ordering MicroSCADA Pro Partners Club 2005 ABB - 2 - MicroSCADA Pro - Portal Imagine that

More information

动态路由选择协议、RIP

动态路由选择协议、RIP 学习沉淀成长分享 动态路由协议 RIP 红茶三杯 ( 朱 SIR) 微博 :http://t.sina.com/vinsoney Latest update: 2012-06-01 Content 动态路由协议概述 RIP RIP 基础实验 动态路由协议概述 什么是路由 什么是动态路由协议 动态路由协议的分类 什么是路由 IP header Data FE1/0 PC1 192.168.1.1/24

More information

管理CISCO IOS

管理CISCO IOS 学习沉淀成长分享 管理 CISCO IOS 红茶三杯 ( 朱 SIR) 红茶三杯 ( 朱 SIR) 微博 : t.sina.com/vinsoney Latest update: 2012-06-01 课程目标 CISCO 路由器及启动过程 CISCO IOS 介绍 CISCO IOS 路由器基础实验 CISCO 路由器及启动过程 路由器组件 路由器启动过程 路由器组件 路由器组件及功能 CPU 执行操作系统的指令

More information

地址分配表 设备 接口 IP 地址 子网掩码 默认网关 WEST G0/ N/A S0/0/0 (DCE) N/A Tunnel N/A I

地址分配表 设备 接口 IP 地址 子网掩码 默认网关 WEST G0/ N/A S0/0/0 (DCE) N/A Tunnel N/A I 拓扑 2014 思科和 / 或其附属公司 保留所有权利 本文档所含内容为思科公开发布的信息 第 1 页, 共 7 页 地址分配表 设备 接口 IP 地址 子网掩码 默认网关 WEST G0/1 172.16.1.1 255.255.255.0 N/A S0/0/0 (DCE) 10.1.1.1 255.255.255.252 N/A Tunnel0 172.16.12.1 255.255.255.252

More information

Microsoft Word - chp19IS-IS.doc

Microsoft Word - chp19IS-IS.doc 第 19 章 IS-IS 近几年来, 随着在 ISP 中的广泛应用,IS(Intermediate System, 中间系统 )-IS 路由协议已经变得很普及 IS-IS 最初是由国际标准化组织制定的一个 OSI( 开放系统互联 ) 路由协议, 被设计成工作在 OSI 无连接网络服务 (CLNS) 的环境中 19.1.1 IS-IS 特点 19.1 IS-IS 概述 IS-IS 是一个非常灵活的路由协议,

More information

《计算机网络》实验指导书

《计算机网络》实验指导书 1 实 验 一 网 络 组 建 与 管 理 一. 实 验 目 的 1. 掌 握 平 行 双 绞 线 和 交 叉 双 绞 线 的 制 作 方 法 ( 初 级 ) 2. 掌 握 对 等 网 和 代 理 服 务 器 网 络 的 组 建 ( 初 级 ) 3. 会 用 ipconfig 和 ping 命 令 ( 初 级 ) 4. 掌 握 网 络 中 文 件 夹 共 享 和 打 印 机 共 享 ( 初 级 )

More information

ChinaITLab 网校名师原创作品系列 版权所有, 盗版必究 目录 目录... I BOSON NETSIM 入门进阶 实战 BOSON NETSIM 基本实验 路由器基本实验 - 静态路由 缺省路由配置 交换机基本实验 -VLAN VTP TRUNK

ChinaITLab 网校名师原创作品系列 版权所有, 盗版必究 目录 目录... I BOSON NETSIM 入门进阶 实战 BOSON NETSIM 基本实验 路由器基本实验 - 静态路由 缺省路由配置 交换机基本实验 -VLAN VTP TRUNK 目录 目录... I BOSON NETSIM 入门进阶 实战...1 1 BOSON NETSIM 基本实验...1 1.1 路由器基本实验 - 静态路由 缺省路由配置...1 1.2 交换机基本实验 -VLAN VTP TRUNK...7 1.3 远程访问基本实验 -PPP CHAP...11 2 BOSON NETSIM 进阶实验...15 2.1 ISDN 传统 DDR 配置 (Legacy

More information

第2章 路由器基本配置

第2章 路由器基本配置 路由器基本配置 本章首先将简要介绍路由器的硬件组成, 重点介绍路由器中最重要的部分 IOS 对路由器的配置, 实际上就是对 IOS 软件进行配置 IOS 提供了大量的命令, 只有熟悉这些命令才能很好地发挥路由器的功能, 本章介绍了路由器的一些基本配置命令 2.1 路由器及 IOS 简介 2.1.1 路由器简介 路由器能起到隔离广播域的作用, 还能在不同网络间转发数据包 路由器实际上是一台特殊用途的计算机,

More information

KillTest 质量更高 服务更好 学习资料 半年免费更新服务

KillTest 质量更高 服务更好 学习资料   半年免费更新服务 KillTest 质量更高 服务更好 学习资料 http://www.killtest.cn 半年免费更新服务 Exam : JN0-130 Title : Juniper Juniper Networks Certified Internet Specialist.e(JNCIS-E) Version : Demo 1 / 10 1. Which CLI command is used to set

More information

2 2 3 DLight CPU I/O DLight Oracle Solaris (DTrace) C/C++ Solaris DLight DTrace DLight DLight DLight C C++ Fortran CPU I/O DLight AM

2 2 3 DLight CPU I/O DLight Oracle Solaris (DTrace) C/C++ Solaris DLight DTrace DLight DLight DLight C C++ Fortran CPU I/O DLight AM Oracle Solaris Studio 12.2 DLight 2010 9 2 2 3 DLight 3 3 6 13 CPU 16 18 21 I/O DLight Oracle Solaris (DTrace) C/C++ Solaris DLight DTrace DLight DLight DLight C C++ Fortran CPU I/O DLight AMP Apache MySQL

More information