LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-05-2009, 04:41 AM   #1
nekkro-kvlt
LQ Newbie
 
Registered: May 2009
Posts: 20

Rep: Reputation: 0
[solved]issue with /etc/hosts file


Entries I adds in the hosts file do not works
I think terminal output is better than long words so:

Quote:
bastien@bastien-laptop:~$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 bastien-laptop
10.192.5.200 3560
10.192.5.11 4507
10.192.5.250 7603_bas
10.192.5.28 7603_haut
10.192.5.253 7609
10.192.5.245 7609_2



# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
bastien@bastien-laptop:~$ ping 4507
connect: Invalid argument
bastien@bastien-laptop:~$ ping 10.192.5.11
PING 10.192.5.11 (10.192.5.11) 56(84) bytes of data.
64 bytes from 10.192.5.11: icmp_seq=1 ttl=255 time=1.71 ms
64 bytes from 10.192.5.11: icmp_seq=2 ttl=255 time=1.36 ms
^C
--- 10.192.5.11 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 1.368/1.540/1.713/0.176 ms
bastien@bastien-laptop:~$
I rebooted my laptop but no success... It's the same for all entry i added... Any ideas ?
PS: I'm under ubuntu 9.0.4

Last edited by nekkro-kvlt; 06-05-2009 at 06:06 AM.
 
Old 06-05-2009, 04:49 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Hostnames in /etc/hosts should always start with a-z and can never start with 0-9.

4507 would be illegal, a4507 would be legal.

Hope this helps.
 
Old 06-05-2009, 06:05 AM   #3
nekkro-kvlt
LQ Newbie
 
Registered: May 2009
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by druuna View Post
Hi,

Hostnames in /etc/hosts should always start with a-z and can never start with 0-9.

4507 would be illegal, a4507 would be legal.

Hope this helps.
It worked, thanks !
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to tell what process last wrote to a file? - hosts file being updated by unk kcoriginal Linux - General 1 12-28-2008 11:53 PM
Web browsing fails to load correct URL, ignores /etc/hosts!! Daily issue lefty.crupps Linux - Desktop 6 08-11-2008 02:01 PM
apache2 virtual hosts issue Geminias Linux - Networking 0 10-08-2006 03:23 PM
apache and /etc/hosts issue gravesb Linux - Software 14 08-10-2005 09:32 AM
does the /etc/hosts file work same as the M$ hosts file? Lleb_KCir Linux - Software 6 04-03-2004 04:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration