当前位置:文档之家› 计算机网络模拟器实验报告记录(1)

计算机网络模拟器实验报告记录(1)

计算机网络模拟器实验报告记录(1)————————————————————————————————作者:————————————————————————————————日期:计算机网络模拟器实验报告学院:学号:姓名:实验名称:计算机网络模拟器试验实验说明:共5个实验,其中前3个必做,后2个选做。

一、实验目的1、掌握模拟器软件的使用方法;2、掌握配置PC、交换机、路由器的方法;3、掌握为交换机设置VLAN,为端口设置TRUNK的方法。

二、实验环境(请注意关闭杀毒软件)WinXP/WIN7、HW-RouteSim 2.2(软件请到BB课程资源下载,下载后直接解压缩运行;下载前请关闭杀毒软件)三、实验步骤及结果实验一:计算机和交换机基本设置添加一个交换机,两个计算机,连接A电脑到交换机3号端口,B电脑到6号端口,双击交换机,进入终端配置:<Switch>systempassword:[Quidway]sysname S3026 ;交换机重命名为S3026 [S3026]super password 111 ;设置特权密码为111 [S3026]quit<S3026>syspassword:111[S3026]display currect-config ;查看当前所有配置[S3026]display vlan all ;查看当前VLAN设置观察此时所有交换机端口都在同一个vlan1内。

双击小电脑A:login:rootpassword:linux[root@PCAroot]# ? ;输入?号查看命令提示[root@PCAroot]#ifconfig eth0 10.65.1.1 netmask 255.255.0.0 双击小电脑B:login:rootpassword:linux[root@PCAroot]#ifconfig eth0 10.65.1.2 netmask 255.255.0.0 点击A电脑做测试:[root@PCA root]#ping 10.65.1.2实验结果及其分析:(将结果保存为文件net1.txt)<Quidway>systemEnter system view, return to user view with Ctrl+Z. [Quidway]sysname S3026[S3026]super password 111[S3026]quit<S3026>sysEnter system view, return to user view with Ctrl+Z. password:111[S3026]display currect-config#hostname S3026super password 111#radius scheme systemserver-type huaweiprimary authentication 127.0.0.1 1645primary accounting 127.0.0.1 1646user-name-format without-domaindomain systemradius-scheme systemaccess-limit disablestate activeidle-cut disabledomain default enable system#local-server nas-ip 127.0.0.1 key huawei #vlan 1ip addressip route-static (default gateway)#interface Aux0/0#interface Ethernet0/1##interface Ethernet0/2##interface Ethernet0/3##interface Ethernet0/4 ##interface Ethernet0/5 ##interface Ethernet0/6 ##interface Ethernet0/7 ##interface Ethernet0/8 ##interface NULL0##user-interface aux 0 passworduser-interface vty 0 4passwordreturn[S3026]display vlan allVlan Name Status Ports-------- -------- ---------- ------------------------1 default Active F0/1, F0/2, F0/3, F0/4, F0/5, F0/6, F0/7, F0/81002 fddi-d Active1004 fnet-d ActiveVLAN Type SAID MTU-------- ------- -------------- --------1 enet 100001 15001002 fddi 101002 15001002 fnet 101003 1500[S3026]Red Hat Linux release 7.3 (Valhalla)Kernel 2.4.18-3 on an i686PCA login: rootpassword: linux[root@PCA root]# ?ifconfig eth0 <ip address> netmask <netmask>ifconfig eth0 <ip address> netmask <netmask> down ifconfigroute add default gw <ip address>route del default gwrouteping <ip address>telnet <ip address>shutdown -h nowinit 0[root@PCA root]# ifconfig eth0 10.65.1.1 netmask 255.255.0.0Red Hat Linux release 7.3 (Valhalla)Kernel 2.4.18-3 on an i686PCB login: rootpassword: linux[root@PCB root]# ifconfig eth0 10.65.1.2 netmask 255.255.0.0[root@PCB root]#[root@PCA root]# ping 10.65.1.264 bytes from 10.65.1.1: icmp_seq=1 ttl=128 time=0.207 ms 64 bytes from 10.65.1.1: icmp_seq=1 ttl=128 time=0.100 ms 64 bytes from 10.65.1.1: icmp_seq=1 ttl=128 time=0.96 ms 64 bytes from 10.65.1.1: icmp_seq=1 ttl=128 time=0.96 ms4packets transmitted, 4 received, 0% loss, time 2000ms[root@PCA root]#试验二:基本VLAN设置添加2台交换机,4台计算机。

连接A电脑到A交换机3号端口,B电脑到6号端口;连接C电脑到B交换机3号端口,D电脑到6号端口;将A交换机的8号端口与B交换机的1号端口连接。

分别设置计算机的IP为:PCA:10.65.1.1 PCB:10.66.1.1 PCC:10.65.1.3 PCD:10.66.1.3 掩码都是255.255.0.0此时,PCA与PCC在同一个子网10.65.0.0内;PCB与PCD在同一个子网10.66.0.0内;默认交换机设置下,PCA能与PCC连通,PCB能与PCD 连通。

实验结果及其分析:[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@PCC root]# ifconfig eth0 10.65.1.3 netmask 255.255.0.0[root@PCD root]# ifconfig eth0 10.66.1.3 netmask 255.255.0.0继续本实验:... ... ;登录交换机过程省略[SwitchA]vlan 2 ;创建vlan2 [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分别查看各交换机的VLAN设置,然后测试连通性:[root@PCA root]#ping 10.65.1.1 通(本机IP)[root@PCA root]#ping 10.65.1.3 不通(中间连接线是vlan 1)[root@PCA root]#ping 10.66.1.1 不通(不同网络,不同vlan)[root@PCA root]#ping 10.66.1.3 不通(不同网络,不同vlan)[root@PCB root]#ping 10.66.1.3 不通(中间连接线是vlan 1)将PCA改接到SwitchA E0/2 (vlan 1)[root@PCA root]#ping 10.65.1.3 不通(同网络,不同vlan)将PCC改接到SwitchB E0/2 (vlan 1)[root@PCA root]#ping 10.65.1.3 通(同网络,同在vlan 1)再改回来:将PCA接回到SwitchA E0/3 (vlan 1)将PCC接回到SwitchB E0/3 (vlan 1)并设置trunk:[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.66.1.3 不通[root@PCB root]#ping 10.66.1.3 通即:PCA和PCC同在vlan 2 是通的,PCB和PCD同在vlan 3是通的。

相关主题