In FreeBSD, an ifconfig call seems to delete the default gateway route, even when given the same IP-address (e.g. when updating the netmask only). Is it a bug or a feature?
As fas as I remember Linux doesn't change the default gateway in this case.
|
feedback
|
|
In FreeBSD an | |||||||
feedback
|
|
I believe this happens because the ifconfig command is actually deleting the old IP and creating the new one, not just changing it. "It's a feature!" | |||
|
feedback
|
|
I was looking for a way to keep the route to default gw in place, but since I saw this thread and tried on my own I guess there's no way. The only thing I had to do is set default gw manually right after setting the ip:
so keep in mind if you're doing this remotely better run both commands with && or you'll get stuck out
| |||
|
feedback
|