This example shows the use of the NULL0 interface.
In this example, the use of the NULL0 interface is only applicable to frames that meet the match criteria defined in the created ACL.
device(config)# ip access-list standard Jules device(conf-ipacl-std)# permit 192.168.0.0 255.255.255.0 device(conf-ipacl-std)# deny 192.168.1.1 255.255.255.0 device(config)# ip access-list standard Vincent device(conf-ipacl-std)# permit 192.168.2.2 255.255.255.0
device(config)# route-map pulp_fiction permit 10 device(config-routemap-pulp_fiction/permit/10)# match ip address acl Jules device(config-routemap-pulp_fiction/permit/10)# set ip vrf pulp_fiction next-hop 3.3.3.3 device(config-routemap-pulp_fiction/permit/10)# set ip interface NULL0
device(config)# route-map pulp_fiction permit 20 device(config-routemap-pulp_fiction/permit/20)# match ip address acl Vincent device(config-routemap-pulp_fiction/permit/20)# set ip vrf pulp_fiction next-hop 3.3.3.5
device(config)# route-map pulp_fiction permit 30 device(config-routemap-pulp_fiction/permit/30)# set ip interface NULL0
The above configuration introduces a third stanza that defines the routing desired for all frames that do not meet any of the match criteria defined by the route map.
Based on the above configuration, when address 192.168.0.0 255.255.255.0 is received, it matches stanza 10:
Providing the default stanza enables a mechanism whereby if any packet is received that does not meet the match criteria set by the route map, the traffic is dropped.