blob: 7043bf143689b20c946060f957e094174e0c9273 [file] [log] [blame]
paul718e3742002-12-13 20:15:29 +00001@node Zebra
2@comment node-name, next, previous, up
3@chapter Zebra
4
5@c SYNOPSIS
6@command{zebra} is an IP routing manager. It provides kernel routing
7table updates, interface lookups, and redistribution of routes between
8different routing protocols.
9
10@menu
11* Invoking zebra:: Running the program
12* Interface Commands:: Commands for zebra interfaces
13* Static Route Commands:: Commands for adding static routes
14* zebra Terminal Mode Commands:: Commands for zebra's VTY
15@end menu
16
17
18@node Invoking zebra, Interface Commands, Zebra, Zebra
19@comment node-name, next, previous, up
20@section Invoking zebra
21
22Besides the common invocation options (@pxref{Common Invocation Options}), the
23@command{zebra} specific invocation options are listed below.
24
25@table @samp
26@item -b
27@itemx --batch
28Runs in batch mode. @command{zebra} parses configuration file and terminates
29immediately.
30
31@item -k
32@itemx --keep_kernel
33When zebra starts up, don't delete old self inserted routes.
34
35@item -l
36@itemx --log_mode
37Set verbose logging on.
38
39@item -r
40@itemx --retain
41When program terminates, retain routes added by zebra.
42
43@end table
44
45@node Interface Commands, Static Route Commands, Invoking zebra, Zebra
46@comment node-name, next, previous, up
47@section Interface Commands
48
49@deffn Command {interface @var{ifname}} {}
50@end deffn
51
52@deffn {Interface Command} {shutdown} {}
53@deffnx {Interface Command} {no shutdown} {}
54Up or down the current interface.
55@end deffn
56
57@deffn {Interface Command} {ip address @var{address}} {}
58Set ip address for the interface.
59@end deffn
60
61@deffn {Interface Command} {description @var{description} ...} {}
62Set description for the interface.
63@end deffn
64
65@deffn {Interface Command} {multicast} {}
66@deffnx {Interface Command} {no multicast} {}
67Enable or disables multicast flag for the interface.
68@end deffn
69
70@deffn {Interface Command} {bandwidth <1-10000000>} {}
71@deffnx {Interface Command} {no bandwidth <1-10000000>} {}
72Set bandwidth value to the interface. This is for calculating OSPF
73cost. This command does not affect the actual device configuration.
74@end deffn
75
76@node Static Route Commands, zebra Terminal Mode Commands, Interface Commands, Zebra
77@comment node-name, next, previous, up
78@section Static Route Commands
79
80Static routing is a very fundamental feature of routing technology. It
81defines static prefix and gateway.
82
83@deffn Command {ip route @var{network} @var{gateway}} {}
84@var{network} is destination prefix with format of A.B.C.D/M.
85@var{gateway} is gateway for the prefix. When @var{gateway} is
86A.B.C.D format. It is taken as a IPv4 address gateway. Otherwise it
87is treated as an interface name.
88
89@example
90ip route 10.0.0.0/8 10.0.0.2
91ip route 10.0.0.0/8 ppp0
92@end example
93
94First example defines 10.0.0.0/8 static route with gateway 10.0.0.2.
95Second one defines the same prefix but with gateway to interface ppp0.
96@end deffn
97
98@deffn Command {ip route @var{network} @var{netmask} @var{gateway}} {}
99This is alternate version of above command. When @var{network} is
100A.B.C.D format, user must define @var{netmask} value with A.B.C.D
101format. @var{gateway} is same option as above command
102
103@example
104ip route 10.0.0.0 255.255.255.0 10.0.0.2
105ip route 10.0.0.0 255.255.255.0 ppp0
106@end example
107
108This is a same setting using this statement.
109@end deffn
110
111@deffn Command {ip route @var{network} @var{gateway} @var{distance}} {}
112
113@end deffn
114
115Multiple nexthop static route
116
117@example
118ip route 10.0.0.1/32 10.0.0.2
119ip route 10.0.0.1/32 10.0.0.3
120ip route 10.0.0.1/32 eth0
121@end example
122
123If there is no route to 10.0.0.2 and 10.0.0.3, and interface eth0
124is reachable, then the last route is installed into the kernel.
125
126@example
127zebra> show ip route
128S> 10.0.0.1/32 [1/0] via 10.0.0.2 inactive
129 via 10.0.0.3 inactive
130 * is directly connected, eth0
131@end example
132
133Floating static route
134
135@deffn Command {ipv6 route @var{network} @var{gateway}} {}
136
137@end deffn
138
139@deffn Command {ipv6 route @var{network} @var{gateway} @var{distance}} {}
140
141@end deffn
142
143
144@deffn Command {table @var{tableno}} {}
145Select the primary kernel routing table to be used. This only works
146for kernels supporting multiple routing tables (like GNU/Linux 2.2.x
147and later). After setting @var{tableno} with this command,
148static routes defined after this are added to the specified table.
149@end deffn
150
151@node zebra Terminal Mode Commands, , Static Route Commands, Zebra
152@comment node-name, next, previous, up
153@section zebra Terminal Mode Commands
154
155@deffn Command {show ip route} {}
156Display current routes which zebra holds in its database.
157
158@example
159@group
160Router# show ip route
161Codes: K - kernel route, C - connected, S - static, R - RIP,
162 B - BGP * - FIB route.
163
164K* 0.0.0.0/0 203.181.89.241
165S 0.0.0.0/0 203.181.89.1
166C* 127.0.0.0/8 lo
167C* 203.181.89.240/28 eth0
168@end group
169@end example
170@end deffn
171
172@deffn Command {show ipv6 route} {}
173@end deffn
174
175@deffn Command {show interface} {}
176@end deffn
177
178@deffn Command {show ipforward} {}
179Display whether the host's IP forwarding function is enabled or not.
180Almost any UNIX kernel can be configured with IP forwarding disabled.
181If so, the box can't work as a router.
182@end deffn
183
184@deffn Command {show ipv6forward} {}
185Display whether the host's IP v6 forwarding is enabled or not.
186@end deffn