From Electron Cloud
Jump to: navigation, search

For example for a Nokia N900, create /etc/udev/rules.d/99-nokia-n900.rules:

SUBSYSTEM=="net", ACTION=="add", ATTRS{idVendor}=="0421", ATTRS{idProduct}=="01c8", ATTRS{manufacturer}=="Nokia", ATTRS{product}=="N900 (PC-Suite Mode)", NAME="n900", RUN+="/sbin/ifconfig n900 192.168.2.14"

This is much less complex than solutions involving ifplugd/netcfg, results in a unique and recognizable network name, and may even work if you plug in multiple USB devices. (Hopefully those which use static IPs all use unique ones though.)