www.howtonetwork.org

CCNA & CCNP Certifcation Training

  • About
  • Contact
  • FAQ
  • Join
  • Home
  • CCNA
    • ICND1
    • ICND2
    • 101 CCNA LABS
  • CCNP
    • ROUTE
    • SWITCH
    • TSHOOT
    • 101 CCNP LABS
  • CompTIA
    • Security+
    • Network+
  • Design
    • CCDA
    • CCDP
You are here: Home / ROUTE / Module 4 / IGP – Filtering EIGRP Routes

IGP – Filtering EIGRP Routes

Cisco IOS software supports route filtering for both EIGRP and OSPF using distribute lists. In addition to this, both protocols also support additional route filtering mechanisms that are exclusive to each individual protocol. While going into all filtering mechanisms is beyond the scope of the ROUTE exam, you should be intimately familiar with distribute lists and their application when using either OSPF or EIGRP.

NOTE: It should also be noted that redistribution can also be used to filter routing information from external route sources. Redistribution is described in detail later in this chapter.

Filtering EIGRP Routes Using Distribute Lists

A distribute list is can be used to filter incoming or outgoing EIGRP routing updates. Distribute lists can be used in conjunction with ACLs, IP prefix lists, or route maps. A distribute list calls upon an ACL, prefix list, or route map to perform the filtering functions in the inbound or outbound direction. In Cisco IOS software, distribute lists are configured using the distribute-list router configuration command. The options that are available for use with this command are shown below:

R2(config)#router eigrp 2
R2(config-router)#distribute-list ?
<1-199>      IP access list number
<1300-2699>  IP expanded access list number
WORD         Access-list name
gateway      Filtering incoming updates based on gateway
prefix       Filter prefixes in routing updates
route-map    Filter prefixes based on the route-map

As stated earlier in this section, distribute lists can call upon ACLs, which may be named and numbered standard or extended, prefix lists and route maps. In addition, the gateway keyword can also be used to filter updates received from a specific gateway or router. Figure 4-1 shows a basic EIGRP network which includes two routers: R2 and R3. R3 is advertising the 172.16.0.0/24, 172.16.1.0/24, 172.16.2.0/24, 172.16.3.0/24, and the 172.16.4.0/24 subnets to R3:

4-1

Fig. 4-1. EIGRP Distribute List Filtering

Assuming that basic EIGRP configuration has been implemented on both routers, the routing table on R3 shows the following routes are being received from R2:

R3#show ip route eigrp
172.16.0.0/16 is variably subnetted, 10 subnets, 2 masks
D       172.16.4.0/24 [90/156160] via 150.1.1.2, 00:00:19, FastEthernet0/0
D       172.16.0.0/24 [90/156160] via 150.1.1.2, 00:00:19, FastEthernet0/0
D       172.16.1.0/24 [90/156160] via 150.1.1.2, 00:00:19, FastEthernet0/0
D       172.16.2.0/24 [90/156160] via 150.1.1.2, 00:00:19, FastEthernet0/0
D       172.16.3.0/24 [90/156160] via 150.1.1.2, 00:00:19, FastEthernet0/0

Using a simple outbound distribute list, in conjunction with an ACL, it is possible to filter some of the routing updates sent by R2 to R3. The following configuration example illustrates how to filter the 172.16.0.0/24 through 172.16.3.0/24 subnets, while allowing the 172.16.4.0/24 subnet:

R2(config)#access-list 1 remark ‘Deny 172.16.0.0 – 172.16.3.0’
R2(config)#access-list 1 deny 172.16.0.0 0.0.3.255
R2(config)#access-list 1 remark ‘Permit 172.16.4.0’
R2(config)#access-list 1 permit 172.16.4.0
R2(config)#router eigrp 150
R2(config-router)#distribute-list 1 out fastethernet 0/0
R2(config-router)#exit

NOTE: Keep in mind that there are many ways the same goal could be accomplished.

The matches against the ACL can be validated using the show ip access-lists command. The show ip protocolscommand can also be used to validate that the distribute list has been successfully applied. The relevant output printed by this command is highlighted below:

R2#show ip protocols
Routing Protocol is “eigrp 150”
Outgoing update filter list for all interfaces is not set
    FastEthernet0/0 filtered by 1, default is 1
Incoming update filter list for all interfaces is not set
Default networks flagged in outgoing updates[Truncated Output]

And finally, based on the configuration implemented on R2, the routing table on R3 now shows only the 172.16.4.0/24 subnet as illustrated below:

R3#show ip route eigrp
172.16.0.0/16 is variably subnetted, 6 subnets, 2 masks
D       172.16.4.0/24 [90/156160] via 150.1.1.2, 00:06:05, FastEthernet0/0

As another example of the use of distribute lists, consider the topology illustrated in Figure 4-2:

4-2

Fig. 4-2. EIGRP Distribute List Filtering

Referencing the topology illustrated in Figure 4-2, routers R1, R2, R3, and R4 are connected to the same multi-access network segment. All three routers are running EIGRP, using AS 150. Routers R1, R2 and R3 are advertising the 172.16.0.0/24, 172.16.1.0/24, 172.16.2.0/24, 172.16.3.0/24 and 172.16.4.0/24 subnets to R4. The current routing table on R4 shows the following entries:

R4#show ip route eigrp
172.16.0.0/24 is subnetted, 5 subnets
D       172.16.4.0 [90/409600] via 150.1.1.1, 00:00:08, Ethernet0/0
[90/409600] via 150.1.1.3, 00:00:08, Ethernet0/0
[90/409600] via 150.1.1.2, 00:00:08, Ethernet0/0
D       172.16.0.0 [90/409600] via 150.1.1.1, 00:00:08, Ethernet0/0
[90/409600] via 150.1.1.3, 00:00:08, Ethernet0/0
[90/409600] via 150.1.1.2, 00:00:08, Ethernet0/0
D       172.16.1.0 [90/409600] via 150.1.1.1, 00:00:08, Ethernet0/0
[90/409600] via 150.1.1.3, 00:00:08, Ethernet0/0
[90/409600] via 150.1.1.2, 00:00:08, Ethernet0/0
D       172.16.2.0 [90/409600] via 150.1.1.1, 00:00:08, Ethernet0/0
[90/409600] via 150.1.1.3, 00:00:08, Ethernet0/0
[90/409600] via 150.1.1.2, 00:00:08, Ethernet0/0
D       172.16.3.0 [90/409600] via 150.1.1.1, 00:00:08, Ethernet0/0
[90/409600] via 150.1.1.3, 00:00:08, Ethernet0/0
[90/409600] via 150.1.1.2, 00:00:08, Ethernet0/0

Let us assume that management has requested that router R4 only use router R2 to reach any of the 172.16subnets. A possible solution would be to configure outbound distribute lists on routers R1 and R3 filtering these subnets. However, this would effectively mean that these two routers would never advertise these subnets to any other router on the network. This would be an issue if, for example, another router was added to the network.

Configuring an inbound distribute list on R4 using either a prefix list or ACL would deny all the prefixes from all advertising routers. This leaves two possible options, which can both be used to filter based on the source gateway. These two options are using the distribute-list route-map or the distribute-list gateway router configuration commands.

The distribute-list route-map command can be applied to R4 using a route map that filters incoming updates based on the route source (gateway). This is implemented as follows:

R4(config)#access-list 1 remark ‘Permit Routes Only From R2’
R4(config)#access-list 1 permit 150.1.1.2
R4(config)#route-map MYMAP permit 10
R4(config-route-map)#description ‘Match Only Routes From R2’
R4(config-route-map)#match ip route-source 1
R4(config-route-map)#exit
R4(config)#router eigrp 150
R4(config-router)#distribute-list route-map MYMAP in ethernet0/0
R4(config-router)#exit

The configuration above configures an inbound distribute list on R4 that references a route map named MYMAP. This route map matches all routes sourced from the address specified in Access Control List 1. ACL 1, in this example, only matches host address 150.1.1.2 (R2). After the implementation of this configuration, the routing table on R4 shows the following:

R4#show ip route eigrp
172.16.0.0/24 is subnetted, 5 subnets
D       172.16.4.0 [90/409600] via 150.1.1.2, 00:00:03, Ethernet0/0
D       172.16.0.0 [90/409600] via 150.1.1.2, 00:00:03, Ethernet0/0
D       172.16.1.0 [90/409600] via 150.1.1.2, 00:00:03, Ethernet0/0
D       172.16.2.0 [90/409600] via 150.1.1.2, 00:00:03, Ethernet0/0
D       172.16.3.0 [90/409600] via 150.1.1.2, 00:00:03, Ethernet0/0

The second option is to use the distribute-list gateway router configuration command. This configuration is performed as follows:

R4(config)#ip prefix-list MYLIST description ‘Allow Only R2 Updates’
R4(config)#ip prefix-list MYLIST seq 5 permit 150.1.1.2/32
R4(config)#router eigrp 150
R4(config-router)#distribute-list gateway MYLIST in ethernet 0/0
R4(config-router)#exit

Following this configuration, the routing table on R4 shows the following entries:

R4#show ip route eigrp
172.16.0.0/24 is subnetted, 5 subnets
D       172.16.4.0 [90/409600] via 150.1.1.2, 00:00:05, Ethernet0/0
D       172.16.0.0 [90/409600] via 150.1.1.2, 00:00:05, Ethernet0/0
D       172.16.1.0 [90/409600] via 150.1.1.2, 00:00:05, Ethernet0/0
D       172.16.2.0 [90/409600] via 150.1.1.2, 00:00:05, Ethernet0/0
D       172.16.3.0 [90/409600] via 150.1.1.2, 00:00:05, Ethernet0/0

NOTE: The same objective could also be accomplished by performing the following:

R4(config)#ip prefix-list R2ONLY description ‘Allow Only R2 Updates’
R4(config)#ip prefix-list R2ONLY seq 5 permit 150.1.1.2/32
R4(config)#ip prefix-list ALLROUTES description ‘Allow All Routes’
R4(config)#ip prefix-list ALLROUTES seq 5 permit 0.0.0.0/0 le 32
R4(config)#router eigrp 150
R4(config-router)#distribute-list prefix ALLROUTES gateway R2ONLY in eth0/0
R4(config-router)#exit

The configuration above configures a distribute list allows all routes from the R2 to be allowed. Because a prefix list has an implicit deny statement at the end, all routes from gateways not included in the prefix list R2ONLY will be rejected. The result of this configuration is as follows:

R4#show ip route eigrp
172.16.0.0/24 is subnetted, 5 subnets
D       172.16.4.0 [90/409600] via 150.1.1.2, 00:00:53, Ethernet0/0
D       172.16.0.0 [90/409600] via 150.1.1.2, 00:00:53, Ethernet0/0
D       172.16.1.0 [90/409600] via 150.1.1.2, 00:00:53, Ethernet0/0
D       172.16.2.0 [90/409600] via 150.1.1.2, 00:00:53, Ethernet0/0
D       172.16.3.0 [90/409600] via 150.1.1.2, 00:00:53, Ethernet0/0

This configuration can be validated by looking at the router configuration or by using the show ip protocolscommand, the output of which is shown below:

R4#show ip protocols
Routing Protocol is “eigrp 150”
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
    Ethernet0/0 filtered by (prefix-list) ALLROUTES gateway R2ONLY
Default networks flagged in outgoing updates
Default networks accepted from incoming updates
EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
EIGRP maximum hopcount 100
EIGRP maximum metric variance 1
Redistributing: eigrp 150
EIGRP NSF-aware route hold timer is 240s
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
150.1.1.0/24
192.168.1.0
Routing Information Sources:
Gateway         Distance      Last Update
150.1.1.2             90      00:05:09
150.1.1.3             90      00:05:09
150.1.1.1             90      00:05:10
Distance: internal 90 external 170

To view statistics on matches against the configured prefix lists, use the show ip prefix-list detail command as illustrated in the following output:

R4#show ip prefix-list detail
Prefix-list with the last deletion/insertion: R2ONLY
ip prefix-list ALLROUTES:
Description: ‘Allow All Routes’
count: 1, range entries: 1, sequences: 5 – 5, refcount: 3
seq 5 permit 0.0.0.0/0 le 32 (hit count: 5, refcount: 1)
ip prefix-list R2ONLY:
Description: ‘Allow Only R2 Updates’
count: 1, range entries: 0, sequences: 5 – 5, refcount: 4
seq 5 permit 150.1.1.2/32 (hit count: 5, refcount: 1)

As has been illustrated in this section, there are many various configurations that can be used to accomplish the same objective. It is therefore important to have a solid understanding of the current network topology as well as any future proposals or possibilities. A failure to understand the potential implications of your configuration may cause unexpected results and may require the (unnecessary) re-configuration of internetworking devices at a later stage.

Filtering Default Routing Information in EIGRP Networks

In Cisco IOS, the default-information allowed [in | out] router configuration command is used to configure EIGRP to permit or deny default routing information.  By default, all EIGRP routers will always accept and pass default routing information between EIGRP processes. This default behavior can be validated in the output of the show ip protocols command as shown below:

R1#show ip protocols
Routing Protocol is “eigrp 150”
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Default networks flagged in outgoing updates
  Default networks accepted from incoming updates
EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
EIGRP maximum hopcount 100[Truncated Output]

In some cases, it may be necessary to prevent the default route from being advertised into or out of the EIGRP autonomous system. To demonstrate where filtering the default route would be a recommended solution, consider the topology illustrated in Figure 4-3 for example:

4-3

Fig. 4-3. EIGRP Default Route Filtering

Referencing the topology illustrated in Figure 4-3, routers R1 and R2 reside within the EIGRP domain belonging to Company Z. R2 has a connection to R3 which belongs to a partner of Company Z. Because both companies are using EIGRP within their interior networks, they decide to use a unique autonomous system between their two interconnect routers R2 and R3.

R2 is redistributing routing information received from the partner and advertising it to the rest of the EIGRP domain belonging to Company Z. R3 is redistributing routing information received from Company Z and advertising it into the rest of the EIGRP domain belonging to the partner. This allows for network connectivity between the two sites.

Now, assume that Company Zs partner has flagged the 200.254.1.0/24 subnet as a network of last resort. This network is flagged as the default network and is received with all the routes received from the partner as shown below on R2:

R2#show ip route eigrp
D    200.254.4.0/24 [90/2297856] via 10.99.99.3, 00:00:12, Serial0/0
D    200.254.5.0/24 [90/2297856] via 10.99.99.3, 00:00:12, Serial0/0
D*   200.254.1.0/24 [90/2172416] via 10.99.99.3, 00:00:12, Serial0/0
D    200.254.2.0/24 [90/2297856] via 10.99.99.3, 00:00:12, Serial0/0
D    200.254.3.0/24 [90/2297856] via 10.99.99.3, 00:00:12, Serial0/0

Because R2 is redistributing the routes received from the partner network into Company Zs EIGRP domain, this network is also advertised to R1 as a candidate default path:

R1#show ip route 200.254.1.0 255.255.255.0
Routing entry for 200.254.1.0/24
Known via “eigrp 150”, distance 170, metric 2174976, candidate default path, type external
Redistributing via eigrp 150
Last update from 150.1.1.2 on FastEthernet0/0, 00:00:55 ago
Routing Descriptor Blocks:
* 150.1.1.2, from 150.1.1.2, 00:00:55 ago, via FastEthernet0/0
Route metric is 2174976, traffic share count is 1
Total delay is 20200 microseconds, minimum bandwidth is 1544 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 2

Company Z does not want this default path in their network; however, they still want routing information for the 200.254.1.0/24 subnet. If a distribute list was used to filter this network, reachability to the 200.254.1.0/24 subnet would be lost as R2 would not advertise this to the rest of the EIGRP domain belonging to Company Z. In this situation, the default-information allowed [in | out] router configuration command can be used to ‘un-flag’ the 200.254.1.0/24 subnet as a candidate default, while still allowing the subnet to be advertised in throughout the EIGRP domain belonging to Company Z. This is performed as follows:

R2(config)#router eigrp 150
R2(config-router)#no default-information allowed out
R2(config-router)#exit

Again, this configuration can be validated using the show ip protocols command:

R2#show ip protocols
Routing Protocol is “eigrp 150”
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Default networks not flagged in outgoing updates
Default networks accepted from incoming updates
EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
EIGRP maximum hopcount 100[Truncated Output]

Following this configuration, R2 ‘un-flags’ the 200.254.1.0/24 subnet as a candidate default but still advertises it to R1. On R1, the route now shows as follows:

R1#show ip route 200.254.1.0 255.255.255.0
Routing entry for 200.254.1.0/24
Known via “eigrp 150”, distance 170, metric 2174976, type external
Redistributing via eigrp 150
Last update from 150.1.1.2 on FastEthernet0/0, 00:26:08 ago
Routing Descriptor Blocks:
* 150.1.1.2, from 150.1.1.2, 00:26:08 ago, via FastEthernet0/0
Route metric is 2174976, traffic share count is 1
Total delay is 20200 microseconds, minimum bandwidth is 1544 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 2

An alternate configuration would be to configure the default-information allowed in router configuration command on R1. However, if R2 has more than one EIGRP neighbor, this command would need to be applied to all neighbors. While the ultimate result is the same, applying the command to one router (R2) versus applying it to several routers makes more sense from a network design and implementation perspective. Additionally, it also validates your understanding of EIGRP and its capabilities in Cisco IOS software

Prev

Next

About Us

This is a free bonus site for members of www.howtonetwork.com

Copyright

The content on this copyright Reality Press Ltd.
Copyright Reality Press Ltd.