Why dhclient is failing to get ip address on a virtual interface for a VM running on VMWare ?
Issue
- After adding a virtual interface,
dhclient
command fails with error as shown below while trying to assign ip to that virtual interface.
[root@example ~]# ip link add virtual2 link eth0 type macvlan mode bridge
[root@example ~]#
[root@example ~]# dhclient -v virtual2 -pf /tmp/dhcp-virtual2.pid
Internet Systems Consortium DHCP Client 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/virtual2/56:8d:03:8a:xx:xx
Sending on LPF/virtual2/56:8d:03:8a:xx:xx
Sending on Socket/fallback
DHCPDISCOVER on virtual2 to 255.255.255.255 port 67 interval 6 (xid=0x37a102a5)
DHCPDISCOVER on virtual2 to 255.255.255.255 port 67 interval 7 (xid=0x37a102a5)
DHCPDISCOVER on virtual2 to 255.255.255.255 port 67 interval 14 (xid=0x37a102a5)
DHCPDISCOVER on virtual2 to 255.255.255.255 port 67 interval 9 (xid=0x37a102a5)
DHCPDISCOVER on virtual2 to 255.255.255.255 port 67 interval 14 (xid=0x37a102a5)
DHCPDISCOVER on virtual2 to 255.255.255.255 port 67 interval 11 (xid=0x37a102a5)
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
[root@example ~]#
/var/log/messages
also has same error likeNo DHCPOFFERS received
.
Environment
- Red Hat Enterprise Linux 6.5
- kernel-2.6.32-431.23.3.el6.x86_64
- DHCP Client
- Virtual Machine running on VMware.
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.