频道栏目
首页 > 资讯 > 交换机 > 正文

帧中继点对点子接口链路上运行OSPF

15-11-09        来源:[db:作者]  
收藏   我要投稿
一.实验目的
(1)实现Fame-Relay点对点子接口实现各节点业务网段的连通性。
(2)掌握OSPF点对点类型和OSPF协议以太网点对点网络类型的配置及区别。
(3)熟悉OSPF的配置命令,了解路径开销的计算。
三.实验步骤
1.基本命令配置
RT1、RT3、RT5、RT7的基本命令配置:
enable
config terminal 
hostname RT           //给路由器命名
no ip domain-lookup    //禁用域名查找
line console 0         //进入console口线路模式
logging syn           //console信息显示自动换行
no login             //配置console登陆不认证
privilege level 15    //配置console口登录为最高特权级别
line vty 0 4          //进入vty线路模式
no login              //配置Telnet登陆不认证
privilege level 15    //配置vty登录为最高特权级别
exit
2.帧中继交换机配置
RT1(config)#frame-relay switching       //启动帧中继交换机 
RT1(config)#int s0/0
RT1(config-if)#clock rate 1000000      //DCE端配置时钟速率
RT1(config-if)#en frame-relay ietf        //帧中继封装
RT1(config-if)#frame-relay lmi-type q933a //LMI类型 
RT1(config-if)#frame-relay intf-type dce //帧中继接口封装类型
RT1(config-if)#frame-relay route 101 int s0/2 201
RT1(config-if)#frame-relay route 102 int s0/3 202
RT1(config-if)#no shutdown
RT1(config-if)#exit
RT1(config)#int s0/2
RT1(config-if)#clock rate 500000       //DCE端配置时钟速率
RT1(config-if)#encapsulation frame-relay ietf  //帧中继封装
RT1(config-if)#frame-relay lmi-type q933a    //LMI类型 
RT1(config-if)#frame-relay intf-type dce//帧中继接口封装类型
RT1(config-if)#frame-relay route 201 int s0/0 101
RT1(config-if)#no shutdown
RT1(config-if)#exit
RT1(config)#int s0/3
RT1(config-if)#clock rate 500000       //DCE端配置时钟速率
RT1(config-if)#encapsulation frame-relay ietf  //帧中继封装RT1(config-if)#frame-relay lmi-type q933a  //LMI类型 
RT1(config-if)#frame-relay intf-type dce//帧中继接口封装类型
RT1(config-if)# frame-relay route 202 int s0/0 102  
RT1(config-if)#no shutdown 
RT1(config-if)#exit
RT1#show frame-relay route   //帧中继路由表信息
Input Intf      Input Dlci      Output Intf     Output Dlci     Status
Serial0/0       101             Serial0/2       201             active
Serial0/0       102             Serial0/3       202             active
Serial0/2       201             Serial0/0       101             active
Serial0/3       202             Serial0/0       102             active
3.接口配置及链路测试
(1)RT3的Loopback 0 配置、局域网接口配置
RT3(config)#int loop 0  
//配置Loopback接口用于Router ID、业务承载、网管等。
RT3(config-if)#ip add 3.3.3.3 255.255.255.255
RT3(config-if)#no shutdown
RT3(config-if)#exit
RT3(config)#int e3/1   //配置业务接口
RT3(config-if)#ip add 192.168.21.1 255.255.255.0
RT3(config-if)#no shutdown 
RT3(config-if)#exit
(2)RT5的Loopback 0 配置、局域网接口配置
RT5(config)#int loop 0
//配置Loopback接口用于Router ID、业务承载、网管等。
RT5(config-if)#ip address 5.5.5.5 255.255.255.255
RT5(config-if)#no shutdown
RT5(config-if)#exit
RT5(config)#int Loopback 10 
RT5(config)#ip ospf network point-to-point
//使用Loopback 10接口模拟业务时必须将其OSPF网络类型配置成为点对点;否则,路由器学习不正确。
RT5(config-if)#ip address 192.168.37.1 255.255.255.0
RT5(config-if)#no shutdown
RT5(config-if)#exit
RT5(config)#int e3/3   RT5 E3——RT7 E3 以太网广播型网络
RT5(config-if)#ip address 192.168.1.9 255.255.255.252
RT5(config-if)#no shutdown
(3)RT7的Loopback 0 配置、局域网接口配置
RT7(config)#int loop 0 
//配置Loopback接口用于Router ID、业务承载、网管等。
RT7(config-if)#ip address 7.7.7.7 255.255.255.255
RT7(config-if)#no shutdown 
RT7(config-if)#exit
RT7(config)#int loopback 10
RT7(config)#ip ospf network point-to-point
//使用Loopback 10接口模拟业务时必须将其OSPF网络类型配置成为点对点;否则,路由器学习不正确。
RT7(config-if)#ip address 192.168.45.1 255.255.255.0
RT7(config-if)#no shutdown 
RT7(config-if)#exit
RT7(config)#int e3/3   RT5 E3——RT7 E3 以太网广播型网络
RT7(config-if)#ip address 192.168.1.10 255.255.255.252
RT7(config-if)#no shutdown 
RT7(config-if)#exit
(4)RT3的Frame-Relay点对点子接口配置
RT3(config)#int s0/0
RT3(config-if)#encapuslation frame-relay ietf//主接口封装帧中继
RT3(config-if)#frame-relay lmi-type q933a//主接口配置帧中继LMI
RT3(config-if)#no shutdown
RT3(config)#int s0/0.101 point-to-point//创建点对点子接口
RT3(config-subif)#frame-relay interface-dlci 101//给点对点子接口配置DLCI号
RT3(config-fr-dlci)#exit     //给子接口配置IP地址
RT3(config-subif)#ip add 192.168.1.1 255.255.255.252
RT3(config-subif)#no shutdown
RT3(config-subif)#exit
RT3(config)#int s0/0.102 point-to-point 
RT3(config-subif)#frame-relay interface-dlci 102
RT3(config-fr-dlci)#exit
RT3(config-subif)#ip add 192.168.1.5 255.255.255.252
RT3(config-subif)#no shutdown 
RT3(config-subif)#exit
查看接口IP配置情况
RT3#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
Serial0/0                  unassigned      YES unset  up                    up    
Serial0/0.101              192.168.1.1     YES manual up                    up      
Serial0/0.102              192.168.1.5     YES manual up                    up      
Serial0/1                  unassigned      YES unset  administratively down down    
Serial0/2                  unassigned      YES unset  administratively down down    
Serial0/3                  unassigned      YES unset  administratively down down    
Ethernet3/0                unassigned      YES unset  administratively down down    
Ethernet3/1                192.168.21.1    YES manual up                    up      
Ethernet3/2                unassigned      YES unset  administratively down down    
Ethernet3/3                unassigned      YES unset  administratively down down    
Loopback0                  3.3.3.3         YES manual up                    up  
(5)RT5的Frame-Relay点对点子接口配置
RT5(config)#int s0/0
RT5(config-if)#encapuslation frame-relay ietf//主接口封装帧中继
RT5(config-if)#frame-relay lmi-type q933a//主接口配置帧中继LMI
RT5(config-if)#no shutdown
RT5(config)#int s0/0.201 point-to-point//创建点对点子接口
RT5(config-subif)#frame-relay interface-dlci 201//给点对点子接口配置DLCI号
RT5(config-fr-dlci)#exit     //给子接口配置IP地址
RT5(config-subif)#ip add 192.168.1.2 255.255.255.252
RT5(config-subif)#no shutdown
RT5(config-subif)#exit
查看接口IP配置情况
RT5#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
Serial0/0                  unassigned      YES unset  up                    up      
Serial0/0.201              192.168.1.2     YES manual up                    up      
Serial0/1                  unassigned      YES unset  administratively down down    
Serial0/2                  unassigned      YES unset  administratively down down    
Serial0/3                  unassigned      YES unset  administratively down down    
Ethernet3/0                unassigned      YES unset  administratively down down    
Ethernet3/1                unassigned      YES unset  administratively down down     
Ethernet3/2                unassigned      YES unset  administratively down down    
Ethernet3/3                192.168.1.9     YES manual up                    up      
Loopback0                  5.5.5.5         YES manual up                    up 
Loopback10                192.168.37.1    YES manual up                    up 
(6)RT7的Frame-Relay点对点子接口配置
RT7(config)#int s0/0
RT7(config-if)#encapuslation frame-relay ietf//主接口封装帧中继
RT7(config-if)#frame-relay lmi-type q933a//主接口配置帧中继LMI
RT7(config-if)#no shutdown
RT7(config)#int s0/0.202 point-to-point//创建点对点子接口
RT7(config-subif)#frame-relay interface-dlci 202/给点对点子接口配置DLCI号
RT7(config-fr-dlci)#exit     //给子接口配置IP地址
RT7(config-subif)#ip add 192.168.1.6 255.255.255.252
RT7(config-subif)#no shutdown
RT7(config-subif)#exit
RT7#show ip interface brief 
Interface                  IP-Address      OK? Method Status                Protocol
Serial0/0                  unassigned      YES unset  up                    up      
Serial0/0.202              192.168.1.6     YES manual up                    up      
Serial0/1                  unassigned      YES unset  administratively down down    
Serial0/2                  unassigned      YES unset  administratively down down    
Serial0/3                  unassigned      YES unset  administratively down down    
Ethernet3/0               unassigned      YES unset  administratively down down    
Ethernet3/1                unassigned      YES unset  administratively down down    
Ethernet3/2                unassigned      YES unset  administratively down down    
Ethernet3/3                192.168.1.10    YES manual up                    up      
Loopback0                  7.7.7.7         YES manual up                    up
Loopback10               192.168..45.1    YES manual up                    up 
  
(7)在RT3、RT5、RT7上配置为地对点网络类型
RT3(config)#int s0/0.101 point-to-point 
RT3(config-subif)#ip ospf network point-to-point 
RT3(config)#int s0/0.102 point-to-point 
RT3(config-subif)#ip ospf network point-to-point
RT5(config)#int s0/0.201 point-to-point 
RT5(config-subif)#ip ospf network point-to-point
RT7(config)#int s0/0.202 point-to-point 
RT7(config-subif)#ip ospf network point-to-point 
(8)在RT3、RT5、RT7上配置OSPF命令
1. RT3配置OSPF
RT3(config)#router ospf 1
//配置OSPF进程号与邻居建立没有关系,但方便网管,需全网统一。
RT3(config-router)#router-id 3.3.3.3 //收到配Router ID
RT3(config-router)#auto- cost reference-bandwidth 1000
//修改参考带宽为1Gbps
//Cisco 的auto- cost reference-bandwidth 命令的单位为1Mbps
//注意:全网路由器的参考带宽必须相同,参考带宽一旦修改就必须全网修改!!!
RT3(config-router)#network 3.3.3.3 0.0.0.0 area 0
//发布Lookback0
RT3(config-router)#network 192.168.1.0 0.0.0.3 area 0
//发布下联网段
RT3(config-router)#network 192.168.1.4 0.0.0.3 area  0
//发布下联网段
RT3(config-router)#network 192.168.21.0 0.0.0.255 area 0
//发布业务网段
RT3(config-router)#passive-interface e3/0
//为业务网段配置被动接口
2.RT5的OSPF配置
RT5(config)#router ospf 1
//配置OSPF进程号与邻居建立没有关系,但方便网管,需全网统一。
RT5(config-router)#router-id 5.5.5.5 //收到配Router ID
RT5(config-router)#auto- cost reference-bandwidth 1000
//修改参考带宽为1Gbps
//Cisco 的auto- cost reference-bandwidth 命令的单位为1Mbps
//注意:全网路由器的参考带宽必须相同,参考带宽一旦修改就必须全网修改!!!
RT5(config-router)#network 5.5.5.5 0.0.0.0 area 0
//发布Lookback0
RT5(config-router)#network 192.168.1.0 0.0.0.3 area 0
//发布上联网段
RT5(config-router)#network 192.168.1.8 0.0.0.3 area  0
//发布互联网段
RT5(config-router)#network 192.168.37.0 0.0.0.255 area 0
//发布业务网段
RT5(config-router)#passive-interface Lookback10
//为业务网段配置被动接口
3.RT7的OSPF配置
RT7(config)#router ospf 1
//配置OSPF进程号与邻居建立没有关系,但方便网管,需全网统一。
RT7(config-router)#router-id 7.7.7.7 //收到配Router ID
RT7(config-router)#auto- cost reference-bandwidth 1000
//修改参考带宽为1Gbps
//Cisco 的auto- cost reference-bandwidth 命令的单位为1Mbps
//注意:全网路由器的参考带宽必须相同,参考带宽一旦修改就必须全网修改!!!
RT7(config-router)#network 7.7.7.7 0.0.0.0 area 0
//发布Lookback0
RT7(config-router)#network 192.168.1.4 0.0.0.3 area 0
//发布上联网段
RT7(config-router)#network 192.168.1.8 0.0.0.3 area  0
//发布互联网段
RT7(config-router)#network 192.168.45.0 0.0.0.255 area 0
//发布业务网段
RT7(config-router)#passive-interface Lookback10
//为业务网段配置被动接口
四.实验测试
1.查看RT3、RT5、RT7的路由表
RT3#show ip route//注:只显示所有通过OSPF获得的路由条目
O    192.168.45.0/24 [110/74] via 192.168.1.6, 00:01:40, Serial0/0.102
     5.0.0.0/32 is subnetted, 1 subnets
O       5.5.5.5 [110/65] via 192.168.1.2, 00:01:40, Serial0/0.101
     7.0.0.0/32 is subnetted, 1 subnets
O       7.7.7.7 [110/65] via 192.168.1.6, 00:01:40, Serial0/0.102
O    192.168.37.0/24 [110/74] via 192.168.1.2, 00:01:40, Serial0/0.101
     192.168.1.0/30 is subnetted, 3 subnets
O       192.168.1.8 [110/74] via 192.168.1.6, 00:01:41, Serial0/0.102
                    [110/74] via 192.168.1.2, 00:01:41, Serial0/0.101
RT5#show ip route//注:只显示所有通过OSPF获得的路由条目
       3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/65] via 192.168.1.1, 00:00:44, Serial0/0.201
O    192.168.45.0/24 [110/20] via 192.168.1.10, 00:00:44, Ethernet3/3
     7.0.0.0/32 is subnetted, 1 subnets
O       7.7.7.7 [110/11] via 192.168.1.10, 00:00:44, Ethernet3/3
O    192.168.21.0/24 [110/74] via 192.168.1.1, 00:00:44, Serial0/0.201
O       192.168.1.4 [110/74] via 192.168.1.10, 00:00:44, Ethernet3/3
RT7#show ip route
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/65] via 192.168.1.5, 00:05:09, Serial0/0.202
     5.0.0.0/32 is subnetted, 1 subnets
O       5.5.5.5 [110/11] via 192.168.1.9, 00:05:09, Ethernet3/3
     7.0.0.0/32 is subnetted, 1 subnets
C       7.7.7.7 is directly connected, Loopback0
O    192.168.21.0/24 [110/74] via 192.168.1.5, 00:05:09, Serial0/0.202
O    192.168.37.0/24 [110/20] via 192.168.1.9, 00:05:09, Ethernet3/3
O       192.168.1.0 [110/74] via 192.168.1.9, 00:05:09, Ethernet3/3
2.查看RT3、RT5、RT7的邻居
RT3#show ip ospf neighbor 
Neighbor ID     Pri   State           Dead Time   Address         Interface
7.7.7.7           0   FULL/  -        00:00:39    192.168.1.6     Serial0/0.102
5.5.5.5           0   FULL/  -        00:00:34    192.168.1.2     Serial0/0.101
RT5#show ip ospf neighbor 
Neighbor ID     Pri   State           Dead Time   Address         Interface
7.7.7.7           1   FULL/DR         00:00:29    192.168.1.10    Ethernet3/3
3.3.3.3           0   FULL/  -        00:00:32    192.168.1.1     Serial0/0.201
RT7#show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
5.5.5.5           1   FULL/BDR        00:00:31    192.168.1.9     Ethernet3/3
3.3.3.3           0   FULL/  -        00:00:35    192.168.1.5     Serial0/0.202
3.查看OSPF LSDB和LSA
RT3#show    ip   ospf   database 
            OSPF Router with ID (3.3.3.3) (Process ID 1)
                Router Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum Link count
3.3.3.3         3.3.3.3            84          0x80000006 0x00F95B           6
5.5.5.5         5.5.5.5            75          0x80000006 0x007554           5
7.7.7.7         7.7.7.7            74          0x80000006 0x00ECB3           5
                Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
192.168.1.9     5.5.5.5         75          0x80000001 0x00E99B
一类LSA宣告路由器和LINK ID 均为始发路由器的Router ID
RT5#show   ip   ospf   database   network 
            OSPF Router with ID (5.5.5.5) (Process ID 1)
                Net Link States (Area 0)
  Routing Bit Set on this LSA
  LS age: 274
  Options: (No TOS-capability, DC)
  LS Type: Network Links
  Link State ID: 192.168.1.10 (address of Designated Router)//链路状态ID为DR的接口IP
  Advertising Router: 7.7.7.7   //通告路由器ID为本区域中DR的Router ID
  LS Seq Number: 80000001   //序列号
  Checksum: 0x83F8         //校验和
  Length: 32                //长度
  Network Mask: /30        //这个网络上使用的掩码
        Attached Router: 7.7.7.7    //相连的路由器(DR本身)
        Attached Router: 5.5.5.5   //相连的路由器
4.OSPF网络类型优化
RT5(config)#int e3/3 
RT5(config-if)#ip ospf network point-to-point
//配置为点对点型网络,两路两端的网络类型必须一致,否则不能建立邻居或路由器学习部正确。
RT7(config)#int e3/3
RT7(config-if)#ip ospf network point-to-point
//配置为点对点型网络,两路两端的网络类型必须一致,否则不能建立邻居或路由器学习部正确
RT5#show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
7.7.7.7           0   FULL/  -        00:00:31    192.168.1.10    Ethernet3/3
3.3.3.3           0   FULL/  -        00:00:33    192.168.1.1     Serial0/0.201
//OSPF点对点网络类型,没有DR、BDR选举!!
RT7#show ip ospf neighbor 
Neighbor ID     Pri   State           Dead Time   Address         Interface
5.5.5.5           0   FULL/  -        00:00:37    192.168.1.9     Ethernet3/3
3.3.3.3           0   FULL/  -        00:00:34    192.168.1.5     Serial0/0.202
五.实验总结
1.OSPF网络类型小结:
 
网络类型   发现邻居  Hello时间  Down时间  DR和BDR  等待时间
点对点     自动发现   10s      30s      无     ----
广播      自动发现   10s      30s      有    30s
非广播     手动发现   10s      120s     有     120s
点对多点    自动发现  10s      120s     无     -----
 
2.配置帧中继时常虚电路不能UP原因:
(1)配置时可能接口down掉了。解决方法——应在接口模式下敲命令:
no shutdown
(2)可能是协议层down掉了,在帧中继交换机上查看接口信息
命令为:show int s0/0(假设接口为s0/0),会出现Lmi down解决方法——应先将帧中继交换机的接口shutdown,并将该接口对应的虚电路路由器上的接口shutdown。然后,在帧中继s0/0接口上封装协议后。先打开接口s0/0,在打开虚电路路由器上的接口。
(3)可能是将帧中继接口配成了DTE.解决方法——将接口配成DCE即可。
 
相关TAG标签
上一篇:刷新本地DNS缓存的方法
下一篇:oracle监听
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站