1、通信工程专业综合实验 版通信工程综合实验计算机网络实验一 网络设备的基本操作与连接调试实验一、基本连接图:二、实验步骤:1. 用每台PC提供的Console连线和网线,选择一台路由器或者交换机连接好; 2. 网线连接时,注意选择正确的接口(区分两种不同的以太网接口); 3. 按照实验指导书完成各项试验内容;4. 完成试验后,备份你试验中形成的配置文件,用U盘拷走,用于写试验报告。 三、路由器配置信息:# version 5.20, Release # sysname H3C #系统名称为H3C# super password level 3 simple mice #设置为管理级,密码明文显示
2、# domain default enable system # telnet server enable #启用远程服务协议# dar p2p signature-file flash:/p2p_default.mtd# port-security enable #端口安全启用#vlan 1 虚拟局域网1#domain system access-limit disable state active idle-cut disable self-service-url disable #user-group system#local-user admin #本地用户admin password
3、 cipher .USE=B,53Q=QMAF41! #密码密文显示 authorization-attribute level 3 #访问权限为 level 3 service-type telnet #telnet登陆local-user mice #本地用户名为mice password simple mice #明文显示密码为:mice service-type telnet #telnet 登陆#interface Aux0 async mode flow link-protocol ppp#interface Cellular0/0 async mode protocol link
4、-protocol ppp#interface Ethernet0/0 port link-mode route ip address 192.168.0.45 255.255.255.0 #配置以太网接口ip地址192.168.0.45#interface Serial0/0 link-protocol ppp#interface NULL0#interface Vlan-interface1 ip address 192.168.1.1 255.255.255.0 #interface Ethernet0/1 port link-mode bridge#interface Ethernet
5、0/2 port link-mode bridge#interface Ethernet0/3 port link-mode bridge#interface Ethernet0/4 port link-mode bridge#subscriber-line1/0#subscriber-line1/1# load xml-configuration # load tr069-configuration#user-interface tty 12user-interface aux 0user-interface vty 0 4 authentication-mode scheme #Retur
6、n四、遇到的问题:1.路由器上无法打开telnet服务,检查了一下发现时未进入系统视图。2.注意系统不区分大小写,因此文件名应避免用大小写区分。3.长的指令可以通过tab键省略局部。五、思考题:1.路由器中的FLASH相当于普通电脑中什么的功能?答:FLASH 相当于普通电脑中的硬盘。2.路由器中的current-configuration和saved-configuration的比较?答:Saved-configuration 是FLASH中保存的配置,而current-confuguration是RAM中保存的配置。3.在实验一的实验任务四中,若不用level3 命令,后续实验会有什么后果
7、?答:若不用level 3的命令,则后续命令无法进行,因为权限不够。4.网络连接基本连接与调试试验中,在配置静态路由之前,PCA为什么无法ping通PCB的IP地址?答:路由表中不知道如何转发,于是就丢弃报文。实验二 网络交换机实验一、实验连接图:在我们的试验中,是交换机和路由器互连,互连的端口是e1/0/1,我们组使用的是交换机。三、实验步骤:内容一:配置Acess链路端口1.按图示连接并检查设备的软件版本及配置信息,确保处于初始状态。如果不符合要求则进行初始化。 2.未配置VLAN之前应该保证先保证PCA和PCB的IP地址在同一网段,且能够相互ping通;2.观察缺省VLAN:在交换机上查
8、看VLAN:display vlan3.配置VLAN并添加端口配置好telnet连接方式,其中一个组可以以telnet方式登录管理。分别在SWA和SWB上创建VLAN2,并将PCA和PCC所连接的端口Ethernet1/0/1添加到VLAN2中。4.测试VLAN间的隔离:测试处于不同VLAN之间的PC能否PING通。内容二:配置Trunk链路端口1.跨交换机VLAN互通测试:PCA与PCC都属于VLAN2但不能够ping通,因为交换机之间的端口是Access链路端口,默认VLAN1,VLAN2的数据不能通过。2.设置SWA和SWB端口为Trunk链路端口:3.配置完之后,PCA和PCC能够pi
9、ng通。四交换机配置信息# sysname H3C# loopback-detection enable# dot1x #交换机上启用802.1X协议#radius scheme system#domain system#local-user aaa #本地用户名 password simple 123 #明文显示密码 service-type lan-access #802.1X协议本地用户#vlan 1 to 2 #交换机中有12号虚拟局域网#interface Aux1/0/0#interface Ethernet1/0/1 port access vlan 2 #属于vlan 2的端口
10、 loopback-detection enable#interface Ethernet1/0/2 loopback-detection enable dot1x #采用802.1X协议的端口#interface Ethernet1/0/3 loopback-detection enable#interface Ethernet1/0/4 loopback-detection enable#interface Ethernet1/0/5 loopback-detection enable#interface Ethernet1/0/6 loopback-detection enable do
11、t1x #采用802.1X协议的端口#interface Ethernet1/0/7 loopback-detection enable#interface Ethernet1/0/8 loopback-detection enable#interface Ethernet1/0/9 loopback-detection enable#interface Ethernet1/0/10 loopback-detection enable#interface Ethernet1/0/11 loopback-detection enable#interface Ethernet1/0/12 loop
12、back-detection enable#interface Ethernet1/0/13 loopback-detection enable#interface Ethernet1/0/14 loopback-detection enable#interface Ethernet1/0/15 loopback-detection enable#interface Ethernet1/0/16 loopback-detection enable#interface Ethernet1/0/17 loopback-detection enable#interface Ethernet1/0/1
13、8 loopback-detection enable#interface Ethernet1/0/19 loopback-detection enable#interface Ethernet1/0/20 loopback-detection enable#interface Ethernet1/0/21 loopback-detection enable#interface Ethernet1/0/22 port access vlan 2 #端口配置为VLAN2 loopback-detection enable#interface Ethernet1/0/23 loopback-det
14、ection enable#interface Ethernet1/0/24 port link-type trunk port trunk permit vlan all #trunk链路端口 loopback-detection enable#interface GigabitEthernet1/1/1#interface GigabitEthernet1/1/2 shutdown#interface GigabitEthernet1/2/1#interface GigabitEthernet1/2/2 shutdown#interface NULL0#user-interface aux
15、 0user-interface vty 0 4#Return五、遇到的问题:无六、思考题:1. 在实验二中,若配置SWA的E1/0/24为trunk类型,SWB为access类型,PCB与PCD之间可以连通么?为什么?答:不能,因为两个地址的协议不一样无法连通。2.实验中,若果交换机间有物理环路产生广播风暴,除了断开交换机链路之外,还有什么处理方法?答:给交换机断电后再给电,随后查找异常流量的来源,拔掉该根网线。实验三 路由器基本应用实验一、实验连接图:E0/0192.168.3.0E0/0192.168.0.1S0/0192.168.2.1S0/0192.168.2.2 192.168.3
16、.11192.168.0.3 三、实验步骤: 任务一:静态路由的配置:1.按照设计计划,完成网络物理连接; 2.把实验中用到的设备初始化配置并重启:reset saved-configuration reboot3.根据网络设计把PCA、PCB的IP地址设置好;4.根据网络设计把RTA中互连接口(serial 0/0)和与PCA连接的Ethernet接口(Ethernet 0/0)的IP地址配置好;(RTB的配置相同)基本方法:在 系统模式下,用“interface 接口名称” 进入该接口配置模式;然后用“ip address .”命令配置IP地址; 5.查看路由表; 路由表记录:(配置完静态
17、路由)RTAip route-static 192.168.3.0 24 192.168.2.2RTAdisplay ip routing-tableRouting Tables: Public Destinations : 10 Routes : 10Destination/Mask Proto Pre Cost NextHop Interface127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0192.168.0.0/24 Direct 0 0 192.168.0.1 Eth0/
18、0192.168.0.1/32 Direct 0 0 127.0.0.1 InLoop0192.168.2.0/24 Direct 0 0 192.168.2.1 S0/0192.168.2.1/32 Direct 0 0 127.0.0.1 InLoop0192.168.2.2/32 Direct 0 0 192.168.2.2 S0/0192.168.3.0/24 Static 60 0 192.168.2.2 S0/0192.168.4.0/24 Direct 0 0 192.168.4.1 Vlan1192.168.4.1/32 Direct 0 0 127.0.0.1 InLoop0
19、 任务二:动态路由器协议:1.用undo ip route-static. 命令删除静态路由,否则会会影响后续实验结果(静态路由优先级高于动态路由,网络首先会选择静态路由)。2. 设置rip协议应用,以路由器A配置为例,RTB中配置方式相同:路由表记录:RTArip %进入rip配置模式RTA-rip-1network 192.168.0.0 %指明RTA连接的网络1 192.168.0.0RTA-rip-1network 192.168.2.0 %指明RTA连接的网络1 192.168.2.0Routing Tables: Public Destinations : 10 Routes :
20、10Destination/Mask Proto Pre Cost NextHop Interface127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0192.168.0.0/24 Direct 0 0 192.168.0.1 Eth0/0192.168.0.1/32 Direct 0 0 127.0.0.1 InLoop0192.168.2.0/24 Direct 0 0 192.168.2.1 S0/0192.168.2.1/32 Direct 0 0 127.0.0.1 InL
21、oop0192.168.2.2/32 Direct 0 0 192.168.2.2 S0/0192.168.3.0/24 RIP 100 1 192.168.2.2 S0/0192.168.4.0/24 Direct 0 0 192.168.4.1 Vlan1192.168.4.1/32 Direct 0 0 127.0.0.1 InLoop0三、路由器配置信息1 静态路由配置#eThe contents of local user admin: State: Active ServiceType: telnet Access-limit: Disable Current AccessNum:
22、 0 User-group: system Bind attributes: Authorization attributes: User Privilege: 3Total 1 local user(s) matched.H3CdisH3Cdisplay cur# version 5.20, Release # sysname H3C# domain default enable system# dar p2p signature-file flash:/p2p_default.mtd# port-security enable#vlan 1#domain system access-lim
23、it disable state active idle-cut disable self-service-url disable#user-group system#local-user admin password cipher .USE=B,53Q=QMAF41! authorization-attribute level 3 service-type telnet#interface Aux0 async mode flow link-protocol ppp#interface Cellular0/0 async mode protocol link-protocol ppp#int
24、erface Ethernet0/0 port link-mode route ip address 192.168.0.1 255.255.255.0#interface Serial0/0 link-protocol ppp ip address 192.168.2.1 255.255.255.0#interface NULL0#interface Vlan-interface1 ip address 192.168.1.1 255.255.255.0#interface Ethernet0/1 port link-mode bridge#interface Ethernet0/2 por
25、t link-mode bridge#interface Ethernet0/3 port link-mode bridge#interface Ethernet0/4 port link-mode bridge# ip route-static 192.168.3.0 255.255.255.0 192.168.2.2 #配置的静态路由# load xml-configuration# load tr069-configuration#user-interface tty 12user-interface aux 0user-interface vty 0 4#Return实验二配置RIP路
26、由器协议配置文件:# version 5.20, Release 1809P01# sysname H3C# domain default enable system# dar p2p signature-file flash:/p2p_default.mtd# port-security enable#vlan 1#domain system access-limit disable state active idle-cut disable self-service-url disable#user-group system#local-user admin password cipher
27、 .USE=B,53Q=QMAF41! authorization-attribute level 3 service-type telnet#interface Aux0 async mode flow link-protocol ppp#interface Cellular0/0 async mode protocol link-protocol ppp#interface Ethernet0/0 port link-mode route ip address 192.168.0.1 255.255.255.0#interface Serial0/0 link-protocol ppp i
28、p address 192.168.2.1 255.255.255.0#interface NULL0#interface Vlan-interface1 ip address 192.168.1.1 255.255.255.0#interface Ethernet0/1 port link-mode bridge#interface Ethernet0/2 port link-mode bridge#interface Ethernet0/3 port link-mode bridge#interface Ethernet0/4 port link-mode bridge#rip 1 net
29、work 192.168.0.0 #RIP协议启用 network 192.168.2.0# load xml-configuration# load tr069-configuration#user-interface tty 12user-interface aux 0user-interface vty 0 4#return五遇到的问题:1.应该正确区分每根线的作用。2.提前设置好各个地址,防止搞混。六、思考题1.在本实验中,如果仅在RTA上配置静态路由,不在RTB上配置静态路由,那么PCA发出的数据报文能达到PCB么?PCA可以PING通PCB么?答:数据报文可以到达PCB,但是由于没有在PCB上配置静态路由,PCB发出的回应信息不知道往哪传,所以会丢弃报文,无法PING通。2. 说明静态路由配置命令“ip route-static 192.168.3.0 24 192.168.2.2”中各参数的意义?答:ip route-static 是配置静态路由命令关键字,192.168.3.0表示当前路由器要访问的目标网段,192.168.2.2表示当前路由器访问该目标段时,与其直连的接口端地址。3. 如果配置静态路由和RIP路由均有效,路由器中会使用