From c8e24c4e0f0c482422cb559e8dfde3a17fa1bf4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=81=AD=E7=84=95?= <14091799+carpte@user.noreply.gitee.com> Date: Mon, 21 Apr 2025 05:29:37 +0000 Subject: [PATCH] k MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈恭焕 <14091799+carpte@user.noreply.gitee.com> --- .../20250418 \347\254\224\350\256\260.md" | 131 ++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 "25 \351\231\210\346\201\255\347\204\225/20250418 \347\254\224\350\256\260.md" diff --git "a/25 \351\231\210\346\201\255\347\204\225/20250418 \347\254\224\350\256\260.md" "b/25 \351\231\210\346\201\255\347\204\225/20250418 \347\254\224\350\256\260.md" new file mode 100644 index 0000000..c5d9baf --- /dev/null +++ "b/25 \351\231\210\346\201\255\347\204\225/20250418 \347\254\224\350\256\260.md" @@ -0,0 +1,131 @@ +``` +Router(config)#route rip // 启用动态路由RIP协议 ,进入RIP配置模式 +Router(config-router)#version 2 // 选用RIP2版本 +# Router(config-router)#network 当前路由直连的网络 // 向别的路由器通[宣告]告自己所连接的网络 +Router(config-router)#network 192.168.10.0 +``` + +![image-20250418155752215](https://gitee.com/bathing-emperor/the-bathing-emperors-bed/raw/master/img/upgit_20250418_1744963072.png) + +#### 路由器配置 + +``` +R1 +Router>en + +Router#confi t + +Router(config)#interface g0/1 + +Router(config-if)#no shutdown + +Router(config-if)#ip address 192.168.10.254 255.255.255.0 + +Router(config-if)#ex + +Router(config)#interface g0/0 + +Router(config-if)#no shutdown + +Router(config-if)#ip address 192.168.100.1 255.255.255.0 + +Router(config-if)#ex + +Router(config)#route rip // 启用动态路由RIP协议 ,进入RIP配置模式 + +Router(config-router)#version 2 // 选用RIP2版本 + +Router(config-router)#network 192.168.100.0 // 向别的路由器通[宣告]告自己所连接的网络 + +Router(config-router)#network 192.168.10.0 + + + +R2 +Router> + +Router#confi t + +Router(config)#hostname R2 + +R2(config)#interface g0/0 + +R2(config-if)#ip address 192.168.100.2 255.255.255.0 + +R2(config-if)#ex + +R2(config)#interface g0/0 + +R2(config-if)#no shutdown + +R2(config-if)#interface g0/1 + +R2(config-if)#ip address 192.168.200.1 255.255.255.0 + +R2(config-if)#no shutdown + +R2(config-if)#ex + +R2(config)#route rip + +R2(config-router)#version 2 + +R2(config-router)#network 192.168.100.0 + +R2(config-router)#network 192.168.200.0 + + + +R3 +Router>en + +Router#confi t + +Router(config)#hostname R3 + +R3(config)#interface g0/0 + +R3(config-if)#no shutdown + +R3(config-if)#ip address 192.168.200.2 255.255.255.0 + +R3(config-if)#ex + +R3(config)#interface g0/1 + +R3(config-if)#no shutdown + +R3(config-if)#ip address 192.168.20.254 255.255.255.0 + +R3(config-if)#ex + +R3(config)#route rip + +R3(config-router)#version 2 + +R3(config-router)#network 192.168.200.0 + +R3(config-router)#network 192.168.20.0 + +R3(config-router)#end + +R3#show ip route //查看一下有没有另外两个路由器的信息(另外两个路由器也可以查看一下路由表) +Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP + D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area + N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 + E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP + i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area + * - candidate default, U - per-user static route, o - ODR + P - periodic downloaded static route + +Gateway of last resort is not set + +R 192.168.10.0/24 [120/2] via 192.168.200.1, 00:00:14, GigabitEthernet0/0 + 192.168.20.0/24 is variably subnetted, 2 subnets, 2 masks +C 192.168.20.0/24 is directly connected, GigabitEthernet0/1 +L 192.168.20.254/32 is directly connected, GigabitEthernet0/1 +R 192.168.100.0/24 [120/1] via 192.168.200.1, 00:00:14, GigabitEthernet0/0 + 192.168.200.0/24 is variably subnetted, 2 subnets, 2 masks +C 192.168.200.0/24 is directly connected, GigabitEthernet0/0 +L 192.168.200.2/32 is directly connected, GigabitEthernet0/0 +``` \ No newline at end of file -- Gitee