Re: Restart Networks

From: Tom Vilot (tom_at_vilot.com)
Date: 03/31/05

  • Next message: Tom Vilot: "Re: Sound Editors"
    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"


  • Next message: Tom Vilot: "Re: Sound Editors"

    Relevant Pages

    • Re: Problem switching to static IP address
      ... Have you tried using ifconfig? ... networking it reports the network is reconfigured but the network is ... shutdown the network and restart it with the substituted file. ... subject of "unsubscribe". ...
      (Debian-User)
    • Re: Cant connect to the internet
      ... In the Startup tab, ... Click OK and restart your computer. ... I ran the Network Diagnostics on the laptop. ...
      (microsoft.public.windowsxp.network_web)
    • Re: NetworkManager tutorials?
      ... Could you explain what you mean by restarting the network since that ... As in 'service network restart' ... I know that ndiswrapper generated some pretty vociferous condemnations ... We're hardly in a position to demand GPL chipsets ...
      (Fedora)
    • Re: Theory Question
      ... You are missing my points (or perhaps I typed too fast to make them ... Crist supplied the ifconfig scenario, I just followed up on it, ... With the correct supporting measures in place, obscuring network topology is ...
      (FreeBSD-Security)
    • Re: Batch file and MFC (Properly Terminating Application)
      ... is no need for restart. ... Mostly the reason an install needs to restart WIndows ... The need to restart after network settings changed went away in Win2K; ...
      (microsoft.public.vc.mfc)