1

I want to refresh the network interface by turning it down then up as per some recommendations to get DNS updates. I listed the interfaces in my device using: ifconfig -a. I got 3 interfaces and I am concerned about the wired one. The output is (hardware addresses are omitted with xx):

x@x-device:~$ ifconfig
enp0s31f6 Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:172.17.72.13  Bcast:172.17.79.255  Mask:255.255.240.0
          inet6 addr: xxxx::xxxx:xxxx:xxxx:xxxx/xx Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:61239 errors:0 dropped:0 overruns:0 frame:0
          TX packets:55609 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:26493098 (26.4 MB)  TX bytes:7035908 (7.0 MB)
          Interrupt:16 Memory:ef200000-ef220000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1558 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1558 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:138063 (138.0 KB)  TX bytes:138063 (138.0 KB)

wlp2s0    Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

I then run the command:

sudo ifdown enp0s31f6 && sudo ifup enp0s31f6

But the output:

Unknown interface enp0s31f6

What is the problem?

5
  • That’s most likely not the complete name. Don’t use legacy tools like ifconfig. Instead, use the ip command from the iproute2 suite.
    – Daniel B
    May 7, 2018 at 10:39
  • Are you using Desktop Environment on this machine? Do you have installed NetworkManager on it?
    – mariaczi
    May 7, 2018 at 10:39
  • @mariacz It is Desktop. But I have not installed anything specific for network managing. Just the default system.
    – None
    May 7, 2018 at 10:40
  • @Daniel B Sorry can you provide more specific answer (full command)?
    – None
    May 7, 2018 at 10:41
  • 1
    You can list network links with ip link. If you want to see addresses, too, use ip addr.
    – Daniel B
    May 7, 2018 at 10:42

1 Answer 1

0

You can try:

 ip link set up dev enp0s31f6

and then run dhcp-client or setup IP manually

man ip
2
  • You mean run dhcp-client to set up the DNS?
    – None
    May 7, 2018 at 10:46
  • If you use dhcp for network interface configuration - run/restart dhcp client for this interface. If you have static IP addresses, you should set the network configuration manually.
    – mariaczi
    May 7, 2018 at 10:49

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.