欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Cisco配置:路由部分→静态路由,ospf,rip配置

程序员文章站 2024-02-12 10:44:16
...

静态路由

  • R1:
en 
configure terminal
ip route 172.31.0.0 255.255.255.0 172.31.1.193
ip route 172.31.1.128 255.255.255.192 172.31.1.193
ip route 0.0.0.0 0.0.0.0 172.31.1.0
ip route 172.31.1.196 255.255.255.252 172.31.1.193

exit
wr
  • R2
en
configure terminal 
ip route 172.31.1.0 255.255.255.128 172.31.1.194 
ip route 172.31.1.128 255.255.255.192 172.31.1.198

exit
wr

  • R3
en
configure terminal 
ip route 172.31.1.0 255.255.255.128 172.31.1.197
ip route 172.31.1.0 255.255.255.0 172.31.1.197
ip route 0.0.0.0 0.0.0.0 172.31.1.128

exit
wr

OSPF

未完待续。。。

RIP

  • R1
ip route 0.0.0.0 0.0.0.0 serial 0/0/1
router rip 
version 2
no auto-summary 
network 192.168.2.0 
network 192.168.1.0
network 209.165.200.224
passive-interface GigabitEthernet 0/0
default-information originate 
exit

  • R2
enable
configure terminal
router rip 
version 2
no auto-summary 
network 192.168.2.0
network 192.168.4.0
passive-interface GigabitEthernet 0/0
network 192.168.3.0

  • R3
enable
configure terminal
router rip 
version 2
no auto-summary 
R3(config-router)#network 192.168.5.0
R3(config-router)#network 192.168.4.0
R3(config-router)#passive-interface GigabitEthernet 0/0