OUT - OF - THE - BOX.
I just had to assign the IP address 10.0.0.1 to my eth1 interface with something like
ifconfig 10.0.0.1 eth1 up
So, thanks again
OUT - OF - THE - BOX.
I just had to assign the IP address 10.0.0.1 to my eth1 interface with something like
ifconfig 10.0.0.1 eth1 up
So, thanks again
Hi Alex,
A question :
My interface is a USB <> ethernet.
When I plug it, the server gives it the name eth1 (all good), but does’nt assign the IP address 10.0.0.1, despite the part of the shell that creates this file :
/etc/network/interfaces.d/eth1.conf
that contains :
allow-hotplug eth1
iface eth1 inet static
address 10.0.0.1/24
I thought that the “allow hotplug” option would detect the presence of eth1 and assign it the IP address.
Sounds weird no ?
And also, the command
root@box:~# ifup eth1
ifup: unknown interface eth1
Also weird no ?
Thanks in advance for your kind help
Then I guess it doesnt know about your extra interface … which should also be absent from ip a
?
If I dont assign manually the IP to eth1 (with ifconfig eth1 up 10.0.0.1
), then the command ip a
results this :
6: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether a0:ce:c8:5b:59:e9 brd ff:ff:ff:ff:ff:ff
There is indeed no IP adress assigned but the interface is there.
Yo,
Just to let you know that I found out where the problem was : Raspian uses a weird / different than Debian / poorly documented system to assign a static IP address to an interface.
I uploaded the config files and now everything works as expected.
More information :
To set up a static IP using the new dhcpd system edit your /etc/dhcpcd.conf file and add :
# Static IP configuration
interface eth1
static ip_address=10.0.0.1/24
static routers=192.168.0.1
static domain_name_servers=8.8.8.8 8.8.4.4
You will also have to edit your /etc/network/interfaces file so that the eth1 entry looks like this:
auto eth1
allow-hotplug eth1
iface eth1 inet **manual**