静态路由引入ospf

image

AR1配置

ospf配置

ospf 1 router-id 1.1.1.1
 area 0.0.0.0
  network 12.12.12.0 0.0.0.255
  network 192.168.1.0 0.0.0.255

基础配置

interface GigabitEthernet0/0/0
 port link-mode route
 combo enable copper
 ip address 12.12.12.1 255.255.255.0
#
interface GigabitEthernet0/0/1
 port link-mode route
 combo enable copper
 ip address 192.168.1.254 255.255.255.0

AR2配置

ospf配置

ospf 1 router-id 2.2.2.2
 area 0.0.0.0
  network 12.12.12.0 0.0.0.255
  network 23.23.23.0 0.0.0.255

基础配置

interface GigabitEthernet0/0/0
 port link-mode route
 combo enable copper
 ip address 12.12.12.2 255.255.255.0
#
interface GigabitEthernet0/0/1
 port link-mode route
 combo enable copper
 ip address 23.23.23.2 255.255.255.0

AR3配置

ospf配置

ospf 1 router-id 3.3.3.3
 import-route static
 area 0.0.0.0
  network 23.23.23.0 0.0.0.255

基础配置

interface GigabitEthernet0/0/0
 port link-mode route
 combo enable copper
 ip address 23.23.23.3 255.255.255.0
#
interface GigabitEthernet0/0/1
 port link-mode route
 combo enable copper
 ip address 36.36.36.3 255.255.255.0
 nat outbound 2000

ACL配置

acl basic 2000
 rule 5 permit source 192.168.1.0 0.0.0.255

NAT配置

interface GigabitEthernet0/0/1
 port link-mode route
 combo enable copper
 ip address 36.36.36.3 255.255.255.0
 nat outbound 2000

静态路由

ip route-static 0.0.0.0 0 36.36.36.6   #可选。
 ip route-static 6.6.6.6 32 36.36.36.6

ISP配置

interface LoopBack0
 ip address 6.6.6.6 255.255.255.0
#
interface GigabitEthernet0/0/0
 port link-mode route
 combo enable copper
 ip address 36.36.36.6 255.255.255.0
posted @ 2026-04-21 21:54  星火撩原  阅读(1)  评论(0)    收藏  举报