设为首页 收藏本站
查看: 682|回复: 0

[经验分享] ospf的网络类型

[复制链接]
累计签到:1 天
连续签到:1 天
发表于 2015-11-23 09:26:08 | 显示全部楼层 |阅读模式
一、帧中继启多点子接口:
wKiom1ZP1OTjKc3jAAB31gmOC6k006.jpg
1.FRpoint-to-multipoint网络类型

FR#show run
Building configuration...!         
interface Serial1/0
no ip address
encapsulation frame-relay
serial restart-delay 0
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 102 interface Serial1/1 201
frame-relay route 103 interface Serial1/2 301
frame-relay route 104 interface Serial1/3 401
!         
interface Serial1/1
no ip address
encapsulation frame-relay
serial restart-delay 0
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 201 interface Serial1/0 102
!         
interface Serial1/2
no ip address
encapsulation frame-relay
serial restart-delay 0
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 301 interface Serial1/0 103
!         
interface Serial1/3
no ip address
encapsulation frame-relay
serial restart-delay 0
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 401 interface Serial1/0 104
!   


R1#show run
Building configuration...

interface Loopback0
ip address 1.1.1.1 255.255.255.0


interface Serial1/0
no ip address
encapsulation frame-relay
serial restart-delay 0
no frame-relay inverse-arp
!         
interface Serial1/0.1 multipoint
ip address 10.1.1.1 255.255.255.0
ip ospf network point-to-multipoint       / /FR的网络类型point-to-multipoint
frame-relay map ip 10.1.1.1 102 broadcast
frame-relay map ip 10.1.1.4 104 broadcast
frame-relay map ip 10.1.1.3 103 broadcast
frame-relay map ip 10.1.1.2 102 broadcast

router ospf 1
router-id 1.1.1.1
network 1.1.1.0 0.0.0.255 area 1
network 10.1.1.0 0.0.0.255 area 1
!      


R2#show run
Building configuration...

interface Loopback0
ip address 2.2.2.2 255.255.255.0

interface Serial1/0
ip address 10.1.1.2 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint
serial restart-delay 0
frame-relay map ip 10.1.1.4 201 broadcast
frame-relay map ip 10.1.1.3 201 broadcast
frame-relay map ip 10.1.1.2 201 broadcast
frame-relay map ip 10.1.1.1 201 broadcast
frame-relay lmi-type cisco


router ospf 1
router-id 2.2.2.2
network 2.2.2.0 0.0.0.255 area 1
network 10.1.1.0 0.0.0.255 area 1

R3#show run
Building configuration...      
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!         
interface Serial1/0
ip address 10.1.1.3 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint
serial restart-delay 0
frame-relay map ip 10.1.1.4 301 broadcast
frame-relay map ip 10.1.1.3 301 broadcast
frame-relay map ip 10.1.1.2 301 broadcast
frame-relay map ip 10.1.1.1 301 broadcast
frame-relay lmi-type cisco
!         
router ospf 1
router-id 3.3.3.3
network 3.3.3.0 0.0.0.255 area 1
network 10.1.1.0 0.0.0.255 area 1
!         


R4#show run
Building configuration...

interface Loopback0
ip address 4.4.4.4 255.255.255.0
!         
interface FastEthernet0/0
no ip address
shutdown
duplex full
!         
interface Serial1/0
ip address 10.1.1.4 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint
serial restart-delay 0
frame-relay map ip 10.1.1.4 401 broadcast
frame-relay map ip 10.1.1.3 401 broadcast
frame-relay map ip 10.1.1.2 401 broadcast
frame-relay map ip 10.1.1.1 401 broadcast
frame-relay lmi-type cisco

router ospf 1
router-id 4.4.4.4
network 4.4.4.0 0.0.0.255 area 1
network 10.1.1.0 0.0.0.255 area 1
!   



R1#show ip route

      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, Loopback0
L        1.1.1.1/32 is directly connected, Loopback0
      2.0.0.0/32 is subnetted, 1 subnets
O        2.2.2.2 [110/65] via 10.1.1.2, 00:22:34, Serial1/0.1
      3.0.0.0/32 is subnetted, 1 subnets
O        3.3.3.3 [110/65] via 10.1.1.3, 00:17:18, Serial1/0.1
      4.0.0.0/32 is subnetted, 1 subnets
O        4.4.4.4 [110/65] via 10.1.1.4, 00:15:07, Serial1/0.1
      10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C        10.1.1.0/24 is directly connected, Serial1/0.1
L        10.1.1.1/32 is directly connected, Serial1/0.1
O        10.1.1.2/32 [110/64] via 10.1.1.2, 00:22:34, Serial1/0.1
O        10.1.1.3/32 [110/64] via 10.1.1.3, 00:17:18, Serial1/0.1
O        10.1.1.4/32 [110/64] via 10.1.1.4, 00:15:07, Serial1/0.1
R1#show ip ospf interface brief
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Lo0          1     1               1.1.1.1/24         1     LOOP  0/0
Se1/0.1      1     1               10.1.1.1/24        64    P2MP  3/3
R1#show ip ospf nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
4.4.4.4           0   FULL/  -        00:01:45    10.1.1.4        Serial1/0.1
3.3.3.3           0   FULL/  -        00:01:47    10.1.1.3        Serial1/0.1
2.2.2.2           0   FULL/  -        00:01:32    10.1.1.2        Serial1/0.1

R1#show ip ospf inter s1/0.1
Serial1/0.1 is up, line protocol is up
  Internet Address 10.1.1.1/24, Area 1, Attached via Network Statement
  Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_MULTIPOINT, Cost: 64
  Topology-MTID    Cost    Disabled    Shutdown      Topology Name
        0           64        no          no            Base
  Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:14
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 4 msec
  Neighbor Count is 3, Adjacent neighbor count is 3
    Adjacent with neighbor 4.4.4.4
    Adjacent with neighbor 3.3.3.3
    Adjacent with neighbor 2.2.2.2
  Suppress hello for 0 neighbor(s)     


R2#show ip route

      1.0.0.0/32 is subnetted, 1 subnets
O        1.1.1.1 [110/65] via 10.1.1.1, 00:27:07, Serial1/0
      2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        2.2.2.0/24 is directly connected, Loopback0
L        2.2.2.2/32 is directly connected, Loopback0
      3.0.0.0/32 is subnetted, 1 subnets
O        3.3.3.3 [110/129] via 10.1.1.1, 00:21:41, Serial1/0
      4.0.0.0/32 is subnetted, 1 subnets
O        4.4.4.4 [110/129] via 10.1.1.1, 00:19:39, Serial1/0
      10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C        10.1.1.0/24 is directly connected, Serial1/0
O        10.1.1.1/32 [110/64] via 10.1.1.1, 00:27:07, Serial1/0
L        10.1.1.2/32 is directly connected, Serial1/0
O        10.1.1.3/32 [110/128] via 10.1.1.1, 00:21:41, Serial1/0
O        10.1.1.4/32 [110/128] via 10.1.1.1, 00:19:39, Serial1/0
R2#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1           0   FULL/  -        00:01:38    10.1.1.1        Serial1/0
R2#show ip ospf in
R2#show ip ospf interface s1/0
Serial1/0 is up, line protocol is up
  Internet Address 10.1.1.2/24, Area 1, Attached via Network Statement
  Process ID 1, Router ID 2.2.2.2, Network Type POINT_TO_MULTIPOINT, Cost: 64
  Topology-MTID    Cost    Disabled    Shutdown      Topology Name
        0           64        no          no            Base
  Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:09
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 2/2, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 1.1.1.1
  Suppress hello for 0 neighbor(s)

2.FR默认网络类型
R1#show ip route

      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, Loopback0
L        1.1.1.1/32 is directly connected, Loopback0
      2.0.0.0/32 is subnetted, 1 subnets
O        2.2.2.2 [110/65] via 10.1.1.2, 00:00:42, Serial1/0.1
      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.1.1.0/24 is directly connected, Serial1/0.1
L        10.1.1.1/32 is directly connected, Serial1/0.1
R1#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   2WAY/DROTHER    00:01:56    10.1.1.2        Serial1/0.1
3.3.3.3           1   FULL/DR         00:01:55    10.1.1.3        Serial1/0.1
4.4.4.4           1   FULL/BDR        00:01:55    10.1.1.4        Serial1/0.1
R1#show ip ospf
*Sep 26 15:04:08.603: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Serial1/0.1 from LOADING to FULL, Loading Done
R1#show ip ospf interface s1/0.1
Serial1/0.1 is up, line protocol is up
  Internet Address 10.1.1.1/24, Area 1, Attached via Network Statement
  Process ID 1, Router ID 1.1.1.1, Network Type NON_BROADCAST, Cost: 64
  Topology-MTID    Cost    Disabled    Shutdown      Topology Name
        0           64        no          no            Base
  Transmit Delay is 1 sec, State BDR, Priority 1
  Designated Router (ID) 4.4.4.4, Interface address 10.1.1.4
  Backup Designated router (ID) 1.1.1.1, Interface address 10.1.1.1
  Old designated Router (ID) 3.3.3.3, Interface address 10.1.1.3
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:00
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 4 msec, maximum is 4 msec
  Neighbor Count is 3, Adjacent neighbor count is 3
    Adjacent with neighbor 2.2.2.2
    Adjacent with neighbor 3.3.3.3
    Adjacent with neighbor 4.4.4.4  (Designated Router)
  Suppress hello for 0 neighbor(s)


3.FR point-to-multipoint none_brodcast 网络类型
R1(config)#int s1/0.1
R1(config-subif)#ip ospf network point-to-multipoint non-broadcast
R1(config-subif)#en
R1#show ip route   / /没有指邻居之前查看路由表

      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, Loopback0
L        1.1.1.1/32 is directly connected, Loopback0
      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.1.1.0/24 is directly connected, Serial1/0.1
L        10.1.1.1/32 is directly connected, Serial1/0.1

R1(config)#router ospf 1
*Sep 26 15:39:17.011: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Serial1/0.1 from LOADING to FULL, Loading Done
R1(config-router)#neighbor 10.1.1.2
R1(config-router)#neighbor 10.1.1.3
R1(config-router)#neighbor 10.1.1.4
R1(config-router)#end


R1#show ip route     //指邻居之后查看路由表
downloaded static route, H - NHRP, l - LISP

      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, Loopback0
L        1.1.1.1/32 is directly connected, Loopback0
      2.0.0.0/32 is subnetted, 1 subnets
O        2.2.2.2 [110/65] via 10.1.1.2, 00:02:05, Serial1/0.1
      3.0.0.0/32 is subnetted, 1 subnets
O        3.3.3.3 [110/65] via 10.1.1.3, 00:01:15, Serial1/0.1
      4.0.0.0/32 is subnetted, 1 subnets
O        4.4.4.4 [110/65] via 10.1.1.4, 00:01:15, Serial1/0.1
      10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C        10.1.1.0/24 is directly connected, Serial1/0.1
L        10.1.1.1/32 is directly connected, Serial1/0.1
O        10.1.1.2/32 [110/64] via 10.1.1.2, 00:02:05, Serial1/0.1
O        10.1.1.3/32 [110/64] via 10.1.1.3, 00:01:15, Serial1/0.1
O        10.1.1.4/32 [110/64] via 10.1.1.4, 00:01:15, Serial1/0.1

R1#show ip ospf interface brief
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Lo0          1     1               1.1.1.1/24         1     LOOP  0/0
Se1/0.1      1     1               10.1.1.1/24        64    P2MP  3/3
R1#show ip ospf in
R1#show ip ospf interface s1/0
%OSPF: OSPF not enabled on Serial1/0
R1#show ip ospf interface s1/0.1
Serial1/0.1 is up, line protocol is up
  Internet Address 10.1.1.1/24, Area 1, Attached via Network Statement
  Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_MULTIPOINT, Cost: 64
  Topology-MTID    Cost    Disabled    Shutdown      Topology Name
        0           64        no          no            Base
  Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:03
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 2
  Last flood scan time is 0 msec, maximum is 4 msec
  Neighbor Count is 3, Adjacent neighbor count is 3
    Adjacent with neighbor 4.4.4.4
    Adjacent with neighbor 3.3.3.3
    Adjacent with neighbor 2.2.2.2
  Suppress hello for 0 neighbor(s)

R1#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
4.4.4.4           0   FULL/  -        00:01:57    10.1.1.4        Serial1/0.1
3.3.3.3           0   FULL/  -        00:01:42    10.1.1.3        Serial1/0.1
2.2.2.2           0   FULL/  -        00:01:39    10.1.1.2        Serial1/0.1

4.FR point-to-point 网络类型
R1#show ip ospf interface s1/0.1
Serial1/0.1 is up, line protocol is up
  Internet Address 10.1.1.1/24, Area 1, Attached via Network Statement
  Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 64
  Topology-MTID    Cost    Disabled    Shutdown      Topology Name
        0           64        no          no            Base
  Transmit Delay is 1 sec, State POINT_TO_POINT
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:05
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 2
  Last flood scan time is 0 msec, maximum is 4 msec
  Neighbor Count is 1, Adjacent neighbor count is 0
  Suppress hello for 0 neighbor(s)
*Sep 26 16:09:01.995: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on Serial1/0.1 from LOADING to FULL, Loading Done

5.FR broadcast 网络类型
R1#show ip ospf int s1/0.1
Serial1/0.1 is up, line protocol is up
  Internet Address 10.1.1.1/24, Area 1, Attached via Network Statement
  Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 64
  Topology-MTID    Cost    Disabled    Shutdown      Topology Name
        0           64        no          no            Base
  Transmit Delay is 1 sec, State BDR, Priority 1
  Designated Router (ID) 3.3.3.3, Interface address 10.1.1.3
  Backup Designated router (ID) 1.1.1.1, Interface address 10.1.1.1
  Old designated Router (ID) 2.2.2.2, Interface address 10.1.1.2
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:09
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 2
  Last flood scan time is 0 msec, maximum is 4 msec
  Neighbor Count is 3, Adjacent neighbor count is 3
    Adjacent with neighbor 2.2.2.2
    Adjacent with neighbor 3.3.3.3  (Designated Router)
    Adjacent with neighbor 4.4.4.4
  Suppress hello for 0 neighbor(s)
R1#R1#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   FULL/DROTHER    00:00:35    10.1.1.2        Serial1/0.1
3.3.3.3           1   FULL/DR         00:00:38    10.1.1.3        Serial1/0.1
4.4.4.4           1   FULL/DROTHER    00:00:39    10.1.1.4        Serial1/0.1
R1#
R3#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1           1   FULL/BDR        00:00:30    10.1.1.1        Serial1/0

总结:
在多点子接口下,FR网络类型为point-to-multipoint时,建立领居关系,不选DR/BDR,
Hello 30, Dead 120, Wait 120,

FR的默认Network Type NON_BROADCAST ,建立邻居关系,选DR、BDR。Hello 30, Dead 120, Wait 120

point-to-multipoint non-broadcast,在该网络类型下,邻居不能自动发现,所以需要手动指定邻居,不需要选举DR、BDR,网络类型显示为Network Type POINT_TO_MULTIPOINT, Hello 30, Dead 120, Wait 120;

point-to-point,在该网络类型下,邻居不能自动发现,所以需要手动指定邻居,不需要选举DR、BDR,网络类型显示为POINT_TO_POINT,, Hello 30, Dead 120, Wait 120;

在bradcast网络类型下,邻居自动发现,所以不需要手动指定邻居,由于是多路访问的环境,所以需要选举DR,Hello 10, Dead 40, Wait 40,


运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-142419-1-1.html 上篇帖子: 网络设备验收 下篇帖子: 思科&华为路由优先级 网络
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表