好文档 - 专业文书写作范文服务资料分享网站

H3C交换机 典型配置举例-6W100-OSPF典型配置举例

天下 分享 时间: 加入收藏 我要投稿 点赞

Reply from 172.16.1.1: bytes=56 Sequence=5 ttl=253 time=63 ms

--- 172.16.1.1 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss

round-trip min/avg/max = 16/59/94 ms

1.2.6 配置文件

?

Switch A

# router id 192.168.1.1 #

vlan 100 #

vlan 200 #

interface Vlan-interface100

ip address 192.168.0.1 255.255.255.0 #

interface Vlan-interface200

ip address 192.168.1.1 255.255.255.0 # ospf 1

area 0.0.0.0

network 192.168.0.0 0.0.0.255 area 0.0.0.1

network 192.168.1.0 0.0.0.255 #

? Switch B

# router id 192.168.2.1 #

vlan 100 #

vlan 200 #

interface Vlan-interface100

ip address 192.168.0.2 255.255.255.0 #

interface Vlan-interface200

ip address 192.168.2.1 255.255.255.0 # ospf 1

area 0.0.0.0

network 192.168.0.0 0.0.0.255 area 0.0.0.2

network 192.168.2.0 0.0.0.255 #

? Switch C

# router id 192.168.1.2

1-4

#

vlan 200 #

vlan 300 #

interface Vlan-interface200

ip address 192.168.1.2 255.255.255.0 #

interface Vlan-interface300

ip address 172.16.1.1 255.255.255.0 # ospf 1

area 0.0.0.1

network 192.168.1.0 0.0.0.255 network 172.16.1.0 0.0.0.255 #

? Switch D

# router id 192.168.2.2 #

vlan 200 #

vlan 300 #

interface Vlan-interface200

ip address 192.168.2.2 255.255.255.0 #

interface Vlan-interface300

ip address 172.17.1.1 255.255.255.0 # ospf 1

area 0.0.0.2

network 192.168.2.0 0.0.0.255 network 172.17.1.0 0.0.0.255 #

1.3 OSPF的Stub区域典型配置举例

1.3.1 适用产品和版本

表2 配置适用的产品与软件版本关系

产品

软件版本

S10500系列以太网交换机 Release 1120系列,Release 1130系列,Release 1200系列 S5800&S5820X系列以太网交换机 Release 1808 S5830系列以太网交换机 Release 1115,Release 1118 S5500-EI系列以太网交换机 Release 2220

1-5

1.3.2 组网需求

如图2所示网络,所有设备均运行OSPF基本功能,网络层相互可达。Switch D作为AS边界路由器,在网络中引入了大量外部路由。通过将Area 1配置为Stub区域,屏蔽大量的AS外部路由条目,降低Area 1中路由器的路由表规模及LSA数量。

为了进一步减少Stub区域路由表规模以及路由信息传递的数量,将Area 1配置为Totally Stub区域,Totally Stub区域将区域间的路由信息及LSA信息进一步过滤了。 图2 配置OSPF Stub区域组网图

1.3.3 配置注意事项

? ?

如果要将一个区域配置成Stub区域,则该区域中的所有路由器必须都要配置stub命令。 如果要将一个区域配置成Totally Stub区域,该区域中的所有路由器必须配置stub命令,而其中该区域的ABR路由器需要配置stub no-summary 命令。

1.3.4 配置步骤

(1) 配置接口的IP地址(略) (2) 配置OSPF(同前例1.2 )

(3) 配置Switch D引入静态路由(此处仅作验证示例,实际组网中此处可能有大量路由被引入)

[SwitchD] ip route-static 200.0.0.0 8 null 0 [SwitchD] ospf

[SwitchD-ospf-1] import-route static [SwitchD-ospf-1] quit

# 查看Switch C的OSPF路由表。

[SwitchC] display ospf routing

OSPF Process 1 with Router ID 192.168.1.2 Routing Tables

Routing for Network

Destination Cost Type NextHop AdvRouter Area 172.16.1.0/24 1 Stub 172.16.1.1 172.16.1.1 0.0.0.1 172.17.1.0/24 4687 Inter 192.168.1.1 192.168.0.1 0.0.0.1 192.168.1.0/24 1562 Transit 192.168.1.2 172.16.1.1 0.0.0.1 192.168.2.0/24 4686 Inter 192.168.1.1 192.168.0.1 0.0.0.1 192.168.0.0/24 3124 Inter 192.168.1.1 192.168.0.1 0.0.0.1

Routing for ASEs

1-6

Destination Cost Type Tag NextHop AdvRouter 200.0.0.0/8 10 Type2 1 192.168.1.1 172.17.1.1

Total Nets: 6

Intra Area: 2 Inter Area: 3 ASE: 1 NSSA: 0

当Switch C所在区域为普通区域时,可以看到路由表中存在AS外部的路由。

(4) 配置Area1为Stub区域 # 配置Switch A。

[SwitchA] ospf

[SwitchA-ospf-1] area 1

[SwitchA-ospf-1-area-0.0.0.1] stub [SwitchA-ospf-1-area-0.0.0.1] quit [SwitchA-ospf-1] quit

# 配置Switch C。

[SwitchC] ospf

[SwitchC-ospf-1] stub-router [SwitchC-ospf-1] area 1

[SwitchC-ospf-1-area-0.0.0.1] stub [SwitchC-ospf-1-area-0.0.0.1] quit [SwitchC-ospf-1] quit

1.3.5 验证配置

# 显示Switch C的OSPF路由表,可以看到当把Switch C所在区域配置为Stub区域时,已经看不到AS外部的路由,取而代之的是一条缺省路由。

[SwitchC] display ospf routing

OSPF Process 1 with Router ID 192.168.1.2 Routing Tables

Routing for Network

Destination Cost Type NextHop AdvRouter Area 0.0.0.0/0 65536 Inter 192.168.1.1 192.168.0.1 0.0.0.1 172.16.1.0/24 1 Stub 172.16.1.1 172.16.1.1 0.0.0.1 172.17.1.0/24 68660 Inter 192.168.1.1 192.168.0.1 0.0.0.1 192.168.1.0/24 1562 Transit 192.168.1.2 172.16.1.1 0.0.0.1 192.168.2.0/24 68659 Inter 192.168.1.1 192.168.0.1 0.0.0.1 192.168.0.0/24 67097 Inter 192.168.1.1 192.168.0.1 0.0.0.1

Total Nets: 6

Intra Area: 2 Inter Area: 4 ASE: 0 NSSA: 0

# 在区域边界路由器Switch A上配置禁止向Stub区域通告Type3 LSA,将区域配置为Totally Stub区域。

[SwitchA] ospf

[SwitchA-ospf-1] area 1

[SwitchA-ospf-1-area-0.0.0.1] stub no-summary [SwitchA-ospf-1-area-0.0.0.1] quit

1-7

# 再次查看Switch C的OSPF路由表,可以看到禁止向Stub区域通告Summary LSA后,Stub区域路由器的路由表项进一步减少,只保留了一条通往区域外部的缺省路由。

[SwitchC] display ospf routing

OSPF Process 1 with Router ID 172.16.1.1 Routing Tables

Routing for Network

Destination Cost Type NextHop AdvRouter Area 0.0.0.0/0 1563 Inter 192.168.1.1 192.168.0.1 0.0.0.1 172.16.1.0/24 1 Stub 172.16.1.1 172.16.1.1 0.0.0.1 192.168.1.0/24 1562 Transit 192.168.1.2 172.16.1.1 0.0.0.1

Total Nets: 3

Intra Area: 2 Inter Area: 1 ASE: 0 NSSA: 0

1.3.6 配置文件

?

Switch A

# router id 192.168.1.1 #

vlan 100 #

vlan 200 #

interface Vlan-interface100

ip address 192.168.0.1 255.255.255.0 #

interface Vlan-interface200

ip address 192.168.1.1 255.255.255.0 # ospf 1

area 0.0.0.0

network 192.168.0.0 0.0.0.255 area 0.0.0.1

network 192.168.1.0 0.0.0.255 stub no-summary #

? Switch B

# router id 192.168.2.1 #

vlan 100 #

vlan 200 #

interface Vlan-interface100

ip address 192.168.0.2 255.255.255.0 #

interface Vlan-interface200

ip address 192.168.2.1 255.255.255.0 # ospf 1

1-8

6uv7p6s4w75dq8n1sig30fluh9bohz00ufr
领取福利

微信扫码领取福利

微信扫码分享