From owner-freebsd-questions@FreeBSD.ORG Fri Dec 18 10:06:44 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D685106568F for ; Fri, 18 Dec 2009 10:06:44 +0000 (UTC) (envelope-from b.smeelen@ose.nl) Received: from mail.ose.nl (mail.ose.nl [212.178.134.164]) by mx1.freebsd.org (Postfix) with ESMTP id DF0178FC0A for ; Fri, 18 Dec 2009 10:06:43 +0000 (UTC) Received: from localhost ([127.0.0.1]) by mail.ose.nl for freebsd-questions@freebsd.org; Fri, 18 Dec 2009 11:06:41 +0100 Message-ID: <4B2B5430.1030204@ose.nl> Date: Fri, 18 Dec 2009 11:06:40 +0100 From: Bas Smeelen User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <91b92520912140623n188e2dd7h1b9115f36faef2ac@mail.gmail.com> <91b92520912170609h2b4d9e8fv8c380924130e04fa@mail.gmail.com> <91b92520912170655u2625aeedkf83fbb220696f06d@mail.gmail.com> <91b92520912170656n1ac767e4i4f51d77790f996@mail.gmail.com> <4B2A4BA3.10309@FreeBSD.org> <91b92520912180136s2a0c0916s8f82d07c8a1c0fb2@mail.gmail.com> In-Reply-To: <91b92520912180136s2a0c0916s8f82d07c8a1c0fb2@mail.gmail.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Subject: Re: ifdown/ifup under FreeBSD? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Dec 2009 10:06:44 -0000 Sandra Kachelmann wrote=3A =3E On Thu=2C Dec 17=2C 2009 at 4=3A17 PM=2C Greg Larkin =3Cglarkin=40freeb= sd=2Eorg=3E wrote=3A =3E =20 =3E=3E -----BEGIN PGP SIGNED MESSAGE----- =3E=3E Hash=3A SHA1 =3E=3E =3E=3E Sandra Kachelmann wrote=3A =3E=3E =20 =3E=3E=3E On Thu=2C Dec 17=2C 2009 at 3=3A46 PM=2C Igor V=2E Ruzanov =3Cigo= rr=40canmos=2Eru=3E wrote=3A =3E=3E=3E =20 =3E=3E=3E=3E =7CUnder RedHat Linux I can configure an interface=2C routes a= nd so on in =3E=3E=3E=3E =7C/etc/sysconfig/network-scripts/ifcfg-eth1=2C =3E=3E=3E=3E =7C/etc/sysconfig/network-scripts/routes-eth1 then simply run= =3A =3E=3E=3E=3E =7C =3E=3E=3E=3E =7C=24 ifup eth1 =3E=3E=3E=3E =7C =3E=3E=3E=3E =7Cand it will set all the routes/netconfig/aliases I just con= figured=2E =3E=3E=3E=3E =7C =3E=3E=3E=3E =7CIs there something similar in FreeBSD=3F =3E=3E=3E=3E =7C =3E=3E=3E=3E =7CI tried configuring aliases in /etc/rc=2Econf and running= =3A =3E=3E=3E=3E =7C =3E=3E=3E=3E =7C=24 /etc/rc=2Ed/netif restart =3E=3E=3E=3E =7C =3E=3E=3E=3E =7Cbut that just ended in errors that the route was already co= nfigured =3E=3E=3E=3E =7Cand so on=2E Sure I could do all the work manually with ifc= onfig and =3E=3E=3E=3E =7Croute but that=27s not my question=2E =3E=3E=3E=3E =7C =3E=3E=3E=3E Under FreeBSD =28as well as under Linux=29 you could use Zebra= =28Zebra/Quagga =3E=3E=3E=3E projects=29 to configure any interfaces/routing specific thing= s=2E =3E=3E=3E=3E =20 =3E=3E=3E I try to avoid doing complex routing things on my servers=2E I le= ave =3E=3E=3E that up to the NOC guys=2E They can do that on their fancy cisco= =3E=3E=3E switches=2E I want just one route per interface =3A-=29 =3E=3E=3E =3E=3E=3E I just wanted to add a seperate route/ip for the second interface= =2C =3E=3E=3E make it permanent by adding it to /etc/rc=2Econf and tell my Free= BSD to =3E=3E=3E pretend it=27s booting up by running /etc/rc=2Ed/netif restart=2E= As others =3E=3E=3E pointed out I forgot /etc/rc=2Ed/route=2E =3E=3E=3E =3E=3E=3E Sandra =3E=3E=3E =20 =3E=3E Hi all=2C =3E=3E =3E=3E I use =22/etc/netstart=22=2C since it includes all of the commands l= isted =3E=3E previously=2C as well as others that start the DHCP client=2C firewa= ll=2C etc=2E =3E=3E =20 =3E =3E That=27s what i was looking for=2E How do you use it correctly=3F Just= =22sh =3E /etc/netstart=22=3F =3E =20 That should work=2E But read the contents of the file=2E It does not restart anything=2C just start Quote=3A =23 This file is NOT called by any of the other scripts - it has been =23 obsoleted by /etc/rc=2Ed/* and is provided here only for user =23 convenience =28if you=27re sitting in single user mode and wish to star= t =23 the network by hand=2C this script will do it for you=29=2E It seems like I loose my remote connection when doing it this way due to ipfw which I normally restart with =23sh /etc/ipfw=2Erules =26 so I don=27t= lose my connection =23sh /etc/netstart =26 or =23sh /etc/netstart both connection lost So after a config change of ip and gateway I prefer the netif and routing option DISCLAIMER=3A This e-mail is for the intended recipient=28s=29 only If you have received it by mistake please let us know by reply and then del= ete it from your system=3B Access=2C disclosure=2C copying=2C distribution or reliance on any of it by= anyone else is prohibited=2E