|
隧道帧中继(Hub-Spoken)+子接口+路由实验
实验拓扑:
见附件
实验目的:
1、 通过隧道帧中继技术使R1与R4、R3与R4能ping通
2、 当r1,r3在不同网段时,在R4使用子接口
3、 配置路由,测试在此情况下如何能使R1、R3联通
IP地址分配表:
路由器 接口 IP地址
R1 S0 192.168.10.1/28
R2 E1 10.1.1.1/24
R3 S0 192.168.20.1/24
R4 S0.401 192.168.10.2/28
R4 S0.403 192.168.20.2/24
R5 E1 10.1.1.2/24
人工配置:
P.S. :在每台Route上都已键入:
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#no ip domain lookup
Router(config)#line console 0
Router(config-line)#logg sync
Router(config-line)#exec-timeout 0 0
Router(config-line)#exit
Router(config)#host R?
R?(config)#
R1的配置:
R1(config)#int s0
R1(config-if)#encapsulation frame-relay
R1(config-if)#ip address 192.168.10.1 255.255.255.240
R1(config-if)#no shut
R1(config-if)# frame-relay map ip 192.168.10.2 104 broadcast
R2的配置:
R2(config)#frame-relay switching
R2(config)#int tunnel 0
R2(config-if)#tunnel source ethernet 1
R2(config-if)#tunnel destination 10.1.1.2
R2(config-if)#exit
R2(config)#int e1
R2(config-if)#ip address 10.1.1.1 255.255.255.0
R2(config-if)#no shut
R2(config-if)#int s0
R2(config-if)#encapsulation frame-relay
R2(config-if)#frame-relay intf-type DCE
R2(config-if)#clock rate 64000
R2(config-if)#no shut
R2(config-if)#int s1
R2(config-if)#encapsulation frame-relay
R2(config-if)#frame-relay intf-type DCE
R2(config-if)#clock rate 64000
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#int s0
R2(config-if)#frame-relay route 104 interface tunnel 0 100
R2(config)#int s1
R2(config-if)#frame-relay route 304 interface tunnel 0 300
R2(config-if)#exit
R2(config)#
R3的配置:
R3(config)#int s0
R3(config-if)#encapsulation frame-relay
R3(config-if)#ip address 192.168.20.1 255.255.255.0
R3(config-if)#no shut
R3(config-if)#frame-relay map ip 192.168.20.2 304 broadcast
R3(config-if)#exit
R3(config)#
R4的配置:
R4(config)#int s0
R4(config-if)#encapsulation frame-relay
R4(config-if)#no shut
R4(config)#int s 0.401 point-to-point
R4(config-subif)#ip address 192.168.10.2 255.255.255.240
R4(config-subif)#no shut
R4(config-subif)#int s 0.403 point-to-point
R4(config-subif)#ip address 192.168.20.2 255.255.255.0
R4(config-subif)#no shut
R4(config)#int s0.401
R4(config-subif)#frame-relay interface-dlci 401
R4(config-fr-dlci)#exit
R4(config)-subif#int s0.403
R4(config-subif)#frame-relay int
R4(config-subif)#frame-relay interface-dlci 403
R4(config-fr-dlci)#end
R4#
R5的配置
R5(config)#frame-relay switching
R5(config)#int E1
R5(config-if)#ip address 10.1.1.2 255.255.255.0
R5(config-if)#no shut
R5(config-if)#int S0
R5(config-if)#encapsulation frame-relay
R5(config-if)#frame-relay intf-type DCE
R5(config-if)#clock rate 64000
R5(config-if)#no shut
R5(config-if)#int tunnel 0
R5(config-if)#tunnel source E1
R5(config-if)#tunnel destination 10.1.1.1
R5(config-if)#exit
R5(config)#int s0
R5(config-if)#frame-relay route 401 interface tunnel 0 100
R5(config-if)#frame-relay route 403 interface tunnel 0 300
R5(config-if)#exit
R5(config)#
实验阶段结果:
R4#ping 192.168.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 64/65/68 ms
R4#ping 192.168.20.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.20.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 64/65/68 ms
R4#
但是,此时R1和R3还没有联通
R1#ping 192.168.20.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.20.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R1#
首先,在R1,R3上没有至对方的路由。那么
R1(config)#ip route 0.0.0.0 0.0.0.0 s0
R3(config)#ip route 0.0.0.0 0.0.0.0 s0
但是,在R3上pingR1:
R3#ping 192.168.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R3#
此时,我们从第二层链路层考虑,即使有了第三层的路由,但是在此时,帧中继交换中,没有生成在R1R3之间的虚链路
R3#show frame-relay PVC
PVC Statistics for interface Serial0 (Frame Relay DTE)
Active Inactive Deleted Static
Local 1 0 0 0
Switched 0 0 0 0
Unused 0 0 0 0
DLCI = 304, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0
input pkts 23 output pkts 20 in bytes 5142
out bytes 1380 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 10 out bcast bytes 340
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
pvc create time 00:31:37, last time pvc status changed 00:20:26
R3#
所以,即使有了路由,但没有链路可走,也是通不了的。在做了如下配置后:
R1(config)#int s0
R1(config-if)#frame-relay map ip 192.168.20.1 104 broadcast
R3(config)#int s0
R3(config-if)#frame-relay map ip 192.168.10.1 304 broadcast
有如下结果:
R1#ping 192.168.20.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.20.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 124/125/132 ms
R1#
实验结论:
1、 当路由器接口不够时,可以利用隧道技术,使2台路由充当帧中继,以扩充端口
2、 隧道技术通过启用一个TUNNEL逻辑接口来实现两边的互相通信
3、 PVC是帧中继交换机一切通信的前提,不然即使有直连、路由,也是不能联通的! |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
|