On 29 December 2017 at 09:06, Filip Francis <[email protected]> wrote:
> the thing is no matter how we do it it always create a vnic on top of the
> ixgbe0 interface and that is not something we want.
> Or is that maybe an other way to have a vnic but with a certain MAC address
> ?
> What is the syntax then if this is possible
At the moment, there is no support for the particular behaviour you're
after. You should be able to work around this, though, using a custom
startup script; e.g.,
https://gist.github.com/jclulow/2606370
You can write a postboot script which sets up the custom IP
configuration that you want on "ixgbe0". Note that the enumeration
order of NICs is not guaranteed, so you'll want your script to
distinguish the link you're after based on the MAC address it has.
For example:
#!/bin/bash
TARGET_MAC='0:25:90:c3:f2:d6'
if ! links=$(dladm show-phys -m -p -o link,address); then
printf 'ERROR: could not read links\n' >&2
exit 1
fi
target=
while IFS=: read link mac; do
if [[ $mac == $TARGET_MAC ]]; then
target=$link
break
fi
done <<< "$links"
if [[ -z $target ]]; then
printf 'ERROR: NIC for MAC %s not found\n' \
"$TARGET_MAC" >&2
exit 1
fi
ifconfig $target ...
Cheers.
--
Joshua M. Clulow
Engineer @ Joyent
http://blog.sysmgr.org
-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription:
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com