This is a discussion on Re: /etc/rc.d/netif wont add default gateway - FreeBSD ; Hi, * area damai™ [071202 21:42]: > whenever i run /etc/rc.d/netif it will read rc.conf and add the pc IP and > netmask but it wont read the default gateway resulting lost connectivity to > internet > # -- my ...
* area damai™
> whenever i run /etc/rc.d/netif it will read rc.conf and add the pc IP and
> netmask but it wont read the default gateway resulting lost connectivity to
> # -- my /etc/rc.conf :
> ifconfig_rl0="inet 192.168.1.9 netmask 255.255.255.0"
> # -- while issuing /etc/rc.d/netif restart:
> [root@msc ~]# /etc/rc.d/netif restart
> Stopping network: lo0 rl0 plip0 pfsync0 pflog0.
what happens is that "/etc/rc.d/netif restart" first runs
"/etc/rc.d/netif stop". This stops all network interfaces.
Now the kernel routing system gets notified that these interfaces
are no longer available and deletes all routes that use this
After that "/etc/rc.d/netif start" runs and the interfaces
become available again. Every time a network interface becomes
available, the kernel adds a route to the immedialtely connected
network (which is determined by interface address and netmask).
So stopping an interface has the side effect of clearing ALL routes
going through this nterface, while starting an interface has only
the side effect of adding a route for the net that is locally
connected to this interface.
The kernel can not add the default route on its own again because
all information about this route had been deleted ehrn the interface
To add non-local routes (including the default route) you could now
run "/etc/rc.d/routing start"
email@example.com mailing list
To unsubscribe, send any mail to "firstname.lastname@example.org"