EIGRP: Route Filtering
·
We
can filter the routes in EIGRP using distribute-list
·
Let
me take a small topology to configure route filtering in EIGRP
R1------S1/0-------------s1/0----R2----s1/1--------------s1/1------R3
10.1.12.1--------------10.1.12.2-----11.1.23.2--------------11.1.23.3
R1(config-router)#do show run | sec router
router
eigrp 100
network 1.1.1.1 0.0.0.0
network 10.1.12.1 0.0.0.0
network 11.11.11.11 0.0.0.0
network 111.111.111.111 0.0.0.0
no auto-summary
R1(config-router)#
R2(config-router)#do show run | sec router
router
eigrp 100
network 10.1.12.2 0.0.0.0
network 11.1.23.2 0.0.0.0
no auto-summary
R2(config-router)#
R3(config-router)#do show run | sec router
router
eigrp 100
network 11.1.23.3 0.0.0.0
no auto-summary
R3(config-router)#
R1(config-router)#do
show ip route
Codes:
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
Gateway
of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
111.0.0.0/32 is subnetted, 1 subnets
C 111.111.111.111 is directly connected,
Loopback2
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.12.0 is directly connected,
Serial1/0
11.0.0.0/8 is variably subnetted, 2
subnets, 2 masks
C 11.11.11.11/32 is directly connected,
Loopback1
D 11.1.23.0/24 [90/2681856] via 10.1.12.2,
00:01:43, Serial1/0
R1(config-router)#
R2(config-router)#do
show ip route
Codes:
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
Gateway
of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
D 1.1.1.1 [90/2297856] via 10.1.12.1,
00:05:54, Serial1/0
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
111.0.0.0/32 is subnetted, 1 subnets
D 111.111.111.111 [90/2297856] via
10.1.12.1, 00:05:43, Serial1/0
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.12.0 is directly connected,
Serial1/0
11.0.0.0/8 is variably subnetted, 2 subnets,
2 masks
D 11.11.11.11/32 [90/2297856] via
10.1.12.1, 00:05:49, Serial1/0
C 11.1.23.0/24 is directly connected,
Serial1/1
R2(config-router)#
R3(config-router)#do
show ip route
Codes:
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
Gateway
of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
D 1.1.1.1 [90/2809856] via 11.1.23.2,
00:01:56, Serial1/1
111.0.0.0/32 is subnetted, 1 subnets
D 111.111.111.111 [90/2809856] via
11.1.23.2, 00:01:56, Serial1/1
10.0.0.0/24 is subnetted, 1 subnets
D 10.1.12.0 [90/2681856] via 11.1.23.2,
00:01:56, Serial1/1
11.0.0.0/8 is variably subnetted, 2
subnets, 2 masks
D 11.11.11.11/32 [90/2809856] via
11.1.23.2, 00:01:56, Serial1/1
C 11.1.23.0/24 is directly connected,
Serial1/1
R3(config-router)#
Observation:
·
EIGRP
is configured between R1 &R2 and R2 & R3
·
R1
has advertised 1.1.1.1/32, 11.11.11.11/32 and 111.111.111.111/32 into EIGRP
·
If
R2 wants only 11.11.11.11/32, then we can filter the other routes using
distribute-list
·
Let
me configure this in R2:
R2(config-router)#ip
prefix-list 11 seq 5 permit 11.11.11.11/32
R2(config-router)#ip
router eigrp 100
R2(config-router)#distribute-list
prefix 11 in serial 1/0
R2(config)#do show ip route
Codes:
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
Gateway
of last resort is not set
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.12.0 is directly connected,
Serial1/0
11.0.0.0/8 is variably subnetted, 2
subnets, 2 masks
D
11.11.11.11/32 [90/2297856] via 10.1.12.1, 00:10:25, Serial1/0
C 11.1.23.0/24 is directly connected,
Serial1/1
R2(config)#
R3(config-router)#do show ip
route
Codes:
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
Gateway
of last resort is not set
10.0.0.0/24 is subnetted, 1 subnets
D 10.1.12.0 [90/2681856] via 11.1.23.2,
00:08:00, Serial1/1
11.0.0.0/8 is variably subnetted, 2
subnets, 2 masks
D
11.11.11.11/32 [90/2809856] via 11.1.23.2, 00:08:00, Serial1/1
C 11.1.23.0/24 is directly connected,
Serial1/1
R3(config-router)#
Observation:
·
Prefix-list
is matched only 11.11.11.11/32
·
R2
now has only 11.11.11.11/32
·
Even
R3 has only 11.11.11.11/32
·
If
I have to configure this in R1, then I have to apply it OUT
·
This
is the major difference between router filtering in OSPF and other protocols.
·
In
OSPF, we can’t do route-filtering OUT, we can do only IN.
·
Even
if we do filtering IN, they will still be presenting in the OSPF database, they
just don’t make it to OSPF routing table.
No comments:
Post a Comment