![5ac0bd0dfe515f32424922bb3f893633.gif](https://i-blog.csdnimg.cn/blog_migrate/2353a5397e302f9e7e53521bcace5678.gif)
三种解决方案,(分割的区域、远离area 0的区域)
![6ffc0061a2ddae7870e2e7d20efb16c5.png](https://i-blog.csdnimg.cn/blog_migrate/a08a777f3ef0789b9d5eeb9e07ae17fc.jpeg)
1、ospf多进程的双向重分布。
![d5bdb04c39880035745ddeae8308b182.png](https://i-blog.csdnimg.cn/blog_migrate/1390e8cfd53c91c9328c003f7430a97a.jpeg)
在R3上做多进程,分别建立两个不同的ospf进程,分别和左边和右边的路由器建立邻居。在把两个路由分别的导入,是双向的。学习到的路由是域外的。
![7e0dbc5f0e1000e34993765d6bf3b7f0.png](https://i-blog.csdnimg.cn/blog_migrate/5c745467ed923444d859f8569e96f2bd.jpeg)
2、通过配置tunnel,隧道。
![ba17a505c44439b59e67e0bda9cc7bd3.png](https://i-blog.csdnimg.cn/blog_migrate/dfb379f92be4faaa7b0d0e72787521a9.jpeg)
配置过程命令:
R1:inter tunnel 1
tunnel source 13.1.1.1
tunnel destination 13.1.1.3
ip add 172.16.1.1 255.255.255.0//给tunnel 配置一个ip地址,地址任意。
router ospf 110
network 172.16.1.0 0.0.0.255 area 0
R3:inter tunnel 3
tunnel source 13.1.1.3
tunnel destination 13.1.1.1
ip add 172.16.1.3 255.255.255.0//给tunnel 配置一个ip地址,地址任意。
router ospf 110
network 172.16.1.0 0.0.0.255 area 0
3、Virtual links(虚链路)
![7feffa119ba9432ca7f3623c14833648.png](https://i-blog.csdnimg.cn/blog_migrate/009cf048a4e593aed565c9d62161312a.jpeg)
虚链路的配置命令:通过router-id找你的直连路由。
R1:
Router ospf 110
Area 2 virtual-link 3.3.3.3(对方的router-id)
R3:
Router ospf 110
Area 2 virtual-link 1.1.1.1(对方的router-id)
检测虚链路的命令:
Show ip ospf virtual-links
关注的是:
Adjacency state full (hello suppressed)
![7f8ce2c4b096c40b38b1cc27c31087c5.png](https://i-blog.csdnimg.cn/blog_migrate/dd32ffc7a36b4a3ffee7389a7b2a05c9.jpeg)
OSPF的三种认证方式
![4421e199497cdb49ec16b9d0a5c3955b.png](https://i-blog.csdnimg.cn/blog_migrate/e5f2a22ca96ac554fcba94f892f00455.jpeg)
1. Link链路认证:
密钥:接口。进入接口、ip ospf authentication-key cisco(明文)
声明:接口。ip ospf authentication(明文)
密钥:接口。Ip ospf message-digest-key 1 md5 cisco(密文)
声明:接口。ip ospf authentication message-digest(密文)
2. Area区域认证:
密钥:接口。进入接口、ip ospf authentication-key cisco(明文)
声明:在ospf进程中。router ospf 110、area 1 authentication(明文)
密钥:接口。Ip ospf message-digest-key 1 md5 cisco(密文)
声明:在ospf进程中。Router ospf 110、area 1 authentication message-digest(密文)
3. Virtual-link虚链路认证:
密钥:在进程中。Area 2 virtual-link 3.3.3.3 authentication-key cisco(明文)
声明:在进程中。Area 2 virtual-link 3.3.3.3 authentication(明文)
密钥:在进程中。Area 2 virtual-link 3.3.3.3 message-digest-key 1 md5 cisco(密文)
声明:在进程中。Area 2 virtual-link 3.3.3.3 authentication message-digest(密文)
ospf扩展小知识
1. 关于ospf负载均衡的:仅支持等价的负载均衡4(default)6(maximum)
Router ospf 110
Maximum-paths <1-6>
2. 被动接口:
作用:不收发ospf报文
命令:passive-interface loopback 0
OSPF网络类型介绍
![b7cc5ae11b389ded1b0e312170e02b0e.png](https://i-blog.csdnimg.cn/blog_migrate/d53803e7f6be8aa0694c6693a56aef73.jpeg)
![e06a21d761cbc0b86bcfc282d2f4cb65.png](https://i-blog.csdnimg.cn/blog_migrate/88d52cc592a5b9e7dd0641889c40643a.jpeg)
结语
感谢阅读,欢迎在评论区中发表自己不同的观点,若有其他问题请在评论区留言,喜欢的朋友请多多关注转发支持一下。
![3f99de0481ee8b28ef5fcc91625238eb.gif](https://i-blog.csdnimg.cn/blog_migrate/f62ed98d0531a5606b72b898d0e6ddbf.gif)