diff --git "a/\351\242\234\351\224\220\346\225\217/20240428\347\254\224\350\256\260.md" "b/\351\242\234\351\224\220\346\225\217/20240428\347\254\224\350\256\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..7d438b763b0a8bd250e90e334a2876807ba2dcb7 --- /dev/null +++ "b/\351\242\234\351\224\220\346\225\217/20240428\347\254\224\350\256\260.md" @@ -0,0 +1,36 @@ +# RIP与OSPF互通 +``` +R4(config)#router rip //进入rip协议 + +R4(config-router)#version 2 //选择版本2 + +R4(config-router)#network 192.168.50.0 //宣告192.168.50.0网段 + +R4(config-router)#no auto-summary //关闭路由汇总 + + +R4(config)#router ospf 1 //进入ospf协议 + +R4(config-router)#redistribute rip subnets //在ospf协议中重分发RIP + +R4(config)#router rip + +R4(config-router)#redistribute ospf 1 metric 3 //在RIP协议中重分发ospf,跳数为3 (这里3-5最合适) +``` + + +## RIP设置静态 +``` +R4(config)#router rip //进入rip协议 + +R4(config-router)#redistribute static // 引入静态路由 +``` + +## 默认路由(缺省) +``` +1.在通信网络中,缺省路由(Default Route)是路由表中一种特殊的静态路由,当网络中报文的路由无法匹配到当前路由表中的路由记录时,缺省路由用来指示路由器或网络主机将该报文发往指定的位置 + +2.缺省路由在路由表中目的地址为0.0.0.0、子网掩码为0.0.0.0,显示为Gateway of last resort is (IP Address) to network 0.0.0.0 [2]。换言之,如果数据报文的目的地址无法与路由表中的路由记录相匹配,则路由器或网络主机中将使用缺省路由转发该报文 + +例:0.0.0.0 0.0.0.0 192.168.1.1(下一跳网段) +``` \ No newline at end of file