manually setting MAC before the interface comes up

From: Christopher L. Barnard (cbar44@tsg.cbot.com)
Date: Tue Sep 10 2002 - 14:44:04 EDT


I am trying to turn a barely-working kludge into an elegant solution. As
everyone probably knows, le qe and hme interfaces use the system MAC
address and do not have a MAC address of their own. So it is possible
for a system with these interfaces to have multiple interfaces with the
same MAC address.

To allow all of our boxes to work properly, the networking group has asked
us to have unique MAC addresses for each interface. We are currently
accomplishing that request in a script in rc2.d that changes the MAC address
to a value roughly based upon the IP address of the interface. This works
fine, except that this change is made after the interface is first brought
up in rcS.d. Port Security on our routers detects that a MAC address has
changed on that interface, and shuts off that interface. So the interface
on the router must be reset after every machine reboot.

So what we need to do is set the MAC address *before* the interface is
plumbed up. Since interfaces are brought up before all filesystems are
mounted, it needs to be set using *only* commands in /sbin and /sbin/sh
internal commands. This is turning into quite a beast of a problem, since
every solution we have come to ends up using something not allowed.

The idea of directly modifying /etc/rcS.d/S30network.sh has been suggested,
but those changes would be lost if a patch updates that file. So we are
trying to write our own startup script, /etc/rcS.d/S29whatever.

Has anyone else tackled this problem? If so, what did you end up doing?

TIA, and of course I will summarize.

+-----------------------------------------------------------------------+
| Christopher L. Barnard O When I was a boy I was told that |
| cbarnard@tsg.cbot.com / \ anybody could become president. |
| (312) 347-4901 O---O Now I'm beginning to believe it. |
| http://www.cs.uchicago.edu/~cbarnard --Clarence Darrow |
+----------PGP public key available via finger or PGP keyserver---------+
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:24:55 EDT