FreeBSD: How To Start / Stop / Restart Network and Routing Services

byVivek GiteonDecember 1, 2004

FreeBSD is a Unix-like free operating system. You can install to choose third party software on FreeBSD from the Ports Collection. Many services such as POP3 server daemons, IMAP, etc. could be started using the inetd. However, networking can be stop or started using special script located in /etc/rc.d/ directory. This directory includes script to stop or start network, and other services such as SSH server.

FreeBSD 5.x/6.x and above version - start or stop network service

FreeBSD 5.x/6.x and above version comes with netif script to start, restart, stop network service. You need to login as a root user. Then you can use following commands:

Hi! Thank you for the easy to unterstand articles. I try to use vlans. How can I ‘restart’ the virtual interface? The command /etc/rc.d/netif restart vlan5 not works for me. Another vlan question: what about interfaces? Must have the external/real/physical interface an address?

I wish the caveat note about running /etc/rc.d/routing restart immediately afterwards was near the note about /etc/rc.d/netif restart — I just took down my host remotely by not finding out that tidbit a little too late after it didn’t come up.

Appreciate the info. A little asterix ** note beside the first command of “routing restart” would have really saved my nightmare. (I was already in a panic to reboot my network interface, and didn’t get a chance to read through the entire document — it seemed easy and clear enough with the first command)