文档介绍:Zebra路由软件详细使用教程 [转贴 2008-03-20 21:31:42]   
字号:大 中 小
前言
Zebra是一个路由软件包,提供基于TCP/IP路由服务,支持RIPv1, RIPv2, RIPng, OSPFv2,nge to enable mode.
  exit       Exit current mode and down to previous mode
  help       Description of the interactive help system
  list       Print command list
  no         Negate a command or set its defaults
  quit       Exit current mode and down to previous mode
  show       Show running system information
  terminal   Set terminal line parameters
  who        Display who is on vty
  write      Write running configuration to memory, network, or terminal
提供的命令很少,实际路由器好多命令都没有,我们只能用有限的命令投入到无限的实验中去。
Router# sh run
Current configuration:
!
hostname Router
password zebra
enable password zebra
!
interface lo
!
interface eth0
!
line vty
!
end
Zebra把操作系统的网络接口当做路由器的接口,所以在做比较复杂的路由实验,会需要比较多的网卡。
进入全局模式,尽可能把实际可用的配置命令都实验一遍:
Router# conf t
Router(config)#
自己取一个路由器名字:
Router(config)# hostname r1
r1(config)#
Zebra比较简单,登陆口令不是在line下修改,而是直接在全局模式下用password修改
r1(config)# password {password}
Zebra不支持enable secret {password}这种MD5加密口令,只能使用enable password {password}来修改
enable口令:
r1# conf t
r1(config)# enable password {password}
在路由器配置中加密所有的口令:
r1(config)# service password-encryption
回到特权模式:
r1(config)# exit
r1# sh run
Current configuration:
!
hostname r1
password 8
enable password 8 ksbxOFN8xcFMc
service password-encryption
!
interface lo
!
interface eth0
!
line vty
!
end
我们看到刚才的明文密码都进行加密了,给我们的实验机也提高安全性。Zebra有一点比较恶心,如果我 们先
设置了service password-encryption,然后再修改口令,sh run就发现口令又都是明文的了,但是由 于有
service password-encryption,所以就无法登陆了。
去掉会话超时,免得10分钟没有动作,就把我们给踢了。但是在实际的路由器配置中,为安全起见我们 最好还
是设上会话超时。
r1# conf t
r1(config)# line vty
r1(config-line)# exec-timeout 0 0
设置日志记录,Zebra可以把日志记录到标准输出、syslog、以及指定输出文件:
r1(config-line)# exit
r1(config)# log stdout
r1(config)# no log stdout
r1(config)# log syslog
r1(config)# no log syslog
r1(config)# log file /usr/local/etc/
配置接口IP地址:
r1(config)# int lo