Problem
I add alias to my NIC and when I ping the alias IP with
ping I get no response but ping -r produces a response. e.g. Original IP = 192.168.0.2
Subnet = 255.255.255.0The IP alias is:
Alias IP = 10.10.10.2
Subnet = 255.255.255.0 Cause
Outgoing packets will generally contain the base(or real) IP address even if you are trying to send out a packet on the aliased network.
In general, outgoing connections initiated from the server will not work, ping -r bypasses the normal routing tables and sends directly to a host on an attached network.
If the host is not on a directly-attached network, an error is
returned. This option can be used to ``ping'' a local host through
an interface that has no route through it Solution
IP aliasing under OSR 5 is primarily meant to be used on systems that do web hosting or on multiple domain hosting therefore its meant that the IP alias should be on the same subnet as the original NIC.
e.g. Original IP = 10.10.10.1
Subnet = 255.255.255.0The IP alias should be
Alias IP = 10.10.10.2
Subnet = 255.255.255.0Using the command:# ifconfig net[x] alias 10.10.10.2If trying to alias separate subnets then it is recommended to use additional NIC's.
See also
ifconfig(ADMN)