1.首先配置R4为帧中继交换机:
Router#config t
Router(config)#hostname FrSwitch
FrSwitch(config)#frame-relay switching
FrSwitch(config)#int s1/0
FrSwitch(config-if)#encapsulation frame-relay
FrSwitch(config-if)#frame-relay lmi-type ansi
FrSwitch(config-if)#frame-relay intf-type dce
FrSwitch(config-if)#frame-relay route 100 interface s1/1 101
FrSwitch(config-if)#clock rate 64000
FrSwitch(config-if)#no shu
FrSwitch(config-if)#int s1/1
FrSwitch(config-if)#encapsulation frame-relay
FrSwitch(config-if)#frame-relay lmi-type ansi
FrSwitch(config-if)#frame-relay intf-type dce
FrSwitch(config-if)#frame-relay route 101 interface s1/0 100
FrSwitch(config-if)#clock rate 64000
FrSwitch(config-if)#no shu
Router#config t
Router(config)#hostname Router1
Router1(config)#int s1/2
Router1(config-if)#ip add 10.0.0.1 255.255.255.0
Router1(config-if)#enca frame-relay
Router1(config-if)#frame-relay lmi-type ansi
Router1(config-if)#no shu
Router>ena
Router#config t
Router(config)#hostname Router2
Router2(config)#interface s1/2
Router2(config-if)#encapsulation frame-relay
Router2(config-if)#ip add 10.0.0.2 255.255.255.0
Router2(config-if)#frame-relay lmi-type ansi
Router2(config-if)#no shu
Serial1/2 (up): ip 10.0.0.2 dlci 100(0x64,0x1840), dynamic,
broadcast,, status defined, active
Router2#show frame-relay map
Serial1/2 (up): ip 10.0.0.1 dlci 101(0x65,0x1850), dynamic,
broadcast,, status defined, active
PVC Statistics for interface Serial1/2 (Frame Relay DTE)
Active Inactive Deleted Static
Local 1 0 0 0
Switched 0 0 0 0
Unused 0 0 0 0
DLCI = 100, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial1/2
input pkts 6 output pkts 7 in bytes 554
out bytes 588 dropped pkts 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 2 out bcast bytes 68
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
pvc create time 00:13:00, last time pvc status changed 00:12:20
Router2#show frame-relay pvc
PVC Statistics for interface Serial1/2 (Frame Relay DTE)
Active Inactive Deleted Static
Local 1 0 0 0
Switched 0 0 0 0
Unused 0 0 0 0
DLCI = 101, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial1/2
input pkts 6 output pkts 6 in bytes 554
out bytes 554 dropped pkts 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 1 out bcast bytes 34
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
pvc create time 00:11:24, last time pvc status changed 00:11:14
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 120/140/168 ms
如果发现ping不通的话,可以使用命令show fram map查看,看是否有R2的反向ARP映射,如果没有的话我们可以手工添加:
Serial1/2 (up): ip 10.0.0.1 dlci 101(0x65,0x1850), static,
broadcast,
CISCO, status defined, active
讨论:配置到这里,有一个问题,假如R2 ping自己的接口ip可以ping通吗?我们做一个试验:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
Router2(config-if)#frame-relay map ip 10.0.0.2 101
Serial1/2 (up): ip 10.0.0.1 dlci 101(0x65,0x1850), static,
broadcast,
CISCO, status defined, active
Serial1/2 (up): ip 10.0.0.2 dlci 101(0x65,0x1850), static,
CISCO, status defined, active
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 268/435/612 ms
OK,实验完。
出自 [url]http://loveme23.51cto.com/blog/7891/29503[/url]