Packet Tracer--配置帧中继
拓扑图:
设备参数:
设备 | 接口 | DLCI | ||
R1 | S0/2 | 102,103 | ||
R2 | S0/2 | 201 | ||
R3 | S0/2 | 301 | ||
R1---R2 | Se1:102-----Se2:201 | |||
R1---R3 | Se1:103-----Se3:301 |
IP参数
设备 | 接口 | IP地址 | 子网掩码 | 默认网关 |
R1 | S0/2 | 192.168.1.1 | 255.255.255.0 | N/A |
R2 | S0/2 | 192.168.1.2 | 255.255.255.0 | N/A |
R3 | S0/2 | 192.168.1.3 | 255.255.255.0 | N/A |
实验步骤:
帧中继配置:
R1配置:
Router>en
Router#
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#interface serial 0/2
R1(config-if)#encapsulation ?
frame-relay Frame Relay networks
hdlc Serial HDLC synchronous
ppp Point-to-Point protocol
R1(config-if)#encapsulation frame-relay ?
ietf Use RFC1490/RFC2427 encapsulation
<cr>
R1(config-if)#encapsulation frame-relay ietf
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
R2配置:
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ho
Router(config)#hostname R2
R2(config)#interface s0/2
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
R2(config-if)#
%LINK-5-CHANGED: Interface Serial0/2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2, changed state to up
R2(config-if)#end
R2#
%SYS-5-CONFIG_I: Configured from console by console
R2#ping 192.168.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 18/21/25 ms
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 0 percent (0/5)
R2(config)#interface s0/2
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
R2(config-if)#
%LINK-5-CHANGED: Interface Serial0/2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2, changed state to up
R2(config-if)#end
R2#
%SYS-5-CONFIG_I: Configured from console by console
R2#ping 192.168.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 18/21/25 ms
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 0 percent (0/5)
R3配置:
Router>en
Router#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R3
R3(config)#interface s0/2
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
R3(config-if)#
%LINK-5-CHANGED: Interface Serial0/2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2, changed state to up
R3(config-if)#end
R3#
%SYS-5-CONFIG_I: Configured from console by console
R3#ping 192.168.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/18/23 ms
如果需要R2与R3 ping通,执行下面的命令即可:
R2---R3 | Se2:201-----Se3:301 |
第一种方法:(配置默认路由)
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格式,并且支持广播。
不积跬步无以至千里,不积小流无以成江海;
千里之行,始于足下;
每天一个小实验。