How to restart/stop/start networking in FreeBSD

Welcome to Linux Screw! If you're new here, you may want to subscribe our RSS feed.

FreeBSD daemonFreeBSD® is an advanced operating system for x86 compatible (including Pentium® and Athlon™), amd64 compatible (including Opteron™, Athlon™64, and EM64T), UltraSPARC®, IA-64, PC-98 and ARM architectures. It is derived from BSD, the version of UNIX® developed at the University of California, Berkeley. It is developed and maintained by a large team of individuals. Additional platforms are in various stages of development.

FreeBSD 5.x/6.x includes netif shell script located in /etc/rc.d/ directory that is meant to restart networking service without system restart. Besides, /etc/rc.d/ contains scripts to start/stop/restart other services such as ssh or squid.

To start FreeBSD networking:

/etc/rc.d/netif start

To stop networking:

/etc/rc.d/netif stop

To restart networking:

/etc/rc.d/netif restart

To restart, start or stop routing service you can do:

/etc/rc.d/routing restart

FreeBSD 4.x and prior versions

To start networking you have to copy shell script as follows:

1) Copy file /usr/share/examples/etc/netstat to /etc dirctory

cp /usr/share/examples/etc/netstart /etc/network

2) And execute the script:

. /etc/network

OR

sh /etc/network

That script will do all necessary work for you (start network, routing, firewall and etc.).

 
 
» You might also be interested in the following articles:
Linux networking stack understanding
Manage FreeBSD kernel modules on the fly
About Linux • Screw
Get FreeBSD ports tree after OS installation
FAQ: How to retreive hardware manufacturer name, serial numbers, etc. in Linux command line



» Want to stay up to date? Subscribe to our E-MAIL or RSS feed!


0 Responses to “How to restart/stop/start networking in FreeBSD”


  1. No Comments

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word




Friendly Sites:Who is behind Linux Screw?
Aspiring Sysadmin | GeekyBits³ | Bash Cures Cancer | TOTMS
Linux Operating System | Small Linux Deployments | My SysAd Blog
The Danesh Project | ZEPY | Linux config Wiki | Planet Sysadmin
The Sys Admin | {buhay sysad} | a non-geek's linux notes
Linux HOWTOs, Tutorials & Projects with Adam Palmer | LinuxAlt.Com
My name is Artem Nosulchik (artiomix AT gmail DOT com) and I'm Linux/Unix, Cisco systems engineer. The main idea of Linux Screw is to share relevant knowledge, skills and observations over The Web. Here you can find a lot of information related to different Linux distributions, FreeBSD, IOS as well as a other Open Source around staff. Read more ››