FreeBSD

FreeBSD

 

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

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:

To start FreeBSD network service:

/etc/rc.d/netif start

To stop FreeBSD network service:

/etc/rc.d/netif stop

To restart FreeBSD network service:

/etc/rc.d/netif restart

Manual method using ifconfig

To stop network card (NIC) on-fly:

ifconfig network-interface down

To start network card (NIC) on fly:

ifconfig network-interface up

To list down network interface:

ifconfig -d

To list up network interface:

ifconfig -u

FreeBSD Update / restart routing tables / service

It is also necessary to update routing table after restating networking service, enter:

/etc/rc.d/routing restart

How do I restart network service over ssh session?

You need to type the commands as follows in order to avoid any problems:

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

FreeBSD 4.x and prior version only - start, restart, stop network service

1) To start network service under FreeBSD you need to copy special script as follows:

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

2) Execute script:

. /etc/network

OR

sh /etc/network
  • 0 Uživatelům pomohlo
Byla tato odpověď nápomocná?

Související články

NetBSD

Balíčky Aktuální verze: http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/6.1.5/All/...

OpenBSD

System Konfigurační skripty a soubory v: /etc/ Skripty na obsluhu démonů v: /etc/rc.d/...