[Solution] Kali Linux DHCP Automatic Access IP Failure VMWare Bridge

Links to the original text: http://www.cnblogs.com/blackblade/p/3688097.html
root@kali:~# service networking restart
[....] Running /etc/init.d/networking restart is deprecated because it may not r[warnble some interfaces ... (warning).
[....] Reconfiguring network interfaces...Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/00:0c:29:e2:03:ff
Sending on   LPF/eth0/00:0c:29:e2:03:ff
Sending on   Socket/fallback
DHCPRELEASE on eth0 to 192.168.1.1 port 67
Reloading /etc/samba/smb.conf: smbd only.
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/00:0c:29:e2:03:ff
Sending on   LPF/eth0/00:0c:29:e2:03:ff
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 19
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
done.

As shown above, the author uses VMWare and runs Kali Linux. He hopes to use bridge mode to get dynamic IP through router, but he can't get IP address correctly in any case.

A little investigation

1. troubleshooting DNS

root@kali:~# cat /etc/resolv.conf
nameserver 192.168.1.1
nameserver 114.114.114.114

192.168.1.1 in it, DNS settings are no problem

 

2. Screening Network Card

root@kali:~# cat /etc/network/interfaces 
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug eth0
auto eth0
iface eth0 inet dhcp

Automatic activation of network card and configuration of dhcp to acquire IP mode

 

3. Check VMWare Bridge Settings

As the author has installed Virual Box & VMWare Workstation, there are many virtual network cards. Bridging is an automatic mode. I wonder if the virtual network cards that can't connect to the outside network can be automatically bridged.

Decisively select the actual external network card, restart the Kali Linux networking service, and solve the problem.

root@kali:~# service networking restart
[....] Running /etc/init.d/networking restart is deprecated because it may not r[warnble some interfaces ... (warning).
[....] Reconfiguring network interfaces...Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/00:0c:29:e2:03:ff
Sending on   LPF/eth0/00:0c:29:e2:03:ff
Sending on   Socket/fallback
DHCPRELEASE on eth0 to 192.168.1.1 port 67
send_packet: Network is unreachable
send_packet: please consult README file regarding broadcast address.
Reloading /etc/samba/smb.conf: smbd only.
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/00:0c:29:e2:03:ff
Sending on   LPF/eth0/00:0c:29:e2:03:ff
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 15
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPOFFER from 192.168.1.1
DHCPACK from 192.168.1.1
Reloading /etc/samba/smb.conf: smbd only.
bound to 192.168.1.101 -- renewal in 3353 seconds.
done.

 

Reprinted at: https://www.cnblogs.com/blackblade/p/3688097.html

Tags: network socket Vmware Linux

Posted on Thu, 10 Oct 2019 15:21:35 -0700 by balacay