From owner-freebsd-isp Fri May 21 9:57: 4 1999 Delivered-To: freebsd-isp@freebsd.org Received: from infowest.com (ns1.infowest.com [204.17.177.10]) by hub.freebsd.org (Postfix) with ESMTP id 93AE8159D6 for ; Fri, 21 May 1999 09:57:02 -0700 (PDT) (envelope-from root@infowest.com) Received: by infowest.com (Postfix, from userid 0) id 87C5D20F43; Fri, 21 May 1999 10:57:03 -0600 (MDT) To: freebsd-isp@freebsd.org Subject: Re: Re: ifconfig alias number 2 Reply-To: From: "Aaron D. Gifford" Message-Id: <19990521165703.87C5D20F43@infowest.com> Date: Fri, 21 May 1999 10:57:03 -0600 (MDT) Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Riger Marquis wrote: >> > I am trying to add an ip alias on my fbsd 3.1 box (ifconfig de0 >> > inet 216.61.218.6 netmask 255.255.255.0 alias) >> >> Wrong netmask use 255.255.255.255 > >Why would you use a different netmask on your secondary interfaces (/32 >vs. /24), assuming they're all on the same subnet? > >Is this just a workaround to avoid having to set the route explicitly? If the interface is already configured with an IP (not an alias IP) for the interface, a route already exists for the /24 subnet via this IP so adding aliases should use the /32 netmask. Examples: # Primary IP for interface: # (This adds 10.60.24.0/24 as a directly connected network) ifconfig if0 inet 10.60.24.12 netmask 255.255.255.0 # Alias IP for interface: # (use the all-ones netmask because the system already knows # this network is directly connected) ifconfig if0 inet 10.60.24.13 netmask 255.255.255.255 alias # Alias IP for a separate logical network on the same physical interface: # (DON'T use the all-ones netmask because we want the system to know # that this network is directly connected) ifconfig if0 inet 10.60.44.50 netmask 255.255.255.0 alias # And anoter alias IP: # (Again use the all-ones netmask) ifconfig if0 inet 10.60.44.51 netmask 255.255.255.255 alias Aaron out. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message