table-map
â– Use to apply a policy to BGP routes about to be added to the IP routing table.
â– The route map can include any of the clauses listed in Table 18 on page 81.
â– The new route map is applied to all routes that are subsequently placed in the
IP routing table. To apply the new table map to routes that are already present
in the IP routing table, you must refresh the IP routing table with the clear ip
routes * command or the clear ip bgp * command (this command will bounce
the BGP sessions).
â– Example
host1(config-router)#table-map distmet1
host1(config-router)#exit
host1(config)#exit
host1#clear ip routes *
â– Use the no version to halt application of the route map.
â– See table-map.
For example, suppose you want to change the distance and metric attributes to
particular values for routes advertised by a members of a particular community. The
show ip route bgp command indicates that the routes currently in the table have a
variety of values for these attributes:
host1#show ip route bgp
Protocol/Route type codes:
I1- ISIS level 1, I2- ISIS level2,
I- route type intra, IA- route type inter, E- route type external,
i- metric type internal, e- metric type external,
O- OSPF, E1- external type 1, E2- external type2,
N1- NSSA external type1, N2- NSSA external type2
Prefix/Length Type Next Hop Dist/Met Intf
------------------ ------- --------------- -------------- ------------
10.100.3.3/32 Bgp 10.12.12.1 20/0 ATM5/1.12
10.63.42.23/32 Bgp 10.45.2.31 12/5 ATM5/1.14
The following commands demonstrate how you can apply the policy to change these
values:
host1(config)#route-map distmet1 permit 5
host1(config-route-map)#match community boston42
host1(config-route-map)#set distance 33
host1(config-route-map)#set metric 44
host1(config-route-map)#exit
host1(config)#router bgp 100
host1(config-router)#table-map distmet1
host1(config-router)#exit
host1(config)#exit
host1#clear ip routes *
The show ip route bgp command reveals the new values:
host1#show ip route bgp
Protocol/Route type codes:
82 â– Configuring BGP Routing Policy
JUNOSe 11.1.x BGP and MPLS Configuration Guide