- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- /etc/hosts question???
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2003 06:42 AM
02-09-2003 06:42 AM
/etc/hosts question???
May someone can explain, why I need line:
# HP Loopback
127.0.0.1 localhost loopback
at the /etc/hosts file? And I read, that I shouldn't change this string. Why?
Thank you for explanation!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2003 06:59 AM
02-09-2003 06:59 AM
Re: /etc/hosts question???
127.0.0.1 localhost loopback
loopback is an internal address that uses the TCP stack, but no network card .
besacley the localhost and the loopback are the same and there are for internal network .
dont remove this line from the /etc/hosts .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2003 12:38 PM
02-09-2003 12:38 PM
Re: /etc/hosts question???
There may be additional network information in the file that you can change if you know your network configuration.
loopback always gets used.
If network resolution isn't working based on the info in /etc/hosts it could be because you've set resolution to work elsewhere.
It is common to have a file called /etc/nsswitch.conf which can tell the server to resolve elsewhere first.
Here is mine and what it says.
hosts: dns[notfound=continue unavail=continue tryagain=continue] files
This means, look for network host resolution on a dns server first. then files, wich is /etc/hosts
dns resolution is controlled by what dns servers you machine uses, which could be but doesn't have to be itself.
Here is an example of the /etc/resolv.conf file which controls where your box looks for dns resolution.
[4243#] more /etc/resolv.conf
domain juf.net
nameserver 10.1.10.39
nameserver 10.1.10.45
nameserver 10.1.10.47
This says I'm part of domain juf.net and I look to three nameservers for hos resolution.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2003 01:15 PM
02-09-2003 01:15 PM
Re: /etc/hosts question???
localhost and loopback are aliases for the IP address 127.0.0.1. When a program or script refers to an alias it actually gets 127.0.0.1
127.0.0.1 is defined everywhere in the known universe as an IP address internal to your machine. This definition is part of the fabric of the universe along with the speed of light and why bread falls butter side down.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2003 01:18 PM
02-09-2003 01:18 PM
Re: /etc/hosts question???
Touch that line and you may possibly screw up your machine forever. There are billions and billions of programs and scripts which use the alias localhost or loopback instead of the IP address 127.0.0.1
Remove it and all those programs and scripts stop working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2003 12:11 AM
02-10-2003 12:11 AM
Re: /etc/hosts question???
But, when I use netstat -rn command I see two Interfaces Lo0 and Lan0(actually I had one - Lan0). What the Lo0 means (it's used by loopback, and has a biggest number of USE)?
The output is:
netstat -rn
Routing tables
Destination Gateway Flags Refs Use Interface Pmtu PmtuTime
127.0.0.1 127.0.0.1 UH 8 601 lo0 4608
192.168.20.61 127.0.0.1 UH 10 361827 lo0 4608
default 192.168.20.1 UG 0 4 lan0 1500
192.168.20 192.168.20.61 U 1 2536 lan0 1500
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2003 10:01 AM
02-10-2003 10:01 AM
Re: /etc/hosts question???
lan0 is your real NIC. The lan = LAN part should be clear. The 0 comes because programmers don't count 1, 2, 3 like normal people but always start with 0.
Ron