1828180 Members
2286 Online
109975 Solutions
New Discussion

Re: Loop back interface

 
Fayez
Trusted Contributor

Loop back interface

Hi all,

I give ip address for the loopback interface using the following command :
ifconfig lo0:1 192.168.1.1 netmask 255.255.255.0
I tested my configuration with the ping command from my PC and it was succesful.
Put when I tried to telnet to that ip address from my PC, it didn't work.
Can any one help me??
Thanks for all.....
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: Loop back interface

I don't know why but.....

But don't change the loopback address.

There is no good reason for it.

It messes up networking.

Leave it alone.

Change it back to the default in /etc/rc.config.d/netconf

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Simon Hargrave
Honored Contributor

Re: Loop back interface

You can't set your "loopback" device with a LAN address, you have to bind the address to your LAN card.

Assuming you're not familiar with HPUX, your easiest recourse will be to run "sam", and configure lan0 (which will be the default internal LAN card - you may need lan1/lan2 etc if you have separate LAN cards).

lanscan will show you what cards you have installed.
Jeff Schussele
Honored Contributor

Re: Loop back interface

Hi Fayez,

If you're referring to the "localhost" entry in /etc/hosts that has loopback as an alias - DO NOT CHANGE THAT FROM 127.0.0.1
It should remain

127.0.0.1 localhost loopback

You'll break a lot of stuff if you do. It's used to keep actual *local* traffic inside the box & off the subnet.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Fayez
Trusted Contributor

Re: Loop back interface

Hi,

What I'm looking to do is to use 'System IP' facility.

I have two network cards, and by giving my loopback lo0:1 an ip address, it will be available as long as one interface remains usable (NOT lo0:0 it still have 127.0.0.1), and it is supported by HPUX as in the docs.

See the man page of ifconfig....
rick jones
Honored Contributor

Re: Loop back interface

IIRC you can do virtual IPs by binding an IP address to lo:n, but the physical NICs still must have IP addresses of their own.

when you say the ping worked, but telnet did not, can you be a bit more specific about the failure messages when you tried to telnet.

for "HA" on links, the "better" solution is to use Auto Port Aggregataion
there is no rest for the wicked yet the virtuous have no pillows
Fayez
Trusted Contributor

Re: Loop back interface

Hi,
I already gived an IP address for the physical ethernet cards :

lan0 192.168.0.115 255.255.255.0
lan1 192.168.1.1 255.255.255.0
lo0:1 192.168.2.1 255.255.255.0

and I execute the following command on my PC:

route add 192.168.2.1 192.168.0.115

The ping command to the VIP done successfully, and when i tried to telnet in using the VIP from my PC the following error message appear:

Could not open a connection to host on port 23 : Connect failed
Sridhar Bhaskarla
Honored Contributor

Re: Loop back interface

Hi,

Your configuration should work. Since your ping is working, then I assume your ip_forwarding is enabled.

Are you able to telnet to the workstaion from your PC using the regular interface?.

Enabled connection logging with inetd (inetd -l) and observe syslog.log while you try to connect to it.

Last but not the least, check if there is firewall between your PC and the system that is not blocking access to port 23 for the VIP.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Fayez
Trusted Contributor

Re: Loop back interface

Hi all,

I am very sorry about my little supplied details.
First there is no firewall between my PC and the server.
And I can telnet to my server using its standard interface IP.
I tried another solution like the following

lo0:1 192.168.0.112 255.255.255.0

And on my PC could not either connect to this IP even it is in the same network, so I did the following:

arp -s 192.168.0.112 xx.yy.zz (the MAC address of lan0)

And it works correct.
But I cannot do this since I have to issue this command on every workstation on the LAN, and I want my VIP to be on different subnet, so both subnets (192.168.1.0 and 192.168.0.0) can connect using my VIP.

Thanks for your response...
rick jones
Honored Contributor

Re: Loop back interface

http://docs.hp.com and a search for "virtual IP" might be helpful.

As for needing to add the MAC address of the PC manually, indeed, that should not be required. If you could further describe the topology of your network and any ndd settings you may have changed that might help. Also full netstat -rn output.
there is no rest for the wicked yet the virtuous have no pillows