📄 main.texi
字号:
@node Zebra@comment node-name, next, previous, up@chapter Zebra@c SYNOPSIS@command{zebra} is an IP routing manager. It provides kernel routingtable updates, interface lookups, and redistribution of routes betweendifferent 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 zebraBesides the common invocation options (@pxref{Common Invocation Options}), the@command{zebra} specific invocation options are listed below.@table @samp@item -b@itemx --batchRuns in batch mode. @command{zebra} parses configuration file and terminatesimmediately.@item -k@itemx --keep_kernelWhen zebra starts up, don't delete old self inserted routes.@item -l@itemx --log_modeSet verbose logging on.@item -r@itemx --retainWhen 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 OSPFcost. 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 CommandsStatic routing is a very fundamental feature of routing technology. Itdefines 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} isA.B.C.D format. It is taken as a IPv4 address gateway. Otherwise itis treated as an interface name.@exampleip route 10.0.0.0/8 10.0.0.2ip route 10.0.0.0/8 ppp0@end exampleFirst 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} isA.B.C.D format, user must define @var{netmask} value with A.B.C.Dformat. @var{gateway} is same option as above command@exampleip route 10.0.0.0 255.255.255.0 10.0.0.2ip route 10.0.0.0 255.255.255.0 ppp0@end exampleThis is a same setting using this statement.@end deffn@deffn Command {ip route @var{network} @var{gateway} @var{distance}} {}@end deffnMultiple nexthop static route@exampleip route 10.0.0.1/32 10.0.0.2ip route 10.0.0.1/32 10.0.0.3ip route 10.0.0.1/32 eth0@end exampleIf there is no route to 10.0.0.2 and 10.0.0.3, and interface eth0is reachable, then the last route is installed into the kernel.@examplezebra> show ip routeS> 10.0.0.1/32 [1/0] via 10.0.0.2 inactive via 10.0.0.3 inactive * is directly connected, eth0@end exampleFloating 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 worksfor kernels supporting multiple routing tables (like GNU/Linux 2.2.xand 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@groupRouter# 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.241S 0.0.0.0/0 203.181.89.1C* 127.0.0.0/8 loC* 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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -