Restarting Network Services Without Rebooting

Pete pete at nrth.org
Mon Nov 21 21:51:47 UTC 2011


(Apologies for the incorrect post to mailing.freebsd.questions
newsgroup :( )


Hello,

Occasionally I'm disconnected from my cable ISP (Virginmedia) which is
making me wonder whether or not it's my fault most of the time or just
occasional 'glitches' with the cable connection.

I have a FreeBSD 8.2 firewall/router box (a Pentium 4 2.8GHz PC clone)
which has two NICs installed. PF is running on this box.

I've recently added the following two rules to my /etc/pf.conf in order
to help with DHCP allocations.


pass in quick log (all) on $ext_if inet proto tcp from any port 67:68 to
any port 67:68 keep state flags S/SA 

pass in quick log (all) on $ext_if inet proto udp from any port 67:68 to
any port 67:68 keep state


I have to say that 90% of the time this firewall/router box runs
flawlessly. The above DHCP 'additions' to the /etc/pf.conf have only
been made today so time will tell whether there's any noticeable
difference.

Today I had another outage (before the firewall DHCP additions were
made) and I got to thinking about how I could restart the network
services on my firewall/router box without rebooting the machine itself.

After some searching I found the following commands which didn't produce
any errors, but I was left with no IP address assigned to my Internet-
facing NIC ($ext_if, which is actually 'sis0').

/etc/rc.d/netif restart && /etc/rc.d/routing restart

If I reboot this machine it *always* configures the network correctly,
providing that there's no problem with the ISP's connection.

Does anyone know what I'm doing wrong here ? Are there more or fewer
commands needed to simulate the effect a reboot of a FreeBSD 8.2 box
would have on general networking ? Should I have
included /etc/rc.d/dhclient in the above command line as well ?

Thanks for your time.

Regards,

Pete.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5807 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20111121/02c59a10/smime.bin


More information about the freebsd-net mailing list