summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPaul Jakma <paul.jakma@sun.com>2007-05-02 16:05:35 +0000
committerPaul Jakma <paul.jakma@sun.com>2007-05-02 16:05:35 +0000
commit7514fb7739f74311830e9ddd1381d0d228224f61 (patch)
tree4d4b9a4fdfcea4cb6fa496085327f1aae9a9a380 /doc
parent5fa05099567bbe42aae87a9bef8fd630b3666a4d (diff)
[zebra] Routemap support on received routes, with 'set src' command (linux)
2007-05-01 David L Stevens <dlstevens@us.ibm.com> * (general) These changes collectively add route-map and prefix-list support to zebra and fix a bug in "show route-map" (with no argument). * doc/main.texi: added route-map, prefix-list, ip protocol and set src documentation * lib/command.h: added PROTOCOL_NODE type * lib/log.c: (proto_name2num) new function, protocol name to number translation. * lib/routemap.c: (vty_show_route_map) fixed "show route-map" without route-map name * lib/routemap.h: added RMAP_ZEBRA type * lib/zebra.h: added proto_name2num() prototype * vtysh/extract.pl.in: added VTYSH_ZEBRA flag for route-map and plist * vtysh/Makefile.am: added zebra_routemap.c * vtysh/vtysh.h: added VTYSH_ZEBRA flag to VTYSH_RMAP * zebra/connected.c: (connected_up_ipv4) added src preference argument to rib_add_ipv4() * zebra/kernel_socket.c: (rtm_read) ditto * zebra/main.c: added prefix list initialization * zebra/Makefile.am: added zebra_routemap.c source file * zebra/rib.h: added generic address union "g_addr" and use in existing places that had an explicit union. Added "src" to struct nexthop. Added preferred src arg to nexthop_ipv4_add and rib_add_ipv4. * zebra/rt_netlink.c: (netlink_routing_table) set preferred source on netlink messages. (netlink_route_change) ditto (netlink_route_multipath) ditto. * zebra/rtread_getmsg.c: (handle_route_entry) added (NULL) src to rib_add_ipv4() call. * zebra/rtread_proc.c: (proc_route_read) ditto * zebra/zebra_rib.c: (nexthop_ipv4_add) add src argument. (nexthop_ipv4_ifindex_add) ditto (rib_add_ipv4) ditto (nexthop_active_check) Add route-map processing. * zebra/zebra_routemap.c: new file for zebra route-map commands. * zebra/zebra_vty.c: (ip_protocol_cmd) Apply route-map to protocol (vty_show_ip_route_detail) added "src" printing (vty_show_ip_route) ditto (show_ip_protocol_cmd) new command, list routemaps. (config_write_protocol) write out routemap protocl config. (zebra_vty_init) Install the new routemap protocol commands. * zebra/zserv.c: (zread_ipv4_add) added (NULL) src arg (zebra_init) init zebra route-maps. * zebra/zserv.h: add zebra_route_map_init
Diffstat (limited to 'doc')
-rw-r--r--doc/ChangeLog5
-rw-r--r--doc/main.texi53
2 files changed, 58 insertions, 0 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 586852c6..b8c81e74 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,8 @@
+2007-05-01 David L Stevens <dlstevens@us.ibm.com>
+
+ * main.texi: added route-map, prefix-list, ip protocol
+ and set src documentation
+
2007-04-30 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* ospfd.texi: Add a paragraph to the description of the OSPFv2
diff --git a/doc/main.texi b/doc/main.texi
index b76a636b..9966b356 100644
--- a/doc/main.texi
+++ b/doc/main.texi
@@ -10,6 +10,7 @@ different routing protocols.
* Invoking zebra:: Running the program
* Interface Commands:: Commands for zebra interfaces
* Static Route Commands:: Commands for adding static routes
+* zebra Route Filtering:: Commands for zebra route filtering
* zebra Terminal Mode Commands:: Commands for zebra's VTY
@end menu
@@ -183,6 +184,49 @@ and later). After setting @var{tableno} with this command,
static routes defined after this are added to the specified table.
@end deffn
+@node zebra Route Filtering
+@section zebra Route Filtering
+Zebra supports @command{prefix-list} and @command{route-map} to match
+routes received from other quagga components. The
+@command{permit}/@command{deny} facilities provided by these commands
+can be used to filter which routes zebra will install in the kernel.
+
+@deffn Command {ip protocol @var{protocol} route-map @var{routemap}} {}
+Apply a route-map filter to routes for the specified protocol. @var{protocol}
+can be @b{any} or one of
+@b{system},
+@b{kernel},
+@b{connected},
+@b{static},
+@b{rip},
+@b{ripng},
+@b{ospf},
+@b{ospf6},
+@b{isis},
+@b{bgp},
+@b{hsls}.
+@end deffn
+
+@deffn {Route Map} {set src @var{address}}
+Within a route-map, set the preferred source address for matching routes
+when installing in the kernel.
+@end deffn
+
+@example
+The following creates a prefix-list that matches all addresses, a route-map
+that sets the preferred source address, and applies the route-map to all
+@command{rip} routes.
+
+@group
+ip prefix-list ANY permit 0.0.0.0/0 le 32
+route-map RM1 permit 10
+ match ip address prefix-list ANY
+ set src 10.0.0.1
+
+ip protocol rip route-map RM1
+@end group
+@end example
+
@node zebra Terminal Mode Commands
@section zebra Terminal Mode Commands
@@ -209,6 +253,15 @@ C* 203.181.89.240/28 eth0
@deffn Command {show interface} {}
@end deffn
+@deffn Command {show ip prefix-list [@var{name}]} {}
+@end deffn
+
+@deffn Command {show route-map [@var{name}]} {}
+@end deffn
+
+@deffn Command {show ip protocol} {}
+@end deffn
+
@deffn Command {show ipforward} {}
Display whether the host's IP forwarding function is enabled or not.
Almost any UNIX kernel can be configured with IP forwarding disabled.