Flexion.Org
Bad grammar and typos for total strangers
Wiki › Draytek Vigor2600 G
Wiki Index All Recent Edit Bottom

Draytek Vigor 2600G

1.   Introduction
2.   Fixed IP address via DHCP
3.   syslog
3.1   Log Rotation
4.   MRTG
4.1   ADSL SNR and Attenuation

Introduction

Here are some quick and dirty guides to use Ubuntu to capture logs from and monitor the status of a Draytek Vigor 2600G router. Plus some other related tips.

Fixed IP address via DHCP

There is no web interface to configure fixed IP address which are given to DHCP clients, therefore it has to be done via the Vigor shell.

Once you have established a telnet session to the Vigor fixed IP addresss for a given host can be defined as follows.

 srv dhcp fixip add <IP Addr> <MAC Addr XX-XX-XX-XX-XX-XX> <Host ID>

Here are some examples...

 srv dhcp fixip add 192.168.1.100 xx-04-23-6B-3E-F9 louise-laptop
 srv dhcp fixip add 192.168.1.101 xx-1E-4F-BA-6B-F3 holly
 srv dhcp fixip add 192.168.1.102 xx-1D-0D-B0-F6-ED ps3

syslog

First configure your Vigor 2600G to syslog events to the IP address of your syslog server. The 2600G has the following syslog facilities...

  • local0: Firewall-Log
  • local1: VPN-Log
  • local2: User-Access-Log
  • local3: Call-Log
  • local4: WAN-Log
  • local5: ADSL Status & Traffic Statistics

To enable to remote UDP logging on your server...

 sudo nano /etc/defaults/syslogd

...and add '-r' to the SYSLOGD so it now reads...

 SYSLOGD="-r"

NOTE! Configure any firewalls on your syslog server to allow incoming packets on UDP/514 from your Draytek router IP address.

 sudo nano /etc/syslog.conf

Add the following before the 'catch-all' section...

 # Logging for the router
 local0.* -/var/log/router-firewall.log
 local1.* -/var/log/router-vpn.log
 local2.* -/var/log/router-useraccess.log
 local3.* -/var/log/router-call.log
 local4.* -/var/log/router-wan.log
 local5.* -/var/log/router-adsl.log

Restart syslogd.

 sudo /etc/init.d/sysklogd restart

Log Rotation

Logfiles can grow, and grow, and grow. If left unchecked you can easily fill a disk with a large collection of logfiles. To prevent the router logs from getting out of control we will rotate them.

 sudo nano /etc/logrotate.d/router

Sample

 /var/log/router-*.log {
     rotate 14
     daily
     compress
     missingok
 }

Reference

MRTG

 sudo apt-get install mrtg
 sudo cfgmaker --global 'WorkDir: /var/www/mrtg' --global 'Options[_]: bits,growright' --output /etc/mrtg.cfg public@192.168.1.1
 sudo mrtg /etc/mrtg.cfg
 sudo indexmaker /etc/mrtg.cfg --output /var/www/mrtg/index.html
 sudo indexmaker --output=/var/www/mrtg/index.html --title="Home Network Statistics" --columns=1 /etc/mrtg.cfg

Create the MRTG cron job

 sudo vi /etc/cron.d/mrtg

Sample

 0-55/5 * * * *   root    export LANG=C ; if [ -x /usr/bin/mrtg ] && [ -r /etc/mrtg.cfg ]; then /usr/bin/mrtg /etc/mrtg.cfg >> /var/log/mrtg/mrtg.log 2>&1; fi

ADSL SNR and Attenuation

 sudo vi /usr/local/bin/adslstats.sh
 sudo chmod 755 /usr/local/bin/adslstats.sh

$Id: DraytekVigor2600G,v 1.6 2008/08/16 11:27:08 martin Exp $

Wiki Index All Recent Edit Top
 
Valid XHTML Valid CSS Hacker