ifconfig alias problem

In other os’s (e.g. windows) you have the possibility
to set more then one IP-address for one interface.
For this purpose there is
ifconfig alias
utility in TCP/IP V4.2x.
Unfortunately this possibility is not perfect.
For example the IP-addresses are the following:

ifconfig en1 192.168.17.2
ifconfig en1 alias 192.168.16.2

Let suppose, there is a foreign host on the network 192.168.16
having the IP-address 192.168.16.17.

In this case the echo request works perfectly:

Source Destination Protocol Info
192.168.16.2 192.168.16.17 ICMP Echo (ping) request
192.168.16.17 192.168.16.2 ICMP Echo (ping) reply
192.168.16.2 192.168.16.17 ICMP Echo (ping) request
192.168.16.17 192.168.16.2 ICMP Echo (ping) reply

The higher layer does not work perfectly, because the destination
address equals to the primary address of the interface (i.e.
192.168.17.2), for example:

Source Destination Protocol Info
192.168.17.2 192.168.16.17 TCP 1026 > telnet …
192.168.16.17 192.168.17.2 TCP telnet > 1026 …
192.168.17.2 192.168.16.17 TELNET Telnet Data …
192.168.16.17 192.168.17.2 TELNET Telnet Data …

If you have luck, there is no default gateway set for the foreign
host, so some applications, e.g. telnet or netprint can work. If there
is a gateway address set for the foreign host, all the replies will be
sent to the gateway, so no answer will be given.

Questions: Is this phenomenon mentioned above is a bug or a feature of
the TCP/IP V4.2x? Is there any other way to set more then one
IP-addresses for one interface?

TIA: Jozsef Pal


| | | | | |_ |_ || || |
|| || |_ | | | | | | |_

Jozsef Pal, Ph.D.El.Eng. Voice: +36 1 457-82-26
VEIKI Research Institute Fax: +36 1 457-82-28
Division for Control Engineering Mobil: +36 30 960-69-23
H-1251 Budapest, P.O.B. 80. Email: j.pal@veiki.hu
HUNGARY Web: http://www.veiki.hu