实验任务一:单区域ospf基本配置
搭建实验环境
- 在路由器上配置ip地址
- 检查网络连通性和路由器路由表
配置ospf
[RTA]ospf 1 router-id 1.1.1.1
[RTA-ospf-1]area 0
[RTA-ospf-1-area-0.0.0.0]network 20.0.0.0 0.0.0.255
[RTA-ospf-1-area-0.0.0.0]network 10.0.0.0 0.0.0.255
[RTB]ospf 1 router-id 2.2.2.2
[RTB-ospf-1]area 0
[RTB-ospf-1-area-0.0.0.0]network 20.0.0.0 0.0.0.255
[RTB-ospf-1-area-0.0.0.0]network 10.1.0.0 0.0.0.255
5.检查路由器ospf邻居状态及路由表
[RTA]display ospf peerOSPF Process 1 with Router ID 1.1.1.1 Neighbor Brief Information
Area: 0.0.0.0
Router ID Address Pri Dead-Time State Interface
2.2.2.2 20.0.0.2 1 40 Full/BDR GE0/1
[H3C]display ospf routing
OSPF Process 1 with Router ID 1.1.1.1
Routing Table
Topology base (MTID 0)
Routing for network
Destination Cost Type NextHop AdvRouter Area
20.0.0.0/24 1 Transit 0.0.0.0 1.1.1.1 0.0.0.0
10.0.0.0/24 1 Stub 0.0.0.0 1.1.1.1 0.0.0.0
10.1.0.0/24 2 Stub 20.0.0.2 2.2.2.2 0.0.0.0
Total nets: 3
Intra area: 3 Inter area: 0 ASE: 0 NSSA: 0
实验任务2:单区域ospf增强配置
//接口视图下配置ospf接口开销
Interface0/0
Ospf cost 150
//GE0/0接口下修改接口的优先级为0(0不选举)
Interface0/0
Ospf dr-priority 0
//重启ospf进程
<>reset ospf 1 process
实验任务3:多区域ospf基本配置
//查看ospf邻居
Display ospf peer
//查看ip路由表
Display ip routing-table