帧中继配置:
R1配置:
Router(config)#hostname R1
R1(config)#interface s0/0/0
R1(config-if)#encapsulation frame-relay ietf
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
R2配置:
Router(config)#hostname R2
R2(config)#interface s0/0/0
R2(config-if)#encapsulation frame-relay ietf
R2(config-if)#ip address 192.168.1.2 255.255.255.0
R2(config-if)#no shutdown
R3配置:
Router(config)#hostname R3
R3(config)#int s0/0/0
R3(config-if)#encapsulation frame-relay ietf
R3(config-if)#ip address 192.168.1.3 255.255.255.0
R3(config-if)#no shutdown
配置完后R1就可以ping通R2和R3,但是现在R2和R3是不相通的
要想R2和R3相通:
第1种方法:
在帧中继中Serial2和Serial3分别添加一条记录
之后R2和R3就可以ping通了
第二种方法(配置默认路由)
R2(config)#ip route 192.168.1.3 255.255.255.255 192.168.1.1
R3(config)#ip route 192.168.1.2 255.255.255.255 192.168.1.1
第三种方法:
R2#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#interface s0/2
R2(config-if)#frame-relay map ip 192.168.1.3 201 ietf
R2(config-if)#end
R2#
%SYS-5-CONFIG_I: Configured from console by console
R2#ping 192.168.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 9/10/11 ms
R3#ping 192.168.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R3(config)#interface s0/2
R3(config-if)#frame-relay map ip 192.168.1.2 301 ietf
R3(config-if)#end
R3#
%SYS-5-CONFIG_I: Configured from console by console
R3#ping 192.168.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 33/41/50 ms
注意:
R2(config-if)#frame-relay map ip 192.168.1.3 201 ietf
R3(config-if)#frame-relay map ip 192.168.1.2 301 ietf
这个也可以配置为:
R2(config-if)#frame-relay map ip 192.168.1.3 201 broadcast
R3(config-if)#frame-relay map ip 192.168.1.2 301 broadcast
其中ietf表示使用封装帧格式,缺省使用的cisco格式,如果没有与其他厂商设备相连,肯定要用ietf格式,而且该映射不支持广播。
而broadcast表示使用ciso格式,并且支持广播。