【实验任务】
- 按图连接网络,按表在路由器R1 和R2之间建立连接
- 配置路由器的静态路由表,并检验所配置的网络连通性
- PC0的IP配置成 59.64.1.2/24
- PC1的IP为 192.168.199.2/24
路由器 | 串口配置 | 以太网端口配置 |
---|---|---|
Router1 | 192.168.1.1/24 | 59.64.1.1/24 |
Router2 | 192.168.1.2/24 | 192.168.199.1/24 |
【实验指导】
在路由器中可以向路由表添加静态路由,方法是在全局模式下,使用命令:
ip route 目的网络的网络地址 子网掩码 下一跳地址
例如: ip route 192.168.199.0 255.255.255.0 192.168.1.2
- 路由器之间的连接可以使用局域网连接方式(使用以太网接口(Ethernet)相连)
- 也可以使用广域网连接方式(使用串口(serial)连接)
- 如果使用串口相连,在链路上可以使用PPP协议,串行接口需要配置时钟频率(64000)
- 按表在路由器R1 和R2之间建立连接,对路由器的路由表进行配置,一旦路由表配置完成,网络中任何一台设备都可以ping到其他的所有设备。Router配置路由信息如下:
- 路由器R1:
configure terminal
interface Ethernet1
ip add 59.64.1.1 255.255.255.0
no shut
interface Serial1
ip add 192.168.1.1 255.255.255.0
no shut
clock rate 64000
exit
ip route 192.168.199.0 255.255.255.0 192.168.1.2
- 路由器R2:
configure terminal
interface Ethernet1
ip add 192.168.199.1 255.255.255.0
no shut
interface Serial1
ip add 192.168.1.2 255.255.255.0
no shut
clock rate 64000
exit
ip route 59.64.1.0 255.255.255.0 192.168.1.1
- PC
Host 0:
配置ip 地址: 59.64.1.2 255.255.255.0
Host 1:
配置ip 地址: 192.168.199.2 255.255.255.0
- 通过ping命令检查网络的连通性:
R1# show ip route
Ip -------- Route
S: 192.168.199.0 via 192.168.1.2
R1# ping 192.168.199.2
Sending 5,100-byte ICMP Echoes to 192.168.199.2, time out is 2.0 seconds:
!!!!!!!!!!
Success rate is 100 percent (5/5), round trIP min/avg/max= 1/2/4 ms
R2# show ip route
Ip -------- Route
S: 59.64.1.0 via 192.168.1.1
R2# ping 59.64.1.2
Sending 5, 100-byte ICMP Echoes to 59.64.1.2, time out is 2.0 seconds:
!!!!!!!!!!
Success rate is 100 percent (5/5), round trIP min/avg/max= 1/2/4 ms