您的位置:首页 > 其它

H3C 配置OSPF基本功能 实验

2010-04-27 10:07 423 查看

实验模拟器下载地址:

http://down.51cto.com/data/81169

配置OSPF 基本功能

1. 组网需求

􀁺 所有的交换机都运行OSPF,并将整个自治系统划分为3 个区域。

􀁺 其中Switch A 和Switch B 作为ABR 来转发区域之间的路由。

􀁺 配置完成后,每台交换机都应学到AS 内的到所有网段的路由。

2. 组网图

图1-22 OSPF 基本配置组网图





3. 配置步骤

(1) 配置各接口的IP 地址(略)

(2) 配置OSPF 基本配置

# 配置Switch A。

<SwitchA> system-view

[SwitchA] ospf

[SwitchA-ospf-1] area 0

[SwitchA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255

[SwitchA-ospf-1-area-0.0.0.0] quit

[SwitchA-ospf-1] area 1

[SwitchA-ospf-1-area-0.0.0.1] network 10.2.1.0 0.0.0.255

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

[SwitchA-ospf-1] quit

# 配置Switch B。

<SwitchB> system-view

[SwitchB] ospf

[SwitchB-ospf-1] area 0

[SwitchB-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255

[SwitchB-ospf-1-area-0.0.0.0] quit

[SwitchB-ospf-1] area 2

[SwitchB-ospf-1-area-0.0.0.2] network 10.3.1.0 0.0.0.255

[SwitchB-ospf-1-area-0.0.0.2] quit

[SwitchB-ospf-1] quit

# 配置Switch C。

<SwitchC> system-view

[SwitchC] ospf

[SwitchC-ospf-1] area 1

[SwitchC-ospf-1-area-0.0.0.1] network 10.2.1.0 0.0.0.255

[SwitchC-ospf-1-area-0.0.0.1] network 10.4.1.0 0.0.0.255

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

[SwitchC-ospf-1] quit

# 配置Switch D。

<SwitchD> system-view

[SwitchD] ospf

[SwitchD-ospf-1] area 2

[SwitchD-ospf-1-area-0.0.0.2] network 10.3.1.0 0.0.0.255

[SwitchD-ospf-1-area-0.0.0.2] network 10.5.1.0 0.0.0.255

[SwitchD-ospf-1-area-0.0.0.2] quit

[SwitchD-ospf-1] quit

(3) 检验配置结果

# 查看Switch A 的OSPF 邻居。

[SwitchA] display ospf peer verbose

OSPF Process 1 with Router ID 10.2.1.1

Neighbors

Area 0.0.0.0 interface 10.1.1.1(Vlan-interface100)'s neighbors

Router ID: 10.3.1.1 Address: 10.1.1.2 GR State: Normal

State: Full Mode: Nbr is Master Priority: 1

DR: 10.1.1.1 BDR: 10.1.1.2 MTU: 0

Dead timer due in 37 sec

Neighbor is up for 06:03:59

Authentication Sequence: [ 0 ]

Neighbor state change count: 5

Neighbors

Area 0.0.0.1 interface 10.2.1.1(Vlan-interface200)'s neighbors

Router ID: 10.4.1.1 Address: 10.2.1.2 GR State: Normal

State: Full Mode: Nbr is Master Priority: 1

DR: 10.2.1.1 BDR: 10.2.1.2 MTU: 0

Dead timer due in 32 sec

Neighbor is up for 06:03:12

Authentication Sequence: [ 0 ]

Neighbor state change count: 5

# 显示Switch A 的OSPF 路由信息。

[SwitchA] display ospf routing

OSPF Process 1 with Router ID 10.2.1.1

Routing Tables

Routing for Network

Destination Cost Type NextHop AdvRouter Area

10.2.1.0/24 10 Transit 10.2.1.1 10.2.1.1 0.0.0.1

10.3.1.0/24 4 Inter 10.1.1.2 10.3.1.1 0.0.0.0

10.4.1.0/24 13 Stub 10.2.1.2 10.4.1.1 0.0.0.1

10.5.1.0/24 14 Inter 10.1.1.2 10.3.1.1 0.0.0.0

10.1.1.0/24 2 Transit 10.1.1.1 10.2.1.1 0.0.0.0

Total Nets: 5

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

# 显示Switch A 的LSDB。

[SwitchA] display ospf lsdb

OSPF Process 1 with Router ID 10.2.1.1

Link State Database

Area: 0.0.0.0

Type LinkState ID AdvRouter Age Len Sequence Metric

Router 10.2.1.1 10.2.1.1 1069 36 80000012 0

Router 10.3.1.1 10.3.1.1 780 36 80000011 0

Network 10.1.1.1 10.2.1.1 1069 32 80000010 0

Sum-Net 10.5.1.0 10.3.1.1 780 28 80000003 12

Sum-Net 10.2.1.0 10.2.1.1 1069 28 8000000F 10

Sum-Net 10.3.1.0 10.3.1.1 780 28 80000014 2

Sum-Net 10.4.1.0 10.2.1.1 769 28 8000000F 13

Area: 0.0.0.1

Type LinkState ID AdvRouter Age Len Sequence Metric

Router 10.2.1.1 10.2.1.1 769 36 80000012 0

Router 10.4.1.1 10.4.1.1 1663 48 80000012 0

Network 10.2.1.1 10.2.1.1 769 32 80000010 0

Sum-Net 10.5.1.0 10.2.1.1 769 28 80000003 14

Sum-Net 10.3.1.0 10.2.1.1 1069 28 8000000F 4

Sum-Net 10.1.1.0 10.2.1.1 1069 28 8000000F 2

Sum-Asbr 10.3.1.1 10.2.1.1 1069 28 8000000F 2

# 查看Switch D 的路由表。

[SwitchD] display ospf routing

OSPF Process 1 with Router ID 10.5.1.1

Routing Tables

Routing for Network

Destination Cost Type NextHop AdvRouter Area

10.2.1.0/24 22 Inter 10.3.1.1 10.3.1.1 0.0.0.2

10.3.1.0/24 10 Transit 10.3.1.2 10.3.1.1 0.0.0.2

10.4.1.0/24 25 Inter 10.3.1.1 10.3.1.1 0.0.0.2

10.5.1.0/24 10 Stub 10.5.1.1 10.5.1.1 0.0.0.2

10.1.1.0/24 12 Inter 10.3.1.1 10.3.1.1 0.0.0.2

Total Nets: 5

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

# 在Switch D 上使用Ping 进行测试连通性。

[SwitchD] ping 10.4.1.1

PING 10.4.1.1: 56 data bytes, press CTRL_C to break

Request time out

Reply from 10.4.1.1: bytes=56 Sequence=2 ttl=253 time=15 ms

Reply from 10.4.1.1: bytes=56 Sequence=3 ttl=253 time=1 ms

Reply from 10.4.1.1: bytes=56 Sequence=4 ttl=253 time=16 ms

Reply from 10.4.1.1: bytes=56 Sequence=5 ttl=253 time=1 ms

--- 10.4.1.1 ping statistics ---

5 packet(s) transmitted

4 packet(s) received

20.00% packet loss

round-trip min/avg/max = 1/8/16 ms
本文出自 “肥猪圈” 博客,请务必保留此出处http://bfp12.blog.51cto.com/1014715/305311
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: