blob: 11351a49527221d83d73ba8817bd510bafaf985e [file] [log] [blame]
paul76b89b42004-11-06 17:13:09 +00001@node Route Map
paul718e3742002-12-13 20:15:29 +00002@chapter Route Map
3
4Route map is a very useful function in zebra. There is a match and set
5statement permitted in a route map.
6
7@example
8@group
9route-map test permit 10
10 match ip address 10
11 set local-preference 200
12@end group
13@end example
14
15This means that if a route matches ip access-list number 10 it's
16local-preference value is set to 200.
17
18@menu
19* Route Map Command::
20* Route Map Match Command::
21* Route Map Set Command::
22@end menu
23
paul76b89b42004-11-06 17:13:09 +000024@node Route Map Command
25@section Route Map Command
paul718e3742002-12-13 20:15:29 +000026
27@deffn {Command} {route-map @var{route-map-name} permit @var{priority}} {}
28@end deffn
29
paul76b89b42004-11-06 17:13:09 +000030@node Route Map Match Command
31@section Route Map Match Command
paul718e3742002-12-13 20:15:29 +000032
33@deffn {Route-map Command} {match ip address @var{access_list}} {}
34Matches the specified @var{access_list}
35@end deffn
36
37@deffn {Route-map Command} {match ip next-hop @var{ipv4_addr}} {}
38Matches the specified @var{ipv4_addr}.
39@end deffn
40
41@deffn {Route-map Command} {match aspath @var{as_path}} {}
42Matches the specified @var{as_path}.
43@end deffn
44
45@deffn {Route-map Command} {match metric @var{metric}} {}
46Matches the specified @var{metric}.
47@end deffn
48
49@deffn {Route-map Command} {match community @var{community_list}} {}
50Matches the specified @var{community_list}
51@end deffn
52
paul76b89b42004-11-06 17:13:09 +000053@node Route Map Set Command
54@section Route Map Set Command
paul718e3742002-12-13 20:15:29 +000055
56@deffn {Route-map Command} {set ip next-hop @var{ipv4_address}} {}
57Set the BGP nexthop address.
58@end deffn
59
60@deffn {Route-map Command} {set local-preference @var{local_pref}} {}
61Set the BGP local preference.
62@end deffn
63
64@deffn {Route-map Command} {set weight @var{weight}} {}
65Set the route's weight.
66@end deffn
67
68@deffn {Route-map Command} {set metric @var{metric}} {}
69Set the BGP attribute MED.
70@end deffn
71
72@deffn {Route-map Command} {set as-path prepend @var{as_path}} {}
73Set the BGP AS path to prepend.
74@end deffn
75
76@deffn {Route-map Command} {set community @var{community}} {}
77Set the BGP community attribute.
78@end deffn
79
80@deffn {Route-map Command} {set ipv6 next-hop global @var{ipv6_address}} {}
81Set the BGP-4+ global IPv6 nexthop address.
82@end deffn
83
84@deffn {Route-map Command} {set ipv6 next-hop local @var{ipv6_address}} {}
85Set the BGP-4+ link local IPv6 nexthop address.
86@end deffn
87