[Voyage-linux] Building Bridges-scripts

Andrew Niemantsverdriet (spam-protected)
Sat Aug 27 06:14:36 HKT 2005


Here is what I came up with. Should be the "debian way" or the the way
that seems to work great with voyage and wrap.

auto br0 
iface br0 inet static
   address 192.168.254.253
   netmask 255.255.255.0
   network 192.168.254.0
   broadcast 192.168.254.255
   gateway 192.168.254.1
   bridge_ports eth0 wlan0
   pre-up ifconfig eth0 0.0.0.0 up
   pre-up ifconfig wlan0 0.0.0.0 up
   pre-up iwconfig wlan0 essid testing mode master
   pre-up brctl addbr br0
   pre-up brctl addif br0 eth0
   pre-up brctl addif br0 wlan0
   post-down ifconfig eth0 0.0.0.0 down
   post-down ifconfig wlan0 0.0.0.0 down
   post-down brctl delif br0 eth0
   post-down brctl delif br0 wlan0
   post-down brctl delbr br0

Also did a little write up on the wiki under the "how do i" section:

http://wiki.voyage.hk/dokuwiki/doku.php?id=how_do_i_make_a_bridge_with_voyage

Thanks for the help everybody:

--
 _
/-\ ndrew

On Sat, 2005-08-27 at 08:13 +1100, Giorgio Ducci wrote:
> Hi Andrew,
> 
> no problem here it is. I just read Punky message and I'm going to read
> the doc link because I think there is a more elegnt way to do it.
> Anyway herefollowing the two scripts:
> --------------------------------------------------------------------
> /etc/network/interfaces:
> --------------------------------------------------------------------
> # 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 eth0
> iface eth0 inet static
>         address 0.0.0.0
>         netmask 0.0.0.0
>         broadcast 0.0.0.0
>         network 0.0.0.0
> 
> -------------------------------------------------------------
> /etc/init.d/wireless
> ------------------------------------------------------------
> #! /bin/sh
> #
> # This script starts the atheros wireless cards and execute
> # "iwconfig" for wireless configuration and bridge command.
> #
> # Version:      @(#)WIFI for Atheros 01-July-2005  author (me)
> #
> 
> # iwpriv wlan0 mode 3
> iwpriv mode 3
> iwconfig ath0 mode master
> iwconfig ath0 essid WHATEVER
> iwconfig ath0 enc off
> iwconfig ath0 rate auto
> # iwconfig txpower auto
> iwconfig ath0 channel 1 
> ifconfig ath0 0.0.0.0 up
> 
> # iwconfig ath1 mode master
> # iwconfig ath1 essid WAP-A
> # iwconfig ath1 enc off
> # iwconfig ath1 rate auto
> # ifconfig ath1 0.0.0.0 up
> 
> brctl addbr br0
> brctl addif br0 eth0
> brctl addif br0 ath0
> # ifconfig eth0 up # if it's not already up by network script
> in /ETC/NETWORK/INTERFACES
> ifconfig br0 192.168.1.200 # i.e. give an IP address for SSH is
> useful ;-)
> ifconfig br0 up
> -------------------------------------------------------
> Putting all the commands in the "interfaces" script did not work for
> me.
> Well, it works fine now, the bridge is up and you can ping and SSH to
> it. If I come up with something more elegant (thanks to Punky doc) I
> will post here.
> cheers
> Giorgio
> 
> 
> > Would you share you scripts with me? I seem to still be getting
> > errors.
> > 
> > Thanks,
> >  _
> > /-\ ndrew
> > 
> > On Fri, 2005-08-26 at 07:28 +1100, Giorgio Ducci wrote:
> > > Hi ANdrew,
> > > 
> > > I had the same problem as you. I do not know why but apparently
> > in 
> > > debian/voyage you cannot configure a bridge at the same as
> > interfaces in 
> > > the same script  ::p
> > > What I made it is a separate script the /etc/init   directory with
> > a 
> > > symlink in rc2.s to start at boot after all other scripts. it's a
> > trick not 
> > > very clean, I know but in this way it works fine. I am not an
> > expert so I 
> > > just workaround that. If you have only one bridge in the network
> > it is 
> > > useful to turn off Spanning Tree with ==> brctl stp br0 off.
> > > By the way, could you please explain to me how did you solve the
> > problem of 
> > > FC4 and voyage install? I did not so ....
> > > Cheers
> > > Giorgio
> > > 
> > > >I am having some trouble building a bridge with voyage-0.2pre1.
> > > >
> > > >Here is my /etc/network/interfaces file:
> > > >
> > > ># 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
> > > >
> > > >iface br0 inet static
> > > >      address 192.168.254.20
> > > >      netmask 255.255.255.0
> > > >      broadcast 192.168.254.255
> > > >
> > > >iwconfig wlan0 essid testing mode master
> > > >ifconfig wlan0 0.0.0.0 up
> > > >ifconfig eth0 0.0.0.0 up
> > > >
> > > >brctl addbr br0
> > > >brctl addif br0 eth0
> > > >brctl addif br0 wlan0
> > > >ifconfig br0 up
> > > >
> > > >
> > > >When I issue a /etc/init.d/networking restart command I get this
> > error:
> > > >
> > > >Setting up IP spoofing protection: rp_filter.
> > > >Enabling packet forwarding...done.
> > > >Reconfiguring network interfaces.../etc/network/interfaces:13:
> > duplicate
> > > >option
> > > >ifdown: couldn't read interfaces file "/etc/network/interfaces"
> > > >/etc/network/interfaces:13: duplicate option
> > > >ifup: couldn't read interfaces file "/etc/network/interfaces"
> > > >done.
> > > >
> > > >Any ideas on how to make my interfaces file work?
> > > >
> > > >
> > > >_______________________________________________
> > > >Voyage-linux mailing list
> > > >Voyage-linux at list.voyage.hk
> > > >http://list.voyage.hk/mailman/listinfo/voyage-linux
> > > 
> > > 
> > > 





More information about the Voyage-linux mailing list