帧中继 PPP2 用户接入
r1:
en
config t
hostname R1
no ip domain-lookup
lin 0
exec-timeout 0 0
logging syn
exit
r2:
en
config t
hostname R2
no ip domain-lookup
lin 0
exec-timeout 0 0
logging syn
exit
r3:
en
config t
hostname R3
no ip domain-lookup
lin 0
exec-timeout 0 0
logging syn
exit
r1 config t
frame-relay switching
inter s1/0
encapsulation frame-relay
fram-relay intf-type dce
clockrate 64000
no shutdown
exit
int s2/0
encapsulation frame-relay
frame-relay intf-type dce
clockrate 64000
no shutdown
exit
r1 int s2/0
frame-relay route 203 int s1/0 302
int s1/0
frame-relay route 302 int s2/0 203
end
r1 show frame-relay route
r2 config t
int s1/0
encapsulation frame-relay ?
encapsulation frame-relay 默认是cisco 但你要确定所要设备都是 否
则不通
int s2/0
encapsulation frame-relay
end
r2 show interface s1/0
r3 config t
int s2/0
encapsulation frame-relay
no shutdown
end
r3 show frame-relay route
(看接口有没有起来,要注意所有的接口要noshutdown)
r2 show ip interface s1/0
(看有没UP起来)
r3 show frame-relay route
(看接口的状态)
r3 show int s2/0
(看看它的封装格式)
---------------------------------------------------------------
step 2
pvc 通了 咱就做测试 配上IP地址
r2 config t
int s1/0
ip add 192.168.0.2 255.255.255.0
no shutdown
end
r3 config t
int s2/0
ip add 192.168.0.1 255.255.255.0
no shutdown
end
r2 ping 192.168.0.1
.....
r2 show frame-relay lmi ? 查看LMCI 号码number
show frame-relay lmi
r2 config t
int s1/0
frame-relay lmi-type 默认CISCO 配置时要记得两边一致 但同一路由
器的两个接口可以不一样
r1 config t
int s2/0
frame-relay lmi-type
r1 show frame-relay lmi
r2 show frame-relay lmi
r2 debug frame-relay lmi ?
r2 debug frame-relay lmi
unde all
r1 debug frame-relay lni ints2/0
unde all
r2 show frame-relay pvc 查看DLCI号码
r2 ping 192.169.0.1
!!!!!
r2 config t
int s1/0
end
r2 show frame-relay map (帧中继映谢)
r3 ping 192.168.0.1 (ping不通自己因为frame-relay要封装先要查映谢)
.....
---------------------------------------------------------------
现在我们给R3自己做条映谢
r3 config t
int s2/0
frame-relay map ? ()
frame-relay map ip ? (第三层协议)
frame-relay map ip 192.168.0.1 ? (目标地址)
frame-relay map ip 192.168.0.1 302 ? (DLCI号码)
frame-relay map ip 192.168.0.1 302 broadcast (支持广播)
end
r3 show frame-relay map
r3 ping 192.168.0.1
!!!!!
-------------------------------------------------------------------
现在我们要关掉动态这个映谢 因为动态的不稳定
r2 config t
int s1/0
no frame-relay inverse-arp
end
r3 config t
int s2/0
no frame-relay inverse-arp
end
r3 show frame-relay (看看那条命令是不是确实敲进来了)
r2 show frame-relay map
r2 clear frame-relay map (清除缓存)
r2 ping 192.168.0.1
....
我们需要做静态映谢
r2 config t
int s1/0
frame-relay map ip ?
frame-relay map ip 192.168.0.1 ?
frame-relay map ip 192.168.0.1 203 broadcast
end
r2 show frame-relau map
r3 config t
int s2/0
frame-relay map ip 192.168.0.2 302 broadcast
end
r3 show frame-relay map
r2 ping 192.168.0.1
!!!!
r2 config t
int lo 0
ip add 2.2.2.2 255.255.255.255
exit
r3 config t
int lo 0
ip add 3.3.3.3 255.255.255.255
exit
r2 config t
router rip
ver 2
no auto-summary
network 2.0.0.0
network 192.168.0.0
end
r3 config t
router rip
ver 2
no auto-summary
network 3.0.0.0
network 192.168.0.0
end
r2 show ip route rip
r3 show ip route rip
r2 debug ip rip
clear ip route *
可以看到它发出了192.168.0.0 这说明水平分割split horizon没效啊
unde all
r2 show ip int s1/0
里面有一句split horizon is disabled它默认就关闭了
r2 config t
int s1/0
ip split-horizon (打开水平分割)
end
---------------------------------------------------------
frame-relay inverse-arp 反ARP 动态映谢 默认的
r1-r3首先要ip地址 以太网 还有MAC地址 而frane-relay 是个二层的在
frame-relay是以DLCI号码来区分的
它由LMI协议动态获取
PVC在二层就隔离了 所以你和别的企业ip地址一样也没关系 它看DLCI号码的