In order to filter routes in EIGRP update message we need to configure Distribute list under EIGRP process. Distribute list can be applied to all or specific interface.
In below example we are applying distribution list on
particular interface in order to filter route for particular neighbor.
There are three ways by which we can match routes to
apply filter.
1.
Access list
2.
Prefix list
3.
Route-map
In below example, we want to advertise only 11.11.11.11/24
from R2 to R3 and suppress all other routes.
There are two routes, one is 11.11.11.11/32 (advertised
from R1) and 11.11.11.11/24 (advertised
from R2).
Prefix list will do this for us and will block all other
routes expect 11.11.11..0/24 but in order to give more flexibility prefix list
is called under route-map.
R1:-
interface Loopback1
ip address 1.1.1.1
255.255.255.255
interface Loopback11
ip address
11.11.11.11 255.255.255.255
interface Loopback111
ip address
111.111.111.111 255.255.255.255
interface FastEthernet0/0
Description “ connected to R2”
ip address
12.12.12.1 255.255.255.0
no shut
router eigrp 1
network 1.1.1.1
0.0.0.0
network
11.11.11.11 0.0.0.0
network 12.12.12.0
0.0.0.255
network
111.111.111.111 0.0.0.0
R2:-
interface Loopback0
ip address 2.2.2.2
255.255.255.255
ip ospf network
point-to-point
no shut
interface Loopback2
ip address
11.11.11.1 255.255.255.0
interface FastEthernet0/0
ip address
12.12.12.2 255.255.255.0
no shut
interface FastEthernet0/1
ip address
23.23.23.2 255.255.255.0
no shut
router eigrp 1
istribute-list route-map Route_Filter out FastEthernet0/1
network 11.11.11.1
0.0.0.0
network 12.12.12.0
0.0.0.255
network 23.23.23.2
0.0.0.0
route-map Route_Filter permit 10
match ip address
prefix-list Route_Filter_routes
ip prefix-list Route_Filter_routes seq 5 permit
11.11.11.0/24 \\Only permit 11.11.11.0/24 \\
R3:-
interface FastEthernet0/1
ip address
23.23.23.3 255.255.255.0
no shut
router eigrp 1
network 23.23.23.3
0.0.0.0
Verification:-
R1:-
R1# sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M -
mobile, B - BGP
D - EIGRP,
EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF
NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF
external type 1, E2 - OSPF external type 2
i - IS-IS,
su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS
inter area, * - candidate default, U - per-user static route
o - ODR, P -
periodic downloaded static route, H - NHRP
+ -
replicated route, % - next hop override
Gateway of last resort is not set
1.0.0.0/32 is
subnetted, 1 subnets
C 1.1.1.1 is
directly connected, Loopback1
11.0.0.0/8 is
variably subnetted, 2 subnets, 2 masks
D 11.11.11.0/24 [90/156160] via
12.12.12.2, 02:20:21, FastEthernet0/0
\\Advertised from R2
C
11.11.11.11/32 is directly connected, Loopback11
12.0.0.0/8 is
variably subnetted, 2 subnets, 2 masks
C
12.12.12.0/24 is directly connected, FastEthernet0/0
L
12.12.12.1/32 is directly connected, FastEthernet0/0
23.0.0.0/24
is subnetted, 1 subnets
D 23.23.23.0
[90/30720] via 12.12.12.2, 02:22:54, FastEthernet0/0
111.0.0.0/32
is subnetted, 1 subnets
C
111.111.111.111 is directly connected, Loopback111
R2:-
R2#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M -
mobile, B - BGP
D - EIGRP,
EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF
NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF
external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS
level-1, L2 - IS-IS level-2
ia - IS-IS
inter area, * - candidate default, U - per-user static route
o - ODR, P -
periodic downloaded static route, H - NHRP
+ -
replicated route, % - next hop override
Gateway of last resort is not set
1.0.0.0/32 is
subnetted, 1 subnets
D 1.1.1.1
[90/156160] via 12.12.12.1, 04:10:00, FastEthernet0/0
2.0.0.0/32 is
subnetted, 1 subnets
C 2.2.2.2 is
directly connected, Loopback0
11.0.0.0/8 is
variably subnetted, 3 subnets, 2 masks
C
11.11.11.0/24 is directly connected, Loopback2
L
11.11.11.1/32 is directly connected, Loopback2
D
11.11.11.11/32 [90/156160] via 12.12.12.1, 04:10:00, FastEthernet0/0
12.0.0.0/8 is
variably subnetted, 2 subnets, 2 masks
C
12.12.12.0/24 is directly connected, FastEthernet0/0
L
12.12.12.2/32 is directly connected, FastEthernet0/0
23.0.0.0/8 is
variably subnetted, 2 subnets, 2 masks
C
23.23.23.0/24 is directly connected, FastEthernet0/1
L
23.23.23.2/32 is directly connected, FastEthernet0/1
111.0.0.0/32
is subnetted, 1 subnets
D
111.111.111.111 [90/156160] via 12.12.12.1, 02:53:00, FastEthernet0/0
R2#sh ip eigrp neighbors
EIGRP-IPv4 Neighbors for AS(1)
H Address Interface Hold Uptime SRTT
RTO Q Seq
(sec) (ms) Cnt Num
1 23.23.23.3 Fa0/1 12 00:03:23 14
200 0 17
0 12.12.12.1 Fa0/0 11 04:10:18 53
318 0 14
R3:-
R3#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M -
mobile, B - BGP
D - EIGRP,
EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF
NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF
external type 1, E2 - OSPF external type 2
i - IS-IS,
su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS
inter area, * - candidate default, U - per-user static route
o - ODR, P -
periodic downloaded static route, H - NHRP
+ -
replicated route, % - next hop override
Gateway of last resort is not set
11.0.0.0/24
is subnetted, 1 subnets
D 11.11.11.0 [90/156160] via 23.23.23.2,
00:04:09, FastEthernet0/1 \\ only allowed prefix on R2
23.0.0.0/8 is
variably subnetted, 2 subnets, 2 masks
C
23.23.23.0/24 is directly connected, FastEthernet0/1
L
23.23.23.3/32 is directly connected, FastEthernet0/1
34.0.0.0/8 is
variably subnetted, 2 subnets, 2 masks
C
34.34.34.0/24 is directly connected, FastEthernet1/0
L
34.34.34.3/32 is directly connected, FastEthernet1/0
R3#sh ip eigrp neighbors
EIGRP-IPv4 Neighbors for AS(1)
H Address Interface Hold Uptime SRTT
RTO Q Seq
(sec) (ms) Cnt Num
0 23.23.23.2 Fa0/1 12 00:03:45 42
252 0 31
Great bloog post
ReplyDelete