Here’s installation logs including trial and error.
VLAN1 :192.168.1.0/24
VLAN2 : 192.168.0.0/24
VLAN3 : 192.168.2.0/24
client1 -- SW – quagga1 – SW – quagga2 – SW – client2
- Client1 ( VLAN1 )
192.168.01.10
- quagga1
eth0 : 192.168.0.254 ( VLAN2 )
eth1 : 192.168.1.254 ( VLAN1 )
- quagga2
eth0 : 192.168.0.253 ( VLAN1)
eth1 : 192.168.2.254 (VLAN3)
- Client2
192.168.2.10 (VLAN3)
install quagga via yum
# cat /etc/centos-release CentOS release 6.3 (Final) # uname -ri 2.6.32-279.14.1.el6.x86_64 x86_64 # yum install -y quagga |
You may want to install telnet client to connect to quagga if you have not installed it.
# yum install -y telnet |
# rpm -ql `rpm -qa | grep quagga` /etc/logrotate.d/quagga /etc/quagga /etc/quagga/bgpd.conf.sample /etc/quagga/bgpd.conf.sample2 /etc/quagga/ospf6d.conf.sample /etc/quagga/ospfd.conf.sample /etc/quagga/ripd.conf.sample /etc/quagga/ripngd.conf.sample /etc/quagga/vtysh.conf.sample /etc/quagga/zebra.conf.sample /etc/rc.d/init.d/bgpd /etc/rc.d/init.d/ospf6d /etc/rc.d/init.d/ospfd /etc/rc.d/init.d/ripd /etc/rc.d/init.d/ripngd /etc/rc.d/init.d/zebra /etc/sysconfig/quagga <snip> |
# egrep -v ^# /etc/sysconfig/quagga QCONFDIR="/etc/quagga" BGPD_OPTS="-A 127.0.0.1 -f ${QCONFDIR}/bgpd.conf" OSPF6D_OPTS="-A ::1 -f ${QCONFDIR}/ospf6d.conf" OSPFD_OPTS="-A 127.0.0.1 -f ${QCONFDIR}/ospfd.conf" RIPD_OPTS="-A 127.0.0.1 -f ${QCONFDIR}/ripd.conf" RIPNGD_OPTS="-A ::1 -f ${QCONFDIR}/ripngd.conf" ZEBRA_OPTS="-A 127.0.0.1 -f ${QCONFDIR}/zebra.conf" ISISD_OPTS="-A ::1 -f ${QCONFDIR}/isisd.conf" WATCH_OPTS="" WATCH_DAEMONS="zebra bgpd ospfd ospf6d ripd ripngd" |
startup script is /etc/init.d/zebra ?
this script “/etc/init.d/zebra” seems to read /etc/sysconfig/quagga file.
# egrep -i ^conf /etc/init.d/zebra CONF_FILE=/etc/quagga/zebra.conf |
start zebra
# /etc/init.d/zebra start Starting zebra: [ OK ] |
nnn , no log files
# ls /var/log/quagga/ |
# /etc/init.d/zebra status zebra (pid 1261) is running...... |
# lsof -ni:2601 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME zebra 1261 quagga 9u IPv4 8433 0t0 TCP 127.0.0.1:discp-client (LISTEN) |
it seems that only zebra process is running.
# cat /proc/1261/cmdline zebra-d-A127.0.0.1-f/etc/quagga/zebra.conf # cat /proc/1261/environ HOSTNAME=centos6-64-vm1.localdomainTERM=vt100-navSHELL=/bin/bashHISTSIZE=1000USER=rootLS_COLORS=MAIL=/var/spool/mail/rootPATH=/sbin:/usr/sbin:/bin:/usr/binPWD=/rootLANG=CHISTCONTROL=ignoredupsSHLVL=3HOME=/rootLOGNAME=rootLESSOPEN=|/usr/bin/lesspipe.sh %sG_BROKEN_FILENAMES=1_=/usr/sbin/zebra |
config files are stored under /etc/quagga/*.conf
# ls /etc/quagga/*.conf /etc/quagga/vtysh.conf /etc/quagga/zebra.conf |
needs to configure *.conf before starting zebra ?
# cat /etc/quagga/zebra.conf hostname centos6-64-vm1.localdomain # cat /etc/quagga/vtysh.conf # |
stop zebra
# /etc/init.d/zebra stop Shutting down zebra: [ OK ] |
sample configuration files are under /usr/quagga directory.
# ls /etc/quagga/*.sample /etc/quagga/bgpd.conf.sample /etc/quagga/ripngd.conf.sample /etc/quagga/ospf6d.conf.sample /etc/quagga/vtysh.conf.sample /etc/quagga/ospfd.conf.sample /etc/quagga/zebra.conf.sample /etc/quagga/ripd.conf.sample |
about listening port
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 ospfapi 2607/tcp # ospfapi isisd 2608/tcp # ISISd vty |
[ configure zebra.conf ]
# cat zebra.conf hostname quagga1 password zebra enable password zebra |
okay , can logon to the quagga.
# /etc/init.d/zebra start Starting zebra: [ OK ] |
# lsof -ni:2601 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME zebra 1344 quagga 9u IPv4 9224 0t0 TCP 127.0.0.1:discp-client (LISTEN) |
access to quagga over telnet
# telnet 127.1 2601 Trying 127.0.0.1... Connected to 127.1. Escape character is '^]'. Hello, this is Quagga (version 0.99.15). Copyright 1996-2005 Kunihiro Ishiguro, et al. User Access Verification Password: quagga1> ena quagga1> enable Password: quagga1# sho quagga1# show run quagga1# show running-config Current configuration: ! hostname quagga1 password zebra enable password zebra ! interface eth0 ipv6 nd suppress-ra ! interface eth1 ipv6 nd suppress-ra ! interface lo ! ! ! line vty ! end quagga1# |
assign IP addresses on eth0 and eth1
quagga1# configure terminal quagga1(config)# interface eth0 quagga1(config-if)# ip address 192.168.0.254/24 quagga1(config)# interface eth1 quagga1(config-if)# ip address 192.168.1.254/24 quagga1# write memory Configuration saved to /etc/quagga/zebra.conf |
add static route
quagga1(config)# ip route 192.168.2.0 255.255.255.0 192.168.0.253 |
quagga2(config)# ip route 192.168.1.0 255.255.255.0 192.168.0.254 |
enable ip_forwarding on both quagga1 and quagga2 boxes.
# echo 1 > /proc/sys/net/ipv4/ip_forward |
quagga1> show ip forwarding IP forwarding is on |
send icmp packets from client1(192.168.1.10) to client2 (192.168.2.10).
client1 # ping 192.168.2.10 PING 192.168.2.10 (192.168.2.10) 56(84) bytes of data. 64 bytes from 192.168.2.10: icmp_seq=1 ttl=62 time=1.88 ms 64 bytes from 192.168.2.10: icmp_seq=2 ttl=62 time=1.95 ms |
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.