Route-map is a rule on Router for modification routing information. Its can use for determine path, filtering, etc. At this post I will make a sample route-map for filtering on eigrp routing protocol. Refer to Figure 1 below, i just use two router, in fact on HO Environment will be a few router and switch. See HO configuration, I assume others network devices with a loopback address, you can see in description loopback interface.
HO Router configuration :
HO#show run Building configuration... --output omitted ! interface Loopback1 description subnet-dns ip address 192.168.1.1 255.255.255.0 ! interface Loopback2 description subnet-smtp ip address 192.168.2.1 255.255.255.0 ! interface Loopback3 description subnet-proxy ip address 192.168.3.1 255.255.255.0 ! interface Loopback11 description CORE1 ip address 172.16.1.1 255.255.255.252 ! interface Loopback12 description CORE2 ip address 172.16.2.1 255.255.255.252 ! interface Loopback21 description sales ip address 192.168.11.1 255.255.255.0 ! interface Loopback22 description engineer ip address 192.168.12.1 255.255.255.0 ! interface FastEthernet0/0 description TO BRANCH ip address 184.108.40.206 255.255.255.252 duplex auto speed auto ! router eigrp 10 network 220.127.116.11 0.0.0.3 network 172.16.1.0 0.0.0.3 network 172.16.2.0 0.0.0.3 network 192.168.1.0 network 192.168.2.0 network 192.168.3.0 network 192.168.11.0 network 192.168.12.0 distribute-list route-map server-netdevices out no auto-summary ! ip prefix-list local-user seq 10 permit 192.168.12.0/24 ! ip prefix-list network-devices seq 5 permit 172.16.1.0/30 ip prefix-list network-devices seq 10 permit 172.16.2.0/30 ! ip prefix-list server seq 5 permit 192.168.1.0/24 ip prefix-list server seq 10 permit 192.168.2.0/24 ip prefix-list server seq 15 permit 192.168.3.0/24 ! route-map server-netdevices deny 8 match ip address prefix-list local-user ! route-map server-netdevices deny 13 match ip address prefix-list network-devices ! route-map server-netdevices permit 18 ! --ouput omitted end
– Loopback 1-3 is server subnet in HO that must can be reach from Branch
– Loopback 11-12 is point-to-point ip addresses in HO Environment that must can’t be reach from Branch
– Loopback 21-22 is local user in HO that must can’t be reach from Branch
In this case, HO router has a few routing information (from other network devices) that will not be sent to Branch router. So, Branch router has not full routing information from HO router. Branch just have Server ip Networks from HO.
In route-map we can use many attribute for grab ip address, in this case i will use prefix-list. If on route-map using deny, we must use permit on acl/prefix-list, otherwise it will ignore.
Branch#sh ip route eigrp 18.104.22.168/8 is variably subnetted, 2 subnets, 2 masks D 22.214.171.124/8 is a summary, 00:00:19, Null0 D 192.168.1.0/24 [90/409600] via 126.96.36.199, 00:00:17, FastEthernet0/0 D 192.168.2.0/24 [90/409600] via 188.8.131.52, 00:00:17, FastEthernet0/0 D 192.168.3.0/24 [90/409600] via 184.108.40.206, 00:00:17, FastEthernet0/0 Branch#