Hello,
I'm working on an embedded Linux application and I need to give the USB ethernet interface (shows up as usb1 in ifconfig) a static IP address.
I've added the following to /etc/network/interfaces and usb1 successfully gets the correct IP on bootup
Code:
auto usb1
iface usb1 inet static
address 192.168.1.100
netmask 255.255.255.0
broadcast 192.168.1.255
However, when I unplug the rj45 cable and plug it back in again the IP address is lost. Doing a simple
Code:
ifdown usb1
ifup usb1
fixes this problem, but it doens't seem to do it automatically.
I need to be able to turn the device on, and whenever I plug in the Ethernet cable, be able to talk to it on a specific IP address..
Any help is appreciated.