Hello,

I like guessnet quiet a bit to be able to automatically load the right
logical interface when trying to start a physical one.

As an example:

+++
auto lo eth0

# The primary network interface
mapping eth0
       script guessnet-ifupdown
       map eth0-static eth0-dhcp
       map default: eth0-dhcp
       map timeout: 10
       map verbose: true

iface eth0-static inet static
       address 192.168.2.103
       netmask 255.255.255.0
       network 192.168.2.0
       broadcast 192.168.2.255
       gateway 192.168.2.1
       # dns-* options are implemented by the resolvconf package, if installed
       dns-nameservers 200.91.75.5 200.91.75.6 192.168.2.1
       dns-search local
       test1-peer address 192.168.2.1 mac 00:06:4f:64:1e:d9

iface eth0-dhcp inet dhcp
+++

However I have the need to always create a bridge between eth0 and a
tap0 tuntap interface.  My first naive approach was to do something
similar, :-)

+++
auto lo br0

mapping br0
        script guessnet-ifupdown
        map br0-static br0-dhcp
        map default: br0-dhcp
        map timeout: 10
        map verbose: true

iface br0-static inet static
        pre-up /usr/sbin/tunctl -u <username> -t tap0
        pre-up /sbin/ifconfig tap0 up
        bridge_ports eth0 tap0
        post-down /sbin/ifconfig tap0 down
        post-down /usr/sbin/tunctl -d tap0
        address 192.168.2.103
        netmask 255.255.255.0
        network 192.168.2.0
        broadcast 192.168.2.255
        gateway 192.168.2.1
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 200.91.75.5 200.91.75.6 192.168.2.1
        dns-search local
        test1-peer address 192.168.2.1 mac 00:06:4f:64:1e:d9

iface br0-dhcp inet dhcp
        pre-up /usr/sbin/tunctl -u vasqueja -t tap0
        pre-up /sbin/ifconfig tap0 up
        bridge_ports eth0 tap0
        post-down /sbin/ifconfig tap0 down
        post-down /usr/sbin/tunctl -d tap0
+++

That can't be done because when guessnet is called the bridge hadn't
been created yet.  I also tried moving the pre-up stuff as part of the
mapping stanza, but that didn't work...

So as of now I have no auto loading of any interfaces (except by lo),
and I'm manually starting the interface I want.  Not big deal, but
I've been wondering if there's a way to accomplish what I want.  I
like a tool that integrates nicely with ifup/ifdown as guessnet does,
and I don't use desktop managers...

Any suggestions on how to accomplish that  I'm looking for?

Thanks,

-- 
Javier.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktimnwni9ntg83o7a=gog+j_q+ggtbpz+qgs+q...@mail.gmail.com

Reply via email to