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-19-2005, 04:57 PM   #1
Markup
LQ Newbie
 
Registered: Feb 2005
Distribution: RHEL4, SLED10, Ubuntu, Solaris
Posts: 26

Rep: Reputation: 15
Unhappy Can't connect to router on eth0


Hi, I'm trying to connect to my adsl modem/router using my ethernet device (intel e100) to do a debian net install. I've plugged in the cable and switched on the computer and the connection LED lights up on the router.
OK, so I've edited my /etc/interfaces file to read:

Code:
auto eth0
iface eth0 static
 address 192.168.2.1
 netmask 255.255.255.0
 gateway 192.168.2.0
The network has DHCP enabled but I'm using static for now. Also you'll notice that I haven't added the 'broadcast' or 'network' options to the interface file I'm not exactly sure what IP's to put for those if they are required?

OK, I then done an 'ifup eth0' and get a response saying something like 'link up - full duplex' so it seems to be working, further to this I done a 'ifconfig' and eth0 is shown. OK, so I go to ping the router address (gateway) and after a few seconds delay I get destination host unreachable. When I check 'route' it shows 2 entries:

Code:
Destination	Gateway		Genmask		Flags	Metric	Ref	Use	Iface
192.0.0.0	*		255.255.255.0	U	0	0	0	eth0
default		192.168.2.0	0.0.0.0		UG	0	0	0	eth0
Is the first entry the broadcast address? Anyway, you'll notice that Genmask is 0.0.0.0 on the default...shouldn't it be 255.255.255.0?

Ahh I'm confused please help.
 
Old 06-19-2005, 05:13 PM   #2
mjsurette
Member
 
Registered: May 2005
Distribution: spiral, fedora
Posts: 65

Rep: Reputation: 18
I'm confused too. Why don't you let dhcp configure your interface? Unless you want to enable some services on it, it'll be a lot simpler.

If you insist on static IP addresses then you have to make it on the same subnet as your router. The 192.168.x.x addresses traditionally have a subnet mask of 255.255.255.0 which means that your IP and the routers IP have to have the first three sets of numbers the same. So if your router has an address of 192.168.0.1 you could make your computer 192.168.0.5 with a subnet mask of 255.255.255.0, which you should set. The broadcast address is usually set automatically from these two.

You should also set your router as your default gateway and edit your /etc/resolv.conf to set your router as your dns server.

If you want more details, check out the Network Administrator's guide at tldp.org.

Good luck.

Mike
 
Old 06-19-2005, 05:37 PM   #3
Markup
LQ Newbie
 
Registered: Feb 2005
Distribution: RHEL4, SLED10, Ubuntu, Solaris
Posts: 26

Original Poster
Rep: Reputation: 15
Thanks Mike, I tried DHCP but ifup says that the device is not configured when I changed static to dhcp and comment out the address. I will checkout that guide shortly, but I'm starting to think that the trouble may be due to ICMP blocking on my router which I'm going to examine after I post this.

edit: it works!...my bad, I should have checked that first really.

Thank you once again.

Last edited by Markup; 06-19-2005 at 05:40 PM.
 
  


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
SUSE 9.3, Eth0 can't connect to router ccclaudius SUSE / openSUSE 1 11-11-2005 11:05 AM
howto connect router to router? kvasarnomad Linux - Networking 4 09-04-2005 09:14 PM
eth0 up but can't connect bengele Linux - Networking 5 02-27-2005 12:12 PM
Eth0 up, has ip address, but cant connect to anything! Munix Linux - Distributions 1 04-10-2004 08:34 PM
Problem withInternet, DHCP, connect with eth0 down work, connect with eth0 up not zowey Linux - Networking 1 03-12-2004 10:05 AM

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

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

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