การ start and stop network service บน FreeBSD


rc.conf

FreeBSD: How To Start / Restart / Stop Network and Routing Service
by
nixcraft

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
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

ifconfig re0 down
 
To start network card (NIC) on fly:
# ifconfig network-interface up

ifconfig re0 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
Please note that script will do all necessary work for you i.e. it will start network, routing, firewall etc.

 

http://www.cyberciti.biz/tips/freebsd-how-to-start-restart-stop-network-service.html

คำสำคัญ (Tags): #start and stop network service
หมายเลขบันทึก: 308429เขียนเมื่อ 25 ตุลาคม 2009 14:00 น. ()แก้ไขเมื่อ 22 มิถุนายน 2012 12:57 น. ()สัญญาอนุญาต: ครีเอทีฟคอมมอนส์แบบ แสดงที่มา-ไม่ใช้เพื่อการค้า-อนุญาตแบบเดียวกันจำนวนที่อ่านจำนวนที่อ่าน:


ความเห็น (0)

ไม่มีความเห็น

พบปัญหาการใช้งานกรุณาแจ้ง LINE ID @gotoknow
ClassStart
ระบบจัดการการเรียนการสอนผ่านอินเทอร์เน็ต
ทั้งเว็บทั้งแอปใช้งานฟรี
ClassStart Books
โครงการหนังสือจากคลาสสตาร์ท