前缀列表(ip-prefix)配置

一.

实验简介

本来前缀列表是要和访问控制列表放在一起讲的,但是这里单拎出来是为了更详细的讲解两者的区别

1.前缀列表针对IP比访问控制更加灵活。

2.前缀列表在后面被引用时是无法对数据包进行过滤的

实验拓扑

二.

实验目的

R4路由器中只引入子网LoopBack的最后一位为单数的子网

实验配置

R1:

un ter mo

sys

sys R1

int g0/0/0

ip add 192.168.12.1 24

q

ospf router-id 1.1.1.1

area 0

net 192.168.0.0 0.0.255.255

q

R2:

un ter mo

sys

sys R2

int g0/0/0

ip add 192.168.12.2 24

int g0/0/1

ip add 192.168.23.2 24

q

ospf router-id 2.2.2.2

area 0

net 192.168.12.0 0.0.0.255

area 1

net 192.168.23.0 0.0.0.255

q

R3:

un ter mo

sys

sys R3

int g0/0/1

ip add 192.168.23.3 24

int g0/0/0

ip add 192.168.34.3 24

q

ospf router-id 3.3.3.3

area 1

net 192.168.0.0 0.0.255.255

q

R4:

un ter mo

sys

sys R4

int g0/0/0

ip add 192.168.34.4 24

int loo0

ip add 10.0.4.1 16

int loo1

ip add 10.0.4.2 24

int loo2

ip add 10.0.4.3 28

int loo3

ip add 10.0.4.4 29

q

ospf router-id 4.4.4.4

import-route direct

area 1

net 192.168.34.0 0.0.0.255

q

查看R2的路由表

在R4上配置前缀列表(后续会讲路由策略)

R4:

ip ip--prefix huawei permit 10.0.4.0 24 greater-equal 24 less-equal 29

route-policy ip permit node 10

if-match ip-prefix huawei

q

ospf

import-route direct route-policy ip

q

三.

实验验证

查看R2路由表

发现没有10.0.0.0/16这条路由了,这是因为我们对子网掩码做了过滤

相关推荐
qq_254617771 小时前
nslookup 这个命令解析dns,和系统接口gethostbyname解析区别在哪?
linux·网络
Arwen3031 小时前
IP地址证书的常见问题有哪些?有没有特殊渠道可以申请免费IP证书?
服务器·网络·网络协议·tcp/ip·http·https
Acrel187021067061 小时前
浅谈电气防火限流保护器设计在消防安全中的应用价值
大数据·网络
企业对冲系统官2 小时前
基差风险管理系统日志分析功能的架构与实现
大数据·网络·数据库·算法·github·动态规划
jarreyer3 小时前
TCP/IP五层模型
网络·网络协议·tcp/ip
Web3VentureView4 小时前
SYNBO 协议亮相 ChainThink “Meme 回归” AMA:市场奖励机制深度剖析
网络·金融·web3·区块链·加密货币
翔云1234565 小时前
(MySQLdb._exceptions.OperationalError) (2006, ‘MySQL server has gone away‘)
网络·python
Xの哲學5 小时前
Linux设备驱动模型深度解剖: 从设计哲学到实战演练
linux·服务器·网络·算法·边缘计算
2401_832298105 小时前
芯片级机密计算,天翼云CSV3筑牢数据“可用不可见”防线
大数据·网络·人工智能