12
me@me:~$ sudo /etc/init.d/networking restart
[ ok ] Restarting networking (via systemctl): networking.service.
me@me:~$ sudo service network-manager restart
me@me:~$ sudo ifup eno1
Internet Systems Consortium DHCP Client 4.3.3
Copyright 2004-2015 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eno1/34:e6:d7:0a:8f:fc
Sending on   LPF/eno1/34:e6:d7:0a:8f:fc
Sending on   Socket/fallback
DHCPDISCOVER on eno1 to 255.255.255.255 port 67 interval 3 (xid=0x162c3b49)
DHCPDISCOVER on eno1 to 255.255.255.255 port 67 interval 7 (xid=0x162c3b49)
DHCPREQUEST of 134.94.232.12 on eno1 to 255.255.255.255 port 67 (xid=0x493b2c16)
DHCPOFFER of 134.94.232.12 from 134.94.232.1
DHCPACK of 134.94.232.12 from 134.94.232.1
bound to 134.94.232.12 -- renewal in 282886 seconds.

me@me:~$ ifconfig -a
eno1      Link encap:Ethernet  HWaddr 34:e6:d7:0a:8f:fc  
          inet addr:134.94.232.12  Bcast:134.94.239.255  Mask:255.255.248.0
          inet6 addr: fe80::36e6:d7ff:fe0a:8ffc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12414 errors:0 dropped:2 overruns:0 frame:0
          TX packets:4826 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:8676664 (8.6 MB)  TX bytes:536959 (536.9 KB)
          Interrupt:20 Memory:f7e00000-f7e20000 

enx00116b68261f Link encap:Ethernet  HWaddr 00:11:6b:68:26:1f  
          inet addr:192.168.1.21  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::1851:f4a:198:2c2f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:44 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:64 (64.0 B)  TX bytes:6860 (6.8 KB)

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:3656 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3656 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:285972 (285.9 KB)  TX bytes:285972 (285.9 KB)

wlp2s0    Link encap:Ethernet  HWaddr 60:57:18:0d:ec:06  
          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)

me@me:~$ sudo lshw -C network  *-network               
       description: Ethernet interface
       product: Ethernet Connection (3) I218-LM
       vendor: Intel Corporation
       physical id: 19
       bus info: pci@0000:00:19.0
       logical name: eno1
       version: 04
       serial: 34:e6:d7:0a:8f:fc
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k duplex=full firmware=0.2-3 ip=134.94.232.12 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
       resources: irq:47 memory:f7e00000-f7e1ffff memory:f7e43000-f7e43fff ioport:f080(size=32)
  *-network DISABLED
       description: Wireless interface
       product: Wireless 7265
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlp2s0
       version: 3b
       serial: 60:57:18:0d:ec:06
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=4.4.0-91-generic firmware=17.459231.0 latency=0 link=no multicast=yes wireless=IEEE 802.11abgn
       resources: irq:52 memory:f7c00000-f7c01fff
  *-network
       description: Ethernet interface
       physical id: 2
       logical name: enx00116b68261f
       serial: 00:11:6b:68:26:1f
       size: 1Gbit/s
       capacity: 1Gbit/s
       capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=ax88179_178a driverversion=22-Aug-2005 duplex=full firmware=ASIX AX88179 USB 3.0 Gigabit Et ip=192.168.1.21 link=yes multicast=yes port=MII speed=1Gbit/s
me@me:~$ sudo ping 192.168.1.14 -c3
PING 192.168.1.14 (192.168.1.14) 56(84) bytes of data.

--- 192.168.1.14 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms

me@me:~$ sudo ifup enx00116b68261f
Unknown interface enx00116b68261f

I have an usb to ethernet adapter connected to my linux system. I edited the connection information, and gave manual ip 192.168.1.21 in the connections menu available at the top right. In the above command lines we can see the available connection information on my system. I am not able to make the interface up for the en0016b68261f. Below are my interfaces present in /etc/network:

interfaces(5) file used by ifup(8) and ifdown(8)

#The loopback network interface

auto lo
iface lo inet loopback

# The primary network interface
iface eno1 inet dhcp

When I try to ping the port at the other end of the usb to ethernet adapter, whose ip address is 192.168.1.14, I am not able to ping this ip address of my development board.

How can my usb to ethernet adapter be set up?

Traceroute shows this:

me@me:/$ traceroute 192.168.1.21
traceroute to 192.168.1.21 (192.168.1.21), 30 hops max, 60 byte packets
 1  192.168.1.21 (192.168.1.21)  0.231 ms  0.192 ms  0.180 ms
me@me:/$ traceroute 192.168.1.14
traceroute to 192.168.1.14 (192.168.1.14), 30 hops max, 60 byte packets
 1  * * *
 2  * * *
 (...)
29  * * *
30  * * *
8
  • What makes you think 192.168.1.14 is pingable? Please add your routing table (ip route show) to your question. – xhienne Aug 15 '17 at 12:22
  • You should have a close look at the machine 192.168.1.14. Your network configuration on 192.168.1.21 looks OK. I suspect that the problem lies on the other machine which either block your pings requests, or its ping replies. Or you may have a problem with your network equipments/cables (you didn't tell us how the two machines were connected; direct cable?). – xhienne Aug 15 '17 at 12:36
  • nope it is accepting the ping when it is on dhcp on another machine. When i login and give the ip as 192.168.1.14 for the ethernetport on the other machine. Then i am able to ping. If i set the above ip address as a static ip address I am not able to ping it from my machine through 192.168.1.21 – jenny Aug 15 '17 at 15:10
  • Yeah i have attached my traceroute in the above question, is traceroute command equivalent to iproute command in linux?? – jenny Aug 15 '17 at 15:15
  • Absolutely not. Despite your beliefs, you should really take a look at the other side. At least spy what comes and go at the other end of the Ethernet cable (on 192.168.1.14) with a tool like tcpdump or wireshark. – xhienne Aug 15 '17 at 15:19
6

There are many solutions. Mainly, you are using NetworkManager on a Linux GUI, what can be useful for that.

Actually, there are two systems for the same task:

  1. The system-wide network configuration scripts, they are using /etc/network/interfaces
  2. And there is the NetworkManager, which is a GUI tool for the same task, but it has a per-user configuration, too.

Your configs are conflicting that you want to try to configure both of them.

This answer explains doing this by the system-wide bootscripts.

Your main problem here, that the USB/Ethernet device is not a fixed device, but you can always plug in and out.

  1. Avoid that terrible interface renaming thing of your USB device and give it a fix name. It is described here, how. In essence, put the line

SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="01:23:45:67:89:ab", NAME="usb0"

into your /etc/udev/rules.d/70-persistent-net.rules. The result will be that your this usb device (identified by its MAC) will be always usb0.

  1. Then you have to eliminate this thing from the influence of the NetworkManager. As here is it explained, it is easy, it simply ignores the devices existing in /etc/network/interfaces. Simply configure it, for example you can give him a static IP, or a dhcp configured one:
auto usb0 #iface usb0 inet dhcp #iface usb0 inet static # address 192.168.220.65 # netmask 255.255.255.224 # broadcast 192.168.220.95

As it is written here, you can reload udev rules without a reboot with the command

# udevadm control --reload-rules && udevadm trigger

as root.

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.