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
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。