Hi all,
I'm a bit puzzled.
This is my /etc/rc.conf:
If I now change my IP, e.g.
Taking
Why and how does a change in IP with
I'm a bit puzzled.
This is my /etc/rc.conf:
Code:
[..]
ifconfig_em0="inet 192.168.10.3 netmask 255.255.255.0"
defaultrouter="192.168.10.1"
[..]
defaultrouter
sets the default gateway (right?)If I now change my IP, e.g.
Code:
$ ifconfig em0 inet 192.168.10.5 netmask 255.255.255.0
Code:
$ ping www.freebsd.org
PING wfe0.nyi.freebsd.org (96.47.72.84): 56 data bytes
ping: sendto: No route to host
ping: sendto: No route to host
ping: sendto: No route to host
^C
--- wfe0.nyi.freebsd.org ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss
Taking
netstat -r
before and after change of IP I see that the default gateway has been removed:
Code:
$ diff before after
5d4
< default home UGS em0
8c7
< 192.168.10.3 link#1 UHS lo0
---
> 192.168.10.5 link#1 UHS lo0
Why and how does a change in IP with
ipconfig
, remove the default gateway?