LinuxQuestions.org
Help answer threads with 0 replies.
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 02-24-2006, 06:56 AM   #1
Bataa
LQ Newbie
 
Registered: Feb 2006
Posts: 6

Rep: Reputation: 0
Post Linux get IP address but can not connect to internet


Dear friends

I have installed Red Hat Fedora 4 on Sharp LapTop.
And recompiled the kernel in order to get working
ethernet card.
I have DSL connection with external router.
As I see from "ifconfig" command, the connection
with server is established, but I can't connect to
internet. Here is the details of network configuration.

[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:400:75:41:1E
inet addr:172.17.0.100 Bcast:172.17.255.255
Mask:255.255.0.0
inet6 addr: fe80::240:d0ff:fe75:411e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:342 (342.0 b) TX bytes:536 (536.0 b)
Interrupt:5 Base address:0xe000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1465 errors:0 dropped:0 overruns:0 frame:0
TX packets:1465 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1656370 (1.5 MiB) TX bytes:1656370 (1.5 MiB)


I got connection in my school in which I give IP address manually.
I am very sure, that I can connect in my home with this DSL cable.

Please advise me, are there any things that I can do ?

Bataa
 
Old 02-24-2006, 07:10 AM   #2
ethics
Senior Member
 
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
Looks like yo uhave been assigned an address,

try 216.239.39.99 in a browser, that's google's IP if it works then probably your DNS settings, look into adding the correct DNS servers into /etc/resolve.conf
 
Old 02-24-2006, 07:12 AM   #3
okmyx
Member
 
Registered: May 2004
Location: Cornwall, UK
Distribution: Ubuntu 8.04
Posts: 464

Rep: Reputation: 31
Have you set the default gateway address to that of your router?
 
Old 02-24-2006, 07:32 AM   #4
Bataa
LQ Newbie
 
Registered: Feb 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Putting google's IP address in browser, didn't succeed.
At start up, Linux says "can't get IP address for eth0,
check cable?". And I activate the device manually, in
Fedora's "networking hardware configuration" utility.
Pinging this address also says "network is unreachable".
The "/etc/resolve.conf" file doesn't exist in etc folder.
Should I create it by myself?

Dear okmyx, I didn't set default gateway address?
I did it when I was in my school laboratory.
Do I need to set it?

Thanks
Bataa
 
Old 02-24-2006, 10:51 AM   #5
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Quote:
Originally Posted by Bataa
Putting google's IP address in browser, didn't succeed.
At start up, Linux says "can't get IP address for eth0,
check cable?". And I activate the device manually, in
Fedora's "networking hardware configuration" utility.
Pinging this address also says "network is unreachable".
The "/etc/resolve.conf" file doesn't exist in etc folder.
Should I create it by myself?

Dear okmyx, I didn't set default gateway address?
I did it when I was in my school laboratory.
Do I need to set it?

Thanks
Bataa
Hi,

It looks as if you are indeed using dhcp. You will need to setup the eth0 device with a IP and route. Along with dns.

The "/etc/resolv.conf" should have your dns IP. You can create it with a text editor.

The contents of the /etc/resolv.conf;

search workgroup
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx

replace xxx.xxx.xxx.xxx with your dns ip address.

It looks like you don't have your route setup.

Do a;

#route -n

To see if the route is there for your gateway.

If not then do;

#route add default gw xxx.xxx.xxx.xxx #replace xs' with gw IP address

#route -n # should show gw for eth0

Just shooting in the dark without needed information!


HTH!
 
Old 02-25-2006, 01:14 AM   #6
Bataa
LQ Newbie
 
Registered: Feb 2006
Posts: 6

Original Poster
Rep: Reputation: 0
thanks gwsandvik!!!

i got connection after adding route IP address.
here is route information for my connection:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 172.17.0.1 0.0.0.0 UG 0 0 0 eth0


1 thing here is what is about #replace xs' with gw IP address.
Do I need to execute this command, even after getting
connection?

Again, thank you for your kind help.

Bataa
 
Old 02-26-2006, 06:04 PM   #7
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Quote:
Originally Posted by Bataa
thanks gwsandvik!!!

i got connection after adding route IP address.
here is route information for my connection:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 172.17.0.1 0.0.0.0 UG 0 0 0 eth0


1 thing here is what is about #replace xs' with gw IP address.
Do I need to execute this command, even after getting
connection?

Again, thank you for your kind help.

Bataa
Hi,

I'm glad to hear you got it! As for the confusion about the xxx.xxx.xxx.xxx , I meant for you to replace the xs' with your gw IP address. If for example your gw was 192.168.0.1 then do a;

route add default gw 192.168.0.1.

I should have been discriptive. Sorry!
 
Old 03-11-2006, 08:52 PM   #8
dkavraal
LQ Newbie
 
Registered: Mar 2006
Posts: 2

Rep: Reputation: 0
Question a bit fine

I have done the same, (having same situation), but there is a strange situation now.

I see that I am able to connect to a given IP. It's obvious it cannot request nslookup. What to do now?

I made myself root, adm, bin, sys group member. But anyhow, I am not able to connect via domain name (google.com eg.) before I ask it with IP.

P.S.: I can nslookup with my account on command line. Problem is about domain names. (web browser and wget -commandline- can not gather info by domain names)
 
Old 03-12-2006, 04:30 PM   #9
dkavraal
LQ Newbie
 
Registered: Mar 2006
Posts: 2

Rep: Reputation: 0
Anyway, I found a way out. I have set just my university's DNS as DNS and DNS-nameservers. (only for one IP for each) I have deleted 192.168.1.1 then it is up.
 
  


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
Can connect to Internet but can't PING any address 1kyle Linux - Wireless Networking 2 09-06-2005 06:41 PM
Newbie Cannot Connect to Internet (Can't get an IP address) thinkdeeper777 Linux - Newbie 8 07-24-2005 11:30 AM
Linux, Internet Radio and Static IP address webwolf70 Linux - Software 5 03-10-2005 01:10 AM
can't connect to the internet:linux dont read my internet address droplsh Linux - General 1 02-29-2004 07:32 PM

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

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