I have Debian on my BB and have written interfaces file for Static IP.
On Boot-Up It takes IP but After unplugged of LAN cable it does not retain it.
ifconfig eth0 does not Show IP against ethernet interface.
Be sure to click 'more' and select 'suggest as answer'!
If you're the thread creator, be sure to click 'more' then 'Verify as Answer'!
I have Debian on my BB and have written interfaces file for Static IP.
On Boot-Up It takes IP but After unplugged of LAN cable it does not retain it.
ifconfig eth0 does not Show IP against ethernet interface.
Are you modifying the interfaces file? Realize this file is modified by other processes like DHclient. Check if it maybe overwriting the interfaces file. Ubuntu Manpage: dhclient - Dynamic Host Configuration Protocol Client
As far as I know dhclient should not modify static IP addresses or any other part of a static interface (kind of negates the "static" part).
I have static IP addresses set up in interfaces on a couple of computers (not BBB) running Debian and have not had dhclient modify
my interfaces file but that may depend on what's in the file. This is what my interfaces file for the static interface looks like:
# network interface
allow-hotplug eth1
iface eth1 inet static
address 192.168.1.22
netmask 255.255.255.0
gateway 192.168.1.1
If you are not using allow-hotplug eth0 (use man interfaces to check it out) it may be what is causing your problem.
If you are using allow-hotplug please show me what the interfaces file you modified looks like (you can substitute IP addresses
if you want to, I did).
HI,
In Linux and so for even BB, to assign Static IP it is necessary to write interfaces file so i Do.
I have not observed any changes in it since i modify interfaces file, SO no issue of modification by dhclient.
any suggestion.
i used allow-hotplug option in my interfaces though problem persist.
Does your machine which you configured for static IP retain it after unplugged LAN for significant period of time and after insertion of it again.
This is my interfaces file looks
auto eth0
iface eth0 inet static
address 172.16.41.22
netmask 255.255.255.0
gateway 171.16.41.1
auto eth0
iface eth0 inet static
address 172.16.41.22
netmask 255.255.255.0
gateway 171.16.41.1
Is this a typo in bold? Because this cannot work!
Sorry while posting this i made a mistake
auto eth0
iface eth0 inet static
address 172.16.41.22
netmask 255.255.255.0
gateway 172.16.41.1
This is my interfaces file. Do u have any solution regarding this?
Sorry it took so long to get back to you but I've had some computer problems of my own to fix!
In answer to your first question, as far as I know from what I have seen it always retains the static IP address as it should.
ifconfig on my computers always shows the static IP address as configured in interfaces so I'm not sure exactly what you say you are seeing. Could you
post a ifconfig before/after ? The best/easiest way to do this if you have the GUI available is to copy it from a terminal opened from the graphics interface
and paste that into a text editor which you can then copy and paste into the reply. This eliminates a lot of typing and all typos.
I would also suggest that you go back to having allow-hotplug in the interfaces file and remove the auto eth0 since allow-hotplug should bring up the
interface when something is plugged in.
One last question mainly just out of curiosity, what are you plugging the Raspberry Pi in to ?