Jerry & everyone,

From:   Jerry Vonau <[email protected]>
Date:   Wed, 01 Sep 2010 04:33:30 -0500
> How about a sample of the udev rules that you wrote?

Discussion in debian-user and an unexpected renaming of interfaces 
in the system prompted me to get busy.  It's much easier that expected.

For the local connections there are two Linksys USB100M adapters 
and one Belkin F5D5050.  The Linksys, adapters have legible serial 
numbers which serve to identify them.  With just one Belkin, the name 
can be LocBelkin.  So I edited just the NAME perameter in the rules.  
Sorry for the long lines; not my choice.

# dalton:/etc/udev/rules.d/70-persistent-net.rules
# PCI device 0x8086:0x2449 (e100)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
ATTR{address}=="00:02:55:d9:a7:ef", ATTR{dev_id}=="0x0", ATTR{type}=="1", 
KERNEL=="eth*", NAME="Net"

# USB device 0x:0x (asix)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
ATTR{address}=="00:1d:7e:00:ff:98", ATTR{dev_id}=="0x0", ATTR{type}=="1", 
KERNEL=="eth*", NAME="LocACS29H400713"

# USB device 0x:0x (asix)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
ATTR{address}=="00:1d:7e:00:e5:da", ATTR{dev_id}=="0x0", ATTR{type}=="1", 
KERNEL=="eth*", NAME="LocLCS218213733"

# USB device 0x:0x (pegasus)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
ATTR{address}=="00:05:1b:00:bb:74", ATTR{dev_id}=="0x0", ATTR{type}=="1", 
KERNEL=="eth*", NAME="LocBelkin"

Then edited /etc/network/interfaces accordingly.  Now I can disconnect 
all cables and USB-Ethernet adapters and reconnect without guessing 
which adapter a LAN machine should connect to!

Then edited /etc/shorewall/interfaces.

# dalton:/etc/shorewall/interfaces
#ZONE   INTERFACE       BROADCAST       OPTIONS
net     Net             detect          
dhcp,tcpflags,routefilter,nosmurfs,logmartians
loc     Loc+            detect          tcpflags,nosmurfs
loc     ppp+
# This is for the tunnel.
vpn     tun0
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE

If another USB-Ethernet adapter is added, I just need to remember to 
tell udev to name it Loc*.  Yes, probably my options for Loc+ are wrong.

Regards,          ... Peter E

-- 
VoIP 7785886232 is gone.  Please use 13604502132.
Sparcstation 2 netboots netbsd; installation pending.
Personal site works;  http://members.shaw.ca/peasthope/ .


------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to