1. 程式人生 > >OSPF多區域設置

OSPF多區域設置

ati nss network interface work sha ospf多區域 由器 com

OSPF多區域的設置
技術分享圖片

IP地址規劃pc1:IP地址:192.168.1.10
子網掩碼: 255.255.255.0
網關: 192.168.1.254
PC2: IP地址192.168.5.10
子網掩碼:255.255.255.0
PC3: IP地址200.1.1.1
子網掩碼:255.255.255.0
網關:200.1.1.254 /24
R1: interface GigabitEthernet0/0/0
ip address 192.168.12.1 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 192.168.1.254 255.255.255.0

ospf 1 router-id 1.1.1.1

area 0.0.0.12
network 192.168.1.0 0.0.0.255
network 192.168.12.0 0.0.0.255

r2:
interface GigabitEthernet0/0/0
ip address 192.168.23.2 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 192.168.12.2 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
ospf 1 router-id 2.2.2.2 進入OSPF進程1將R1路由器路由地址名字改為2.2.2.2
area 0.0.0.0 宣告區域為0

network 192.168.23.0 0.0.0.255 將192.168.23.0網段加入到區域0。

area 0.0.0.12
network 192.168.12.0 0.0.0.255將192.
68.12.0網段加入到區域0.
R3:
interface GigabitEthernet0/0/0
ip address 192.168.34.3 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 192.168.23.3 255.255.255.0
#
interface GigabitEthernet0/0/2

ospf 1 router-id 3.3.3.3
進入OSPF進程1將R1路由器路由地址名字改為3.3.3.3

area 0.0.0.0 宣告區域為0
network 192.168.23.0 0.0.0.255
network 192.168.34.0 0.0.0.255
R4:
#
interface GigabitEthernet0/0/0
ip address 192.168.15.4 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 192.168.34.4 255.255.255.0

ospf 1 router-id 4.4.4.4
進入OSPF進程1將R1路由器路由地址名字改為4.4.4.4

area 0.0.0.0 宣告區域為0。
network 192.168.34.0 0.0.0.255
將192.168.34.0網段加入到區域0中
area 0.0.0.45
宣告區域為45。

network 192.168.15.0 0.0.0.255
將192.168.15.0網段加入到區域45中。
R5:
interface GigabitEthernet0/0/0
ip address 100.1.1.11 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 192.168.15.5 255.255.255.0
#
interface GigabitEthernet1/0/0
#
interface GigabitEthernet2/0/0
ip address 192.168.5.254 255.255.255.0
#
ospf 1 router-id 5.5.5.5
進入OSPF進程1將R1路由器路由地址名字改為5.5.5.5

area 0.0.0.45
宣告區域為45.
network 192.168.5.0 0.0.0.255
將192.168.5.0的網段加入到區域為45中

network 192.168.15.0 0.0.0.255
將192.168.5.0的網段加入到區域為45中

nssa
#
ip route-static 200.1.1.0 255.255.255.0 100.1.1.10設置去往200.1.1.0網段的下一跳是100.1.1.10
R6:
interface GigabitEthernet0/0/0
ip address 100.1.1.10 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 200.1.1.254 255.255.255.0
#
interface GigabitEthernet0/0/2

ip route-static 192.168.1.0 255.255.255.0 100.1.1.11設置去往192.168.1.0網段的下一跳是100.1.1.11
ip route-static 192.168.5.0 255.255.255.0 100.1.1.11
設置去往192.168.5.0網段的下一跳是100.1.1.11

OSPF多區域設置