0

I have an Rpi 3 with Jessie latest os. Now i have purchased USB to ethernet adapter for an extra ethernet port. I want to assign a static IP address to this port. This port is for defining a another network under Rpi3.

I don't know how to configure the Jessie. I just tried by editing dhcpcd.cpnf.

interface eth1
static ip_address=192.168.2.1/24
static routers=192.168.2.1
static domain_name_servers=192.168.2.1

This is not work for me. Can anyone please help me? I didn't find any tutorial on this.

7
  • As a first check: did your USB Ethernet adapter correctly identified and is working? What does ifconfig -a has to say? Do you see eth1? Next, what kind of USB Ethernet adapter do you have? Use lsusb to check that it's not a bad one, such as Davicom-based adapters or some others that don't work correctly, albeit they get detected. – TheDiveO Sep 7 '17 at 20:16
  • yeah it showing the port when type ifconfig -a enx70886b827d30. – vishnu m c Sep 8 '17 at 13:08
  • When i tried once again the same command it shows eth0 has no inet address but enxb827eb57b8d9: this one has inet address. Why they are switched eth0 should be for inbuilt ethernet port – vishnu m c Sep 8 '17 at 13:13
  • This happens when i pluged out and again inserted – vishnu m c Sep 8 '17 at 13:15
  • You're obviously using Debian Stretch, not Jessie. – TheDiveO Sep 8 '17 at 17:01
0

So the OP is actually using Debian Stretch, and not Jessie, as he is bitten by the less-than-stellar decision by the Debian maintainers to enable "stable" network names. Unfortunately, the maintainers (both Debian as well as Raspbian) do not seem to realize that having stable, albeit unpredictable network interface names based on the MAC48 of the network adapter is a bad idea on server platforms, such as the Raspberry Pis.

The reason is that on the Raspberry Pi hardware platform, the builtin Ethernet and Wifi network interfaces are connected via USB. And Debian Stretch now enforces USB-based network interfaces to use the unpredictable naming scheme. This results in total confusion as can be seen here, as the unsuspecting users are completely left in the dark. How many users will understand what is going on?

Alas, to switch off this naming madness, follow these instructions from the Stretch release notes, to get back to stable and predictable network interface names on Raspbian, and I don't like this, how do I disable this? in particular. In short:

sudo ln -s /dev/null /etc/systemd/network/99-default.link
sudo reboot

I fail to see how unpredictable network interface names fit into the self-esteem of Debian as being the stablest of stable.

4
  • There is any bad effect in doing sudo ln -s /dev/null /etc/systemd/network/99-default.link. – vishnu m c Sep 11 '17 at 3:25
  • what do you mean? is this a question or a statement? – TheDiveO Sep 11 '17 at 5:57
  • Sorry, it is a question – vishnu m c Sep 11 '17 at 6:54
  • Setting the link restores Stretch to the naming behavior until Jessie: all devices get kernel names, such as eth0, wlan1, especially for SUB network adapters. Read the official documentation I've provided a link to above. There are no unwanted side effects, as far as I know ... compare this with the unwanted side effects introduced with the new MAC48 naming scheme and systemd-networkd (especially as documentation on those stuff is scarce and thin). – TheDiveO Sep 11 '17 at 7:10

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.