Date: Tue, 21 Dec 1999 11:26:26 +0300 (MSK) From: Dmitry Valdov <dv@dv.ru> To: "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net> Cc: freebsd-stable@freebsd.org Subject: Re: alias ip addresses not pingable Message-ID: <Pine.BSF.3.95q.991221111246.24276D-100000@xkis.kis.ru> In-Reply-To: <199912202308.PAA44335@gndrsh.dnsmgr.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi! btw, I've seen the same problem. I think it doesn't depend on netmask. I'll try to explain: ifconfig doesn't add route for new alias to loopback if You ping new IP address before adding it as alias. For example: 1. We are going to add IP 1.2.3.4 as alias to ed0 2. ping 1.2.3.4 (before adding) - from the same host (!) 3. ifconfig ed0 1.2.3.4 255.255.255.255 alias Result: ping from other host - OK ping from localhost - not OK 4. route add 1.2.3.4 127.0.0.1 ping from localhost - OK. If You skip step 2 in this example, You'll not need to route add 1.2.3.4 to loopback - it adds automaticly. So, in his example when he tests it after boot it "makes" step 2. as in my example. Why? Sorry for my english. I think, You understood. Example: comin# ping 195.98.32.140 PING 195.98.32.140 (195.98.32.140): 56 data bytes ^C --- 195.98.32.140 ping statistics --- 4 packets transmitted, 0 packets received, 100% packet loss comin# ifconfig fxp0 inet 195.98.32.140 netmask 255.255.255.255 alias comin# ping 195.98.32.140 PING 195.98.32.140 (195.98.32.140): 56 data bytes ping: sendto: Host is down ping: sendto: Host is down ping: sendto: Host is down ^C --- 195.98.32.140 ping statistics --- 5 packets transmitted, 0 packets received, 100% packet loss and: comin# ifconfig fxp0 inet 195.98.32.141 netmask 255.255.255.255 alias comin# ping 195.98.32.141 PING 195.98.32.141 (195.98.32.141): 56 data bytes 64 bytes from 195.98.32.141: icmp_seq=0 ttl=255 time=0.084 ms 64 bytes from 195.98.32.141: icmp_seq=1 ttl=255 time=0.051 ms ^C --- 195.98.32.141 ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.051/0.068/0.084/0.016 ms Dmitry. On Mon, 20 Dec 1999, Rodney W. Grimes wrote: > Date: Mon, 20 Dec 1999 15:08:31 -0800 (PST) > From: "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net> > To: Randy Bush <randy@psg.com> > Cc: eddy@isi.edu, FreeBSD Stable <freebsd-stable@FreeBSD.ORG> > Subject: Re: alias ip addresses not pingable > > > >> aliases should have a netmask of 255.255.255.255, as seen in ifconfig(8) > > > why? i regularly use aliases with masks smaller than /32, on a 3.1 > > > system e.g: > > > > well, it turned out that > > > > if i > > boot with the alias netmask of 255.255.255.0 > > it does not work > > delete the alias > > ifconfig the alias with a /32 > > it still does not work > > > > but if i boot with a /32 alias, it works! > > Take a look at netstat -rn in the 2 different situations you describe > above. Your probably getting an error during the boot with alias /24 > that has to do with the fact it can't add the route to the address as > the route already exists. > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" 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.991221111246.24276D-100000>