解决OSPF的不规则区域问题

实验拓扑

在这里插入图片描述

地址划分

在这里插入图片描述

自己遇到的问题

1.做普通tunnel,静态指向对端,IP地址需要与路由表一致,例如R3指向R5需写成:IP route 45.1.1.0 255.255.255.0 34.1.1.2,而不能写成IP route 45.0.0.0 255.255.255.0 34.1.1.2 ,我就是简写成这样,始终tunnel不成功
2.做OSPF的虚链路时,记得两端都要配置

测试

R1 分别ping R10,R12,R14的环回
在这里插入图片描述
R1的路由表
在这里插入图片描述

配置

R1
interface Loopback0
ip address 172.16.64.1 255.255.224.0
interface Ethernet0/0
ip address 172.16.0.1 255.255.192.0
ip ospf priority 0 修改接口优先级,默认为1,使R3为DR,无BDR
router ospf 100 协议ospf
router-id 1.1.1.1
network 172.16.0.0 0.0.255.255 area 0
R2
interface Loopback0
ip address 172.16.80.1 255.255.224.0
interface Ethernet0/0
ip address 172.16.0.2 255.255.192.0
ip ospf priority 0 修改接口优先级
router ospf 100
router-id 2.2.2.2
network 172.16.0.0 0.0.255.255 area 0
R3
interface Loopback0
ip address 172.16.96.1 255.255.224.0
interface Tunnel0 做tunnel
ip address 192.168.1.1 255.255.255.0
tunnel source Serial3/0
tunnel destination 45.1.1.2
interface Ethernet0/0
ip address 172.16.0.3 255.255.192.0
router ospf 100
router-id 3.3.3.3
network 172.16.0.0 0.0.255.255 area 0
network 192.168.1.0 0.0.0.255 area 0
R4
interface Serial3/0
ip address 45.1.1.1 255.255.255.0
interface Serial3/1
ip address 34.1.1.2 255.255.255.0
R5
interface Loopback0
ip address 172.16.130.1 255.255.254.0
interface Tunnel0
ip address 192.168.1.2 255.255.255.0
tunnel source Serial3/1
tunnel destination 34.1.1.1
ip route 34.1.1.0 255.255.255.0 45.1.1.1记得写静态
interface Ethernet0/0
ip address 172.16.128.1 255.255.254.0
interface Serial3/1
ip address 45.1.1.2 255.255.255.0
router ospf 101
router-id 5.5.5.5
network 172.16.0.0 0.0.255.255 area 0
network 192.168.1.0 0.0.0.255 area 0
R6
router ospf 101
router-id 6.6.6.6
area 2 virtual-link 12.12.12.12 area0与area5做虚链路,2是中间区域,12.12.12.12是对端的RID
interface Loopback0
ip address 172.16.132.1 255.255.254.0
ip ospf 101 area 0这是进接口宣告,千万不要把接口宣告错
interface Ethernet0/0
ip address 172.16.128.2 255.255.254.0
ip ospf 101 area 0
R7
router ospf 101
router-id 7.7.7.7
interface Loopback0
ip address 172.16.134.1 255.255.254.0
ip ospf 101 area 0
interface Ethernet0/0
ip address 172.16.128.3 255.255.254.0
ip ospf 101 area 0
interface Serial3/1
ip address 172.16.176.1 255.255.248.0
ip ospf 101 area 3
R8
router ospf 101
router-id 8.8.8.8
interface Loopback0
ip address 172.16.136.1 255.255.254.0
ip ospf 101 area 0
interface Ethernet0/0
ip address 172.16.128.4 255.255.254.0
ip ospf 101 area 0
interface Serial3/1
ip address 172.16.144.1 255.255.252.0
ip ospf 101 area 1
R9
interface Loopback0
ip address 172.16.152.1 255.255.252.0
interface Serial3/0
ip address 172.16.144.2 255.255.252.0
router ospf 101
router-id 9.9.9.9
network 172.16.0.0 0.0.255.255 area 1
R10
interface Loopback0
ip address 172.16.156.1 255.255.252.0
interface Serial3/0
ip address 172.16.148.2 255.255.252.0
router ospf 101
router-id 10.10.10.10
network 172.16.0.0 0.0.255.255 area 1
R11
interface Loopback0
ip address 172.16.168.1 255.255.248.0
interface Serial3/0
ip address 172.16.160.2 255.255.252.0
router ospf 101
router-id 11.11.11.11
network 172.16.0.0 0.0.255.255 area 2
R12
router ospf 101
router-id 12.12.12.12
area 2 virtual-link 6.6.6.6 与R6做虚链路
interface Loopback0
ip address 172.16.208.1 255.255.248.0
ip ospf 101 area 5
interface Loopback1
ip address 172.16.216.1 255.255.248.0
ip ospf 101 area 5
interface Serial3/0
ip address 172.16.164.2 255.255.252.0
ip ospf 101 area 2
R13
router ospf 101
router-id 13.13.13.13
redistribute ospf 102 subnets 重发布解决不规则区域问题
router ospf 102
router-id 133.133.133.133
redistribute ospf 101 subnets
interface Loopback0
ip address 172.16.184.1 255.255.248.0
ip ospf 101 area 3
interface Serial3/0
ip address 172.16.176.2 255.255.248.0
ip ospf 101 area 3
interface Serial3/1
ip address 172.16.192.1 255.255.248.0
ip ospf 102 area 1
R14
interface Loopback0
ip address 172.16.200.1 255.255.248.0
interface Serial3/0
ip address 172.16.192.2 255.255.248.0
router ospf 102
router-id 14.14.14.14
network 172.16.0.0 0.0.255.255 area 1

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

LYDlsj

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值