LinuxQuestions.org
Visit Jeremy's Blog.
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 08-19-2008, 05:16 PM   #1
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Rep: Reputation: 69
I got a problem with my eth0 device


My eth0 was working earlier on BT3, now it just doesn't work at all. When BT3 boots up, eth0 doesn't even appear on ifconfig anymore. However, it works fine on windows xp, and fedora 8.

What I normally do on BT3 to get eth0 running is this:

ifconfig eth0 up
ifconfig eth0 192.168.1.x
ip r a default via 192.168.1.1
cat /etc/resolv.conf # and I make sure that 192.168.1.1 is the nameserver

Then I test the connection by pinging a external website. However, nothing happens. I can't even access my router by entering 192.168.1.1 on a browser.

I'm confused about the /etc/resolv.conf file.
Is the nameserver supposed to be my gateway or two of my internet provider's dns servers, because it works both ways. However, I've noticed that my internet access speeds up with I put my gateway as the nameserver as opposed to my two internet provider's dns servers.

Also, I have a feeling that what's wrong is the route. So I read up on
man ip. When I enter

ip r a default via 192.168.1.1

That's short for

ip route add default via 192.168.1.1 right?

The man ip page wasn't too specific on certain things. For example, what does "default" in the last command mean? Does it mean default as in the type of routing? Which would be unicast? I'm in my home network with 3 computers behind a router which acts as my gateway to the internet. How do I check which type of routing is set default? Any advice?

I checked

ip -s route

and it had the range of ips 192.168.1.0/24
Does the 0/24 mean literally 0-24 cause my eth0's internal ip is 192.168.1.111, so that wouldn't fall into range? Do I need to change the range for my eth0 to reach the gateway?
 
Old 08-19-2008, 05:34 PM   #2
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
The nameservers are suppose to be DNS servers, it's likely your router is just going to it's list of DNSs and making those requests for you by proxy... so to speak.

192.168.1.0 is the network /24 is the netmask (ie 24 bits in the network address). /24 gives a netmask of 255.255.255.0.

Personally I wouldn't use the method you are using of assign network information under a red hat based distro, I'd either directly edit ifcfg-eth0 file in /etc/sysconfig/network-scripts/ and actually restart the network, or use setup and change things that way before again, restarting the network... failing that, doing things on the fly I'd use ifconfig... so I am not sure how ip works.
 
Old 08-19-2008, 05:38 PM   #3
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Original Poster
Rep: Reputation: 69
Having this issue on Backtrack 3, which I think is Slax based.
 
Old 08-19-2008, 05:49 PM   #4
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Ah ok, sorry kinda misread that bit. I do not know enough about IP to help anymore then saying that /24 is just a referal to the netmask.
 
Old 08-19-2008, 06:12 PM   #5
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Original Poster
Rep: Reputation: 69
So then since the netmask is 255.255.255.0 that means that all clients on the network can only communicated with any ip on 192.168.1.*?

So the range of possible ip addresses would be 192.168.1.0-255?

Like i could assign an ip of 192.168.1.255 to my eth0 if I wanted?
 
Old 08-19-2008, 07:32 PM   #6
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
0 and 255 will likely be reserved for network and broadcast respectively. To keep things simple, .1 should be assigned to the gateway of the network.
 
  


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
eth0: Device eth0 has different MAC address than expected,ignoring. lin1010 Linux - Networking 5 11-24-2010 07:30 AM
eth0 device problem Tim Johnson Red Hat 1 01-25-2005 01:59 PM
eth0 device problem ewarmour Linux - Networking 10 08-04-2003 04:35 PM
eth0 device problem when booting Aric Slackware 2 02-20-2003 09:01 PM
new eth0 device problem question ewarmour Linux - Networking 10 06-11-2001 04:21 PM


All times are GMT -5. The time now is 02:35 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