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

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/weixin_43458720/article/details/90553038

静态路由

  • 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

  • RA
enable
configure terminal
int g0/0
ip address 172.31.0.1 255.255.254.0
no shut

int  S0/0/0
ip add 172.31.4.1 255.255.255.252
no shut

router ospf 1
router-id 1.1.1.1
network 172.31.0.0 0.0.1.255 area 0
passive-interface g0/0
network 172.31.4.0 0.0.0.3 area 0
  • RB
en
conf t

ipv6 unicast-routing

int s0/0/0
ip add 172.31.4.2 255.255.255.252
no shut

int g0/0
ipv6 add FE80::1 link
ip address 172.31.2.1  255.255.254.0
ipv6 ospf 1 area 0
no shut

int s0/0/1
ipv6 add 2001:DB8:2::1/64
ipv6 ospf 1 area 0
no shut
exit

router ospf 1
router-id 2.2.2.2
network 172.31.4.0 0.0.0.3 area 0
network 172.31.2.0 0.0.1.255 area 0
passive-interface GigabitEthernet 0/0
exit

ipv6 router ospf 1
router-id 3.3.3.3

RC

en
conf t
int g0/0
ipv6 add 2001:DB8:3::1/64
ipv6 add FE80::3 link
ipv6 ospf 1 area 0
no shut

int s0/0/0
ipv6 add 2001:DB8:2::2/64
ipv6 ospf 1 area 0
no shut

exit
ipv6 unicast-routing 


ipv6 router ospf 1
router-id 3.3.3.3

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

猜你喜欢

转载自blog.csdn.net/weixin_43458720/article/details/90553038