IP Prefix List
An IP
prefix list is a network filtering tool used primarily in routing protocols to
control which routes are accepted or rejected based on their network prefixes.
Key Characteristics
·
Prefix-based
filtering: Matches routes based on their network address and prefix length.
·
Ordering
processing: Entries are processed top-down until a match is found.
·
Implicit
deny: if no match is found, the prefix is denied by default
R1(config)#ip
prefix-list NAME seq 10 deny 192.168.1.1/24?
ge
Minimum prefix length to be matched
le
Maximum prefix length to be matched
<cr>
Parameters
·
Network/len:
The network address and prefix length to match.
·
Ge:
“greater than or equal to” – minimum prefix length to match.
·
Le:
“less than or equal to” – maximum prefix length to match.
·
Seq:
optional sequence number for ordering entries.
Prefix
lists are widely used in routing protocols like BGP, OSPF, and EIGRP for
precise control over route advertisements and redistributions.
Topology:-
Goal:.Configure the topology as per the diagram
- Configure the IP addresses as per the topology
- Configure IGP protocol EIGRP 100
- Advertise the directly connected routes
- configure IP Prefix list name INTERNET
- Deny 192.168.31.0/24 - 192.168.32.0/24
- rest permit
- deny 192.168.11.0/24 adjust the SEQ number.
- make sure router 2 deny192.168.31.1/24 & 192.168.32.1/24 and 192.168.11.1/24
- change the SEQ
R1(config)#interface serial 5/0
R1(config-if)#ip address 12.1.1.1 255.0.0.0
R1(config-if)#exit
R1(config)#interface loopback 1
R1(config-if)#ip address 192.168.11.1 255.255.255.0
R1(config-if)#exit
R1(config)#interface loopback 2
R1(config-if)#ip address 192.168.12.1 255.255.255.0
R1(config-if)#exit
R1(config)#interface loopback 3
R1(config-if)#ip address 192.168.13.1 255.255.255.0
R1(config-if)#exit
R1(config)#interface loopback 4
R1(config-if)#ip address 192.168.14.1 255.2/55.255.0
R1(config-if)#exit
R2(config)#interface serial 5/0
R2(config-if)#ip address 12.1.1.2 255.0.0.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface serial 5/1
R2(config-if)#ip address 13.1.1.1 255.0.0.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface loopback 1
R2(config-if)#ip address 192.168.21.1 255.255.255.0
R2(config-if)#exit
R2(config)#interface loopback 2
R2(config-if)#ip address 192.168.22.1 255.255.255.0
R2(config-if)#exit
R2(config)#interface loopback 3
R2(config-if)#ip address 192.168.23.1 255.255.255.0
R2(config-if)#exit
R2(config)#interface loopback 4
R2(config-if)#ip address 192.168.24.1 255.255.255.0
R2(config-if)#exit
R3(config)#interface serial 5/1
R3(config-if)#ip address 23.1.1.2 255.0.0.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#
R3(config)#interface loopback 1
R3(config-if)#ip address 192.168.31.1 255.255.255.0
R3(config-if)#exit
R3(config)#interface loopback 2
R3(config-if)#ip address 192.168.32.1 255.255.255.0
R3(config-if)#exit
R3(config)#interface loopback 3
R3(config-if)#ip address 192.168.33.1 255.255.255.0
R3(config-if)#exit
R3(config)#interface loopback 4
R3(config-if)#ip address 192.168.34.1 255.255.255.0
R3(config-if)#exit
R1(config)#router eigrp 100
R1(config-router)#network 12.0.0.0
R1(config-router)#network 192.168.11.0
R1(config-router)#network 192.168.12.0
R1(config-router)#network 192.168.13.0
R1(config-router)#network 192.168.14.0
R1(config-router)#no auto-summary
R1(config-router)#exit
R2(config)#router eigrp 100
R2(config-router)#network 192.168.21.0
R2(config-router)#network 192.168.22.0
R2(config-router)#network 192.168.23.0
R2(config-router)#network 192.168.24.0
R2(config-router)#network 12.0.0.0
R2(config-router)#network 23.0.0.0
R2(config-router)#exit
R3(config)#router eigrp 100
R3(config-router)#network 23.0.0.0
R3(config-router)#network 192.168.31.0
R3(config-router)#network 192.168.32.0
R3(config-router)#network 192.168.33.0
R3(config-router)#network 192.168.34.0
R3(config-router)#no auto-summary
R3(config-router)#exit
D 192.168.12.0/24 [90/2297856] via 12.1.1.1, 00:00:33, Serial5/0
D 192.168.13.0/24 [90/2297856] via 12.1.1.1, 00:00:33, Serial5/0
D 192.168.14.0/24 [90/2297856] via 12.1.1.1, 00:00:33, Serial5/0
D 192.168.31.0/24 [90/2297856] via 23.1.1.2, 00:00:24, Serial5/1
D 192.168.11.0/24 [90/2297856] via 12.1.1.1, 00:00:33, Serial5/0
D 192.168.34.0/24 [90/2297856] via 23.1.1.2, 00:00:24, Serial5/1
D 192.168.32.0/24 [90/2297856] via 23.1.1.2, 00:00:24, Serial5/1
D 192.168.33.0/24 [90/2297856] via 23.1.1.2, 00:00:24, Serial5/1
R2(config)#ip prefix-list INTERNET seq 10 deny 192.168.31.0/24
R2(config)#ip prefix-list INTERNET seq 15 deny 192.168.32.0/24
R2(config)#ip prefix-list INTERNET seq 30 permit 0.0.0.0/0 le 32
R2#show ip prefix-list
ip prefix-list INTERNET: 3 entries
seq 10 deny 192.168.31.0/24
seq 15 deny 192.168.32.0/24
seq 30 permit 0.0.0.0/0 le 32
R2(config)#router eigrp 100
R2(config-router)#distribute-list prefix INTERNET in serial 5/1
*Aug 13 14:41:48.487: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 23.1.1.2 (Serial5/1) is resync: route configuration changed
R2(config-router)#end
R2#clear ip route *
R2#show ip route eigrp 100
D 192.168.12.0/24 [90/2297856] via 12.1.1.1, 00:00:19, Serial5/0
D 192.168.13.0/24 [90/2297856] via 12.1.1.1, 00:00:19, Serial5/0
D 192.168.14.0/24 [90/2297856] via 12.1.1.1, 00:00:19, Serial5/0
D 192.168.11.0/24 [90/2297856] via 12.1.1.1, 00:00:19, Serial5/0
D 192.168.34.0/24 [90/2297856] via 23.1.1.2, 00:00:19, Serial5/1
D 192.168.33.0/24 [90/2297856] via 23.1.1.2, 00:00:19, Serial5/1
R2(config)#ip prefix-list INTERNET seq 20 deny 192.168.11.0/24
R2(config)#end
R2(config)#router eigrp 100
R2(config-router)#distribute-list prefix INTERNET in serial 5/0
R2(config-router)#exit
R2#show ip prefix-list
ip prefix-list INTERNET: 4 entries
seq 10 deny 192.168.31.0/24
seq 15 deny 192.168.32.0/24
seq 20 deny 192.168.11.0/24
seq 30 permit 0.0.0.0/0 le 32
R2#show ip route eigrp 100
D 192.168.12.0/24 [90/2297856] via 12.1.1.1, 00:00:41, Serial5/0
D 192.168.13.0/24 [90/2297856] via 12.1.1.1, 00:00:41, Serial5/0
D 192.168.14.0/24 [90/2297856] via 12.1.1.1, 00:00:41, Serial5/0
D 192.168.34.0/24 [90/2297856] via 23.1.1.2, 00:00:41, Serial5/1
D 192.168.33.0/24 [90/2297856] via 23.1.1.2, 00:00:41, Serial5/1
No comments:
Post a Comment