h3c ospf stub total stub nssa

拓朴如下


Ip
设置如下本实验只使用R1 R2 R3 R4:

 

实现区域1stub

R1

[RT1]ospf 1

[RT1-ospf-1]area 1

[RT1-ospf-1-area-0.0.0.1]stu

[RT1-ospf-1-area-0.0.0.1]stub

 

R2

[RT2]ospf 1

[RT2-ospf-1]ar

[RT2-ospf-1]area 1

[RT2-ospf-1-area-0.0.0.1]st

[RT2-ospf-1-area-0.0.0.1]stub

 

和思科的设备一样,stub中的路由器能学到一条默认路由

 

实现区域1total  stub

 

R1

[RT1]ospf 1

[RT1-ospf-1]area 1

[RT1-ospf-1-area-0.0.0.1]stu

[RT1-ospf-1-area-0.0.0.1]stub

 

R2

[RT2]ospf 1

[RT2-ospf-1]ar

[RT2-ospf-1]area 1

[RT2-ospf-1-area-0.0.0.1]st

[RT2-ospf-1-area-0.0.0.1]stub no-summary

 

和思科的设备一样,total  stub中的路由器能学到一条默认路由

 

 

实现区域1nssa

R1

[RT1]ospf 1

[RT1-ospf-1]area 1

[RT1-ospf-1-area-0.0.0.1]nssa

 

R2

 

[RT2]ospf 1

[RT2-ospf-1]

[RT2-ospf-1]ar

[RT2-ospf-1]area 1

[RT2-ospf-1-area-0.0.0.1]

[RT2-ospf-1-area-0.0.0.1]nssa default-route-advertise

 

和思科的设备一样,nssa中的路由器默认不能学到一条默认路由,所以要加上default-route-advertise

 

或使用如下的命令:

 

ospf 1

 area 0.0.0.0

  abr-summary 10.10.0.0 255.255.248.0

  network 192.168.2.0 0.0.0.255

 area 0.0.0.1

  abr-summary 172.16.0.0 255.255.248.0

  authentication-mode md5

  network 192.168.1.0 0.0.0.255

  nssa no-summary

#

 

结果看R1的路由表:

 

<RT1>display ip routing-table

Routing Tables: Public

        Destinations : 14       Routes : 14

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

 

0.0.0.0/0           OSPF   10   1563         192.168.1.2     S0/2/0

127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0

127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0

172.16.0.1/32       Direct 0    0            127.0.0.1       InLoop0

172.16.1.1/32       Direct 0    0            127.0.0.1       InLoop0

172.16.2.1/32       Direct 0    0            127.0.0.1       InLoop0

172.16.3.1/32       Direct 0    0            127.0.0.1       InLoop0

172.16.4.1/32       Direct 0    0            127.0.0.1       InLoop0

172.16.5.1/32       Direct 0    0            127.0.0.1       InLoop0

172.16.6.1/32       Direct 0    0            127.0.0.1       InLoop0

172.16.7.1/32       Direct 0    0            127.0.0.1       InLoop0

192.168.1.0/24      Direct 0    0            192.168.1.1     S0/2/0

192.168.1.1/32      Direct 0    0            127.0.0.1       InLoop0

192.168.1.2/32      Direct 0    0            192.168.1.2     S0/2/0

 

<RT1>

 

测试在R1:

<RT1>ping -c 1 -a 172.16.0.1 192.168.100.1

  PING 192.168.100.1: 56  data bytes, press CTRL_C to break

    Reply from 192.168.100.1: bytes=56 Sequence=1 ttl=253 time=20 ms

 

  --- 192.168.100.1 ping statistics ---

    1 packet(s) transmitted

    1 packet(s) received

    0.00% packet loss

    round-trip min/avg/max = 20/20/20 ms

 

<RT1>

 

 

 

 

本文出自 “上善若水威加海内” 博客,转载请与作者联系!

你可能感兴趣的:(h3c,stub,休闲,ospf,NSSA)