Date: Fri, 18 Dec 2009 11:06:40 +0100 From: Bas Smeelen <b.smeelen@ose.nl> To: freebsd-questions@freebsd.org Subject: Re: ifdown/ifup under FreeBSD? Message-ID: <4B2B5430.1030204@ose.nl> In-Reply-To: <91b92520912180136s2a0c0916s8f82d07c8a1c0fb2@mail.gmail.com> References: <91b92520912140623n188e2dd7h1b9115f36faef2ac@mail.gmail.com> <91b92520912170609h2b4d9e8fv8c380924130e04fa@mail.gmail.com> <Pine.LNX.4.64.0912171741390.14221@sta1.canmos.ru> <91b92520912170655u2625aeedkf83fbb220696f06d@mail.gmail.com> <91b92520912170656n1ac767e4i4f51d77790f996@mail.gmail.com> <4B2A4BA3.10309@FreeBSD.org> <91b92520912180136s2a0c0916s8f82d07c8a1c0fb2@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Sandra Kachelmann wrote: > On Thu, Dec 17, 2009 at 4:17 PM, Greg Larkin <glarkin@freebsd.org> wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Sandra Kachelmann wrote: >> >>> On Thu, Dec 17, 2009 at 3:46 PM, Igor V. Ruzanov <igorr@canmos.ru> wrote: >>> >>>> |Under RedHat Linux I can configure an interface, routes and so on in >>>> |/etc/sysconfig/network-scripts/ifcfg-eth1, >>>> |/etc/sysconfig/network-scripts/routes-eth1 then simply run: >>>> | >>>> |$ ifup eth1 >>>> | >>>> |and it will set all the routes/netconfig/aliases I just configured. >>>> | >>>> |Is there something similar in FreeBSD? >>>> | >>>> |I tried configuring aliases in /etc/rc.conf and running: >>>> | >>>> |$ /etc/rc.d/netif restart >>>> | >>>> |but that just ended in errors that the route was already configured >>>> |and so on. Sure I could do all the work manually with ifconfig and >>>> |route but that's not my question. >>>> | >>>> Under FreeBSD (as well as under Linux) you could use Zebra (Zebra/Quagga >>>> projects) to configure any interfaces/routing specific things. >>>> >>> I try to avoid doing complex routing things on my servers. I leave >>> that up to the NOC guys. They can do that on their fancy cisco >>> switches. I want just one route per interface :-) >>> >>> I just wanted to add a seperate route/ip for the second interface, >>> make it permanent by adding it to /etc/rc.conf and tell my FreeBSD to >>> pretend it's booting up by running /etc/rc.d/netif restart. As others >>> pointed out I forgot /etc/rc.d/route. >>> >>> Sandra >>> >> Hi all, >> >> I use "/etc/netstart", since it includes all of the commands listed >> previously, as well as others that start the DHCP client, firewall, etc. >> > > That's what i was looking for. How do you use it correctly? Just "sh > /etc/netstart"? > That should work. But read the contents of the file. It does not restart anything, just start Quote: # This file is NOT called by any of the other scripts - it has been # obsoleted by /etc/rc.d/* and is provided here only for user # convenience (if you're sitting in single user mode and wish to start # the network by hand, this script will do it for you). It seems like I loose my remote connection when doing it this way due to ipfw which I normally restart with #sh /etc/ipfw.rules & so I don't lose my connection #sh /etc/netstart & or #sh /etc/netstart both connection lost So after a config change of ip and gateway I prefer the netif and routing option DISCLAIMER: This e-mail is for the intended recipient(s) only If you have received it by mistake please let us know by reply and then delete it from your system; Access, disclosure, copying, distribution or reliance on any of it by anyone else is prohibited.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B2B5430.1030204>
