路由器基礎配置之rip路由


拓撲圖如下

路由器0配置

  Router>enable   進入特權模式
  Router#configure terminal   進入全局配置模式
  Enter configuration commands, one per line. End with CNTL/Z.
  Router(config)#hostname R1    修改路由器名為R1
  R1(config)#interface s0/0/0    進入端口
  R1(config-if)#ip address 192.168.1.1 255.255.255.0  設置ip地址
  R1(config-if)#clock rate 64000   設置時鍾速率
  R1(config-if)#no shutdown   激活端口

  %LINK-5-CHANGED: Interface Serial0/0/0, changed state to down
  R1(config-if)#interface l0   進入回環端口

  R1(config-if)#ip address 1.1.1.1 255.255.255.0  設置ip地址
  R1(config-if)#exit    返回上一級
  R1(config)#router rip   開啟rip協議
  R1(config-router)#version 2    版本2
  R1(config-router)#no auto-summary    關閉自動匯總
  R1(config-router)#network 192.168.1.0   添加直連網段到RIP
  R1(config-router)#network 1.1.1.0    添加直連網段到RIP
  R1(config-router)#end     返回特權模式

路由器1配置

  Router>enable    進入特權模式
  Router#configure terminal    進入全局配置模式
  Enter configuration commands, one per line. End with CNTL/Z.
  Router(config)#hostname R2   修改路由器名為R2
  R2(config)#interface s0/0/0    進入端口
  R2(config-if)#ip address 192.168.1.2 255.255.255.0    設置ip地址
  R2(config-if)#no shutdown    激活端口

  R2(config-if)#interface s0/0/1    進入端口
  R2(config-if)#ip address 192.168.2.1 255.255.255.0   設置ip地址
  R2(config-if)#clock rate 64000    設置時鍾速率
  R2(config-if)#no shutdown    激活端口

  %LINK-5-CHANGED: Interface Serial0/0/1, changed state to down
  R2(config-if)#exit    返回上一級
  R2(config)#router rip  開啟rip協議
  R2(config-router)#version 2   版本2
  R2(config-router)#no auto-summary    關閉自動匯總
  R2(config-router)#network 192.168.1.0     添加直連網段到RIP
  R2(config-router)#network 192.168.2.0   添加直連網段到RIP
  R2(config-router)#end   返回特權模式

路由器2配置

  Router>enable    進入特權模式
  Router#configure terminal    進入全局配置模式
  Enter configuration commands, one per line. End with CNTL/Z.
  Router(config)#hostname R3   修改路由器名R3
  R3(config)#interface s0/0/0    進入端口
  R3(config-if)#ip address 192.168.3.1 255.255.255.0   設置ip地址
  R3(config-if)#clock rate 64000    設置時鍾速率
  R3(config-if)#no shutdown   激活端口

  %LINK-5-CHANGED: Interface Serial0/0/0, changed state to down
  R3(config-if)#interface s0/0/1   進入端口
  R3(config-if)#ip address 192.168.2.2 255.255.255.0  設置ip地址
  R3(config-if)#no shutdown  激活端口

  R3(config-if)#exit   返回上一級
  R3(config)#router rip    開啟rip協議
  R3(config-router)#version 2    版本2
  R3(config-router)#no auto-summary  關閉自動匯總
  R3(config-router)#network 192.168.2.0  添加直連網段到RIP
  R3(config-router)#network 192.168.3.0   添加直連網段到RIP
  R3(config-router)#end    返回特權模式

路由器3配置

  Router>enable  進入特權模式
  Router#configure terminal    進入全局配置模式
  Enter configuration commands, one per line. End with CNTL/Z.
  Router(config)#hostname R4   修改路由器名為R4
  R4(config)#interface s0/0/0   進入端口
  R4(config-if)#ip address 192.168.3.2 255.255.255.0   設置ip地址
  R4(config-if)#no shutdown    激活端口

  R4(config-if)#interface l0   進入回環端口

  R4(config-if)#ip address 2.2.1.1 255.255.255.0  設置ip地址
  R4(config-if)#interface l1   進入回環端口

  R4(config-if)#ip address 2.2.2.1 255.255.255.0   設置ip地址
  R4(config-if)#interface l2   進入回環端口

  R4(config-if)#ip address 2.2.3.1 255.255.255.0  設置ip地址
  R4(config-if)#interface l3    進入回環端口

  R4(config-if)#ip address 2.2.4.1 255.255.255.0    設置ip地址
  R4(config-if)#exit    返回上一級
  R4(config)#router rip   開啟rtp協議
  R4(config-router)#version 2    版本2
  R4(config-router)#no auto-summary    關閉路由匯總
  R4(config-router)#network 192.168.3.0    添加直連網段到RIP
  R4(config-router)#network 2.2.1.0    添加直連網段到RIP
  R4(config-router)#network 2.2.2.0    添加直連網段到RIP
  R4(config-router)#network 2.2.3.0    添加直連網段到RIP
  R4(config-router)#network 2.2.4.0   添加直連網段到RIP

完成配置

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM