计算机网络实验指导1(1) 联系客服

发布时间 : 星期五 文章计算机网络实验指导1(1)更新完毕开始阅读bd1549222f60ddccda38a040

\

configuration or there is a software problem and system operation may be compromised. Rounded IOMEM up to: 10Mb.

Using 3 percent iomem. [10Mb/256Mb] 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. 52.227-19 and subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS sec. 252.227-7013. cisco Systems, Inc. 170 West Tasman Drive

San Jose, California 95134-1706

Cisco IOS Software, 2800 Software (C2800NM-IPBASE-M), Version 12.4(3g), RELEASE SOFTWARE (fc2)

Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2006 by Cisco Systems, Inc. Compiled Mon 06-Nov-06 02:36 by alnguyen

Image text-base: 0x400A1994, data-base: 0x41540000 Port Statistics for unclassified packets is not turned on. Cisco 2811 (revision 49.46) with 251904K/10240K bytes of memory. Processor board ID FHK1107F150 2 FastEthernet interfaces

DRAM configuration is 64 bits wide with parity enabled. 239K bytes of non-volatile configuration memory. 62720K bytes of ATA CompactFlash (Read/Write) Press RETURN to get started! //加电自检结束

Cisco Router and Security Device Manager (SDM) is installed on this device. This feature requires the one-time use of the username \ with the password \vel of 15.

Please change these publicly known initial credentials using SDM or the IOS CLI. Here are the Cisco IOS commands.

username privilege 15 secret 0 no username cisco

Replace and with the username and password you want to use For more information about SDM please follow the instructions in the QUICK START GUIDE for your router or go to http://www.cisco.com/go/sdm ----------------------------------------------------------------------- 配置连接网络1的F0/0接口

User Access Verification Username: cisco //按要求输入用户名 Password: //输入密码:cisco router-A3# //进入特权模式 router-A3#configure t

Enter configuration commands, one per line. End with CNTL/Z. router-A3(config)#int fa0/0 //配置路由器fa0/0口 router-A3(config-if)#ip address 192.168.2.1 255.255.255.0 //配置fa0/0的ip和子网 router-A3(config-if)#no shut //激活端口 router-A3(config-if)#exit router-A3(config)#exit Building configuration...

配置连接网络2的F0/1接口 router-A3#config t

Enter configuration commands, one per line. End with CNTL/Z. router-A3(config)#int fa0/1 //配置fa0/1口 router-A3(config-if)#ip address 10.0.0.1 255.0.0.0 //设置ip和子网 router-A3(config-if)#no shut //激活 router-A3(config-if)#^Z

两个子网相连接的路由器设置以完成

下面配置网络,以实现两个不同的网络连接。

首先配置与fa0/0相连接的交换机上的所有pc机的ip 和网关如上表中网络1 的配置

然后同理,配置网络2的ip

配置完成后从网络1(或网络2)的任何一台主机上ping网络2(或网络1)上的主机,看是否能ping 通。

Ping 通说明实验成功

二、用路由器的扩展端口连接两个子网

两个子网配置不变,端口用fa0/3/0,fa0/3/1,fa0/3/2,fa0/3/3中的任意两个,端口配置命令

如下:

首先把fa0/0和fa0/1端口的ip取消掉,防止后面设置时出错。

router-A3#config t

Enter configuration commands, one per line. End with CNTL/Z. router-A3(config)#int fa0/0

router-A3(config-if)#no ip address 192.168.2.1 255.255.255.0 router-A3(config-if)#exit router-A3(config)#int fa0/1

router-A3(config-if)#no ip address 10.0.0.1 255.0.0.0 router-A3(config-if)#exit router-A3(config)#exit

下面我们用fa0/3/0和fa0/3/1端口为例来配置。

router-A3#vlan database router-A3(vlan)#vlan 2 VLAN 2 added:

Name: VLAN0002 router-A3(vlan)#vlan 3 VLAN 3 added:

Name: VLAN0003 router-A3(vlan)#vlan 4 VLAN 4 added:

Name: VLAN0004 router-A3(vlan)#vlan 5 VLAN 5 added:

Name: VLAN0005 router-A3(vlan)#exit APPLY completed. Exiting....

router-A3#config t

Enter configuration commands, one per line. End with CNTL/Z. router-A3(config)#int fa0/3/0

router-A3(config-if)#switchport mode access router-A3(config-if)#switchport access vlan 2 router-A3(config-if)#exit router-A3(config)#int fa0/3/1

router-A3(config-if)#switchport mode access router-A3(config-if)#switchport access vlan 3 router-A3(config-if)#exit router-A3(config)#int fa0/3/2

router-A3(config-if)#switchport mode access router-A3(config-if)#switchport access vlan 4 router-A3(config-if)#exit router-A3(config)#int fa0/3/3

router-A3(config-if)#switchport mode access