锐捷ospf配置相关命令
route ospf 1
route-id 1.1.1.1
network 12.0.0.1 0.0.0.0 area o
show ip ospf database 查看ospf数据库表
show ip ospf route 查看ospf学习到的路由
default-information originate always 下发默认路由,不加always参数则只会在设备上纯在的有效的默认路由才会下发
配置虚链路
R2
route ospf 1
area 1 virtual-link 3.3.3.3
R3
route ospf 1
area 1 virtual-link 2.2.2.2
特殊区域
route ospf 1
area 2 stub
area 2 stub no-summary
area 2 nssa
area 2 nssa no-summary
route ospf 1
redistribute connected subnets 将直连路由重发到ospf中
ospf上做路由汇总
route ospf 1
area 0 range 172.16.0.0 255.255.252.0 inherit-minimunm/not-advertise
inherit-minimunm(设置聚合前所有路由开销中最小的开销作为路由开销,默认开销值最大)
not-advertise(表示不发布这条聚合路由,默认发布)
ospf邻居认证
明文认证
route ospf 1
area 0 authentication
int g 0/0
ip ospf authentication-key admin
密文认证
route ospf 1
area 3 authentication message-digest
int g 0/0
ip ospf message-digest-key 1 md5 admin@123
配置网络类型
int g 0/0
ip ospf network point-to-point
distance 114 /修改ospf的默认管理距离