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?
ifconfig
. Instead, use theip
command from the iproute2 suite.ip link
. If you want to see addresses, too, useip addr
.