LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 04-13-2004, 08:07 AM   #1
Streme
LQ Newbie
 
Registered: Apr 2004
Posts: 4

Rep: Reputation: 0
Can ping network but can't ping any internet ip when I hard set the ip


I'm having a problem when I try to Hard set my ip in /etc/conf.d/net on a fresh Gentoo stage 1 install.

I can access the local network and the local network can access the linux machine but the outside world cannot access the linux machine and the linux machine cannot access the outside world.

It works fine when I set the iface to dhcp, but I have to set the IP to something static so that it doesn't just change on me when ever it feels like it.

I've checked the subnet masks and other things, all is well. I thought maybe it was a dns name thing but I can't ping IP addresses.

When I ping a hostname it says unknown host. When I ping an IP address it says network unreachable.

I just can't comprehend why setting the IP to something static would be causing this problem.

Thanks in advanced for any help.
 
Old 04-13-2004, 08:31 AM   #2
Streme
LQ Newbie
 
Registered: Apr 2004
Posts: 4

Original Poster
Rep: Reputation: 0
This is what I get when I ifconfig


DHCP IP

eth0 Link encap:Ethernet HWaddr 00:A0:CC:22:69:8F
inet addr:192.168.0.122 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::2a0:ccff:fe22:698f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1272 errors:3 dropped:0 overruns:0 frame:0
TX packets:389 errors:3 dropped:0 overruns:0 carrier:3
collisions:0 txqueuelen:1000
RX bytes:81439 (79.5 Kb) TX bytes:207337 (202.4 Kb)
Interrupt:12 Base address:0x4f00

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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)


STATIC IP

eth0 Link encap:Ethernet HWaddr 00:A0:CC:22:69:8F
inet addr:192.168.0.122 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::2a0:ccff:fe22:698f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1167 errors:3 dropped:0 overruns:0 frame:0
TX packets:283 errors:3 dropped:0 overruns:0 carrier:3
collisions:0 txqueuelen:1000
RX bytes:74958 (73.2 Kb) TX bytes:142265 (138.9 Kb)
Interrupt:12 Base address:0x4f00

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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
 
Old 04-13-2004, 09:06 AM   #3
zaphodiv
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 388

Rep: Reputation: 30
When you manually set a static ip address you also have to set the gateway address and the nameservers.

Look at the difference in the out put of route between DHCP and static.

Set your nameservers in /etc/resolv.conf or wherever gentoo wants it set.
 
Old 04-13-2004, 09:12 AM   #4
Streme
LQ Newbie
 
Registered: Apr 2004
Posts: 4

Original Poster
Rep: Reputation: 0
resolv.conf is identical for both ways. I'll check gateway

Thanks
 
Old 04-13-2004, 09:18 AM   #5
Streme
LQ Newbie
 
Registered: Apr 2004
Posts: 4

Original Poster
Rep: Reputation: 0
Oh, Thank you so very much.

Default gateway was not being set in /etc/conf.d/net

uncommented the line and rebooted, works wonderful!

It's always the simplest little thing that you miss that'll screw everything up.



Micheal
 
  


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
Strange Ping Issue - Can't ping localhost but can ping others on LAN code_slinger Linux - Networking 15 03-30-2015 02:39 PM
can ping network computer, cannot ping google.com (help needed) ben_build#2.1.0 Linux - Wireless Networking 23 11-07-2010 12:55 PM
default gateway not set by PPPoE, can't ping internet rproffit Linux - Networking 3 12-17-2007 05:29 AM
FC4 won't ping 127.0.0.1 or the internet, but will ping local computers jalsk Linux - Networking 4 11-22-2005 05:59 PM
Able to ping within network but cannot get out to the internet Falsehope Linux - Networking 14 10-01-2005 07:29 AM

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

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