telnet 0 vs telnet `hostname` vs telnet 127.0.0.1

telnet 0 vs telnet `hostname` vs telnet 127.0.0.1

Post by Legen » Wed, 06 Oct 1999 04:00:00



Hello all,

    I have a question in networking

What does the command telnet 0 do? I know it will telnet to itself, but does
it go through anything? I mean gateway and anything else? How is it
different from telnet-ing to its nodename? Also What about "telnet
127.0.0.1?" All these telnet do the same thing but are they different? and
How?

Regards,

Benny Pei

 
 
 

telnet 0 vs telnet `hostname` vs telnet 127.0.0.1

Post by Barry Margoli » Thu, 07 Oct 1999 04:00:00




>What does the command telnet 0 do? I know it will telnet to itself, but does
>it go through anything? I mean gateway and anything else? How is it
>different from telnet-ing to its nodename? Also What about "telnet
>127.0.0.1?" All these telnet do the same thing but are they different? and
>How?

When an application uses 0.0.0.0 (the same as 0) as the address in a
connect() call, the OS looks for one of the system's actual addresses and
replaces it with that.  So "telnet 0" is essentially the same as "telnet
`hostname`" if the host only has one address.

telnet 127.0.0.1 will connect to the loopback interface rather than the
systems's network interface.

The differences are very slight.  For instance, if you do "telnet
127.0.0.1" and login, "who" will show that you logged in from localhost.
But if you do "telnet 0" or "telnet `hostname`" you will be shown as having
logged in from your hostname.

--

GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

telnet 0 vs telnet `hostname` vs telnet 127.0.0.1

Post by tusha » Wed, 27 Oct 1999 04:00:00





> >What does the command telnet 0 do? I know it will telnet to itself, but does
> >it go through anything? I mean gateway and anything else? How is it
> >different from telnet-ing to its nodename? Also What about "telnet
> >127.0.0.1?" All these telnet do the same thing but are they different? and
> >How?

> When an application uses 0.0.0.0 (the same as 0) as the address in a
> connect() call, the OS looks for one of the system's actual addresses and
> replaces it with that.  So "telnet 0" is essentially the same as "telnet
> `hostname`" if the host only has one address.

> telnet 127.0.0.1 will connect to the loopback interface rather than the
> systems's network interface.

> The differences are very slight.  For instance, if you do "telnet
> 127.0.0.1" and login, "who" will show that you logged in from localhost.
> But if you do "telnet 0" or "telnet `hostname`" you will be shown as having
> logged in from your hostname.

> --

> GTE Internetworking, Powered by BBN, Burlington, MA
> *** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
> Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

Barry,

I tried to telnet 127.0.0.1 and 0.0.0.0 and 0. All of them indicates that I am logged in from local

host. So please explain it better or leave it.

Thanks,

NOT a UNIX Guru

 
 
 

1. Telnet looping and No hostname from telnet logins

Im y /var/adm/syslog Im getting alot of recvfrom:Connection refused
when someone tries to login. The login process takes a long time as
well, up to two minute, but eventually they login is made. Then
only their IP address is available using w.

I think I have DNS setup properly.

If anyone can be of some assistance. Your help is muchly appreciated
--
Andrew Cochran                  |To Wit, T-Wooo
Ottawa Ontario                  |    
Canada                          |    

2. PHILIPS CM 206 CD-ROM drive

3. telnet vs. rsh vs. rlogin ???

4. will 13W3-to-5BNC cable fix the problem ?

5. Linux vs OS2 vs NT vs Win95 vs Multics vs PDP11 vs BSD geeks

6. Linux Frequently Asked Questions with Answers (Part 2 of 6)

7. telnet: connect to address 127.0.0.1: Connection refused

8. Size limitations kernel

9. - I can't telnet to 127.0.0.1 -- I'm dying over here.

10. telnet: connect to address 127.0.0.1: Connection refused

11. Why libwrap refused connection to telnet from 127.0.0.1

12. can't telnet to 127.0.0.0 after starting dip

13. telnet programming: CAI IP does NOT stop telnet???