代码: |
./configure make make install |
代码: |
zebrasrv 2600/tcp # zebra service zebra 2601/tcp # zebra vty ripd 2602/tcp # RIPd vty ripngd 2603/tcp # RIPngd vty ospfd 2604/tcp # OSPFd vty bgpd 2605/tcp # BGPd vty ospf6d 2606/tcp # OSPF6d vty |
代码: |
! Zebra configuration saved from vty ! 2002/02/28 01:46:12 ! hostname LinuxRouter /*主机名为 LinuxRouter*/ passWord zebra /*口令为 zebra*/ enable password z3bRa /*进入特权模式时的口令为 z3bRa */ log file /var/log/zebra/zebra.log /*日志文件的地址*/ ! interface eth0 /*以太接口 eth0*/ description Interface to External Network/*对接口的描述*/ ip address 10.0.0.1/24 /*该接口的 IP 地址*/ ! interface eth1/*以太接口 eth0*/ description Interface to Internal Network/*对接口的描述*/ ip address 192.168.66.1/24/*该接口的 IP 地址*/ |
代码: |
/usr/sbin/zebra -dk /usr/sbin/ospfd -d /usr/sbin/bgpd -d |
代码: |
labrat:~# telnet 0 2604 /*Telnet 到本地机器的 2604 端口*/ Trying 0.0.0.0... Connected to 0. Escape character is '^]'. /*用 '^]'退出该会话*/ Hello, this is zebra (version 0.84b) Copyright 1996-2000 Kunihiro Ishiguro User access Verification Password: /*在此键入口令,如 zebra*/ ospfd> enable/*进入特权模式*/ Password: /*输入特权模式口令,如 z3bRa*/ ospfd# configure terminal /*从终端配置路由器*/ ospfd(config)# router ospf /*配置 OSPF*/ ospfd(config-router)# network 192.168.66.0/24 area 0 /*通过 OSPF 广播网络 network 192.168.66.0,/24 指出子网掩码为 24 位,area 0 指出该网络所在的域*/ ospfd(config-router)# passive-interface eth0 /*将 eth0 接口设置成一个被动(passive)接口*/ ospfd(config-router)# end /*退出配置模式*/ ospfd# write file /*保存修改*/ Configuration saved to /etc/zebra/ospfd.conf |
代码: |
labrat:~# telnet 0 2605 Trying 0.0.0.0... Connected to 0. Escape character is '^]'. Hello, this is zebra (version 0.84b) Copyright 1996-2000 Kunihiro Ishiguro User Access Verification Password: bgpd> enable Password: bgpd# configure terminal bgpd(config)# router bgp 65530 /*配置 BGP,65530 是自治系统编号。也就是将该系统配置成自治系统 65530 上的外部网关*/ bgpd(config-router)# network 192.168.66.0/24 /*由 BGP 广播的网络*/ bgpd(config-router)# neighbor 10.0.0.5 remote-as 65531 /*静态指定自治系统 65531 上 IP 地址为 10.0.0.5 的路由器为本机的邻机*/ bgpd(config-router)# end bgpd# write file Configuration saved to /etc/zebra/bgpd.conf |
新闻热点
疑难解答