From 06949d0e32c935833aae16c05f22fcfef012a10f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=88=90=E8=B1=AA?= <1400383615@qq.com> Date: Wed, 23 Apr 2025 22:52:23 +0800 Subject: [PATCH] 0423 --- ...50\351\207\215\345\210\206\345\217\221.md" | 112 ++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 "29 \346\235\250\346\210\220\350\261\252/20250422 \350\267\257\347\224\261\345\231\250\351\207\215\345\210\206\345\217\221.md" diff --git "a/29 \346\235\250\346\210\220\350\261\252/20250422 \350\267\257\347\224\261\345\231\250\351\207\215\345\210\206\345\217\221.md" "b/29 \346\235\250\346\210\220\350\261\252/20250422 \350\267\257\347\224\261\345\231\250\351\207\215\345\210\206\345\217\221.md" new file mode 100644 index 0000000..bbcb9c8 --- /dev/null +++ "b/29 \346\235\250\346\210\220\350\261\252/20250422 \350\267\257\347\224\261\345\231\250\351\207\215\345\210\206\345\217\221.md" @@ -0,0 +1,112 @@ +##### 路由器重分发 + +1. rip转ospf + + ![042301](https://gitee.com/yuszz/picture-warehouse/raw/master/img/upgit_20250423_1745411525.png) + + ```cmd + #OSPF关键步骤 + Router(config)#router ospf 1 + Router(config-router)#network 1.1.1.0 0.0.0.255 area 0 + Router(config-router)#network 2.2.2.0 0.0.0.255 area 0 + Router(config-router)#end + Router#show ip route + + #RIP关键步骤 + Router(config)#router rip + Router(config-router)#version 2 + Router(config-router)#network 3.3.3.0 + Router(config-router)#ex + Router(config)#router ospf 1 + Router(config-router)#network 2.2.2.0 0.0.0.255 area 0 + Router(config-router)#ex + Router(config)#router ospf 1 + Router(config-router)#redistribute rip subnets // 获取来自RIP子网络的路由进行分发 + Router#show ip route + ``` + +2. OSPF转静态 + + ![042302](https://gitee.com/yuszz/picture-warehouse/raw/master/img/upgit_20250423_1745413297.png) + + ```cmd + #OSPF关键配置 + ! + router ospf 1 + log-adjacency-changes + redistribute static subnets + network 10.10.10.0 0.0.0.255 area 0 + network 20.20.20.0 0.0.0.255 area 0 + ! + ip classless + ip route 0.0.0.0 0.0.0.0 20.20.20.2 + ! + #静态关键配置 + ! + ip classless + ip route 10.10.10.0 255.255.255.0 20.20.20.1 + ! + ``` + +3. rip转静态 + + ![042303](https://gitee.com/yuszz/picture-warehouse/raw/master/img/upgit_20250423_1745416278.png) + + ```cmd + #OSPF关键配置 + ! + router rip + version 2 + redistribute static + network 50.0.0.0 + network 60.0.0.0 + ! + ip classless + ip route 0.0.0.0 0.0.0.0 60.60.60.2 + ! + #静态路由关键配置 + ! + router rip + version 2 + network 60.0.0.0 + ! + ip classless + ip route 50.50.50.0 255.255.255.0 60.60.60.1 + ! + ``` + +4. ospf转rip + + ```cmd + Router(config):router rip + Router(config-router):version 2 + Router(config-router)#redistribute ospf 1 metric 5 // 获取来自OSPF进程1的路由进行重分发,且设置metric为5 + ``` + +5. 实验 + + ![042304](https://gitee.com/yuszz/picture-warehouse/raw/master/img/upgit_20250423_1745419909.png) + + ```cmd + #关键配置 + ! + router ospf 1 + log-adjacency-changes + redistribute rip subnets + redistribute static subnets + network 11.11.11.0 0.0.0.255 area 0 + ! + router rip + version 2 + redistribute ospf 1 metric 3 + redistribute static + network 9.0.0.0 + ! + ip classless + ip route 192.168.200.0 255.255.255.0 12.12.12.1 + ip route 192.168.220.0 255.255.255.0 12.12.12.1 + ip route 0.0.0.0 0.0.0.0 12.12.12.1 + ! + ``` + + \ No newline at end of file -- Gitee