实验拓扑:
试验要求:
R1
通过
FR
分别与
R2
和
R3
相连,
R2
与
R3
之间没有连接,形成一个
hub and spoke
网络拓扑结构,要求
R1 R2 R3
都采用点对点子接口。
试验目的:掌握
hub
路由器与
spoke
路由器都采用点对点子接口的时候
IP
的分配与其他情况下
IP
的分配的差别。
试验配置:
R1
:
R1(config)#int s1/0
R1(config-if)#enca fram
R1(config-if)#no shu
R1(config-if)#exit
R1(config)#int s1/0.1 point-to-point
R1(config-subif)#ip add 172.16.3.3 255.255.255.0
R1(config-subif)#fram interface-dlci 301
R1(config-fr-dlci)#exit
R1(config-subif)#exit
R1(config)#int s1/0.2 point-to-point
R1(config-subif)#ip add 172.16.1.3 255.255.255.0
R1(config-subif)#fram interface-dlci 302
R1(config-fr-dlci)#no shu
R1(config-subif)#exit
R2
:
R2(config)#int s1/0
R2(config-if)#enca fram
R2(config-if)#no shu
R2(config-if)#exit
R2(config)#int s1/0.1 point-to-point
R2(config-subif)#ip add 172.16.3.1 255.255.255.0
R2(config-subif)#fram interface-dlci 103
R2(config-fr-dlci)#no shu
R2(config-subif)#exit
R3
:
R3(config)#int s1/0
R3(config-if)#enca fram
R3(config-if)#no shu
R3(config-if)#exit
R3(config)#int s1/0.1 point-to-point
R3(config-subif)#ip add 172.16.1.1 255.255.255.0
R3(config-subif)#fram interface-dlci 203
R3(config-fr-dlci)#no shu
R3(config-subif)#exit
好了,要特别注意
R1
的两个子接口的
IP
配置,
hub
路由器点对点子接口的
IP
是不能够在同一网段的,切记!!!
下面在三台路由器上
show fram map
:
R1#show fram map
Serial1/0.1 (up): point-to-point dlci, dlci 301(0x12D,0x48D0), broadcast
status defined, active
Serial1/0.2 (up): point-to-point dlci, dlci 302(0x12E,0x48E0), broadcast
status defined, active
R2#show fram map
Serial1/0.1 (up): point-to-point dlci, dlci 103(0x67,0x1870), broadcast
status defined, active
R3#show fram map
Serial1/0.1 (up): point-to-point dlci, dlci 203(0xCB,0x30B0), broadcast
status defined, active
全部都
active
了,现在分别在
R2
和
R3
上
ping R1
的相应接口:
R2#ping 172.16.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 180/242/288 ms
R3#ping 172.16.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 120/273/720 ms
好的,都可以
ping
通,那如果我在
R3
上去
ping172.16.3.3
会是什么结果呢?
R3#ping 172.16.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.3.3, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
无法
ping
通,让我们
debug ip pac
来看一下:
R3#debug ip pac
IP packet debugging is on
R3#ping 172.16.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.3.3, timeout is 2 seconds:
*Mar 1 00:03:35.247: IP: s=172.16.1.1 (local), d=172.16.3.3, len 100, unroutable.
*Mar 1 00:03:37.247: IP: s=172.16.1.1 (local), d=172.16.3.3, len 100, unroutable.
*Mar 1 00:03:39.247: IP: s=172.16.1.1 (local), d=172.16.3.3, len 100, unroutable.
*Mar 1 00:03:41.247: IP: s=172.16.1.1 (local), d=172.16.3.3, len 100, unroutable.
*Mar 1 00:03:43.247: IP: s=172.16.1.1 (local), d=172.16.3.3, len 100, unroutable.
Success rate is 0 percent (0/5)
出现
unroutable
,无法路由,因为不在同一网段,路由器需要查找路由表来进行转发,我们察看路由表可以看到并没有到
172.16.3.0
网段的路由,我们自己添加一条默认路由上去,下一跳指向
172.16.1.3
这个子接口,我们可以到
R1
上验证一下
172.16.1.3
能否到
172.16.3.3
:
R1#ping
Protocol [ip]:
Target IP address: 172.16.1.3
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface: 172.16.3.3
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.3, timeout is 2 seconds:
Packet sent with a source address of 172.16.3.3
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 288/326/384 ms
OK
,没有问题,下面配置缺省路由:
R3(config)#ip route 0.0.0 .0 0.0.0.0 172.16.1.3
同样
R2
也需要配置缺省路由:
R2(config)#ip route 0.0.0 .0 0.0.0.0 172.16.3.3
好了,我们
ping
测试一下:
R2#ping 172.16.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 144/176/192 ms
R2#ping 172.16.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 288/354/432 ms
都可以
ping
通。
实验总结:在
hub and spoke
拓扑结构中,如果
hub
路由器采用点对点子接口的话,每个点对点子接口配置的
IP
不能在同一个网段,在
spoke
路由器上还需要加上一条默认路由才可以与其他
spoke
路由器相互通讯。
写在最后:通过连载试验,我把
Frame-relay
在部分网格拓扑结构
hub
路由器与
spoke
路由器基本上所有用到的接口类型都演示了一遍,也演示了怎样让
spoke
路由器相互之间可以通信的方法,通过这几日的连载,大家应该可以掌握在
Frame-relay
部分网格拓扑结构中怎样配置
hub
和
spoke
路由器以适应不同的需求。希望大家能够喜欢!