LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-04-2006, 05:30 PM   #1
mr_coffee
Member
 
Registered: Jan 2006
Location: PA
Distribution: Mandriva Power Pack 2006
Posts: 146

Rep: Reputation: 15
Unhappy I think i messed up my 2 files that tell linux to connect to the internet, help plz


Hello everyone, For some reason I booted up the computer and no internet is working at all, but when i boot into windows it works fine. THese are the 2 files i messed with:
/etc/sysconfig/network
which now looks like this:
NETWORKING = YES
HOSTNAME = localhost.localdomain

and
/etc/hosts
127.0.0.1 localhost.localdomain localhost

and i thought that is what was orignally in the files, but now i cannot connect to the internet. Also when i boot up, It is taking forever to boot because for some reason its trying to determine the IP address of my 2 firewire ports, and yet nothing is even hooked up into them. I connect to the itnernet thorugh a cable modem. The ethernet is a Realtek card. And it was working fine. Its located at eth1, eth0 and eth2 are my firewire ports. I went iton the control pannel and deleted the network interfaces of all of my possible internet connections, eth0...eth2 and then went to set up eth1 which is the ethernet port by using create a new network interface. I said i wanted to set up a cable connection, and i just kept everything default and yet sitll no luck. I tried booting into root and it doesn't let me connect to the internet either. Any ideas? Thanks. This was working fine like a day ago!! It all started when i was trying to change my machine name. Now it says coffee@localhost. It use to say coffee@x1-a3-blah-blah-blah and it would work fine. But somtimes it would stop working when i would boot up and go into a terminal and i noticed all the times my internet stopped working is when suddenly my machine name changed to localhost. But now its always localhost and its because i i configured those files so it should still work with localhost!
 
Old 02-04-2006, 05:51 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Go in the MCC and give your computer a real hostname, such as coffee. The domain name is the name that you give your local network. localhost is an alias for your loopback interface. It is what a program would use as a hostname for a computer that it is running on. I'm not sure, but localdomain may be the network address alias of the "lo" (localhost) device, so that could be wrong also.

There are two root commands that you can use to set the hostname, and domainname. They are called "hostname" and "domainname". After changing either, you will need to restart KDE. The interface that connects to the cable modem isn't connected to the LAN, so you may need to get the domain name from DHCP.

Last edited by jschiwal; 02-04-2006 at 05:59 PM.
 
Old 02-04-2006, 08:32 PM   #3
mr_coffee
Member
 
Registered: Jan 2006
Location: PA
Distribution: Mandriva Power Pack 2006
Posts: 146

Original Poster
Rep: Reputation: 15
jschiwal thanks for the info, So how do i get the domain name fom the DHCP? and why would this keep me from connecting to the internet? Did you see anything obviously wrong with my files? Thank u!
 
Old 02-05-2006, 09:02 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
You can make up a name for your Lan yourself. One way to do it is with the "domainname" command. Another, is using the Network Setup in the MCC.
Naming your computer localhost will cause a problem because that is the alias for the LO interface. Using that name on another computer for instance will reach that other computers LO interface rather than your computer.
I'm not certain about the consequences of naming your domain "localdomain", however, I think this would be an alias for the network address of the LO device. I.E. 127.0.0.0 and netmask 255.0.0.0 .

You could use localhost.localdomain when refering to your local machine offline. For example using root@localhost.localdomain to access root's mail on your host. This supplies a shortcut where the linklayer is bypassed, because it isn't necessary to access the network.

The dhcpd client service will supply your host's name "hostname" to the server. It will also gather information from the server and modify certain files such as /etc/resolv.conf with items such as the name server addresses.

I'm not even sure if the file you edited was the right one. It would be better using the "hostname" and "domainname" commands on your computer, or to go through the MCC. I used to use Mandrake, but I'm using SuSE right now. The /etc/sysconfig/network/config file on my laptop doesn't contain a reference to my hostname.

There is a trick that some people use. Suppose that there is a website or host that you don't want the computer to reach. Adding the name to the /etc/hosts file and giving it the fake address of 172.0.0.1 (The LO interface address) will prevent accessing that site. Read the /etc/host.conf file if you don't know why this would work.

Last edited by jschiwal; 02-06-2006 at 07:26 AM.
 
Old 02-11-2006, 10:51 AM   #5
mr_coffee
Member
 
Registered: Jan 2006
Location: PA
Distribution: Mandriva Power Pack 2006
Posts: 146

Original Poster
Rep: Reputation: 15
I still can't get online with linux! I don't know how i screwed the files up so bad to make it not work anymore. I totally deleted everything from /etc/sysconfig/network so that file is totally empty because i'm not on a network at all, all i'm doing is connecting to the internet through a cable modem . So when i go to set up my internet connection, do i select make a cable connection or a LAN connection? when my computer was working, i guess it was set to LAN but why? i'm not on a LAN! I'm pretty close to just reinstalling the whole Operating system so the default settings/files would be restored, isn't there any other easier way to fix this problem? I changed my host name so its not localhost as well, so now when I open the terminal it says coffee@w00t instead of coffee@localhost, still doesn't work though!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Messed up my Internet Settings (can't connect to the internet) Almazick Linux - Wireless Networking 0 09-07-2004 07:23 PM
How to connect to the internet- URGENT PLZ ! vwal_13 Slackware 9 04-11-2004 04:15 AM
SuSe Linux 9.0 Pro, GRUB Loader is messed up. Just asking for some Support plz. v8n3t Linux - Software 1 03-05-2004 03:10 PM
Can't connect to Internet or access Dos files in Fedora David Wimp Linux - Newbie 2 02-26-2004 02:35 PM
Cannot Connect to WOW Cable internet. Plz help enigma Z Linux - Networking 1 09-10-2003 07:46 PM


All times are GMT -5. The time now is 08:59 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration