0

The os recognize my ethernet device as enp6s0.

ifconfig -a
enp6s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.31.22  netmask 255.255.255.0  broadcast 192.168.31.255

My home network structure:

isp ---- moden ---- router ---- pc

I had already binding my pc mac address with 192.168.31.22 in router setting,router ip locates 192.168.31.1. Everytime i boot pc ,it can't connect the internet automatically,i have click connect button on wcid network manager gui. enter image description here It is no use to set the /etc/network/interfaces as below:

Setting as static ip.

auto lo
iface lo inet loopback   
auto enp6s0
iface enp6s0 inet static
address 192.168.31.22
netmask  255.255.255.0
gateway 192.168.31.1
dns-nameservers  192.168.31.1

setting as dhcp.

auto lo
iface lo inet loopback   
auto enp6s0
iface enp6s0 inet dhcp
1
  • In addtiion to @showkey answer, you may have to comment out "auto enp6s0" after you add "allow-hotplug enp6s0". Jul 12, 2021 at 5:36

1 Answer 1

0

Add the line in /etc/network/interfaces.

allow-hotplug  enp6s0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.