首页 > 其他分享 >思科设备OSPF配置命令

思科设备OSPF配置命令

时间:2022-10-10 19:32:18浏览次数:51  
标签:思科 ospf 命令 OSPF area Cisco ip router config

Cisco(config)#router ospf 110  

Cisco(config-router)#router-id 1.1.1.1  

Cisco(config-router)#network 20.1.1.0 0.0.0.255 area 0

Cisco#show ip ospf neighbor

Cisco(config)#int f0/0

Cisco(config-if)#ip ospf priority 1

Cisco(config-if)#ip ospf network broadcast  //修改接口的网络类型

Cisco(config-if)#ip ospf network non-broadcast  

Cisco(config-if)#ip ospf network point-to-multipoint

Cisco#show ip ospf interface

Cisco(config)#int f0/0

Cisco(config-if)#ip ospf cost 100  //修改接口cost值

Cisco(config-if)#bandwidth 1000000  //修改参考带宽

Cisco(config-if)#ip ospf hello-interval 10  //修改hello间隔时间,死亡时间随之改变(4倍)

Cisco(config)#router ospf 110

Cisco(config-router)#network 0.0.0.0 255.255.255.255 area 0  //宣告所有接口

Cisco#clear ip ospf process  //清理OSPF进程

Cisco#show ip ospf  //可查看到路由器ID,OSPF定时器以及LSA信息

Cisco#show ip route ospf  //查看学习到的OSPF路由

Cisco#show ip protocols  //显示路由协议参数

Cisco#debug ip ospf events  //显示OSPF相关事件

Cisco#debug ip ospf adj  //跟踪邻接关系的建立和终止

Cisco#debug ip ospf packet  //查看正在传输的OSPF分组

Cisco#undebug all  //关闭所有debug

Cisco(config)#router ospf 110

Cisco(config-router)#passive-interface f0/1 //把接口变为被动接口

Cisco(config-router)#passive-interface default  //把所有接口变为被动接口

Cisco(config)#int f0/0

Cisco(config-if)#ip ospf 110 area 0  //将接口宣告进OSPF

Cisco#show ip ospf database  //查看LSDB摘要信息

Cisco#show ip ospf database router  //查看1类LSA的详细信息

Cisco#show ip ospf database router self-originate  //查看自己生成的1类LSA的信息

Cisco#show ip ospf database network  //查看2类LSA的详细信息

Cisco#show ip ospf database summary  //查看3类LSA的详细信息

Cisco#show ip ospf database external  //查看5类LSA的详细信息

Cisco#show ip ospf border-routers  //查看5类LSA的详细信息

Cisco(config)#router ospf 1

Cisco(config-router)#network 10.1.1.0 0.0.0.255 area 1

Cisco(config-router)#area 1 stub  //配置stub区域

Cisco(config-router)#area 1 default-cost 2  //修改下发的默认三类LSA的cost为2,默认为1

Cisco(config-router)#area 1 stub no-summary  //配置完全stub区域

Cisco(config-router)#area 1 nssa  //配置nssa区域

Cisco(config-router)#area 1 nssa default-information-originate  //在NSSA区域的ABR上手工下发默认路由

Cisco(config-router)#area 1 nssa no-summary  //配置完全nssa区域

Cisco(config-router)#area 1 nssa no-redistribution no-summary  //配置完全nssa区域过滤7类LSA

Cisco(config-router)#default-information originate  //在OSPF中默认路由

Cisco(config-router)#default-information originate always  //不论有没有静态默认路由,都向OSPF中注入默认路由

Cisco(config-router)#area 1 range 172.16.0.0 255.255.0.0  

Cisco(config-router)#area 1 range 172.16.0.0 255.255.0.0 cost 1  //在ABR上对区域1中的1、2类明细路由进行汇总

Cisco(config-router)#summary-address 10.1.0.0 255.255.0.0  //在ASBR上对外部路由进行汇总

Cisco(config-router)#area 2 virtual-link 3.3.3.3  //配置虚链路

Cisco#show ip ospf virtual-links  //查看虚链路

Cisco (config)#int f0/0

Cisco(config-if)#ip ospf authentication-key abc123  //配置OSPF认证密码

Cisco(config-if)#ip ospf authentication  //启用OSPF接口认证

Cisco(config)#router ospf 110

Cisco(config-router)#area 0 authentication  //启用OSPF区域认证

Cisco(config-if)#ip ospf message-digest-key 1 md5 abc123  //配置OSPF密文认证密码

Cisco(config-if)#ip ospf authentication message-digest  //启用OSPF接口密文认证

Cisco(config)#router ospf 110

Cisco(config-router)#area 0 authentication message-digest  //启用OSPF区域的密文认证

Cisco(config-router)#area 1 virtual-link 3.3.3.3 authentication-key abc123  

Cisco(config-router)#area 1 virtual-link 3.3.3.3 authentication  //配置OSPF虚链路的明文认证

Cisco(config-router)# area 1 virtual-link 3.3.3.3 authentication message-digest-key 1 md5 abc123

Cisco(config-router)#area 1 virtual-link 3.3.3.3 authentication message-digest  //配置OSPF虚链路的密文认证

标签:思科,ospf,命令,OSPF,area,Cisco,ip,router,config
From: https://blog.51cto.com/u_13699905/5745081

相关文章

  • vsftp命令
    CentOS6.5下快速搭建ftp服务器参考:https://www.linuxidc.com/Linux/2015-10/123848.htm1、用root进入系统2、使用命令rpm  -qa|grepvsftpd查看系统是否安装了f......
  • openssl生成随机命令
     1.openssl生成要使用OpenSSL生成一个随机密码,打开终端并运行下面的命令:   opensslrand14-base64     #-base64参数将确保生成的密码可以被键盘敲出......
  • 华为设备访问控制基本命令
    配置基本的访问控制表acl2000创建一个编号型ACL,基本ACL的范围是2000~29999rule5permitsource1.1.1.10指定规则ID为5,允许数据源地址为1.1.1.1的报文通过,反掩码全......
  • 华为路由器DHCP配置基本命令
    配置基于接口地址池DHCP(动态主机配置协议)[R1]dhcpenable路由器上开启DHCP[R1]intg0/0/0[R1-GigabitEthernet0/0/0]dhcpselectinterface开启接口DHCP功能[R1-Gig......
  • 华为路由器NAT基本配置命令
    NAT地址转换静态[R1]intg0/0/0[R1-GigabitEthernet0/0/0]natstaticglobal202.169.10.5inside172.16.1.1静态地址转换[R1]displaynatstatic查看Nat静态配置信......
  • 华为路由器vrrp(虚拟路由器冗余协议)基本配置命令
    vrrp(虚拟路由器冗余协议)基本配置intg0/0/0vrrpvrid1virtual-ip172.16.1.254创建VRRP备份组,备份组号为1,配置虚拟IP为172.16.1.254vrrpvrid1priority120修改......
  • 华为交换机配置聚合链路常用命令
    配置Eth-Trunk1聚合链路interfaceEth-Trunk1创建Eth-Trunk1接口modemanualload-balance指定为手工负载分担模式intg0/0/1进入接口eth-trunk1将接口g0/0......
  • python接口自动化-pytest常用命令
    1.pytest拥有丰富的入参选项,常用参数如下:-m:只运行被标记的测试用例;-k:只运行与给定字符串表达式匹配的类名下的测试用例;-s:显示标准输出,例如print()的语句;-v:显示详细报告......
  • 华为路由器配置静态路由命令
    配置静态路由命令iproute-static目标网络子网掩码/前缀下一跳/出接口配置浮动静态路由实现路由备份(网络冗余)iproute-static192.168.20.02410.0.12.2preference......
  • xargs 命令用法
    事例1:把文件结果做为参数,查看文件大小 cat1.txt|xargs-ils-hl{}-i 用{}代替传递的数据{} 作为cat的结果,在xargs作为一个参数ls:此处不支持命......