Configure ospf multi-region, dynamic, static

Configuration parameters

R1 configuration

IP configuration parameters

interface GigabitEthernet0/0/0

 ip address 10.0.0.1 255.255.255.252

#

interface GigabitEthernet0/0/1

 ip address 172.16.31.1 255.255.255.252

#

interface GigabitEthernet0/0/2

 ip address 10.0.0.5 255.255.255.252

#

interface LoopBack0

 ip address 1.1.1.1 255.255.255.255

#

interface LoopBack1

 ip address 192.130.1.1 255.255.255.0

#

ospf configuration parameters

ospf 1 router-id 1.1.1.1

 import-route direct #Import direct routing

 import-route static #Import static routing

 area 0.0.0.0

  network 1.0.0.0 0.255.255.255

  network 192.130.1.0 0.0.0.255

  network 10.0.0.0 0.255.255.255

 area 0.0.0.1

  network 10.0.0.5 0.0.0.0

static parameters

ip route-static 0.0.0.0 0.0.0.0 172.16.31.2

ip route-static 59.56.61.0 255.255.255.0 172.16.31.2

R2 configuration 

IP configuration parameters

interface GigabitEthernet0/0/0

 ip address 10.0.0.2 255.255.255.252

#

interface GigabitEthernet0/0/1

 ip address 192.130.100.1 255.255.255.0

#

interface LoopBack0

 ip address 2.2.2.2 255.255.255.255

ospf configuration parameters

ospf 1 router-id 2.2.2.2

 import-route direct               

 import-route static                

 import-route rip 1 #Import dynamic routing

 area 0.0.0.0

  network 2.0.0.0 0.255.255.255

  network 10.0.0.0 0.255.255.255

Dynamic configuration parameters

rip 1

 undo summary

 version 2

 network 192.130.100.0

 network 2.0.0.0

 import-route ospf 1 #Import ospf 1

R3 configuration 

IP configuration parameters

interface GigabitEthernet0/0/0

 ip address 10.0.0.6 255.255.255.252

#

interface GigabitEthernet0/0/1

 ip address 10.0.0.9 255.255.255.252

#

interface LoopBack0

 ip address 3.3.3.3 255.255.255.255

ospf configuration parameters

ospf 1 router-id 3.3.3.3

 import-route direct

 import-route static

 area 0.0.0.1

  network 3.0.0.0 0.255.255.255

  network 10.0.0.6 0.0.0.0

static address

ip route-static 4.0.0.0 255.0.0.0 10.0.0.10

ip route-static 192.130.3.0 255.255.255.0 10.0.0.10

 R4 configuration

IP configuration parameters

interface GigabitEthernet0/0/0

 ip address 10.0.0.10 255.255.255.252

#

interface LoopBack0

 ip address 4.4.4.4 255.255.255.255

#

interface LoopBack1

 ip address 192.130.3.1 255.255.255.0

#

static parameters

ip route-static 0.0.0.0 0.0.0.0 10.0.0.9

ip route-static 3.0.0.0 255.0.0.0 10.0.0.9

R5 configuration 

IP configuration parameters

interface GigabitEthernet0/0/0

 ip address 192.130.100.2 255.255.255.0

#

interface LoopBack0

 ip address 5.5.5.5 255.255.255.255

#

interface LoopBack1

 ip address 192.130.2.1 255.255.255.0

Rip configuration parameters

rip 1

 undo summary #Disable route aggregation

 version 2 #Specify RIP version number

 network 5.0.0.0

 network 192.130.2.0

 network 192.130.100.0

 import-route ospf 1

ISP configuration 

IP configuration parameters

interface GigabitEthernet0/0/0

 ip address 172.16.31.2 255.255.255.252

#

interface LoopBack1

 ip address 59.56.61.1 255.255.255.0

static parameters

ip route-static 0.0.0.0 0.0.0.0 172.16.31.1

ip route-static 1.0.0.0 255.0.0.0 172.16.31.1

ip route-static 192.130.1.0 255.255.255.0 172.16.31.1

Things to note

1. ospf needs to import static and dynamic files. Dynamic files must also be imported into ospf to communicate with each other. Static files do not need to be imported.

Guess you like

Origin blog.csdn.net/chenqb_/article/details/131178345