班级:07东方信息 姓名: 学号:
实验时间:10年5月9日 机房:9-205 组号:7 机号:A
一、实验题目
实验四 IP地址分配
二、实验设备
CISCO路由器,专用电缆,网线,CONSOLE线,PC机
三、实验内容
学习分配IP地址;
在路由器端口上配置IP地址及其子网掩码。
四、原理
Internet依靠TCP/IP协议,在全球范围内实现不同硬件结构、不同操作系统、不同网络系统的互联。在Internet上,每一个节点都依靠唯一的IP地址互相区分和相互联系。IP地
址是一个32位二进制数的地址,由4个8位字段组成,每个字段之间用点号隔开,用于标识TCP/IP宿主机。
每个IP地址都包含两部分:网络ID和主机ID。网络ID标识在同一个物理网络上的所有宿主机,主机ID标识该物理网络上的每一个宿主机,于是整个Internet上的每个计算机都依靠各自唯一的IP地址来标识。
IP地址构成了整个Internet的基础,它是如此重要,每一台联网的计算机无权自行设定IP地址,有一个统一的机构—IANA负责对申请的组织分配唯一的网络ID,而该组织可以对自己的网络中的每一个主机分配一个唯一的主机ID,正如一个单位无权决定自己在所属城市的街道名称和门牌号,但可以自主决定本单位内部的各个办公室编号一样。
五、实际步骤
对PC_A的参数进行设置
从PC_A telnet到路由器A上,进行设置;
User Access Verification
Password:
Password:
7-A>en
Password:
7-A#conf t
Enter configuration commands, one per line. End with CNTL/Z.
配置routerA的s0/3/0端口的IP地址
7-A(config)#int s0/3/0
7-A(config-if)#no shut
7-A(config-if)#interface s0/3/0
7-A(config-if)#ip add
% Incomplete command.
7-A(config-if)#ip address 172.17.200.5 255.255.255.252
7-A(config-if)#^Z
7-A#^Z
7-A#conf t
Enter configuration commands, one per line. End with CNTL/Z.
配置路由器routerA的f0/0端口的IP地址
7-A(config)#int f0/0
7-A(config-if)#ip addr
% Incomplete command.
7-A(config-if)#ip addr 10.7.3.1 255.255.255
% Incomplete command.
7-A(config-if)#no shutdown
7-A(config-if)#exit
7-A(config)#exit
检查routerA配置
7-A#show running
Building configuration...
Current configuration : 806 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname 7-A
!
boot-start-marker
boot-end-marker
!
enable password cisco
!
no network-clock-participate aim 0
no network-clock-participate aim 1
no aaa new-model
ip subnet-zero
!
!
ip cef
!
!
no ftp-server write-enable
!
!
!
!
interface FastEthernet0/0
ip address 10.7.3.1 255.255.255.0 √完成对10.7.3.1的设置
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 10.7.1.1 255.255.255.0 √完成对10.7.1.1的设置
duplex auto
speed auto
!
interface Serial0/3/0
ip address 172.17.200.5 255.255.255.252 √完成对172.17.200.5的设置
no fair-queue
!
interface Serial0/3/1
no ip address
shutdown
clockrate 2000000
!
ip classless
ip http server
!
!
!
control-plane
!
!
line con 0
line aux 0
line vty 0 4
password cisco
login
!
scheduler allocate 20000 1000
!
end
验证端口状态和配置的参数
7-A#sho int s0/3/0
Serial0/3/0 is up, line protocol is up √连通状态
Hardware is GT96K Serial
Internet address is 172.17.200.5/30
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
Encapsulation HDLC, loopback not set
Keepalive set (10 sec)
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
up DSR=up DTR=up RTS=up CTS=up
验证routerA和PC_1的连接
7-A>ping 10.7.3.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.7.3.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
六、成果与总结
通过此次的的实验在之前的基础上,更加深入的学习了CISCO路由器的配置和设置,实验通过对路由器和电脑TCP/IP上的设置,实现了中断之间的互联。