实验拓扑及要求
实验配置
sys
sys AR1
int g0/0/0
ip add 192.168.0.1 24
ospf dr-priority 200 优先级
ospf 1 router-id 1.1.1.1
area 0
net 192.168.0.0 0.0.0.255
sys
sys AR2
int g0/0/0
ip add 192.168.0.2 24
ospf dr-priority 100
ospf 1 router-id 2.2.2.2
area 0
net 192.168.0.0 0.0.0.255
sys
sys AR3
int g0/0/0
ip add 192.168.0.3 24
ospf 1 router-id 3.3.3.3
area 0
net 192.168.0.0 0.0.0.255
net 34.0.0.0 0.255.255.255
int s4/0/0
ip add 34.0.0.3 8
sys
sys AR6
int g0/0/0
ip add 192.168.0.6 24
ospf 1 router-id 6.6.6.6
area 0
net 192.168.0.0 0.0.0.255
dis ospf peer brief 看邻居建立状态
dis ospf int g0/0/0 看DR和BDR
dis ip routing-table protocol ospf 路由表协议ospf–开销 下一跳
dis ospf int g0/0/0 s4/0/0
<>reset ospf process 重启进程
down失效
init初始-收到对方hello包,没看到自己
two-way双向通讯-收到hello包,看到自己,形成邻居
exstart交换初始,决定主从关系
exchange-向邻居发送database description
loading LSR和LSU交换
full LSDB同步,形成邻接关系
sys
sys AR4
int g0/0/1
ip add 48.0.0.4 8
int s4/0/1
ip add 34.0.0.4 8
int loopback 4
ip add 4.4.4.4 32
ospf 1 router-id 4.4.4.4
area 0
net 4.4.4.4 0.0.0.0
net 34.0.0.0 0.255.255.255
sys
sys AR8
int g0/0/0
ip add 48.0.0.8 8
q
ip route-static 0.0.0.0 0 48.0.0.4 缺省
int loopback 8
ip add 8.8.8.8 32
R1 ping 8.8.8.8
缺省路由发布
1.
R4引入(np)48路由-直连
R4
ospf 1
import-route direct
R1dis ip rou pro ospf --48.0.0.0
ping 48.0.0.8
2.静态写入(na)
ip route-static 0.0.0.0 0 48.0.0.4
3.动态发布(na)
R4
ip route-static 0.0.0.0 0 48.0.0.8
default-route-advertise
R1 dis rou pro ospf
0.0.0.0/0 O_ASE 外部路由 优先级150
R4
acl 2000
rule 1 permit
q
int g0/0/1
nat outbound 2000
R1 ping 8.8.8.8
MD5认证配置
1.接口认证
int g0/0/0
ospf authentication-mode md5 1 cipher hwhwhw
2.区域认证
ospf 1
area 0
authentication-mode md5 1(密钥id需要一致) cipher hwhwhw
同时配置,接口优先生效
5个接口4个接口同时配置,先区域,然后删除其中一个
R1-3 R6
int G0/0/0 ospf authenticatio-mode md5 1 cipher 123456
OSPF 1
dis th 查看认证