一、帧中继(Frame-Relay)是一种WAN连接技术;工作在OSI模型的第二层(数据链接层),是一种二层封装技术,并且是一种面向连接的服务;通过VC实现两个分支站点的远程互连。
FR于1990年首次被标准化。现已经取代X.25技术,它简化了第2层的功能,只提供基本的错误检测功能,提高了网络对信息的处理效率(由于广域网链路可靠性大大提高,不需要再像X.25那种结构效率太低)。
在利用帧中继做远程互连时,用户首先需要将自已的设备与ISP的设备连起来,在这个连接过程中,要用到以下三种设备。
1、用户前端设备(CPE)也叫CSU/DSU。用户本地路由器所用的信令与电信的局端设备所用的信令是不一样,CSU/DSU充当翻译作用。
2、数据终端设备(DTE)也就是用户自已的路由器。
3、数据通信设备(DCE)也就是电信的局端设备。
二、FR连接运行在虚电路(VC)上,每条VC都由一个数据链路连接标识符(DLCI)标识。并将此DLCI映射到一个IP地址。DLCI号在帧中继中相当于二层地址。
VC分为:永久虚电路(PVC)、交换虚电路(SVC)。
PVC:需要不断通过FR在DTE之间传输数据时使用。
SVC:用于间歇性的通过FR在DTE之间传输数据。要考虑ISP是否支持。
FR交换机将2台路由器的DLCI关联起来,从而创建1条PVC。
DLCI只具有本地意义。
DLCI的范围(16-1007)
0-15和1008-1023被保留
1019和1020保留用于广播
1023保留用于Cisco LMI
0保留用于LMI类型的ANSI和Q.933A
DLCI地址映射:
要通过FR传输数据,必须将本地DLCI和目的IP地址关联。
地址映射可手工配置,也可动态生成。
动态生成时使用帧中继反向地址解析协议(IARP)。
本地管理接口(LMI)
LMI是指路由器与电信的局端FR交换机之间通信的协议,负责管理设备之间的连接以及维护连接状态。
LMI是可以配置的,但路由器尝试自动检测FR交换机使用的LMI类型。
LMI的三种类型:Cisco/ANSI/Q933A
FR网络是非广播多路访问(NBMA)网络。
三、帧中继(Frame-relay)之全网互连的配置
1、拓朴图如下:
2、R5模拟成帧中继交换机,按如下步骤配置
----------------------------------------------------------------------------------
FR5(config)#no ip routing #关闭路由功能
FR5(config)#frame-relay switching #将R5配置成帧中继交换机
FR5(config)#int s1/1
FR5(config-if)#encapsulation frame-relay ?
MFR Multilink Frame Relay bundle interface
ietf Use RFC1490/RFC2427 encapsulation
<cr>
FR5(config-if)#encapsulation frame-relay #默认是Cisco封装类型,如果连接的是Cisco路由器,建议使用这种封装,如果连接是非Cisco路由器,则选择ietf。
FR5(config-if)#clock rate 64000 #在接口上配置时钟频率
FR5(config-if)#frame-relay lmi-type cisco #指定接口LMI的类型[cisco|ansi|q933a]
FR5(config-if)#frame-relay intf-type dce #将接口指定为DCE接口
FR5(config-if)#frame-relay route 102 int s1/2 201 #写帧中继到R2的路由,实际上就是建立PVC;frame-relay route + 入接口DLCI号 + 出接口 + 出接口的DLCI号
FR5(config-if)#frame-relay route 103 int s1/3 301 #写帧中继到R3的路由
FR5(config-if)#frame-relay route 104 int s1/4 401 #写帧中继到R4的路由
FR5(config-if)#no shut #激活接口
FR5(config-if)#exit
FR5(config)#int s1/2
FR5(config-if)#encapsulation frame-relay
FR5(config-if)#clock rate 64000
FR5(config-if)#frame-relay lmi-type cisco
FR5(config-if)#frame-relay intf-type dce
FR5(config-if)#frame-relay route 201 int s1/1 102
FR5(config-if)#frame-relay route 203 int s1/3 302
FR5(config-if)#frame-relay route 204 int s1/4 402
FR5(config-if)#no shut
FR5(config-if)#exit
FR5(config)#int s1/3
FR5(config-if)#encapsulation frame
FR5(config-if)#clock rate 64000
FR5(config-if)#frame-relay intf-type dce
FR5(config-if)#frame-relay lmi-type cisco
FR5(config-if)#frame-relay route 301 int s1/1 103
FR5(config-if)#frame-relay route 304 int s1/4 403
FR5(config-if)#frame-relay route 302 int s1/2 203
FR5(config-if)#no shutdown
FR5(config-if)#exit
FR5(config)#int s1/4
FR5(config-if)#encapsulation frame-relay
FR5(config-if)#clock rate 64000
FR5(config-if)#frame-relay lmi-type cisco
FR5(config-if)#frame-relay intf-type dce
FR5(config-if)#frame-relay route 402 int s1/2 204
FR5(config-if)#frame-relay route 403 int s1/3 304
FR5(config-if)#frame-relay route 401 int s1/1 104
FR5(config-if)#no shut
----------------------------------------------------------------------------------
到此,FR5帧中继交换机就模拟好了!
3、北京总部R1路由器的配置
----------------------------------------------------------------------------------
R1(config)#int s1/1
R1(config-if)#ip add 12.0.0.1 255.255.255.0 #配置IP
R1(config-if)#encapsulation frame-relay #封装帧中继
R1(config-if)#no shut #激活接口
R1(config-if)#exit
R1(config)#int loopback 0 #回环接口用于模拟内网测试
R1(config-if)#ip add 1.1.1.1 255.255.255.255
用ping去测试网络的连通性
R1(config-if)#do ping 12.0.0.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/88/144 ms
R1(config-if)#do ping 12.0.0.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 64/96/140 ms
R1(config-if)#do ping 12.0.0.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 64/104/180 ms
R1(config-if)#do ping 12.0.0.1 #R1不能够ping通自己,通过show frame-relay map 可看到没有指向自己的Map
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R1(config-if)#do show frame-relay map #查看frame-relay map
Serial1/1 (up): ip 12.0.0.2 dlci 102(0x66,0x1860), dynamic,
broadcast,, status defined, active
Serial1/1 (up): ip 12.0.0.3 dlci 103(0x67,0x1870), dynamic,
broadcast,, status defined, active
Serial1/1 (up): ip 12.0.0.4 dlci 104(0x68,0x1880), dynamic,
broadcast,, status defined, active
----------------------------------------------------------------------------------
4、上海分部R2路由器的配置
----------------------------------------------------------------------------------
R2(config)#int s1/2
R2(config-if)#encapsulation frame-relay #封装帧中继
R2(config-if)#ip add 12.0.0.2 255.255.255.0 #配置IP
R2(config-if)#no shut #激活接口
R2(config-if)#exit
R2(config)#int lo 0 #回环接口用于模拟内网测试
R2(config-if)#ip add 2.2.2.2 2
R2(config-if)#ip add 2.2.2.2 255.255.255.255
R2(config-if)#do ping 12.0.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 64/79/108 ms
R2(config-if)#do ping 12.0.0.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/88/112 ms
R2(config-if)#do ping 12.0.0.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 44/76/120 ms
R2(config-if)#do ping 12.0.0.2 #R2不能够ping通自己,没有指向自己的Map
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R2(config-if)#do show frame-relay map #查看frame-relay map
Serial1/2 (up): ip 12.0.0.1 dlci 201(0xC9,0x3090), dynamic,
broadcast,, status defined, active
Serial1/2 (up): ip 12.0.0.3 dlci 203(0xCB,0x30B0), dynamic,
broadcast,, status defined, active
Serial1/2 (up): ip 12.0.0.4 dlci 204(0xCC,0x30C0), dynamic,
broadcast,, status defined, active
----------------------------------------------------------------------------------
5、深圳分部R3路由器的配置
----------------------------------------------------------------------------------
R3(config)#int s1/3
R3(config-if)#encapsulation frame-relay
R3(config-if)#ip add 12.0.0.3 255.255.255.0
R3(config-if)#no shut
R3(config-if)#exit
R3(config)#int lo 0
R3(config-if)#ip add 3.3.3.3 255.255.255.255
R3(config-if)#do ping 12.0.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/68/104 ms
R3(config-if)#do ping 12.0.0.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/88/148 ms
R3(config-if)#do ping 12.0.0.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/73/108 ms
R3(config-if)#do ping 12.0.0.3 #R3不能够ping通自己,没有指向自己的Map
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.3, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R3(config-if)#do show frame-relay map #查看frame-relay map
Serial1/3 (up): ip 12.0.0.1 dlci 301(0x12D,0x48D0), dynamic,
broadcast,, status defined, active
Serial1/3 (up): ip 12.0.0.2 dlci 302(0x12E,0x48E0), dynamic,
broadcast,, status defined, active
Serial1/3 (up): ip 12.0.0.4 dlci 304(0x130,0x4C00), dynamic,
broadcast,, status defined, active
----------------------------------------------------------------------------------
6、广州分部R4路由器的配置
----------------------------------------------------------------------------------
R4(config)#int s1/4
R4(config-if)#encapsulation frame-relay
R4(config-if)#ip add 12.0.0.4 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#exit
R4(config)#int lo 0
R4(config-if)#ip add 4.4.4.4 255.255.255.255
R4(config-if)#do ping 12.0.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 64/76/100 ms
R4(config-if)#do ping 12.0.0.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 44/89/140 ms
R4(config-if)#do ping 12.0.0.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/96/172 ms
R4(config-if)#do ping 12.0.0.4 #R4不能够ping通自己,没有指向自己的Map
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.4, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R4#show frame-relay map #查看frame-relay map
Serial1/4 (up): ip 12.0.0.1 dlci 401(0x191,0x6410), dynamic,
broadcast,, status defined, active
Serial1/4 (up): ip 12.0.0.2 dlci 402(0x192,0x6420), dynamic,
broadcast,, status defined, active
Serial1/4 (up): ip 12.0.0.3 dlci 403(0x193,0x6430), dynamic,
broadcast,, status defined, active
----------------------------------------------------------------------------------
通过show frame-relay map 可看到在R1、R2、R3、R4上所见到的帧中继MAP都是Inverse-ARP动态(dynamic)映射过来的,并且都支持广播;还有就是他们上面都没有自己的map,所以不能ping通自己。
四、实际应用中通常都是手动映射的(配置静态帧中继)
1、R1上手动映射帧中继MAP
----------------------------------------------------------------------------------
R1(config)#int s1/1
R1(config-if)#no frame-relay inverse-arp #关闭帧中继的逆向ARP,不允许动态映射
R1(config-if)#do clear frame-relay inarp #清除逆向ARP留下的cache
R2(config-if)#do show frame-relay map #已清空ARP留下的缓存
R1(config-if)#frame-relay map ip 12.0.0.2 102 broadcast #将IP地址静态映射到DLCI,加broadcast参数实现伪广播;frame-relay map ip +目的IP + 本地DLCI号 +模拟广播
R1(config-if)#frame-relay map ip 12.0.0.3 103 broadcast #同上
R1(config-if)#frame-relay map ip 12.0.0.4 104 broadcast #同上
R1(config-if)#frame-relay map ip 12.0.0.1 102 broadcast #指向自己的Map,此处的DLCI号也可以是103,104
用ping 测试网络的连通性
R1(config-if)#do ping 12.0.0.1 #可以ping 通自己了!
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 160/214/276 ms
R1(config-if)#do ping 12.0.0.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/52/124 ms
R1(config-if)#do ping 12.0.0.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/48/140 ms
R1(config-if)#do ping 12.0.0.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/65/140 ms
----------------------------------------------------------------------------------
2、R2上手动映射帧中继MAP
----------------------------------------------------------------------------------
R2(config)#int s1/2
R2(config-if)#no frame-relay inverse-arp
R2(config-if)#do clear frame-relay inarp
R2(config-if)#do show frame-relay map #已清空ARP留下的缓存
R2(config-if)#frame-relay map ip 12.0.0.1 201 broadcast
R2(config-if)#frame-relay map ip 12.0.0.3 203 broadcast
R2(config-if)#frame-relay map ip 12.0.0.4 204 broadcast
R2(config-if)#frame-relay map ip 12.0.0.2 201 broadcast #此处的DLCI号也可以是203,204
R2(config-if)#do ping 12.0.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/69/140 ms
R2(config-if)#do ping 12.0.0.2 #可以ping 通自己了!
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/70/156 ms
R2(config-if)#do ping 12.0.0.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/49/136 ms
R2(config-if)#do ping 12.0.0.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/49/140 ms
3、R3上手动映射帧中继MAP
----------------------------------------------------------------------------------
R3(config)#int s1/3
R3(config-if)#no frame-relay inverse-arp
R3(config-if)#do clear frame-relay inarp
R3(config-if)#do show frame-relay map #已清空ARP留下的缓存
R3(config-if)#frame-relay map ip 12.0.0.1 301 broadcast
R3(config-if)#frame-relay map ip 12.0.0.2 302 broadcast
R3(config-if)#frame-relay map ip 12.0.0.4 304 broadcast
R3(config-if)#frame-relay map ip 12.0.0.3 301 broadcast #此处的DLCI号也可以是303,302
R3(config-if)#do ping 12.0.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/45/112 ms
R3(config-if)#do ping 12.0.0.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/52/124 ms
R3(config-if)#do ping 12.0.0.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/77/172 ms
R3(config-if)#do ping 12.0.0.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/44/112 ms
4、R4上手动映射帧中继MAP
----------------------------------------------------------------------------------
R4(config)#int s1/4
R4(config-if)#no frame-relay inverse-arp
R4(config-if)#do clear frame-relay inarp
R4(config-if)#do show frame-relay map #已清空ARP留下的缓存
R4(config-if)#frame-relay map ip 12.0.0.1 401 broadcast
R4(config-if)#frame-relay map ip 12.0.0.2 402 broadcast
R4(config-if)#frame-relay map ip 12.0.0.3 403 broadcast
R4(config-if)#frame-relay map ip 12.0.0.4 401 broadcast #此处的DLCI号也可以是403,402
R4(config-if)#do ping 12.0.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/58/100 ms
R4(config-if)#do ping 12.0.0.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/52/112 ms
R4(config-if)#do ping 12.0.0.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/51/144 ms
R4(config-if)#do ping 12.0.0.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 36/70/160 ms
五、在R、R2、R3和R4上运行一种路由协议,宣告接口,此处用RIPv2
1、在R1上运行RIPv2路由协议
----------------------------------------------------------------------------
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#no auto-summary
R1(config-router)#network 1.0.0.0
R1(config-router)#network 12.0.0.0
R1(config-router)#do show ip route #在R2、R3、R4都启用了路由协议才可查看到所有路由条目
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
R 2.2.2.2 [120/1] via 12.0.0.2, 00:01:01, Serial1/1
3.0.0.0/32 is subnetted, 1 subnets
R 3.3.3.3 [120/1] via 12.0.0.3, 00:01:01, Serial1/1
4.0.0.0/32 is subnetted, 1 subnets
R 4.4.4.4 [120/1] via 12.0.0.4, 00:01:01, Serial1/1
12.0.0.0/24 is subnetted, 1 subnets
C 12.0.0.0 is directly connected, Serial1/1
2、在R2上运行RIPv2路由协议
----------------------------------------------------------------------------
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#no auto-summary
R2(config-router)#netowrk 2.0.0.0
R2(config-router)#network 12.0.0.0
R2(config-router)#do show ip route #在R1、R3、R4都启用了路由协议才可查看到所有路由条目
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
R 1.1.1.1 [120/1] via 12.0.0.1, 00:00:17, Serial1/2
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
3.0.0.0/32 is subnetted, 1 subnets
R 3.3.3.3 [120/2] via 12.0.0.3, 00:00:17, Serial1/2
4.0.0.0/32 is subnetted, 1 subnets
R 4.4.4.4 [120/2] via 12.0.0.4, 00:00:17, Serial1/2
12.0.0.0/24 is subnetted, 1 subnets
C 12.0.0.0 is directly connected, Serial1/2
3、在R3上运行RIPv2路由协议
----------------------------------------------------------------------------
R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#no auto-summary
R3(config-router)#network 3.0.0.0
R3(config-router)#network 12.0.0.0
R3(config-router)#do show ip route #在R1、R2、R4都启用了路由协议才可查看到所有路由条目
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
R 1.1.1.1 [120/1] via 12.0.0.1, 00:00:20, Serial1/3
2.0.0.0/32 is subnetted, 1 subnets
R 2.2.2.2 [120/2] via 12.0.0.2, 00:00:20, Serial1/3
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback0
4.0.0.0/32 is subnetted, 1 subnets
R 4.4.4.4 [120/2] via 12.0.0.4, 00:00:21, Serial1/3
12.0.0.0/24 is subnetted, 1 subnets
C 12.0.0.0 is directly connected, Serial1/3
4、在R4上运行RIPv2路由协议
----------------------------------------------------------------------------
R4(config)#router rip
R4(config-router)#version 2
R4(config-router)#no auto-summary
R4(config-router)#network 4.0.0.0
R4(config-router)#network 12.0.0.0
R4(config-router)#do show ip route #在R1、R2、R3都启用了路由协议才可查看到所有路由条目
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
R 1.1.1.1 [120/1] via 12.0.0.1, 00:00:24, Serial1/4
2.0.0.0/32 is subnetted, 1 subnets
R 2.2.2.2 [120/2] via 12.0.0.2, 00:00:24, Serial1/4
3.0.0.0/32 is subnetted, 1 subnets
R 3.3.3.3 [120/2] via 12.0.0.3, 00:00:24, Serial1/4
4.0.0.0/32 is subnetted, 1 subnets
C 4.4.4.4 is directly connected, Loopback0
12.0.0.0/24 is subnetted, 1 subnets
C 12.0.0.0 is directly connected, Serial1/4
六、以上R1、R2、R3、R4之间实现了全网互连(full-mesh),可提供最大容错能力,不过此连接成本最为昂贵。
可以通过实现部分连接,只对重要结点采取多链路互连即可,并且从安全角度考虑,如允许总部访问各分支机构,各分支机构只能访问总部,不能相互访问。又或者分支机构只能通过总部再访问其他分支机构。
1、在帧中继交换机FR5上No掉各分支机构互连的帧中继路由,只保留去往总部的。
----------------------------------------------------------------------------
FR5(config)#int s1/2
FR5(config-if)#no frame-relay route 203 int s1/3 302
FR5(config-if)#no frame-relay route 204 int s1/4 402
FR5(config-if)#exit
FR5(config)#int s1/3
FR5(config-if)#no frame-relay route 304 int s1/4 403
FR5(config-if)#no frame-relay route 302 int s1/2 203
FR5(config-if)#exit
FR5(config)#int s1/4
FR5(config-if)#no frame-relay route 402 int s1/2 204
FR5(config-if)#no frame-relay route 403 int s1/3 304
FR5(config-if)#exit
此时,总部能与各分支机构通信,各分支机构之间已不能再通信。
----------------------------------------------------------------------------
2、帧中继交换机FR5上已没有各分支机构间的的帧中继路由,所以可清除各分支机构R2、R3、R4上无用的静态映射帧中继MAP,见如下:
清除R2上无用的静态映射帧中继MAP
----------------------------------------------------------------------------------
R2(config)#int s1/2
R2(config-if)#do clear frame-relay inarp
R2(config-if)#no frame-relay map ip 12.0.0.3 203 broadcast
R2(config-if)#no frame-relay map ip 12.0.0.4 204 broadcast
清除R3上无用的静态映射帧中继MAP
----------------------------------------------------------------------------------
R3(config)#int s1/3
R3(config-if)#no frame-relay map ip 12.0.0.2 302 broadcast
R3(config-if)#no frame-relay map ip 12.0.0.4 304 broadcast
清除R4上无用的静态映射帧中继MAP
----------------------------------------------------------------------------------
R4(config)#int s1/4
R4(config-if)#do clear frame-relay inarp
R4(config-if)#no frame-relay map ip 12.0.0.2 402 broadcast
R4(config-if)#no frame-relay map ip 12.0.0.3 403 broadcast
----------------------------------------------------------------------------------
3、按以下方式可让各分支构通过总部互访。
----------------------------------------------------------------------------------
R2(config)#int s1/2
R2(config-if)#frame-relay map ip 12.0.0.4 201 broadcast
R2(config-if)#frame-relay map ip 12.0.0.3 201 broadcast
R2(config-if)#do clear ip route *
R2(config)#int s1/3
R3(config-if)#frame-relay map ip 12.0.0.2 301 broadcast
R3(config-if)#frame-relay map ip 12.0.0.4 301 broadcast
R2(config-if)#frame-relay map ip 12.0.0.3 201 broadcast
R3(config-if)#do clear ip route *
R2(config)#int s1/4
R4(config-if)#frame-relay map ip 12.0.0.2 401 broadcast
R4(config-if)#frame-relay map ip 12.0.0.3 401 broadcast
R4(config-if)#do clear ip route *
测试信息就不贴上了,大家有兴趣可以做做,一块讨论哈!