Hi,

Following up on this, placing the script into /etc/rc.conf.lagg and configuring/including it in rc.conf with:

lagg_dev="lagg0"
lagg_devs="igb0 igb1 igb2 igb3"

Solves the issue.

if [ -n "${lagg_dev}" ]; then
    /sbin/ifconfig "${lagg_dev}" create > /dev/null 2>&1
    if [ $? -eq 0 ]; then
        /sbin/mount -t tmpfs tmpfs /tmp
        /bin/cp /rescue/ifconfig /tmp
        addr=`kenv boot.netif.ip`
        netmask=`kenv boot.netif.netmask`
        bootif=`kenv boot.netif.name`
        if_lagg_devs=`echo ${lagg_devs} | sed "s/ / laggport /g"`
        for dev in ${lagg_devs}
        do
            /tmp/ifconfig ${dev} up
        done
        ifconfig ${lagg_dev} up
        ifconfig ${lagg_dev} ${addr} netmask ${netmask} laggproto \
            lacp laggport ${if_lagg_devs} up
        ifconfig ${bootif} -alias ${addr}
        /sbin/umount /tmp
    fi
fi


On 07/20/2016 11:56 AM, Nagy, Attila wrote:
Hi,

I have several netbooted machines, which operate in this way:
- the machine boots up from one interface (PXE, DHCP), for example igb0
- during the boot, an rc script runs* which deletes the IP from igb0 and creates the lagg interface with igb0, igb1 etc and sets the original IP on that interface (with a statically linked ifconfig)
- normal booting continues from the lagg interface

This has worked for years and broke somewhere in the lifecycle of 10-STABLE.

Now I can't remove the IP address from the interface, ifconfig igb0 delete gives:
interface igb0 cannot change link addresses!

Any ideas about how could I work around this?

Basically I would like to switch the IP from one interface to another while running from an NFS root. (and this has worked before svn rev xxx)

Thanks,
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[email protected]"

_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[email protected]"

Reply via email to