问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

什么是路由前缀列表?

发布网友 发布时间:2022-04-12 20:27

我来回答

2个回答

懂视网 时间:2022-04-13 00:48

Exercises: 1. Construct a prefix list that permits only the 192.168.1.0/24 network. ip prefix-list test1 seq 5 permit 192.168.1.0/24 2. Construct a prefix list that denies network 119.0.0.0, and permits all other prefixes (including all su

Exercises:

1. Construct a prefix list that permits only the 192.168.1.0/24 network.

ip
prefix-list test1 seq 5 permit 192.168.1.0/24

2. Construct a prefix list that denies network 119.0.0.0, and permits all other prefixes (including all subnets of 119.0.0.0).

ip prefix-list test2 seq 5 deny 119.0.0.0/8
ip prefix-list test2 seq 10 permit 0.0.0.0/0 le 32

3. Construct a prefix list that permits only the default route.

ip prefix-list test3 seq 5 permit 0.0.0.0/0

4. Construct a prefix list the permits everything except the default route.

ip prefix-list test4 seq 5 deny 0.0.0.0/0
ip prefix-list test4 seq 10 permit 0.0.0.0/0 le 32

5. Construct a prefix list that permits network 172.16.0.0 and any of its subnets, and denies all other prefixes.

ip prefix-list test5 seq 5 permit 172.16.0.0/16 le 32

6. Construct a prefix list that permits only the following prefixes:
10.2.8.32/27
10.2.8.32/28
10.2.8.32/29
10.2.8.32/30

ip prefix-list test6 seq 5 permit 10.2.8.32/27 le 30

7. Construct a prefix list that:

Permits 197.25.94.128/25
Denies 197.25.94.192/26
Permits 197.25.94.224/27
Denies 197.25.94.240/28
Permits 197.25.94.248/29
Denies 197.25.94.252/30
Permits all other prefixes, except for 198.82.0.0/16

ip prefix-list test7 seq 5 deny 197.25.94.192/26
ip prefix-list test7 seq 10 deny 197.25.94.240/28
ip prefix-list test7 seq 15 deny 197.25.94.252/30
ip prefix-list test7 seq 20 deny 198.82.0.0/16
ip prefix-list test7 seq 25 permit 0.0.0.0/0 le 32

8. Construct a prefix list that permits any prefix matching the first 20 bits of 175.29.64.0 which has a mask of at least /26 but not exceeding /29, and denies all other prefixes.

ip prefix-list test8 seq 5 permit 175.29.64.0/20 ge 26 le 29

9. Construct a prefix list that denies any prefix matching the first 19 bits of 15.26.96.0 with any mask up to and including /32, and permits any other prefix.

ip prefix-list test9 seq 5 deny 15.26.96.0/19 le 32
ip prefix-list test9 seq 10 permit 0.0.0.0/0 le 32

10. Construct a prefix list that denies the RFC 1918 private networks and any of their subnets, and permits everything else.

ip prefix-list test10 seq 5 deny 10.0.0.0/8 le 32
ip prefix-list test10 seq 10 deny 172.16.0.0/12 le 32
ip prefix-list test10 seq 15 deny 192.168.0.0/16 le 32
ip prefix-list test10 seq 20 permit 0.0.0.0/0 le 32

11. Construct a prefix list that permits any subnet of network 15.0.0.0 (but not the network), and denies everything else. Your router lies within AS 65011. Place the prefix list in service in the inbound direction with BGP neighbor 1.2.3.4.

ip prefix-list test11 seq 5 permit 15.0.0.0/8 ge 9

To place it in service:
router bgp 65011
neighbor 1.2.3.4 prefix-list test11 in

12. Construct a prefix list that denies 162.56.0.0/16 and all of its subnets (with the exception of 162.56.209.208/29, which is permitted), and permits all other prefixes. Your router lies within AS 65012. Place the prefix list in service in the outbound direction with its BGP neighbor having address 5.6.7.8.

ip prefix-list test12 seq 5 permit 162.56.209.208/29
ip prefix-list test12 seq 10 deny 162.56.0.0/16 le 32
ip prefix-list test12 seq 15 permit 0.0.0.0/0 le 32

To place it in service:
router bgp 65012
neighbor 5.6.7.8 prefix-list test12 out

13. Construct a prefix list that permits the CIDR block containing the thirty-two class C networks beginning with 200.202.160.0/24, and denies everything else. Your router is within AS 65013. Place the prefix list in service in the inbound direction with BGP peer-group "Lucky_13".

ip prefix-list test13 seq 5 permit 200.202.160.0/19

To place it in service:
router bgp 65013
neighbor Lucky_13 prefix-list test13 in

14. Construct a prefix list that denies any prefix for which the most-significant four bits are "0110", and permits everything else.

ip prefix-list test14 seq 5 deny 96.0.0.0/4 le 32
ip prefix-list test14 seq 10 permit 0.0.0.0/0 le 32

15. Construct a prefix list that permits the host address of "CatSpace", and denies everything else.

ip prefix-list test15 seq 5 permit 64.82.100.67/32

16. Construct a prefix list that permits only classful networks, and denies everything else.

ip prefix-list test16 seq 5 permit 0.0.0.0/1 ge 8 le 32
ip prefix-list test16 seq 10 permit 128.0.0.0/2 ge 16 le 32
ip prefix-list test16 seq 15 permit 192.0.0.0/3 ge 24 le 32

17. Construct a prefix list that denies only supernets, and permits everything else.

ip prefix-list test17 seq 5 deny 0.0.0.0/1 le 7
ip prefix-list test17 seq 10 deny 128.0.0.0/2 le 15
ip prefix-list test17 seq 15 deny 192.0.0.0/3 le 23
ip prefix-list test17 seq 20 permit 0.0.0.0/0 le 32

18. Construct a prefix list that permits only subnets, and denies everything else.

ip prefix-list test18 seq 5 permit 0.0.0.0/1 ge 9
ip prefix-list test18 seq 10 permit 128.0.0.0/2 ge 17
ip prefix-list test18 seq 15 permit 192.0.0.0/3 ge 25

19. Construct a prefix list that permits only CIDR blocks encompassing at least 32 class-C equivalents.

ip prefix-list test19 seq 5 deny 0.0.0.0/0
ip prefix-list test19 seq 10 permit 0.0.0.0/0 le 19

20. Construct a prefix list that permits only the RFC 1918 private networks and their subnets, and configure RIP to use this prefix list for outbound routing advertisements.

ip prefix-list test20 seq 5 permit 10.0.0.0/8 le 32
ip prefix-list test20 seq 10 permit 172.16.0.0/12 le 32
ip prefix-list test20 seq 15 permit 192.168.0.0/16 le 32

To place it in effect for outbound RIP updates:
router rip
distribute-list prefix test20 out

--------------

在进行路由过滤和地址限制方面,Prefix-list占用CPU的资源比采用access-list要少很多,它提供更快的访问列表装入速度,目前IOS版本11.1CC(17),11.3(3)和12.0都提供该项特性。
Prefix-list保存了access-list的多项重要特性:
1、Permit和Deny;
2、最先匹配法则;
3、基于Prefix长度的过滤(精确匹配或range匹配)
然而,与Route-map搭配使用的Prefix-list不支持包过滤。
Sequence Number 用于内部正确标识“真正”的match(以最小的Sequence Num为准)。
解释如下:
1、Prefix-list可以采用增量方式从新定义,这也就是说,它里面的条目可以单独增加或删除,而无需象access-list一样,一删就得将整个access-list删掉重写。
2、To_DCC_Routes 是这个prefix-list增量表的名字。
3、Seq 10用于内部正确标识“真正”的match(以最小的Sequence Num为准)。
4、Match的工作原理与Access-list十分类似。
空的Prefix-list允许所有的前缀;
当Prefix-list中的任何一条都不满足的话,就认为隐含拒绝;
当Prefix-list中的多项条目均满足时,以最小的Sequence Num的那条作为匹配。
这里有一个例子。
如果有以下这样的Prefix-list:
ip prefix-list abc deny 10.0.0.0/8 le 32
ip prefix-list abc permit 0.0.0.0/0 le 32
则10.1.0.0/16满足上述两条,但该Prefix会被拒绝,因为第一条才是真正的匹配。

热心网友 时间:2022-04-12 21:56

ip prefix-list
用来匹配一个前缀,他可以匹配前缀的范围以及掩码的范围,因为他可以匹配掩码,所以经常用来匹配路由条目。
举个例子 ip prefix-list 1 permit 128.0.0.0/2 le 32
这里定义了一个名字为1的前缀列表,匹配的前缀是128.0.0.0,,掩码范围是从2到32
其实这里就匹配了所有的B类的路由
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
中控是什么意思 抖音直播中控是什么意思 iphone通讯录群组设置 如何更改iphone通讯录拨打电话时总是出现两个称呼 我的电脑是Win8.1update老硬盘有坏道,最近新买了一个硬盘是希捷的1TB混 ... 使命召唤:黑色行动2常见问题 GMA 4500M技术特性 电脑显示器的配置电脑的基本配置有哪些 梦见对象把门钥匙和我分手 梦见对象还我门钥匙要和我分手的预兆 公益性捐赠税前扣除资格 春节到了,给公司员工的家属的一封信的开头怎么写,怎么称呼合适? 员工家属对安全的回信 公司请的临时工工资已开发票怎么入账 企业发生的临时工支出以什么作为入账凭证呢? 付临时工资怎么做账 怎么做分录 临时工工资怎么计入成本? 关于钱的说说心情短语 临时工工资的账务处理? 施工企业发生的临时雇佣人工费有,没有发票如何入账? 终于交房了的心情说说 合作社临时工工资怎么做账务处理 欠朋友钱时间到了没有钱还心情说说 关于金钱损失的心情 企业发生的“临时工”支出以什么作为入账凭证呢? 单位雇的临时工工资怎么入帐 临时工工资怎么入账 钱的句子说说心情 求CAD的各个命令,要缩短的那种~谢谢! CAD插个的图块怎么缩小了几十倍啊,哪里调它的整体比例 CAD图块缩小,新手免进 套路表白 以跟你商量个事开头,后面随便发挥,谢谢老司机。谢谢了 水粉24种颜色的调色表和方法 我跟朋友发了一个 更你商量个事 如何聊才幽默呢? 华为mate9用NFC刷公交卡扣钱了卡机说刷卡失败是怎么 你好,华为手机这个型号钱包里面不能用公交卡 路由器无法重置 无法获取IP 系统灯也不亮 孩子总是不喜欢和其他小朋友玩,这是为什么? 孩子总是不喜欢和其他小朋友玩,你知道为什么吗? 孩子在幼儿园不愿意跟小朋友一起玩,妈妈应该怎么做? 剩米饭做早餐饼的做法有哪些? ubuntu查看版本号命令 如何查看安装的ubuntu版本 如何查看Ubuntu版本? 小孩子在幼儿园不喜欢跟小朋友玩,怎么办? 我家孩子不喜欢和小朋友们玩耍总是喜欢自己一个人玩,在家也自己躲在角落里是不是得了孤独症啊? 小孩总是不喜欢和其他小朋友玩,原因是什么? 孩子从小就不喜欢与其他小朋友一起玩,家长应该如何是好? 村的繁体字怎么写 郭亮村字体我需要各种郭亮村字体的写法,谢谢! 多吃杨梅,可以补充哪些人体所需的微量元素?