Re: DHCP woes
Chris Bell <[email protected]> Mon, 19 Jun 2017 15:17:22 +0100
| Newsgroups | gmane.comp.security.ipcop.user |
|---|---|
| Message-ID | <374472028.4EvyL1gIyT@gigl> |
On Monday 19 Jun 2017 09:12:45 Joe Acquisto-j4 wrote:
> IPCop v2.1.9
>
> I continue to have DHCP oddities. For instance one device, on GREEN
> segment, was handed out a dynamic address for BLUE. That has happened to
> several devices.
>
> GREEN and BLUE are on different NIC. However, after several power cycles
> on the device, now it is being handed out a GREEN address. One oddness is
> that the "edit" icon is greyed out for that address.
>
> I added that device to the "fixed lease" list yet it continues to hand it
> GREEN address.
The BIOS in some boxes finds devices in random order, first to reply, and passes
the list to Linux. I had to sort this while testing a shorewall setup by using
a file in /etc/network/if-pre-up.d called get-mac-address.sh (remove "##### "
from each line and re-join the line beginning mac=)
##### #!/bin/sh
#####
##### set -e
#####
##### export LANG=C
#####
##### iface="$1"
##### mac=$(/sbin/ifconfig "$iface" | sed -n -e '/^.*HWaddr \([:
[:xdigit:]\-]*\).*/{s//\1/;y/ABCDEF/abcdef/;p;q;}')
##### which=""
#####
##### while read testmac scheme; do
##### if [ "$which" ]; then continue; fi
##### if [ "$mac" = "$(echo "$testmac" | sed -e 'y/ABCDEF/abcdef/')" ]; then
##### which="$scheme"; fi
##### done
#####
##### if [ "$which" ]; then echo $which; exit 0; fi
##### exit 1
Then near the beginning of the file /etc/network/interfaces, insert
auto eth0 eth1 eth2 eth3
mapping eth0 eth1 eth2 eth3
script /etc/network/if-pre-up.d/get-mac-address.sh
map xx:00:00:00:00:9e eth0
map xx:00:00:00:00:00 eth1
map xx:00:00:00:86:b3 eth2
map xx:00:00:00:00:0e eth3
Hope that helps.
--
Chris Bell
website chrisbell.org.uk
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
IPCop-user mailing list
[email protected]
Manage your subscription or unsubscribe
https://lists.sourceforge.net/lists/listinfo/ipcop-user