OSPF多区域的所有配置命令(cisco)
展开全部
根据你的拓扑图 我自己做的配置 接口你自己看吧
用的是小凡
你可以参考下
首先完成直连
R1配置
Router>
Router>ena
Router#conf t
Router(config)#no ip domain lookup
Router(config)#line console 0
Router(config-line)#exec-timeout 0 0
Router(config-line)#logg synchronous
Router(config-line)#exit
Router(config)#hostname R1
R1(config)#in f0/0
R1(config-if)#no shutdown
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#in s1/0
R1(config-if)#no shutdown
R1(config-if)#ip add 192.168.3.1 255.255.255.0
R1(config-if)#in s1/1
R1(config-if)#no shutdown
R1(config-if)#ip add 192.168.2.1 255.255.255.0
R1(config-if)#exit
R2配置
Router>
Router>ena
Router#conf t
Router(config)#no ip domain lookup
Router(config)#line console 0
Router(config-line)#exec-timeout 0 0
Router(config-line)#logg synchronous
Router(config-line)#exit
Router(config)#hostname R2
R2(config)#in s0/0
R2(config-if)#no shutdown
R2(config-if)#ip add 192.168.3.2 255.255.255.0
R2(config-if)#in s0/1
R2(config-if)#no shutdown
R2(config-if)#ip add 192.168.4.1 255.255.255.0
R2(config-if)#in s0/2
R2(config-if)#no shutdown
R2(config-if)#ip add 192.168.5.1 255.255.255.0
R2(config-if)#do ping 192.168.3.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:
!!!!!
R3配置
Router>ena
Router#conf t
Router(config)#no ip domain lookup
Router(config)#line console 0
Router(config-line)#exec-timeout 0 0
Router(config-line)#logg synchronous
Router(config-line)#exit
Router(config)#hostname R3
R3(config)#in s0/0
R3(config-if)#no shutdown
R3(config-if)#ip add 192.168.2.2 255.255.255.0
R3(config-if)#in s0/1
R3(config-if)#no shutdown
R3(config-if)#ip add 192.168.4.2 255.255.255.0
R3(config-if)#in s0/2
R3(config-if)#no shutdown
R3(config-if)#ip add 192.168.6.1 255.255.255.0
R3(config-if)#in s0/3
R3(config-if)#no shutdown
R3(config-if)#ip add 192.168.7.1 255.255.255.0
R3(config-if)#do ping 192.168.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 216/247/288 ms
R3(config-if)#do ping 192.168.4.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.4.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 144/229/288 ms
R4配置
Router>ena
Router#conf t
Router(config)#no ip domain lookup
Router(config)#line console 0
Router(config-line)#exec-timeout 0 0
Router(config-line)#logg synchronous
Router(config-line)#exit
Router(config)#ho
Router(config)#hostname R4
R4(config)#in s0/2
R4(config-if)#no shutdown
R4(config-if)#ip add 192.168.5.2 255.255.255.0
R4(config-if)#in s0/0
R4(config-if)#no shutdown
R4(config-if)#ip add 192.168.6.2 255.255.255.0
R4(config-if)#in s0/1
R4(config-if)#no shutdown
R4(config-if)#ip add 192.168.8.1 255.255.255.0
R4(config-if)#do ping 192.168.5.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.5.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 144/236/316 ms
R4(config-if)#do ping 192.168.6.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.6.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 216/268/432 ms
R5配置
Router>
Router>en
Router#conf t
Router(config)#no ip domain lookup
Router(config)#line console 0
Router(config-line)#exec-timeout 0 0
Router(config-line)#logg synchronous
Router(config-line)#exit
Router(config)#hostname R5
R5(config)#in s0/0
R5(config-if)#no shutdown
R5(config-if)#ip add 192.168.8.2 255.255.255.0
R5(config-if)#in s0/3
R5(config-if)#no shutdown
R5(config-if)#ip add 192.168.7.2 255.255.255.0
R5(config-if)#in s0/1
R5(config-if)#no shutdown
R5(config-if)#ip add 192.168.9.1 255.255.255.0
R5(config-if)#do ping 192.168.8.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.8.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 72/217/440 ms
R5(config-if)#do ping 192.168.7.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.7.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 144/238/400 ms
R6配置
Router>
Router>ena
Router#conf t
Router(config)#no ip domain lookup
Router(config)#line console 0
Router(config-line)#exec-timeout 0 0
Router(config-line)#logg synchronous
Router(config-line)#exit
Router(config)#hostname R6
R6(config)#in s0/0
R6(config-if)#no shutdown
R6(config-if)#ip add 192.168.9.2 255.255.255.0
R6(config)#in f1/0
R6(config-if)#no shutdown
R6(config-if)#ip add 192.168.10.1 255.255.255.0
配置PC机、网关、子网
VPCS 1 >ip 192.168.1.10 192.168.1.1 24
PC1 : 192.168.1.10 255.255.255.0 gateway 192.168.1.1
VPCS 2 >ip 192.168.10.10 192.168.10.1 24
PC2 : 192.168.10.10 255.255.255.0 gateway 192.168.10.1
配置OSPF多域
将R3和R2、R4配置成骨干区 R3的S0/0配置为area 1区域 R3的S0/3配置为area 2区域
R2的S0/0配置为area 1区域 R4的S0/1配置为area 2区域
R3配置
R3(config)#router ospf 10
R3(config-router)#network 192.168.4.0 0.0.0.255 area 0
R3(config-router)#network 192.168.6.0 0.0.0.255 area 0
R3(config-router)#network 192.168.2.0 0.0.0.255 area 1
R3(config-router)#network 192.168.7.0 0.0.0.255 area 2
R2配置
R2(config)#router ospf 10
R2(config-router)#network 192.168.3.0 0.0.0.255 area 1
R2(config-router)#network 192.168.4.0 0.0.0.255 area 0
R2(config-router)#network 192.168.5.0 0.0.0.255 area 0
R4配置
R4(config)#router ospf 10
R4(config-router)#network 192.168.5.0 0.0.0.255 area 0
R4(config-router)#network 192.168.6.0 0.0.0.255 area 0
R4(config-router)#network 192.168.8.0 0.0.0.255 area 2
配置OSPF area 1区域
将R1和R2的S0/0配置为area 1区域
R3的S0/0配置为area 1区域
R2和R3的area 1已经配置过了 只要配置R1即可
R1配置
R1(config)#router ospf 10
R1(config-router)#network 192.168.1.0 0.0.0.255 area 1
R1(config-router)#network 192.168.2.0 0.0.0.255 area 1
R1(config-router)#network 192.168.3.0 0.0.0.255 area 1
配置OSPF area 2区域
将R5和R6 R4的S0/1配置为area 2区域
R3的S0/3配置为area 2区域
R3和R4的area 2已经配置过 只要配置R5和R6即可
R5配置
R5(config)#router ospf 10
R5(config-router)#network 192.168.8.0 0.0.0.255 area 2
R5(config-router)#network 192.168.7.0 0.0.0.255 area 2
R5(config-router)#network 192.168.9.0 0.0.0.255 area 2
R6配置
R6(config)#router ospf 10
R6(config-router)#network 192.168.9.0 0.0.0.255 area 2
R6(config-router)#network 192.168.10.0 0.0.0.255 area 2
OSPF多域配置完成
如果感觉路由条目太多可以将area 1配置为末梢区在配置成完全末梢区
R3配置
R3(config)#router ospf 10
R3(config-router)#area 1 stub
R2配置
R2(config)#router ospf 10
R2(config-router)#area 1 stub
R1配置
R1(config)#router ospf 10
R1(config-router)#area 1 stub
R3配置
R3(config)#router ospf 10
R3(config-router)#area 1 stub no-summary
R2配置
R2(config)#router ospf 10
R2(config-router)#area 1 stub no-summary
area 2同理
看在我帮你都做出来的份上~~选我吧~~顺便多给店分 哈哈!!!
用的是小凡
你可以参考下
首先完成直连
R1配置
Router>
Router>ena
Router#conf t
Router(config)#no ip domain lookup
Router(config)#line console 0
Router(config-line)#exec-timeout 0 0
Router(config-line)#logg synchronous
Router(config-line)#exit
Router(config)#hostname R1
R1(config)#in f0/0
R1(config-if)#no shutdown
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#in s1/0
R1(config-if)#no shutdown
R1(config-if)#ip add 192.168.3.1 255.255.255.0
R1(config-if)#in s1/1
R1(config-if)#no shutdown
R1(config-if)#ip add 192.168.2.1 255.255.255.0
R1(config-if)#exit
R2配置
Router>
Router>ena
Router#conf t
Router(config)#no ip domain lookup
Router(config)#line console 0
Router(config-line)#exec-timeout 0 0
Router(config-line)#logg synchronous
Router(config-line)#exit
Router(config)#hostname R2
R2(config)#in s0/0
R2(config-if)#no shutdown
R2(config-if)#ip add 192.168.3.2 255.255.255.0
R2(config-if)#in s0/1
R2(config-if)#no shutdown
R2(config-if)#ip add 192.168.4.1 255.255.255.0
R2(config-if)#in s0/2
R2(config-if)#no shutdown
R2(config-if)#ip add 192.168.5.1 255.255.255.0
R2(config-if)#do ping 192.168.3.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:
!!!!!
R3配置
Router>ena
Router#conf t
Router(config)#no ip domain lookup
Router(config)#line console 0
Router(config-line)#exec-timeout 0 0
Router(config-line)#logg synchronous
Router(config-line)#exit
Router(config)#hostname R3
R3(config)#in s0/0
R3(config-if)#no shutdown
R3(config-if)#ip add 192.168.2.2 255.255.255.0
R3(config-if)#in s0/1
R3(config-if)#no shutdown
R3(config-if)#ip add 192.168.4.2 255.255.255.0
R3(config-if)#in s0/2
R3(config-if)#no shutdown
R3(config-if)#ip add 192.168.6.1 255.255.255.0
R3(config-if)#in s0/3
R3(config-if)#no shutdown
R3(config-if)#ip add 192.168.7.1 255.255.255.0
R3(config-if)#do ping 192.168.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 216/247/288 ms
R3(config-if)#do ping 192.168.4.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.4.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 144/229/288 ms
R4配置
Router>ena
Router#conf t
Router(config)#no ip domain lookup
Router(config)#line console 0
Router(config-line)#exec-timeout 0 0
Router(config-line)#logg synchronous
Router(config-line)#exit
Router(config)#ho
Router(config)#hostname R4
R4(config)#in s0/2
R4(config-if)#no shutdown
R4(config-if)#ip add 192.168.5.2 255.255.255.0
R4(config-if)#in s0/0
R4(config-if)#no shutdown
R4(config-if)#ip add 192.168.6.2 255.255.255.0
R4(config-if)#in s0/1
R4(config-if)#no shutdown
R4(config-if)#ip add 192.168.8.1 255.255.255.0
R4(config-if)#do ping 192.168.5.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.5.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 144/236/316 ms
R4(config-if)#do ping 192.168.6.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.6.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 216/268/432 ms
R5配置
Router>
Router>en
Router#conf t
Router(config)#no ip domain lookup
Router(config)#line console 0
Router(config-line)#exec-timeout 0 0
Router(config-line)#logg synchronous
Router(config-line)#exit
Router(config)#hostname R5
R5(config)#in s0/0
R5(config-if)#no shutdown
R5(config-if)#ip add 192.168.8.2 255.255.255.0
R5(config-if)#in s0/3
R5(config-if)#no shutdown
R5(config-if)#ip add 192.168.7.2 255.255.255.0
R5(config-if)#in s0/1
R5(config-if)#no shutdown
R5(config-if)#ip add 192.168.9.1 255.255.255.0
R5(config-if)#do ping 192.168.8.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.8.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 72/217/440 ms
R5(config-if)#do ping 192.168.7.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.7.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 144/238/400 ms
R6配置
Router>
Router>ena
Router#conf t
Router(config)#no ip domain lookup
Router(config)#line console 0
Router(config-line)#exec-timeout 0 0
Router(config-line)#logg synchronous
Router(config-line)#exit
Router(config)#hostname R6
R6(config)#in s0/0
R6(config-if)#no shutdown
R6(config-if)#ip add 192.168.9.2 255.255.255.0
R6(config)#in f1/0
R6(config-if)#no shutdown
R6(config-if)#ip add 192.168.10.1 255.255.255.0
配置PC机、网关、子网
VPCS 1 >ip 192.168.1.10 192.168.1.1 24
PC1 : 192.168.1.10 255.255.255.0 gateway 192.168.1.1
VPCS 2 >ip 192.168.10.10 192.168.10.1 24
PC2 : 192.168.10.10 255.255.255.0 gateway 192.168.10.1
配置OSPF多域
将R3和R2、R4配置成骨干区 R3的S0/0配置为area 1区域 R3的S0/3配置为area 2区域
R2的S0/0配置为area 1区域 R4的S0/1配置为area 2区域
R3配置
R3(config)#router ospf 10
R3(config-router)#network 192.168.4.0 0.0.0.255 area 0
R3(config-router)#network 192.168.6.0 0.0.0.255 area 0
R3(config-router)#network 192.168.2.0 0.0.0.255 area 1
R3(config-router)#network 192.168.7.0 0.0.0.255 area 2
R2配置
R2(config)#router ospf 10
R2(config-router)#network 192.168.3.0 0.0.0.255 area 1
R2(config-router)#network 192.168.4.0 0.0.0.255 area 0
R2(config-router)#network 192.168.5.0 0.0.0.255 area 0
R4配置
R4(config)#router ospf 10
R4(config-router)#network 192.168.5.0 0.0.0.255 area 0
R4(config-router)#network 192.168.6.0 0.0.0.255 area 0
R4(config-router)#network 192.168.8.0 0.0.0.255 area 2
配置OSPF area 1区域
将R1和R2的S0/0配置为area 1区域
R3的S0/0配置为area 1区域
R2和R3的area 1已经配置过了 只要配置R1即可
R1配置
R1(config)#router ospf 10
R1(config-router)#network 192.168.1.0 0.0.0.255 area 1
R1(config-router)#network 192.168.2.0 0.0.0.255 area 1
R1(config-router)#network 192.168.3.0 0.0.0.255 area 1
配置OSPF area 2区域
将R5和R6 R4的S0/1配置为area 2区域
R3的S0/3配置为area 2区域
R3和R4的area 2已经配置过 只要配置R5和R6即可
R5配置
R5(config)#router ospf 10
R5(config-router)#network 192.168.8.0 0.0.0.255 area 2
R5(config-router)#network 192.168.7.0 0.0.0.255 area 2
R5(config-router)#network 192.168.9.0 0.0.0.255 area 2
R6配置
R6(config)#router ospf 10
R6(config-router)#network 192.168.9.0 0.0.0.255 area 2
R6(config-router)#network 192.168.10.0 0.0.0.255 area 2
OSPF多域配置完成
如果感觉路由条目太多可以将area 1配置为末梢区在配置成完全末梢区
R3配置
R3(config)#router ospf 10
R3(config-router)#area 1 stub
R2配置
R2(config)#router ospf 10
R2(config-router)#area 1 stub
R1配置
R1(config)#router ospf 10
R1(config-router)#area 1 stub
R3配置
R3(config)#router ospf 10
R3(config-router)#area 1 stub no-summary
R2配置
R2(config)#router ospf 10
R2(config-router)#area 1 stub no-summary
area 2同理
看在我帮你都做出来的份上~~选我吧~~顺便多给店分 哈哈!!!
Storm代理
2023-07-25 广告
2023-07-25 广告
StormProxies是一家国内优质海外HTTP代理商,拥有一个庞大的IP资源池,覆盖200多个地区,IP数量大且匿名度高。其优点还包括超高并发、稳定高效、技术服务等特点,同时提供HTTP、HTTPS以及SOCKS5协议支持。此外,Sto...
点击进入详情页
本回答由Storm代理提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询