alias-IP & alias-Hostname

L

lkrao

Guest
Hello Forum members,

I am new to the Linux administration and i have a question on the below requirement , requirement is as below

Create a new alias-IP & alias-Host name to the existing virtual machine ( RHEL 6.6)

I have created alias-IP and here is the below

eth3 Link encap:Ethernet HWaddr 00:12:34:A0:56:00
inet addr:10.1.2.3 Bcast:10.1.2.3 Mask:255.255.255.0
inet6 addr: ab10::123:45aa:abc1:1200/12 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:123456789 errors:0 dropped:0 overruns:0 frame:0
TX packets:123456789 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:123456789012 (123.4 GiB) TX bytes:123456789012 (456.1 GiB)

eth3:1 Link encap:Ethernet HWaddr 00:12:34:A0:56:00
inet addr:10.1.2.4 Bcast:10.1.2.3 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:31711983 errors:0 dropped:0 overruns:0 frame:0
TX packets:31711983 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:123456789012 (12.4 GiB) TX bytes:123456789012 (24.1 GiB)

But the users have a request ( they use this values in the script to start the servers and bindd them to the IP & PORT ) where in when they SSH with the alias-IP and do

hostname -i

it should give 10.1.2.4 but is is giving 10.1.2.3

for alias-Host name i have added the DNS entries but users have the similar requirement there as well

hostname -s

It should give them actual host-name or alias-Hostname based on how they login , Can you please help me with this
 


Latest posts

Top