| 代碼: |
./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 |
新聞熱點
疑難解答