Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Dec 2006
usb/ethernet ip address selection
When I connect the usb device, ifconfig automatically shows a new interface "usbX", and it has an assigned IP address, e.g. "192.168.X.1" - yes, the "X" is the same number between the address and the interface name.
Each time I connect the usb device, it gets a different ip address...
192.168.9.1, 192.168.10.1, etc (actually the device address ends in .2, the PC is .1)
How do I configure this device to always have the same address? Or maybe it's more accurate to ask, how do I configure linux to always assign the network address with this device?
Well, if I had to do this, I would look into the /etc/network/interfaces file. But as even the interface name changes, this could become a major pain in the arse to configure. Good luck!
- Join Date
- Jun 2010
Maybe you can add a crond script to detect your usb device, When It detect your device is insert , reconfig the ip addr . When the device is removed ,start detect. But
I think it is not a goodway to do it . ^_^