实验是基于dynamips + dynagen 模拟器做的
NET文件:
autostart = false
ghostios = true
sparsemem = true
[localhost]
port = 7200
workingdir = F:\Dynamips\cisco
[[2610]]
image = F:\cisco\IOS\C2600-IS.BIN
ram = 64
confreg = 0x2102
idlepc = 0x80334f90
[[3640]]
image = F:\cisco\IOS\C3640-JK.BIN
solt1 = PA-4T
ram = 128
exec_area = 64
confreg = 0x2102
idlepc = 0x604c9368
[[7200]]
image = F:\cisco\IOS\c7200-adventerprisek9-mz.124-15.T6.bin
npe = npe-400
ram = 256
exec_area = 64
confreg = 0x2102
idlepc =0x606dd0c8
[[ROUTER R1]]
model = 3640
S1/0 = FRSW S1/0
[[ROUTER R2]]
model = 3640
S1/0 = FRSW S1/1
[[ROUTER R3]]
model = 3640
S1/0 = FRSW S1/2
[[ROUTER FRSW]]
model = 7200
# Input Intf Input Dlci Output Intf Output Dlci Status
# Serial1/0 101 Serial1/1 201 inactive
# Serial1/0 102 Serial1/2 301 inactive
# Serial1/1 201 Serial1/0 101 inactive
# Serial1/2 301 Serial1/0 102 inactive
路由器的基本配置:
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#no ip domain lookup
Router(config)#enable secret ccnp
Router(config)#line console 0
Router(config-line)#password cisco
Router(config-line)#login
Router(config-line)#logging synchronous
Router(config-line)#exec-timeout 30 0
Router(config-line)#exit
Router(config)#line vty 0 4
Router(config-line)#password ccie
Router(config-line)#login
Router(config-line)#exit
Router(config)#
FRSW (将7200路由器做为FR交换机使用)
FRSW(config)#frame-relay switching
FRSW(config)#interface serial 1/0
FRSW(config-if)#no ip address
FRSW(config-if)#no shutdown
FRSW(config-if)#encapsulation frame-relay ietf
FRSW(config-if)#frame-relay intf-type dce
FRSW(config-if)#clock rate 64000
FRSW(config-if)#frame-relay lmi-type ansi
FRSW(config-if)# frame-relay route 101 interface Serial1/1 201
FRSW(config-if)# frame-relay route 102 interface Serial1/2 301
FRSW(config)# interface serial 1/1
FRSW(config-if)# no ip address
FRSW(config-if)# no shutdown
FRSW(config-if)# encapsulation frame-relay ietf
FRSW(config-if)# frame-relay intf-type dce
FRSW(config-if)# clock rate 14400
FRSW(config-if)# frame-relay lmi-type cisco (默认值)
FRSW(config-if)# frame-relay route 201 interface Serial1/0 101
FRSW(config)# interface serial 1/2
FRSW(config-if)# no ip address
FRSW(config-if)# no shutdown
FRSW(config-if)# encapsulation frame-relay
FRSW(config-if)# frame-relay intf-type dce
FRSW(config-if)# clock rate 9600
FRSW(config-if)# frame-relay lmi-type q933a
FRSW(config-if)# frame-relay route 301 interface Serial1/0 102
实验一:帧中继基本配置
R1:
interface serial 1/0
encapsulation frame-relay ietf
ip address 10.0.0.1 255.255.255.0
no shutdown
frame-relay map ip 10.0.0.2 101 broadcast
R2
interface serial 1/0
encapsulation frame-relay ietf
ip address 10.0.0.2 255.255.255.0
no shutdown
frame-relay map ip 10.0.0.1 201 broadcast
R3
interface serial 1/0
encapsulation frame-relay
ip address 10.0.0.3 255.255.255.0
no shutdown
实验一结果:
R1:
R1#
R1#show frame-relay map
Serial1/0 (up): ip 10.0.0.2 dlci 101(0x65,0x1850), static,
broadcast,
IETF, status defined, active
Serial1/0 (up): ip 10.0.0.3 dlci 102(0x66,0x1860), dynamic,
broadcast,
IETF, status defined, active
R1#
R1#
R1#show frame-relay pvc
PVC Statistics for interface Serial1/0 (Frame Relay DTE)
Active Inactive Deleted Static
Local 2 0 0 0
Switched 0 0 0 0
Unused 0 0 0 0
DLCI = 101, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial1/0
input pkts 0 output pkts 0 in bytes 0
out bytes 0 dropped pkts 0 in pkts dropped 0
out pkts dropped 0 out bytes dropped 0
in FECN pkts 0 in BECN pkts 0 out FECN pkts 0
out BECN pkts 0 in DE pkts 0 out DE pkts 0
out bcast pkts 0 out bcast bytes 0
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
pvc create time 00:25:35, last time pvc status changed 00:20:58
DLCI = 102, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial1/0
input pkts 2 output pkts 3 in bytes 60
out bytes 90 dropped pkts 0 in pkts dropped 0
out pkts dropped 0 out bytes dropped 0
in FECN pkts 0 in BECN pkts 0 out FECN pkts 0
out BECN pkts 0 in DE pkts 0 out DE pkts 0
out bcast pkts 3 out bcast bytes 90
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
pvc create time 00:21:20, last time pvc status changed 00:18:00
R1#
R2:
R2#show frame-relay map
Serial1/0 (up): ip 10.0.0.1 dlci 201(0xC9,0x3090), static,
broadcast,
IETF, status defined, active
R2#
R3:
R3#
R3#show frame-relay map
Serial1/0 (up): ip 10.0.0.1 dlci 301(0x12D,0x48D0), dynamic,
broadcast,, status defined, active
R3#
实验一总结:
1、路由器与帧中继交换机frame-relay 封装类型要匹配
2、路由器默认启用frame-relay inverse-arp
3、LMI 可自动学习
实验二:配置Hub-and-Spoke帧中继网络
R1:
interface serial 1/0
no ip address
no shutdown
encapsulation frame-relay ietf
interface serial 1/0.1 multipoint
ip address 10.0.0.1 255.255.255.0
no shutdown
frame-relay interface-dlci 101
exit
frame-relay interface-dlci 102
exit
exit
interface loopback 0
ip address 192.168.1.1 255.255.255.0
no shutdown
exit
router rip
network 192.168.1.0
network 10.0.0.0
end
copy run start
router rip
R2:
interface serial 1/0
no ip address
no shutdown
encapsulation frame-relay ietf
exit
interface serial 1/0.1 point-to-point
ip address 10.0.0.2 255.255.255.0
no shutdown
frame-relay interface-dlci 201
exit
exit
interface loopback 0
ip address 192.168.2.1 255.255.255.0
no shutdown
exit
router rip
network 192.168.2.0
network 10.0.0.0
end
R3:
参照R2的相关配置方法。
通过show ip route 发现,R2中没有R3的路由,R3也没有R2的路由。
R2#ping 192.168.3.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R3#ping 192.168.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
经了解frame-realy及rip路由协议的特性,原因为split-horizon,R1从R2中学到的路由因水平分割的原因不再发往R3,反之,从R3学到的路由也不发往R2.
在R1的子接口上执行 no ip split-horizon后再看R2和R3的路由表:
R2:
R2#show ip route
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
10.0.0.0/24 is subnetted, 1 subnets
C 10.0.0.0 is directly connected, Serial1/0.1
R 192.168.1.0/24 [120/1] via 10.0.0.1, 00:00:20, Serial1/0.1
C 192.168.2.0/24 is directly connected, Loopback0
R 192.168.3.0/24 [120/1] via 10.0.0.1, 00:00:20, Serial1/0.1
R2#
R3:
R3#show ip route
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
10.0.0.0/24 is subnetted, 1 subnets
C 10.0.0.0 is directly connected, Serial1/0.1
R 192.168.1.0/24 [120/1] via 10.0.0.1, 00:00:12, Serial1/0.1
R 192.168.2.0/24 [120/1] via 10.0.0.1, 00:00:12, Serial1/0.1
C 192.168.3.0/24 is directly connected, Loopback0
R3#
总结:
在物理接口上启用帧中继后split-horizon是默认关闭的,但在子接口下默认是开启状态。
因关闭水平分割后距离矢量路由选择协议会有路由环路的问题,所以在非广播型网络环境下最好选择链路状态路由选择协议。