* frantisek holop <min...@obiit.org> [120724 03:14]: > hi there, > > consider a notebook with two nic's: re0 (ethernet) > and urtwn0 (usb wifi). let's say, at boot time > there is ethernet connection and /etc/hostname.re0 > contains "dhcp". urtwn0 is not plugged in. > > later, i want to switch to wifi. > > what i do: insert the usb wifi (/etc/hostname.urtwn0 > contains the correct network data), i disconnect the > ethernet cable, route -n flush, ifconfig re0 down, > sh /etc/netstart. > > what i expect: network is now through wifi. > > what i get: urtwn0 gets an IP, but route shows that the > default route is still trying to go through re0, even if > i comment out dhcp from /etc/hostname.re0 > > how can i persuade the system to forget about re0?
man ifconfig priority n Set the interface routing priority to n. This will influence the default routing priority of new static routes added to the kernel. n is in the range of 0 to 16 with smaller numbers being better.