|
Description
|
I want to use the MAC address to build the name of a VNIC. I can create this
VNIC using VNA.
However, here is the error I get when trying to start DHCP on this
interface (the error does not occur if I use static IP):
-bash-3.2# ifconfig vnic0015172426CE0 dhcp start
ifconfig: vnic0015172426CE0: interface does not exist or cannot be managed using DHCP
-bash-3.2# /usr/lib/vna vnic0015172426CE0
dladm_vnic_delete: link busy
-bash-3.2# ifconfig vnic0015172426CE0 unplumb
-bash-3.2# /usr/lib/vna vnic0015172426CE0
Now, if I don't specify the VNIC name:
-bash-3.2# /usr/lib/vna e1000g0 0:15:17:24:26:ce
vnic2
-bash-3.2# ifconfig vnic2 plumb
-bash-3.2# ifconfig vnic2 dhcp start
-bash-3.2# ifconfig vnic2
vnic2: flags=201004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,CoS> mtu 1500 index 27
inet 10.17.5.214 netmask ffffff00 broadcast 10.17.5.255
ether 0:15:17:24:26:ce
*** (#1 of 1): [ UNSAVED ] xxxxx@xxxxx.com
dhcp_ipc_alloc_request() truncates interface names from LIFNAMSIZ (32) to IFNAMSIZ (16), in order
to squeeze them into struct dhcp_ipc_request.ifname.
Various other parts of libdhcpagent also use IFNAMSIZ where they should prefer LIFNAMSIZ.
It's a private interface, so we could change the way the IPC request works,
but there are other problems here. Chief among them: the standard BSD
ioctls all rely on IFNAMSIZ in struct ifreq. If your interface name is too long,
then many portable networking applications will fall apart.
Are you sure you really want to do this with your interfaces?
|