OSPF多区域的所有配置命令(cisco)
发布网友
发布时间:2022-04-29 22:53
我来回答
共2个回答
热心网友
时间:2022-06-25 02:31
根据你的拓扑图 我自己做的配置 接口你自己看吧
用的是小凡
你可以参考下
首先完成直连
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同理
看在我帮你都做出来的份上~~选我吧~~顺便多给店分 哈哈!!!
热心网友
时间:2022-06-25 02:31
看你用静态还是动态了.一般做静态速度快.next hop 设置好下一跳就行了.要输入命令的话,输死你都弄不了.静态的是去宣告一个网络段,比如说在conf t模式下network 30 所有的路由器都宣告在30段就行了.
Cisco OSPF命令与配置手册目录
开始学习Cisco OSPF配置,首先了解关键命令和配置:1. OSPF进程配置启用OSPF进程: router ospf process-id 在VRF中配置: route ospf process-id vrf name 2. 基本Area配置 密码认证: area area-id authentication 设置默认路由开销: area area-id default-cost 配置NSSA区域: area area-id NSSA ...
Linux SCADA
ForceSCADA是力控科技信创产品的重要组成部分,具备完全自主知识产权,支持部署在Linux桌面版、服务器版、嵌入式等系统架构下。使用ForceSCADA可以搭建创新性高、扩展性佳、融合度强的SCADA平台,进而构建高效、智能化的监控中心,先进、灵活的...
思科路由器配置命令教程
enable:进入特权命令状态 configterminal:进入全局设置状态 end:退出全局设置状态 interfacetypeslot/number:进入端口设置状态 exit:退出局部设置状态 hostnamename:设置交换机名 showversion:查看版本及引导信息 showrunning-config:查看运行设置 showvlan:查看VLAN设置 showinterfacetypeslot/number:显示端...
cisco ospf 如何配置?
router ospf 100 (100是进程号,随便一个数字,一般一台设备启一个进程)router-id 192.168.0.1 (自己设定,格式为IP地址,推荐本机loopback地址)network 172.20.1.1 0.0.0.0 area 0 (172.20.1.1为端口地址,有几个端口划入写几条,0.0.0.0为反掩码,精确宣告,area是区域号,根据规...
OSPF多区域的所有配置命令(cisco)
R4配置 Router>ena
简述cisco路由器的配置方法
Cisco路由器支持多种路由协议,如RIP、OSPF和BGP等。管理员需要根据网络的实际需求选择适当的路由协议,并在路由器上进行相应的配置。例如,要配置OSPF路由协议,管理员可以使用“router ospf 1”命令进入OSPF配置模式,然后使用“network”命令指定要参与OSPF的网络段。通过以上步骤,网络管理员可以完成Cisco...
Cisco OSPF命令与配置手册的目录
1.2 route ospf process-id vrf name第2章 OSPF Area命令2.1 area area-id authentication配置示例:简单密码认证XSH2.2 area area-id authentication message-digest配置示例1:MD5密码认证配置示例2:更改密钥和密码2.3 area area-id default-cost cost配置示例:设置通告进stub区域的默认路由的OSPF开销值2.4 area area-...
思科配置命令详细介绍
一、基本设置方式 二、命令状态 三、设置对话过程 四、常用命令 五、配置IP寻址 六、配置静态路由 第二章 广域网协议设置 一、HDLC 二、PPP 三、X.25 四、Frame Relay 五、ISDN 六、PSTN 第三章 路由协议设置 一、RIP协议 二、IGRP协议 三、OSPF协议 四、重新分配路由 五、IPX协议设置 第四章 服务质量及...
ospf协议是怎么配置的
OSPF协议是一种链路状态协议。每个路由器负责发现、维护与邻居的关系,并将已知的邻居列表和链路费用LSU报文描述,通过可靠的泛洪与自治系统AS(Autonomous System)内的其他路由器周期性交互,学习到整个自治系统的网络拓扑结构;并通过自治系统边界的路由器注入其他AS的路由信息,从而得到整个Internet的路由信息。
...一下cisco路由器上的多区域OSPF的理论知识和配置方法?
当多个A B R连接两个区域时,在O S P F间汇总路由是不明智的。在这样一种拓扑结构中的 区域间发送汇总路由会减少路由表大小,但也会导致一个非最优的路径选择。这对于A B R到 O S P F区域0的连接是十分重要的。注意在一个OSPF层次路由拓扑结构中,router ospf的process-id参数用于标识OSPF网...
怎么在路由器上作动态路由OSPF,实现三个网段间的主机互相ping通!!!主要...
cisco 路由器或三层交换机上均可配置 下面是思科三层交换机(35系列)的详细配置 SW1 配置 sW1(config)#do sh run Building configuration...Current configuration : 1429 bytes !version 12.4 service timestamps debug datetime msec service timestamps log datetime msec no service password-...