summaryrefslogtreecommitdiff
path: root/doc/main.texi
blob: 7043bf143689b20c946060f957e094174e0c9273 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
@node Zebra
@comment  node-name,  next,  previous,  up
@chapter Zebra

@c SYNOPSIS
@command{zebra} is an IP routing manager.  It provides kernel routing
table updates, interface lookups, and redistribution of routes between
different routing protocols.

@menu
* Invoking zebra::              Running the program
* Interface Commands::          Commands for zebra interfaces
* Static Route Commands::       Commands for adding static routes
* zebra Terminal Mode Commands::  Commands for zebra's VTY
@end menu


@node Invoking zebra, Interface Commands, Zebra, Zebra
@comment  node-name,  next,  previous,  up
@section Invoking zebra

Besides the common invocation options (@pxref{Common Invocation Options}), the
@command{zebra} specific invocation options are listed below.

@table @samp
@item -b
@itemx --batch
Runs in batch mode.  @command{zebra} parses configuration file and terminates
immediately.

@item -k
@itemx --keep_kernel
When zebra starts up, don't delete old self inserted routes.

@item -l
@itemx --log_mode
Set verbose logging on.

@item -r
@itemx --retain
When program terminates, retain routes added by zebra.

@end table

@node Interface Commands, Static Route Commands, Invoking zebra, Zebra
@comment  node-name,  next,  previous,  up
@section Interface Commands

@deffn Command {interface @var{ifname}} {}
@end deffn

@deffn {Interface Command} {shutdown} {}
@deffnx {Interface Command} {no shutdown} {}
Up or down the current interface.
@end deffn

@deffn {Interface Command} {ip address @var{address}} {}
Set ip address for the interface.
@end deffn

@deffn {Interface Command} {description @var{description} ...} {}
Set description for the interface.
@end deffn

@deffn {Interface Command} {multicast} {}
@deffnx {Interface Command} {no multicast} {}
Enable or disables multicast flag for the interface.
@end deffn

@deffn {Interface Command} {bandwidth <1-10000000>} {}
@deffnx {Interface Command} {no bandwidth <1-10000000>} {}
Set bandwidth value to the interface.  This is for calculating OSPF
cost.  This command does not affect the actual device configuration.
@end deffn

@node Static Route Commands, zebra Terminal Mode Commands, Interface Commands, Zebra
@comment  node-name,  next,  previous,  up
@section Static Route Commands

Static routing is a very fundamental feature of routing technology.  It
defines static prefix and gateway.

@deffn Command {ip route @var{network} @var{gateway}} {}
@var{network} is destination prefix with format of A.B.C.D/M.
@var{gateway} is gateway for the prefix.  When @var{gateway} is
A.B.C.D format.  It is taken as a IPv4 address gateway.  Otherwise it
is treated as an interface name.

@example
ip route 10.0.0.0/8 10.0.0.2
ip route 10.0.0.0/8 ppp0
@end example

First example defines 10.0.0.0/8 static route with gateway 10.0.0.2.
Second one defines the same prefix but with gateway to interface ppp0.
@end deffn

@deffn Command {ip route @var{network} @var{netmask} @var{gateway}} {}
This is alternate version of above command.  When @var{network} is
A.B.C.D format, user must define @var{netmask} value with A.B.C.D
format.  @var{gateway} is same option as above command

@example
ip route 10.0.0.0 255.255.255.0 10.0.0.2
ip route 10.0.0.0 255.255.255.0 ppp0
@end example

This is a same setting using this statement.
@end deffn

@deffn Command {ip route @var{network} @var{gateway} @var{distance}} {}

@end deffn

Multiple nexthop static route

@example
ip route 10.0.0.1/32 10.0.0.2
ip route 10.0.0.1/32 10.0.0.3
ip route 10.0.0.1/32 eth0
@end example

If there is no route to 10.0.0.2 and 10.0.0.3, and interface eth0
is reachable, then the last route is installed into the kernel.

@example
zebra> show ip route
S>  10.0.0.1/32 [1/0] via 10.0.0.2 inactive
                      via 10.0.0.3 inactive
  *                   is directly connected, eth0
@end example

Floating static route

@deffn Command {ipv6 route @var{network} @var{gateway}} {}

@end deffn

@deffn Command {ipv6 route @var{network} @var{gateway} @var{distance}} {}

@end deffn


@deffn Command {table @var{tableno}} {}
Select the primary kernel routing table to be used.  This only works
for kernels supporting multiple routing tables (like GNU/Linux 2.2.x
and later).  After setting @var{tableno} with this command, 
static routes defined after this are added to the specified table.
@end deffn

@node zebra Terminal Mode Commands,  , Static Route Commands, Zebra
@comment  node-name,  next,  previous,  up
@section zebra Terminal Mode Commands

@deffn Command {show ip route} {}
Display current routes which zebra holds in its database.

@example
@group
Router# show ip route 
Codes: K - kernel route, C - connected, S - static, R - RIP, 
       B - BGP * - FIB route.

K* 0.0.0.0/0              203.181.89.241
S  0.0.0.0/0              203.181.89.1
C* 127.0.0.0/8            lo
C* 203.181.89.240/28      eth0
@end group
@end example
@end deffn

@deffn Command {show ipv6 route} {}
@end deffn

@deffn Command {show interface} {}
@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.
If so, the box can't work as a router.
@end deffn

@deffn Command {show ipv6forward} {}
Display whether the host's IP v6 forwarding is enabled or not.
@end deffn