实验拓扑:

试验要求: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路由器以适应不同的需求。希望大家能够喜欢!
转载于:https://blog.51cto.com/loveme23/43728