OSPF配置命令:
①启动ospf进程:
ospf 1 router-id 1.1.1.1
②创建区域:
area 0
③宣告(激活接口,发布路由):注意网段后面跟的是反掩码
network 10.0.12.0 0.0.0.255
实验如下:
①划分网段
②配置接口ip
推荐给每个路由器先配置一个环回接口,这个接口会作为路由器的RID。文章来源:https://www.toymoban.com/news/detail-534469.html
③启动ospf进程
文章来源地址https://www.toymoban.com/news/detail-534469.html
注意网段的宣告是要分区域的
④用ping命令测试网络连通性
PC>ping 192.168.3.254
Ping 192.168.3.254: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 192.168.3.254: bytes=32 seq=2 ttl=126 time=16 ms
From 192.168.3.254: bytes=32 seq=3 ttl=126 time=15 ms
From 192.168.3.254: bytes=32 seq=4 ttl=126 time<1 ms
From 192.168.3.254: bytes=32 seq=5 ttl=126 time=15 ms
--- 192.168.3.254 ping statistics ---
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 0/11/16 ms
PC>ping 192.168.4.254
Ping 192.168.4.254: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 192.168.4.254: bytes=32 seq=2 ttl=125 time=31 ms
From 192.168.4.254: bytes=32 seq=3 ttl=125 time=16 ms
From 192.168.4.254: bytes=32 seq=4 ttl=125 time=16 ms
From 192.168.4.254: bytes=32 seq=5 ttl=125 time=31 ms
--- 192.168.4.254 ping statistics ---
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 0/23/31 ms
PC>ping 192.168.2.254
Ping 192.168.2.254: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 192.168.2.254: bytes=32 seq=2 ttl=124 time=47 ms
From 192.168.2.254: bytes=32 seq=3 ttl=124 time=31 ms
From 192.168.2.254: bytes=32 seq=4 ttl=124 time=31 ms
From 192.168.2.254: bytes=32 seq=5 ttl=124 time=31 ms
--- 192.168.2.254 ping statistics ---
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 0/35/47 ms
到了这里,关于ensp动态路由ospf基础配置的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!