Configuració d'un Voyage per fer de router troncal
Primer de tot ens hem de baixar la distribució voyage ( que és una debian per aquests sistemes ).
Per tal de poder-lo obtenir podem anar a la pàgina del projecte : http://www.voyage.hk/software/voyage.html
Un cop tenim el tar.gz de la versió actual podem descomprimir-lo ( ho hem de fer com a root ) amb la comanda tar -xvzf voyage-0.2.tar.gz
Seguidament hem de conectar la memoria CF al ordinador mitjançant algun lector de tarjetes. Quan aquest hagi reconegut la tarjeta hem de borrar les particions de FAT que tingui i posar-ne una de EXT2 amb la comanda fdisk. Un cop tenim la partició feta podem formatejar-la i posar el count del ext2 a 0 amb la comanda mkfs.ext2 i tune2fs -c 0. Cal anar amb compte al fer aquestes operacions que posem el dispositiu corresponent a la tarjeta de la memòria ja que en cas contrari podriem esborrar tot el contingut del nostre disc dur.
Quan ja tenim la tarjeta formatejada podem usar la comanda ./usr/local/sbin/voyage-update des de l'arrel del que s'ha descomprimit per tal d'instal·lar la distribució a la tarjeta de memòria. Després de demanar-nos el directori on tenim el voyage, quin dispositiu volem usar, quin punt de muntatge volem fer server i quin tipus de hardware usarem ( en el nostre cas WRAP ) ja tenim la CF preparada per funcionar.
Acte seguit i per tal de configurar el mínim preparem els següents apartats :
Configurar les IP's
Editem el fitxer : /etc/network/interface
allí hi hem de posar :
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.
auto lo
iface lo inet loopback
auto br0
iface br0 inet static
address 10.225.0.65
netmask 255.255.255.240
bridge_ports eth0 eth1
broadcast 10.225.0.79
network 10.225.0.64
auto ath0
iface ath0 inet static
address 10.225.0.9
netmask 255.255.255.248
network 10.225.0.8
broadcast 10.225.0.15
# #pre-up wlanconfig ath create wlandev wifi1 wlanmode ap
madwifi-base wifi0
wireless-mode Master
wireless-channel 1
up iwpriv ath0 mode 3
up iwconfig ath0 mode master
up iwconfig ath0 essid guifibages-supernode-PB-UPC
up iwconfig ath0 txpower auto
up iwconfig ath0 enc off
up iwconfig ath0 rate auto
# up nat.sh ath0 eth0 "10.1.20.0/24"
auto ath1
iface ath1 inet static
address 10.225.0.17
netmask 255.255.255.248
network 10.225.0.16
broadcast 10.225.0.23
# #pre-up wlanconfig ath create wlandev wifi1 wlanmode ap
madwifi-base wifi1
wireless-mode Master
wireless-channel 161
up iwpriv ath1 mode 1
up iwconfig ath1 mode master
up iwconfig ath1 essid guifibages-supernode-PB-SC
up iwconfig ath1 txpower auto
up iwconfig ath1 enc off
up iwconfig ath1 rate auto
# up nat.sh ath0 eth0 "10.1.20.0/24"
I ara hem d'entrar via ssh al aparell :
Posar el password
passwd
Configurar les plaques wifi
http://madwifi.org/
http://madwifi.org/wiki/UserDocs/FirstTimeHowTo
http://madwifi.org/wiki/UserDocs
http://madwifi.org/wiki/UserDocs/AccessPointInterface
http://madwifi.org/wiki/UserDocs/802.11a_channels
# Wireless tools cribsheet: # ------------------------ # iwlist ath0 scan list AP's the driver has scanned # iwconfig ath0 essid "foo" set the ssid to foo # iwpriv ath0 mode 1 lock operation to 11a only # iwpriv ath0 mode 2 lock operation to 11b only # iwpriv ath0 mode 3 lock operation to 11g only # iwpriv ath0 mode 0 autoselect from 11a/b/g (default) # # # # # # There are some debugging mechanisms for the curious/masochistic: # # # echo 1 > /proc/sys/net/ath/debug enable console msgs from the driver # echo 1 > /proc/net/wlan0/debug enable console msgs from the wlan module # echo hal > /proc/sys/net/ath/dump dump h/w register state to the console # # #pre-up wlanconfig ath create wlandev wifi1 wlanmode ap madwifi-base wifi1 wireless-mode Master #wireless-mode Adhoc #wireless-mode Managed up iwpriv ath0 mode 3 up iwconfig ath0 mode master up iwconfig ath0 essid guifibages-supernode-PB-UPC up iwconfig ath0 txpower auto up iwconfig ath0 enc off up iwconfig ath0 rate auto # wireless-channel 1 # wireless-essid voyage-adhoc # wireless-mode Ad-hoc
Actualitzar
Un cop tenim el aparell configurat amb la xarxa, li donem conexió a internet a través del ordinador en el que l'estem configurant.
seguidament fem :
apt-get update apt-get upgrade apt-get install quagga snmpd
SNMP
QUAGGA
Tenim el fitxer zebra.conf :
! -*- zebra -*- ! ! zebra sample configuration file ! ! $Id: zebra.conf.sample,v 1.1.1.1 2002/12/13 20:15:30 paul Exp $ ! hostname PB1 password guifibages enable password guifibages ! ! Interface's description. ! !interface lo ! description test of desc. ! !interface sit0 ! multicast ! ! Static default route sample. ! !ip route 0.0.0.0/0 203.181.89.241 ! !log file /var/log/quagga/zebra.log log file /tmp/zebra.log
Tenim el fitxer quagga.conf :
! -*- ospf -*- ! ! OSPFd sample configuration file ! ! hostname ospfd password guifibages enable password guifibages ! router ospf network 10.225.0.0/24 area 0 ! log file /tmp/ospfd.log

