帧中继―星型结构
分别做非广播,点到点,点到多点
帧交换配置命令 (3种类型都不需要更改,命令作用参考《帧中继-全网互联》)
enable
config t
host r4
no ip domain loo
line console 0
logg syn
exec-time 0 0
exit
frame-relay switch
int s 0/1
encap frame-relay
frame-relay lmi-type ansi
frame-relay intf-type dce
clock rate 64000
frame-relay route 102 int s0/2 201
frame-relay route 103 int s0/3 301
no shu
int s 0/2
encap frame-relay
frame-relay lmi-type ansi
frame-relay intf-type dce
clock rate 64000
frame-relay route 201 int s0/1 102
no shu
int s 0/3
encap frame-relay
frame-relay lmi-type ansi
frame-relay intf-type dce
clock rate 64000
frame-relay route 301 int s0/1 103
no shu
1点到多点与全网状类似,不需要建立邻居关系,只需要将r1-r3接口的ospf协议网络类型改为点到多点,
R1-r3配置命令
R1
enable
config t
host r1
no ip domain loo
line console 0
logg syn
exec-time 0 0
exit
int s 0/0
enca frame-relay
ip add 192.1.1.1 255.255.255.0
no shu
ip ospf network point-to-m //接口的ospf协议网络类型配置为点到点
int lo0
ip add 1.1.1.1 255.255.255.0
router ospf 10
network 192.1.1.1 0.0.0.0 area 0
network 1.1.1.1 0.0.0.0 area 0
r2
enable
config t
host r2
no ip domain loo
line console 0
logg syn
exec-time 0 0
exit
int s 0/0
enca frame-relay
ip add 192.1.1.2 255.255.255.0
no shu
ip ospf network point-to-m //接口的ospf协议网络类型配置为点到点
int lo0
ip add 2.2.2.2 255.255.255.0
router ospf 10
network 192.1.1.2 0.0.0.0 area 0
network 2.2.2.2 0.0.0.0 area 0
r3
enable
config t
host r3
no ip domain loo
line console 0
logg syn
exec-time 0 0
exit
int s 0/0
enca frame-relay
ip add 192.1.1.3 255.255.255.0
no shu
ip ospf network point-to-m //接口的ospf协议网络类型配置为点到点
int lo0
ip add 3.3.3.3 255.255.255.0
router ospf 10
network 192.1.1.3 0.0.0.0 area 0
network 3.3.3.3 0.0.0.0 area 0
测试
R1使用1.1.1.1 ping 2.2.2.2与3.3.3.3
用r2的2.2.2.2 ping 3.3.3.3
全网通
注意!星型结构中r2访问r3或r3访问r2都是需要经过r1的
2、非广播需要在接口做虚链路的静态映射,r1要与r2、r3建立邻居关系且r1必须为dr
R1-r3配置命令
R1
enable
config t
host r1
no ip domain loo
line console 0
logg syn
exec-time 0 0
exit
int s 0/0
enca frame-relay
ip add 192.1.1.1 255.255.255.0
no shu
frame-relay map ip 192.1.1.2 102 //配置静态映射 :到192.1.1.2走dlci102过
frame-relay map ip 192.1.1.3 103 //配置静态映射 :到192.1.1.3走dlci103过
int lo0
ip add 1.1.1.1 255.255.255.0
router ospf 10
network 192.1.1.1 0.0.0.0 area 0
network 1.1.1.1 0.0.0.0 area 0
nei 192.1.1.2 //与192.1.1.2建立邻居关系
nei 192.1.1.3 //与192.1.1.3建立邻居关系
r2
enable
config t
host r2
no ip domain loo
line console 0
logg syn
exec-time 0 0
exit
int s 0/0
enca frame-relay
ip add 192.1.1.2 255.255.255.0
no shu
frame-relay map ip 192.1.1.3 201 //配置静态映射 :到192.1.1.3走dlci201过
ip ospf pri 0 //配置接口的优先级(默认1 ,0不参加选举dr)
int lo0
ip add 2.2.2.2 255.255.255.0
router ospf 10
network 192.1.1.2 0.0.0.0 area 0
network 2.2.2.2 0.0.0.0 area 0
r3
enable
config t
host r3
no ip domain loo
line console 0
logg syn
exec-time 0 0
exit
int s 0/0
enca frame-relay
ip add 192.1.1.3 255.255.255.0
no shu
frame-relay map ip 192.1.1.2 301 //配置静态映射 :到192.1.1.2走dlci301过
ip ospf pri 0 //配置接口的优先级(默认1 ,0不参加选举dr)
int lo0
ip add 3.3.3.3 255.255.255.0
router ospf 10
network 192.1.1.3 0.0.0.0 area 0
network 3.3.3.3 0.0.0.0 area 0
测试
R1的1.1.1.1 pingr2的2.2.2.2与r3的3.3.3.3
R2的2.2.2.2 ping r3的3.3.3.3
全网通
3、点到点R1需要起两个子接口并且使用不同的网段,子接口映射相应的虚链路。
修改下top图 将r1 s0/0起两个子接口 s0/0.1 ip为 192.1.1.1 s0/0.2 ip为193.1.1.1
将r3的s0/0 ip修改为193.1.1.2
R1-R3配置命令
R1
enable
config t
host r1
no ip domain loo
line console 0
logg syn
exec-time 0 0
exit
int s 0/0
enca frame-relay
ip ospf network point-to-point //接口协议网络类型为点到点
no shu
int s 0/0.1 point-to-point //进入子接口
no shu
ip add 192.1.1.1 255.255.255.0
frame-relay int 102 //配置该接口使用虚链路102
int s 0/0.2 point-to-point //进入子接口
no shu
ip add 193.1.1.1 255.255.255.0
frame-relay int 103 //配置该接口使用虚链路103
int lo0
ip add 1.1.1.1 255.255.255.0
router ospf 10
network 192.1.1.1 0.0.0.0 area 0
network 193.1.1.1 0.0.0.0 area 0
network 1.1.1.1 0.0.0.0 area 0
r2
enable
config t
host r2
no ip domain loo
line console 0
logg syn
exec-time 0 0
exit
int s 0/0
enca frame-relay
ip add 192.1.1.2 255.255.255.0
no shu
ip ospf network point-to-point
ip ospf pri 0 //将接口优先级设为0
int lo0
ip add 2.2.2.2 255.255.255.0
router ospf 10
network 192.1.1.2 0.0.0.0 area 0
network 2.2.2.2 0.0.0.0 area 0
r3
enable
config t
host r3
no ip domain loo
line console 0
logg syn
exec-time 0 0
exit
int s 0/0
enca frame-relay
ip add 193.1.1.2 255.255.255.0
ip ospf network point-to-point
no shu
ip ospf pri 0 //将接口优先级设为0
int lo0
ip add 3.3.3.3 255.255.255.0
router ospf 10
network 193.1.1.2 0.0.0.0 area 0
network 3.3.3.3 0.0.0.0 area 0
测试
用r1 ping r2的2.2.2.2和r3的3.3.3.3
用r2的2.2.2.2pingr3的3.3.3.3
全网通