hello.

dunno if this is what you are looking for, but here is
my /etc/networks/interfaces, which is the debian way to setup
networking.

It sets up bridges and tap devices for uml`s.

It`s pretty self explaining, but don`t hesitate to ask any questions.

cheers,
juraj


Am Sonntag, den 01.01.2006, 19:59 +0000 schrieb David Cannings:
> Hello,
> 
> It's time to update the bridging HOWTO again, but I need a little help.  I 
> would like to expand it so that there is information about setting up bridges 
> in different distributions, using the standard init scripts.
> 
> I know that Gentoo has init scripts that support it, but I don't use any 
> other 
> distributions to be able to investigate.
> 
> If any of you use your distributions init scripts to create a bridge for use 
> with UML, please could you drop me an email and let me know how you did it.  
> I'd need to know which files need to be edited and a brief description of how 
> you'd accomplish http://edeca.net/articles/bridging/create-bridge.html 
> without a custom script.  Sample files would be great also.
> 
> Anybody who contributes something which I end up using will, of course, be 
> credited at the end of the document.
> 
> Cheers,
> 
> David
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> User-mode-linux-user mailing list
> User-mode-linux-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user
# 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

# 3com interface
#auto eth0
#iface eth0 inet static
#       address 192.168.223.2
#       netmask 255.255.255.0
#       broadcast 192.168.223.255

#onboard marwell gigabit
auto eth1
iface eth1 inet static
        address 10.222.0.11
        netmask 255.255.255.0
        broadcast 10.222.0.255

auto br0
iface br0 inet manual
post-up brctl addbr br0
post-up ifconfig br0 0.0.0.0
pre-down ifconfig br0 down
#post-up ifup eth2
#post-up ifup tap0
#pre-down ifdown tap0
#pre-down ifdown eth2
pre-down brctl delbr br0


auto eth2 
iface eth2 inet manual
post-up ifconfig eth2 0.0.0.0 promisc up
post-up sleep 3
post-up brctl addif br0 eth2
pre-down ifconfig eth2 down
pre-down brctl delif br0 eth2

auto br1
iface br1 inet manual
post-up brctl addbr br1
post-up ifconfig br1 0.0.0.0
pre-down ifconfig br1 down
#post-up ifup eth2
#post-up ifup tap0
#pre-down ifdown tap0
#pre-down ifdown eth2
pre-down brctl delbr br1


auto eth0
iface eth0 inet manual
post-up ifconfig eth0 0.0.0.0 promisc up
post-up sleep 3
post-up brctl addif br1 eth0
pre-down ifconfig eth0 down
pre-down brctl delif br1 eth0



auto tap0
iface tap0 inet manual
pre-up tunctl -t tap0
post-up ifconfig tap0 0.0.0.0 promisc up
post-up sleep 1
post-up brctl addif br0 tap0
pre-down ifconfig tap0 down
pre-down brctl delif br0 tap0
post-down tunctl -d tap0

auto tap1
iface tap1 inet static
        address 10.222.0.1
        netmask 255.255.255.255
pre-up  tunctl -t tap1
#uml_proxy_arp 10.222.0.2
#uml_proxy_ether eth1
post-up route add -host 10.222.0.2 dev tap1
post-up sysctl -w net.ipv4.conf.tap1.proxy_arp="1"
post-up arp -Ds 10.222.0.2 eth1 pub
post-up route add default gw 10.222.0.2  tap1
pre-down route del default gw 10.222.0.2  tap1
pre-down route del -host 10.222.0.2 dev tap1
post-down tunctl -d tap1

auto tap2
iface tap2 inet static
        address 10.222.0.15
        netmask 255.255.255.255
pre-up  tunctl -t tap2
post-up route add -host 10.222.0.16 dev tap2
post-up sysctl -w net.ipv4.conf.tap2.proxy_arp="1"
post-up arp -Ds 10.222.0.16 eth1 pub
pre-down route del -host 10.222.0.16 dev tap2
post-down tunctl -d tap2

auto tap3
iface tap3 inet manual
pre-up tunctl -t tap3
post-up ifconfig tap3 0.0.0.0 promisc up
post-up sleep 1
post-up brctl addif br1 tap3
pre-down ifconfig tap3 down
pre-down brctl delif br1 tap3
post-down tunctl -d tap3

auto tap4
iface tap4 inet static
        address 10.222.0.17
        netmask 255.255.255.255
pre-up  tunctl -t tap4
post-up route add -host 10.222.0.18 dev tap4
post-up sysctl -w net.ipv4.conf.tap4.proxy_arp="1"
post-up arp -Ds 10.222.0.18 eth1 pub
pre-down route del -host 10.222.0.18 dev tap4
post-down tunctl -d tap4


Reply via email to