Date: Fri, 13 Feb 1998 11:25:17 +1100 (EST) From: Anthony Hill <ahill@blacksun.net.au> To: questions@FreeBSD.ORG Cc: doug@connect.com.au Subject: Re: subnet alias for ethernet device wont work Message-ID: <Pine.BSF.3.95q.980213110939.23713A-100000@blacksun.net.au> In-Reply-To: <Pine.BSF.3.95q.980211134341.20191B-100000@blacksun.net.au>
next in thread | previous in thread | raw e-mail | index | archive | help
Whilst I still have the problem, thanks to everyone who replied to this. The general opionion was that I should use a full class C netmask for the aliases that I add to the ethernet device. This confuses me for two main reasons :- 1. It seems wrong. The address is part of a subnet, why have a mask if it does not reflect the network the address is from ? 2. It doesnt work ! The address is still unreachable from anywhere. (including the local machine) I do have a work-around which is to add a specific route pointing at the loopback address:- /sbin/route add -host 210.8.131.132 -gateway 127.0.0.1 This works fine, but feels like a "hack" - is this a traditional way of doing this sort of thing ? On Wed, 11 Feb 1998, Anthony Hill wrote: > > Sorry for bringing up such a basic problem, but this is starting to drive > me nuts. > > I am using a FreeBSD 2.2.1-RELEASE #0 box as a router and server for my > local network, and have been assigned a /26 subnet (210.8.131.128/26) by > my employer. I have assigned a few numbers to various hosts on the network > and everything seems to be routing fine. > > However I need to bind a few more addresses to the FreeBSD box (for > virtual web servers) and dont seem to be able to get them to work. > > eg :- > bash# ifconfig ed1 > ed1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 > inet 210.8.131.129 netmask 0xffffffc0 broadcast 210.8.131.191 > ether 00:00:01:30:53:91 > bash# > > ..ok 210.8.131.129 is the primary address of the router/server and works > fine. So now I try to add another address to the ethernet card :- > > bash# ifconfig ed1 inet 210.8.131.132 netmask 0xffffffc0 alias > ifconfig: ioctl (SIOCAIFADDR): File exists > bash# ifconfig ed1 > ed1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 > inet 210.8.131.129 netmask 0xffffffc0 broadcast 210.8.131.191 > inet 210.8.131.132 netmask 0xffffffc0 broadcast 210.8.131.191 > ether 00:00:01:30:53:91 > bash# > > ..so aside from the "ifconfig: ioctl (SIOCAIFADDR): File exists" message > (anyone know what it means?), that seemed to work fine. However, I cant > ping the new address. :- > > bash# ping 210.8.131.132 > PING 210.8.131.132 (210.8.131.132): 56 data bytes > ^C > --- 210.8.131.132 ping statistics --- > 5 packets transmitted, 0 packets received, 100% packet loss > bash# > > Now when working with full class C's, this is all I've had to do, so now > I'm on unfamilar ground, but think maybe its a problem with routed ? > route shows this :- > > bash# route get 210.8.131.132 > route to: 210.8.131.132 > destination: 210.8.131.132 > interface: ed1 > flags: <UP,HOST,DONE,LLINFO,WASCLONED> > recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire > 16384 16384 0 0 0 0 1500 -116 > bash# > > ..and netstat shows :- > > bash# netstat -rn > Routing tables > > Internet: > Destination Gateway Flags Refs Use Netif > Expire > default 203.63.80.135 UGSc 37 28832 tun0 > 127.0.0.1 127.0.0.1 UH 0 125 lo0 > 202.21.8.125 127.0.0.1 UH 0 25134 lo0 > 203.63.80.135 202.21.8.125 UH 35 0 tun0 > 210.8.131.128/26 link#1 UCc 4 0 > 210.8.131.129 0:0:1:30:53:91 UHLW 2 70034 lo0 > You have mail in /var/mail/ahill > bash# > > ..so can someone please tell me what I am missing ? > > Thanks in advance > > Anthony Hill > > btw. Please reply to the "from" address as Im not subscribed to the list, > and my news feed sucks. > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95q.980213110939.23713A-100000>