一.实验目的
1. 掌握H3C路由器的连接和基本配置方法。
2. 理解路由器的基本功能。
二.实验原理和拓扑
图2.1 Telnet方式登录路由器的拓扑结构图
图2.2 路由器端口IP地址配置测试
三.实验内容
1.路由器的外部接口识别。
2.各种连接线型号的识别。
3.路由器的用户配置接口(参见H3C Router Ref的入门2.1.1和2.1.2)
3.1 通过Console口连接配置
3.2 通过Telnet远程登录配置(两种登录方式都要做一次!)
4.熟悉H3C路由器的命令行接口
4.1 掌握命令行模式的基本使用方法 (参见H3C Router Ref的入门2.2)
4.2 掌握命令行视图(不同的视图有不同的光标提示符,参见H3C Router Ref 入门2.2.1)
4.2 掌握命令行模式的快捷键使用方法
5.熟悉Comware的基本配置(参见H3C Router Ref的入门第3章)
5.1 基本配置 (H3C Router Ref的入门3.1,特别注意3.1.6的用户级别切换里面的密码和权限设置)
5.2 配置接口
- 给指定的接口配置IP地址和子网掩码
- 相邻两台路由器用连接线连起来,两个端口分别配置相同网段的IP地址,用ping命令测试其连通性,使用如图2.2所示的网络图。
四.实验的结果及分析。
1. 通过telnet方式登陆显示结果如下:
实验中,我把R1与R2之间的网段地址更改为192.168.1.0/24 R1的s0/0接口地址为192.168.1.2,R2的s0/0接口地址为192.168.1.5。
在R1上配置如下:
System-view
Systemname R1
Int e0/0
Ip add 192.168.1.2 255.255.255.0
Quit
在R2配置如下:
System-view
Systemname R2
Int e0/0
Ip add 192.168.1.5 255.255.255.0
Quit
配置完毕用ping指令测试连通性:
在连接R1的主机上,用命令行ping 192.168.1.5
在连接R2的主机上,用命令行ping 192.168.1.2
结果如下:
五.实验心得体会
上学期做网络布线实验时候,已经初步接触H3C了,所以轻车熟路,加上本身有学习过CCNA的知识,所以对于该实验是手到擒来。
H3C路由器与交换机的实验
<Quidwqy>system
password:
[Quidway]interface ethernet0
[Quidway-Ethernet0]ip addr 10.65.1.2 255.255.255.0
[Quidway-Ethernet0]undo shutdown
[Quidway-Ethernet0]int e1
[Quidway-Ethernet1]ip addr 10.66.1.2 255.255.255.0
[Quidway-Ethernet1]undo shutdown
[root@PCA root]#ifconfig eth0 10.65.1.1 netmask 255.255.0.0
[root@PCB root]#ifconfig eth0 10.66.1.1 netmask 255.255.0.0
[root@PCA root]#ping 10.65.1.2 通
[root@PCA root]#ping 10.66.1.2 不通,没设网关
[root@PCA root]#route add default gw 10.65.1.2
[root@PCA root]#ping 10.66.1.2 通
去掉Host B与Router的连线,再ping:
[root@PCA root]#ping 10.66.1.2 不通(没有接线端口会自动down掉) 再连接Host B与Router的连线,再ping:
[root@PCA root]#ping 10.66.1.2 通了
实验八 单臂路由
设PCA:10.65.1.1 PCB:10.66.1.1
1.一个接口两个IP的情况
<Quidwqy>system
password:
[Quidway]interface ethernet0
[Quidway-Ethernet0]ip addr 10.65.1.2 255.255.255.0
[Quidway-Ethernet1]ip addr 10.66.1.2 255.255.255.0 secondary
[Quiway-Ethernet1]undo shutdown
[root@PCA root]#ping 10.66.1.1 通
2.划分两个子接口,对两个vlan的路由
[SwitchA]vlan 2
[SwitchA-vlan2]port e0/3
[SwitchA]vlan 3
[SwitchA-vlan3]port e0/6
[SwitchA]ine e0/1
[SwitchA-Ethernet0/1]port link-type trunk
[SwitchA-Ethernet0/1]port trunk permit vlan all
[SwitchA-Ethernet0/1]port trunk encap dot1q
[SwitchA]dis curr
[Quidway]int e0
[SwitchA-Ethernet0]int e0.1
[SwitchA-Ethernet0.1]encapsulation dot1q 2
[SwitchA-Ethernet0.1]ip addr 10.65.1.2 255.255.255.0
[SwitchA-Ethernet0.1]nudo shut
[SwitchA-Ethernet0.1]int e0.2
[SwitchA-Ethernet0.2]encapsulation dot1q 2
[SwitchA-Ethernet0.2]ip addr 10.66.1.2 255.255.255.0
[SwitchA-Ethernet0.2]nudo shut
[SwithA]dis curr
[root@PCA root]#ping 10.66.1.1 通
实验九 静态路由实验
PCA:10.65.1.1 PCB:10.66.1.1 PCC:10.68.1.1 PCD:10.69.1.1
[RouterA]interface ethernet0
[RouterA-Ethernet0]ip addrress 10.65.1.2 255.255.0.0
[RouterA-Ethernet0]undo shutdown
[RouterA-Ethernet0]int e1
[RouterA-Ethernet1]ip addrress 10.66.1.2 255.255.0.0
[RouterA-Ethernet1]undo shutdown
[RouterA-Ethernet1]int s1
[RouterA-Serial1]ip addrress 10.67.1.2 255.255.0.0
[RouterA-Serial1]undo shutdown
[RouterA-Serial1]clock rate 64000
[RouterA-Serial1]quit
[RouterA]ip routing
[RouterA]dis curr
[RouterB]interface ethernet0
[RouterB-Ethernet0]ip addrress 10.68.1.2 255.255.0.0
[RouterB-Ethernet0]undo shutdown
[RouterB-Ethernet0]int e1
[RouterB-Ethernet1]ip addrress 10.69.1.2 255.255.0.0
[RoterB-Ethernet1]undo shutdown
[RouterB-Ethernet1]int s0
[RouterB-Serial0]ip addrress 10.67.1.1 255.255.0.0
[RouterB-Serial0]undo shutdown
[RouterB-Serial0]quit
[RouterB]ip routing
[RouterB]dis curr
[root@PCA root]#ifconfig eth0 10.65.1.1 netmask 255.255.0.0
[root@PCA root]#route add default gw 10.65.1.2
[root@PCA root]#ping 10.65.1.2 通
[root@PCA root]#ping 10.66.1.2 通
[root@PCA root]#ping 10.67.1.2 通
[root@PCA root]#ping 10.68.1.2 不通
[root@PCA root]#ping 10.69.1.2 不通
[RouterA]ip route-static 10.69.0.0 255.255.0.0 10.67.1.1
[root@PCA root]#ping 10.69.1.1 通
下面再加入一个路由器Router C:
[RouterB-Serial0]undo ip addrress 10.67.1.1 255.255.0.0
[RouterB-Serial0]ip addrress 10.70.1.1 255.255.0.0
[RouterC]interface serial0
[RouterC-Serial0]ip addrress 10.67.1.1 255.255.0.0
[RouterC-Serial0]undo shutdown
[C-Serial0]clock rate 64000
[RouterC-Serial0]int s1
[RouterC-Serial1]ip addrress 10.70.1.1 255.255.0.0
[RouterC-Serial1]undo shutdown
[RouterC-Serial1]quit
[RouterC]ip route-static 10.69.0.0 255.255.0.0 10.70.1.1
[RouterC]dis curr
[root@PCA root]#ping 10.69.1.1 通
[root@PCA root]#ping 10.68.1.1 不通
实验十 动态路由实验
[RouterA]rip version 2 multicast
[RouterA-rip]network 10.0.0.0 ;可以all rA-rip]ip routing
[RouterB]rip version 2 multicast
[RouterB-rip]network 10.0.0.0
[RouterB-rip]ip routing
[RouterC]rip version 2 multicast
[RouterC-rip]network 10.0.0.0
[RouterC-rip]ip routing
[RouterC]dis ip route
[root@PCA root]#ping 10.68.1.1 通
[root@PCA root]#ping 10.69.1.1 通
[RouterA-rip]peer 10.67.1.1 ;指明交换点
[RouterA-rip]summary ;聚合
[RouterA-Serial0]rip split-horizon ;水平分隔
[RouterA]rip work
[RouterA]rip input
[RouterA]rip output
[Quidway]router id A.B.C.D ;配置路由器的ID
[Quidway]ospf enable ;启动OSPF协议
[Quidway-ospf]import-route direct ;引入直联路由
[Quidway-Serial0]ospf enable area 0 ;配置OSPF区域
[Quidway-Serial0]link-protocol ppp
实验十一 访问控制列表实验
1.基本访问列表
[RouterC]firewall enable
[RouterC]firewall default permit
[RouterC]acl 10
[RouterC-acl-10]rule normal deny source 10.65.1.1
[RouterC-acl-10]rule normal permit source any
[C]int s0
[RouterC-Serial0]firewall packet-filter 10 inbound
[RouterC-Serial0]quit
[RouterC]display acl
[root@PCA root]#ping 10.68.1.1 不通
[root@PCB root]#ping 10.68.1.1 通
[RouterC]undo acl 10
[RouterC]display acl
[root@PCA root]#ping 10.68.1.1 通
[root@PCB root]#ping 10.68.1.1 通
[RouterC]acl 11
[RouterC-acl-11]rule normal deny source 10.65.1.1 0.0.0.255
[RouterC-acl-11]rule normal permit source any
[RouterC]int s0
[RouterC-Serial0]firewall packet-filter 11 inbound
[rC]display acl
[root@PCA root]#ping 10.68.1.1 不通
[root@PCB root]#ping 10.68.1.1 不通
[RouterC]undo acl
2.扩展访问控制列表
[RouterC]firewall enable
[RouterC]firewall default permit
[RouterC]acl 101
[RouterC-acl-101]rule deny tcp source 10.65.1.1 0 destination 10.69.1.1 0
[RouterC-acl-101]rule permit ip source any destination any
[RouterC]int s1
[RouterC-Serial1]firewall packet-filter 101 outbound
[RouterC-Serial1]quit
[RouterC]dis acl
[root@PCA root]#ping 10.68.1.1 通
[root@PCA root]#ping 10.69.1.1 不通
[root@PCB root]#ping 10.69.1.1 通
[RouterC]undo acl
[root@PCA root]#ping 10.69.1.1 通
H3C 交换机&路由器的基本配置
实验一 基本命令实验
添加一个交换机,一个计算机,双击交换机,进入终端配置:
<Quidway>system
password:
[Quidway]sysname S3026 交换机命名
[S3026]super password 111 修改特权用户密码
[S3026]user-interface vty 0 4
[S3026-ui-vty0-4]authentication-mode password
[S3026-ui-vty0-4]set authentication-mode password simple 222
[S3026-ui-vty0-4]user privilege level 3
[S3026-ui-vty0-4]quit
[S3026]quit
<S3026>sys
password:111
[S3026]display currect-config
[S3026]dis curr
[S3026]vlan 2
[S3026-vlan2]port ethernet0/2
[S3026-vlan2]port e0/4 to et0/6
[S3026-vlan2]quit
[S3026]dis vlan
[S3026]int e0/3
[S3026-Ethernet1]port access vlan 2
[S3026-Ethernet1]quit
[S3026]dis vlan
[S3026]dis curr
[S3026]interface vlan 1 进入接口视图
[S3026-Vlan-interface1]ip address 10.65.1.1 255.255.0.0
[S3026-Vlan-interface1]quit
[S3026]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2
[S3026]ip default-gateway 10.65.1.2
[S3026]dis curr
[S3026]save
双击小电脑:
login:root
password:linux
[root@PCA root]#ifconfig eth0 10.65.1.1 netmask 255.255.0.0
[root@PCA root]#ping 10.65.1.2
[root@PCA root]#telnet 10.65.1.2
实验二 配置端口聚合
要求聚合的端口工作在全双工,速度一致,在同一槽口且连续, ingress:源MAC, both:源和目的MAC
对于SwitchA:
[SwitchA]interface ethernet0/1
[SwitchA-Ethernet0/1]duplex full
[SwitchA-Ethernet0/1]speed 100
[SwitchA-Ethernet0/1]int e0/2
[SwitchA-Ethernet0/2]duplex full
[SwitchA-Ethernet0/2]speed 100
对于SwitchB:
[SwitchB]interface ethernet0/1
[SwitchB-Ethernet0/1]duplex full
[SwitchB-Ethernet0/1]speed 100
[SwitchB-Ethernet0/1]int e0/2
[SwitchB-Ethernet0/2]duplex full
[SwitchB-Ethernet0/2]speed 100
聚合操作:
[SwitchA]link-aggregation ethernet0/1 to ethernet0/2 both
[SwitchB]link-aggregation ethernet0/1 to ethernet0/2 both
[SwitchA]display link-aggregation ethernet0/1
[SwitchA]undo link-aggregation all
实验三 基本VLAN设置
[SwitchA]vlan 2
[SwitchA-vlan2]port e0/3 to e0/4
[SwitchA]vlan 3
[SwitchA-vlan3]port e0/5 to e0/6
[SwitchB]vlan 2
[SwitchB-vlan2]port e0/3 to e0/4
[SwitchB]vlan 3
[SwitchB-vlan3]port e0/5 to e0/6
设置计算机的IP为:
PCA:10.65.1.1 PCB:10.65.1.2 PCC:10.65.1.3 PCD:10.65.1.4
[root@PCA root]#ping 10.65.1.1 通
[root@PCA root]#ping 10.65.1.2 不通
[root@PCA root]#ping 10.65.1.3 不通
[root@PCA root]#ping 10.65.1.4 不通
将PCA改接到SwitchA E0/2, PCC改接到SwitchB E0/2
[root@PCA root]#ping 10.65.1.3 通(这时都在vlan 1)
再改回来:
[S3026A]interface ethernet 0/8
[S3026A-Ethernet0/8]port link-type trunk
[S3026A-Ethernet0/8]port trunk permit vlan all
[S3026B]interface ethernet 0/1
[S3026B-Ethernet0/1]port link-type trunk
[S3026B-Ethernet0/1]port trunk permit vlan all
[root@PCA root]#ping 10.65.1.3 通
[root@PCA root]#ping 10.65.1.4 不通
[root@PCB root]#ping 10.65.1.4 通
即:PCA和PCC同在vlan 2 是通的。
PCB和PCD同在vlan 3是通的。
PCA和PCB是不通的。同理PCC和PCD也是不通的。
[S3026C]interface ethernet 0/1
[S3026C-Ethernet0/1]port link-type trunk
[S3026C-Ethernet0/1]port trunk permit vlan all
[S3026C]interface ethernet 0/8
[S3026C-Ethernet0/8]port link-type trunk
[S3026C-Ethernet0/8]port trunk permit vlan all
[root@PCA root]#ping 10.65.1.3 通
[root@PCA root]#ping 10.65.1.4 不通
实验四 配置primary VLAN和secondary VLAN
[SwitchA]vlan 2
[SwitchA-vlan2]port ethernet 0/5 to ethernet 0/6
[SwitchA]vlan 3
[SwitchA-vlan3]port ethernet 0/7 to ethernet 0/8
[SwitchA]vlan 5
[SwitchA-vlan5]port ethernet 0/1 to ethernet 0/4
[SwitchA-vlan5]isolate-user-vlan enable ;vlan5是主vlan
[SwitchA-vlan5]quit
[SwitchA]isolate-user-vlan 5 secondary 2,3 ;vlan2,3是子vlan
[SwitchB]vlan 2
[SwitchB-vlan2]port ethernet 0/5 to ethernet 0/6
[SwitchB]vlan 3
[SwitchB-vlan3]port ethernet 0/7 to ethernet 0/8
[SwitchA]vlan 4
[SwitchB-vlan4]port ethernet 0/1 to ethernet 0/4
[SwitchB-vlan4]isolate-user-vlan enable ;vlan4是主vlan
[SwitchB-vlan4]quit
[SwitchB]isolate-user-vlan 4 secondary 2,3 ;vlan2,3是子vlan
实验五 其它功能
(一) 设置镜像
[Quidway]monitor-port e0/8
[Quidway]port mirror e0/1
或:[Quidway]port mirror e0/1 to e0/2 observing-port e0/8
(二) 生成树
[Quidway]stp {enable|disable}
[Quidway]stp priority 4096 设置交换机的优先级
[Quidway]stp root primary 设置交换机为树根
[Quidway-Ethernet0/1]stp cost 200 设置交换机端口的花费
实验六 路由器BootROM升级
<Quidway>system
[Quidway]reload
Press Ctrl+B to enter Boot Menu …
Boot Menu:
1:Download application program
2:Download Bootrom program
3:Modify Bootrom password
4:Exit menu
5:Reboot
Enter your choice(1-5):1
Downloading application program
from serial ... (rs232)
please choose your download speed:
1:9600bps
2:19200bps
3:38400bps
4:Exit and reboot
Enter your choice(1-4):2
Download speed is 38400bps.
Please change the terminal's speed to 38400bps.
And select XMODEM
protocol. Press ENTER key when ready.
Downloading ...CC (please select [File]->[Send])
Download completed.
Write flash auccessfully!
张强胜网络09120xx00824125实验一路由器的基本配置实验目的本次实验主要是学习几种路由器的工作模式间的关系及其如何利用超…
路由器的基本操作实验报告一实验编号实验83二实验名称路由器的基本操作三所属课程网络工程四知识类别路由器五实验来源锐捷公司六关键词c…
一实验目的通过对路由器安装与配置实验加深对相关网络设备工作原理理解掌握其常见产品的安装与配置方法为将来从事网络工程建设打下基础二实…
实验八路由器基本配置一实验目的掌握对路由器进行基本配置的方法二实验预习内容1路由器有哪两种管理方式答1带外管理通过交换机端口Con…
首先感谢院领导给我的这次进修学习机会。通过这次在福建省人民医院手术室对腔镜手术的专项学习,在很大程度上开拓了我的眼界、增强了自己的…
共青团施甸县委“防艾法制宣传一条街”活动总结12月x日是第22个“世界艾滋病日”,根据县委的安排部署,为切实做好“世界艾滋病日”和…
“绿色校园、变废为宝”设计大赛活动总结为促进我院校园文化建设,丰富学生的业余生活,展现海经大学生风采,创建和谐校园,进一步美化我校…
11月x日计划已久的南越王墓参观终于进行了,虽然活动没有想象中美好,但也收获颇丰。整个参观过程比较顺利,参观了玉枕展示,巫与神的世…
20xx年上半年工作总结办公室20xx年上半年,办公室在院党组的正确领导下,在兄弟庭室的大力支持和协助下,充分发挥综合、协调、参谋…