http://localhost.ruhr.de/~stefan/interfaces/
A solution to this issue is to abandon generic interface names and assign descriptive ones. To do this, udev provides a way of renaming network devices depending on their unique MAC hardware address:
KERNEL="eth*", SYSFS{address}="00:02:3f:46:de:ad:be:ef", NAME="fw"
Adding this line to a file in /etc/udev/rules.d/ instructs udev to rename the netork interface with the entered MAC address to "fw", indicating the firewire interface. You can do the same with your WLAN and LAN interfaces, so that you end up with descriptive names for all of your network devices.
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # # This file has been modified to use user mode linux # processes on this machine - the installed software # makes some assumptions on the naming of the tap devices # (to be more precise the numbering). So if you like to # use further uml processes with networking, use tap devices # starting from tap4. # The loopback network interface auto lo iface lo inet loopback # These interfaces are brought up automatically #auto tap0 tap1 tap2 tap3 eth0 eth1 br0 br1 br2 br3 # use vlans instead of multiple nics auto tap0 tap1 tap2 tap3 eth0.1 eth0.2 br0 br1 br2 br3 # eth0.1 (internal lan/br0) iface eth0.1 inet manual pre-up vconfig add eth0.1 up ifconfig eth0 0.0.0.0 promisc up post-down vconfig rem eth0.1 # eth1 (host dsl ethernet to firewall pppoe/br1) iface eth0.2 inet manual pre-up vconfig add eth0.2 up ifconfig eth0.2 0.0.0.0 promisc up post-down vconfig rem eth0.2 # optional eth2 (host ethernet to firewall wlan/br2) # connect to bridge br2 iface eth0.3 inet manual pre-up vconfig add eth0.3 up ifconfig eth0.3 0.0.0.0 promisc up post-down vconfig rem eth0.3 # optional eth3 (external host(s) to firewall dmz/br3) # connect to bridge br3 #iface eth3 inet manual # up ifconfig eth3 0.0.0.0 promisc up # connect internal lan to firewall (ipcop green) iface tap0 inet manual pre-up tunctl -u ipcop -t tap0 up ifconfig tap0 up down ifconfig tap0 down # connect external dsl to firewall (ipcop red) iface tap1 inet manual pre-up tunctl -u ipcop -t tap1 up ifconfig tap1 up down ifconfig tap1 down # optional connect wlan ap on eth2 to firewall (ipcop blue) iface tap2 inet manual pre-up tunctl -u ipcop -t tap2 up ifconfig tap2 up down ifconfig tap2 down # connect more umls in firewall dmz (ipcop orange) iface tap3 inet manual pre-up tunctl -u ipcop -t tap3 up ifconfig tap3 up down ifconfig tap3 down # bridge between second nic and virtual firewall dsl nic iface br1 inet manual up ifconfig br1 0.0.0.0 up bridge_ports eth0.2 tap1 bridge_fd 1 bridge_stp off bridge_hello 1 down ifconfig br1 down # bridge between third nic and firewall wlan net iface br2 inet manual bridge_ports eth0.3 tap2 bridge_fd 1 bridge_stp off bridge_hello 1 down ifconfig br2 down # bridge between virtual nic and firewall dmz iface br3 inet manual bridge_ports tap3 bridge_fd 1 bridge_stp off bridge_hello 1 down ifconfig br3 down # br0 is the interface to internal lan iface br0 inet static address 192.168.1.2 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 192.168.1.2 dns-search zuhause.xx bridge_ports eth0.1 tap0 bridge_fd 1 bridge_stp off bridge_hello 1 down ifconfig br0 down
Linux/Netzwerk/Konfiguration (last edited 2009-06-04 09:04:01 by DetlevLengsfeld)