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=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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B2B5430.1030204>