Re: Restart Networks
From: Tom Vilot (tom_at_vilot.com)
Date: 03/31/05
- Previous message: Juan Sanchez: "Re: ssh - restricted shell"
- In reply to: Abu Khaled: "Re: Restart Networks"
- Next in thread: Danny Pansters: "Re: Restart Networks"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 30 Mar 2005 17:52:35 -0700 To: Abu Khaled <khaled.abu@gmail.com>
> > On linux variants, you can run a command like:
> > /etc/init.d/network restart
> > that will restart network serverices ie, reinitialize ifconfig setup, reload
> > IPs for a local NIC.
> >
> > Does anyone know if there is a similar command or command set in
> > FreeBSD?
You can also try just restarting the interface. On my laptop, for
example, running FreeBSD 5.3, I re-start the ndis based network
interface thusly:
/etc/rc.d/ndis restart
where that script is:
----------------------------------------------------------------------
#!/bin/sh
# By Mario S. 2004
# PROVIDE: ndis
# KEYWORD: FreeBSD
. /etc/rc.subr
name="ndis"
start_precmd=""
stop_precmd=""
start_cmd="ndis_yastart"
stop_cmd="ndis_yastop"
ndis_yastart()
{
echo "Starting NDIS network driver: "
sysctl dev.ndis.0.SSID="myssid"
ifconfig ndis0 192.168.1.234
route add default 192.168.1.1
echo "Done"
}
ndis_yastop()
{
ifconfig ndis0 down
kldunload if_ndis
killall dhclient
}
load_rc_config $name
run_rc_command "$1"
----------------------------------------------------------------------
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
- Previous message: Juan Sanchez: "Re: ssh - restricted shell"
- In reply to: Abu Khaled: "Re: Restart Networks"
- Next in thread: Danny Pansters: "Re: Restart Networks"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|