From owner-freebsd-questions Tue May 14 00:25:16 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id AAA27298 for questions-outgoing; Tue, 14 May 1996 00:25:16 -0700 (PDT) Received: from mailgate.nation-net.com (mailgate.nation-net.com [194.159.125.1]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id AAA27287 for ; Tue, 14 May 1996 00:24:53 -0700 (PDT) Received: from w14.winecellar.co.uk (194.159.125.14) by mailgate.nation-net.com with SMTP (Apple Internet Mail Server 1.0); Tue, 14 May 1996 08:26:05 +0000 Message-ID: <3198351F.720D@nation-net.com> Date: Tue, 14 May 1996 08:24:15 +0100 From: Paul Walsh Organization: Walsh Simmons X-Mailer: Mozilla 2.0 (Win95; I) MIME-Version: 1.0 To: Dean Neumann CC: questions@FreeBSD.ORG Subject: Re: ifconfig aliasing Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk This is the answer to a similar question posted a few weeks ago ( and probably a few weeks before that etc..) .................................................................... Eric Berenguier wrote: > Is it possible to give several adresses to a single network > interface on a FreeBSD system ? > (I know it's possible to do this with latest Linux kernel (IP_ALIAS)) I have no idea how this might be done with ppp or slip, but on ethernet the following: ifconfig alias route add 127.0.0.1 Lazy way to make this permanent: Add these commands to /etc/rc.local More scalable way to permanency: Add the following to /etc/sysconfig: (put them with like config options) -- # network interface aliases interface_aliases="ed1" alias_ed1="alias x.x.x.x" route_alias1="x.x.x.x 127.0.0.1" -- Add the word alias1 to the static_routes= definition. Add the following to /etc/netstart: -- # Set up any aliases to network interfaces. for device in ${interface_aliases}; do eval ifconfig_args=\$alias_${device} ifconfig ${device} ${ifconfig_args} done -- This way if you have more than one alias on an interface you just have: alias_ed1="alias x.x.x.x alias y.y.y.y alias z.z.z.z" route_alias1="x.x.x.x 127.0.0.1" route_alias2="y.y.y.y 127.0.0.1" route_alias3="z.z.z.z 127.0.0.1" static_routes="multicast alias1 alias2 alias3 loopback" All of your network config info is still in one file this way and you can easily see the aliases assigned to an interface. -- _ __ | Only my ideas here unless I say otherwise... ' ) ) / | (BeamJack@IRC) /--' ____/___o __ | "Nondum amabam, et amare amabam... quaerebam quid / \_(_) /_) (__/) )_ | amarem, amans amare." - St Augustine .................................................................... Regards, Paul Walsh (www.nation-net.com)