Bridging Tun/Tap Ejemplo 1
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
 
# The loopback network interface
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
 
# The primary network interface
 
allow-hotplug eth0
allow-hotplug eth1
 
auto eth0:1
iface eth0:1 inet static
    address 192.168.101.7
    netmask 255.255.255.0
    network 192.168.101.0
    broadcast 192.168.101.255
    gateway 192.168.101.1
    # dns-* options are implemented by the resolvconf package, if installed
    dns-nameservers 192.168.101.1
    dns-search ing.uninorte.edu.py
 
auto eth0:2
iface eth0:2 inet static
    address 192.168.100.7
    netmask 255.255.255.0
    network 192.168.100.0
    broadcast 192.168.100.255
    gateway 192.168.100.1
 
auto eth0:3
iface eth0:3 inet static
    address 192.168.254.7
    netmask 255.255.255.0
    network 192.168.254.0
    broadcast 192.168.254.255
    gateway 192.168.254.1
 
auto eth1
iface eth1 inet manual
    up ifconfig $IFACE 0.0.0.0 up
    up ip link set $IFACE promisc on
    down ip link set $IFACE promisc off
    down ifconfig $IFACE down
 
auto eth1:1
iface eth1:1 inet manual
    up ifconfig $IFACE 0.0.0.0 up
    up ip link set $IFACE promisc on
    down ip link set $IFACE promisc off
    down ifconfig $IFACE down
 
## previus add "root" (any user) to "vboxusers" group to run fine
 
auto br0
iface br0 inet dhcp
    bridge_ports eth1:1
    bridge_fd 1
    bridge_stp on
    bridge_hello 1
    down ifconfig br0 down
    post-down brctl delbr br0 
 
auto tap0
iface tap0 inet manual
    pre-up tunctl -t $IFACE -u root
    pre-up brctl addif br0 $IFACE
    up ifconfig $IFACE 0.0.0.0 up
    down ifconfig $IFACE down
    down brctl delif br0 $IFACE
    down tunctl -d $IFACE
 
auto tap1
iface tap1 inet manual
    pre-up tunctl -t $IFACE -u root
    pre-up brctl addif br0 $IFACE
    up ifconfig $IFACE 0.0.0.0 up
    down ifconfig $IFACE down
    down brctl delif br0 $IFACE
    down tunctl -d $IFACE
 
auto tap2
iface tap2 inet manual
    pre-up tunctl -t $IFACE -u root
    pre-up brctl addif br0 $IFACE
    up ifconfig $IFACE 0.0.0.0 up
    down ifconfig $IFACE down
    down brctl delif br0 $IFACE
    down tunctl -d $IFACE
 
auto tap3
iface tap3 inet manual
    pre-up tunctl -t $IFACE -u root
    pre-up brctl addif br0 $IFACE
    up ifconfig $IFACE 0.0.0.0 up
    down ifconfig $IFACE down
    down brctl delif br0 $IFACE
    down tunctl -d $IFACE
Unless otherwise stated, the content of this page is licensed under GNU Free Documentation License.