华为ospf多区域配置
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
[R3]int loopback 0
[R3-LoopBack0]ip
[R3-LoopBack0]q
[R3]int loopback 1
[R3-LoopBack1]ip
[R3-LoopBack1]q
[R3]ospf 10
[R3-ospf-10]area 2
]network
]q
[R3-ospf-10]area 0
Ctrl_C to break
seq=1 ttl=255 time=31 ms
seq=2 ttl=255 time=15 ms
seq=3 ttl=255 time=16 ms
seq=4 ttl=255 time=31 ms
seq=5 ttl=255 time=16 ms
ping statistics ---
5 packet(s) transmitted
5 packet(s) received
% packet loss
round-trip min/avg/max = 15/21/31 ms
Ctrl_C to break
seq=1 ttl=253 time=94 ms
seq=2 ttl=253 time=109 ms
seq=3 ttl=253 time=94 ms
seq=4 ttl=253 time=94 ms
seq=5 ttl=253 time=94 ms
ping statistics ---
5 packet(s) transmitted
5 packet(s) received
% packet loss
round-trip min/avg/max = 94/97/109 ms
[R1]int loop
[R1]int LoopBack 0
[R1-LoopBack0]ip
[R1-LoopBack0]q
[R1]int loopback 1
[R1-LoopBack1]ip
[R1-LoopBack1]q
[R1]ospf 10
[R1-os源自文库f-10]area 1
]network
]network
5 packet(s) transmitted
5 packet(s) received
% packet loss
round-trip min/avg/max = 109/128/156 ms
PC>
查看R2的路由表:
3.配置R1与R2 链路认证,使用明文认证
R1:
[R1]int e0/0/0
[R1-Ethernet0/0/0]ospf aut
[R1-Ethernet0/0/0]ip
[R1-Ethernet0/0/0]q
[R1]int e0/0/1
[R1-Ethernet0/0/1]ip
[R1-Ethernet0/0/1]q
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip
[R1-GigabitEthernet0/0/0]q
[R1-Ethernet0/0/0]ospf authentication-mode sim
[R1-Ethernet0/0/0]ospf authentication-mode simple plain YP
[R1-Ethernet0/0/0]q
查看邻居路由:两个路由器链路密码不同断开认证邻居关系
[R1]dis ospf peer brief
]network
为了能让网段能够到达
//为了能让0网段能够到达
]q
[R1-ospf-10]q
[R1]ip
[R1]ip
[R1]
R2:
[R2]int e0/0/0
[R2-Ethernet0/0/0]ip
[R2-Ethernet0/0/0]int e0/0/1
[R2-Ethernet0/0/1]ip
[R2-Ethernet0/0/1]q
4.配置R3与R4的区域认证,使用密文认证。
R3:
[R3]ospf 10
[R3-ospf-10]area 2
]au
]authentication-mode md5 1 cipher YP
]q
查看邻居路由:两个路由器链路密码不同断开认证邻居关系
[R3-ospf-10]dis ospf peer brief
2.配置:
R1:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]sysname R1
[R1]int e0/0/0
[R2]int loopback 0
[R2-LoopBack0]ip
[R2-LoopBack0]q
[R2]int loopback 1
[R2-LoopBack1]ip
[R2-LoopBack1]q
[R2]ospf 10
[R2-ospf-10]area 1
]network
]q
[R2-ospf-10]area 0
[R4-LoopBack0]q
[R4]int loopback 1
[R4-LoopBack1]ip
[R4-LoopBack1]q
[R4]ospf 10
[R4-ospf-10]area 2
]network
]network
]network
]q
[R4-ospf-10]q
[R4]
从PC端ping各个路由器的route id
R2:
[R2]int e0/0/0
[R2-Ethernet0/0/0]ospf au
[R2-Ethernet0/0/0]ospf authentication-mode simple plain YP
[R2-Ethernet0/0/0]q
查看邻居路由:两个路由器链路密码相同重新连接认证邻居关系
[R2]dis ospf peer brief
Peer Statistic Information
----------------------------------------------------------------------------
Area Id Interface Neighbor id State
----------------------------------------------------------------------------
Peer Statistic Information
----------------------------------------------------------------------------
Area Id Interface Neighbor id State
----------------------------------------------------------------------------
R4:
[R4]ospf 10
[R4-ospf-10]area 2
]au
]authentication-mode md5 1 cipher YP
]q
查看邻居路由:两个路由器链路密码相同重新连接认证邻居关系
[R4-ospf-10]dis ospf peer brief
Peer Statistic Information
]network
]network
]network
]q
[R3-ospf-10]q
[R3]
R4:
[Huawei]sysname R4
[R4]int e0/0/0
[R4-Ethernet0/0/0]ip
[R4-Ethernet0/0/0]q
[R4]int loopback 0
[R4-LoopBack0]ip
Peer Statistic Information
----------------------------------------------------------------------------
Area Id Interface Neighbor id State
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Area Id Interface Neighbor id State
----------------------------------------------------------------------------
华为ospf多区域配置
OSPF多区域配置
1.规划网络拓扑图如下:
文字说明:
a.R1 与R2作为末梢区域area 1
b.R2 与R3作为主区域area0
c.R3与R4作为末梢区域area 2
d.R1 上连接交换机LSW3,LSW3上拥有vlan 8,g0/0/1与g/0/2属于vlan 8
e.R1还直连一个主机,网段为网段。
Ctrl_C to break
seq=1 ttl=252 time=156 ms
seq=2 ttl=252 time=125 ms
seq=3 ttl=252 time=109 ms
seq=4 ttl=252 time=110 ms
seq=5 ttl=252 time=141 ms
ping statistics ---
]network
]network
]network
]q
[R2-ospf-10]q
[R2]
R3:
[Huawei]sysname R3
[R3]int e0/0/0
[R3-Ethernet0/0/0]ip
[R3-Ethernet0/0/0]int e0/0/1
[R3-Ethernet0/0/1]ip
[R3-Ethernet0/0/1]q
[R3-LoopBack0]ip
[R3-LoopBack0]q
[R3]int loopback 1
[R3-LoopBack1]ip
[R3-LoopBack1]q
[R3]ospf 10
[R3-ospf-10]area 2
]network
]q
[R3-ospf-10]area 0
Ctrl_C to break
seq=1 ttl=255 time=31 ms
seq=2 ttl=255 time=15 ms
seq=3 ttl=255 time=16 ms
seq=4 ttl=255 time=31 ms
seq=5 ttl=255 time=16 ms
ping statistics ---
5 packet(s) transmitted
5 packet(s) received
% packet loss
round-trip min/avg/max = 15/21/31 ms
Ctrl_C to break
seq=1 ttl=253 time=94 ms
seq=2 ttl=253 time=109 ms
seq=3 ttl=253 time=94 ms
seq=4 ttl=253 time=94 ms
seq=5 ttl=253 time=94 ms
ping statistics ---
5 packet(s) transmitted
5 packet(s) received
% packet loss
round-trip min/avg/max = 94/97/109 ms
[R1]int loop
[R1]int LoopBack 0
[R1-LoopBack0]ip
[R1-LoopBack0]q
[R1]int loopback 1
[R1-LoopBack1]ip
[R1-LoopBack1]q
[R1]ospf 10
[R1-os源自文库f-10]area 1
]network
]network
5 packet(s) transmitted
5 packet(s) received
% packet loss
round-trip min/avg/max = 109/128/156 ms
PC>
查看R2的路由表:
3.配置R1与R2 链路认证,使用明文认证
R1:
[R1]int e0/0/0
[R1-Ethernet0/0/0]ospf aut
[R1-Ethernet0/0/0]ip
[R1-Ethernet0/0/0]q
[R1]int e0/0/1
[R1-Ethernet0/0/1]ip
[R1-Ethernet0/0/1]q
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip
[R1-GigabitEthernet0/0/0]q
[R1-Ethernet0/0/0]ospf authentication-mode sim
[R1-Ethernet0/0/0]ospf authentication-mode simple plain YP
[R1-Ethernet0/0/0]q
查看邻居路由:两个路由器链路密码不同断开认证邻居关系
[R1]dis ospf peer brief
]network
为了能让网段能够到达
//为了能让0网段能够到达
]q
[R1-ospf-10]q
[R1]ip
[R1]ip
[R1]
R2:
[R2]int e0/0/0
[R2-Ethernet0/0/0]ip
[R2-Ethernet0/0/0]int e0/0/1
[R2-Ethernet0/0/1]ip
[R2-Ethernet0/0/1]q
4.配置R3与R4的区域认证,使用密文认证。
R3:
[R3]ospf 10
[R3-ospf-10]area 2
]au
]authentication-mode md5 1 cipher YP
]q
查看邻居路由:两个路由器链路密码不同断开认证邻居关系
[R3-ospf-10]dis ospf peer brief
2.配置:
R1:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]sysname R1
[R1]int e0/0/0
[R2]int loopback 0
[R2-LoopBack0]ip
[R2-LoopBack0]q
[R2]int loopback 1
[R2-LoopBack1]ip
[R2-LoopBack1]q
[R2]ospf 10
[R2-ospf-10]area 1
]network
]q
[R2-ospf-10]area 0
[R4-LoopBack0]q
[R4]int loopback 1
[R4-LoopBack1]ip
[R4-LoopBack1]q
[R4]ospf 10
[R4-ospf-10]area 2
]network
]network
]network
]q
[R4-ospf-10]q
[R4]
从PC端ping各个路由器的route id
R2:
[R2]int e0/0/0
[R2-Ethernet0/0/0]ospf au
[R2-Ethernet0/0/0]ospf authentication-mode simple plain YP
[R2-Ethernet0/0/0]q
查看邻居路由:两个路由器链路密码相同重新连接认证邻居关系
[R2]dis ospf peer brief
Peer Statistic Information
----------------------------------------------------------------------------
Area Id Interface Neighbor id State
----------------------------------------------------------------------------
Peer Statistic Information
----------------------------------------------------------------------------
Area Id Interface Neighbor id State
----------------------------------------------------------------------------
R4:
[R4]ospf 10
[R4-ospf-10]area 2
]au
]authentication-mode md5 1 cipher YP
]q
查看邻居路由:两个路由器链路密码相同重新连接认证邻居关系
[R4-ospf-10]dis ospf peer brief
Peer Statistic Information
]network
]network
]network
]q
[R3-ospf-10]q
[R3]
R4:
[Huawei]sysname R4
[R4]int e0/0/0
[R4-Ethernet0/0/0]ip
[R4-Ethernet0/0/0]q
[R4]int loopback 0
[R4-LoopBack0]ip
Peer Statistic Information
----------------------------------------------------------------------------
Area Id Interface Neighbor id State
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Area Id Interface Neighbor id State
----------------------------------------------------------------------------
华为ospf多区域配置
OSPF多区域配置
1.规划网络拓扑图如下:
文字说明:
a.R1 与R2作为末梢区域area 1
b.R2 与R3作为主区域area0
c.R3与R4作为末梢区域area 2
d.R1 上连接交换机LSW3,LSW3上拥有vlan 8,g0/0/1与g/0/2属于vlan 8
e.R1还直连一个主机,网段为网段。
Ctrl_C to break
seq=1 ttl=252 time=156 ms
seq=2 ttl=252 time=125 ms
seq=3 ttl=252 time=109 ms
seq=4 ttl=252 time=110 ms
seq=5 ttl=252 time=141 ms
ping statistics ---
]network
]network
]network
]q
[R2-ospf-10]q
[R2]
R3:
[Huawei]sysname R3
[R3]int e0/0/0
[R3-Ethernet0/0/0]ip
[R3-Ethernet0/0/0]int e0/0/1
[R3-Ethernet0/0/1]ip
[R3-Ethernet0/0/1]q