Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
static IP = no internet.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jxn
Guru
Guru


Joined: 27 Aug 2004
Posts: 327
Location: south dakota

PostPosted: Fri Jul 08, 2005 8:41 pm    Post subject: static IP = no internet. Reply with quote

Can someone please clue me into what I'm doing wrong? I'm trying to set up my server to use a static IP address issued by my ISP... I've changed the settings for netmask, broadcast, gateway, and IP address in /etc/conf.d/net, and commented out dhcp; but when I do this I no longer have "internet", ie I can't use emerge or a browser. Any idea what I could be doing wrong? /etc/resolv.conf dns settings are fine.
Thanks.
_________________
My Last.fm profile | get e17!
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Fri Jul 08, 2005 9:19 pm    Post subject: Reply with quote

Can you ping an internet IP address ?
Back to top
View user's profile Send private message
jxn
Guru
Guru


Joined: 27 Aug 2004
Posts: 327
Location: south dakota

PostPosted: Fri Jul 08, 2005 9:29 pm    Post subject: Reply with quote

msalerno wrote:
Can you ping an internet IP address ?

nope:

Code:
# ping -c 3 www.yahoo.com
connect: Network is unreachable

_________________
My Last.fm profile | get e17!
Back to top
View user's profile Send private message
DaveArb
Guru
Guru


Joined: 29 Apr 2004
Posts: 510
Location: Texas, USA

PostPosted: Fri Jul 08, 2005 9:44 pm    Post subject: Reply with quote

jxn wrote:
Code:
# ping -c 3 www.yahoo.com
connect: Network is unreachable


That's trying to ping a name. Try pinging 68.142.197.73.

Dave
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Fri Jul 08, 2005 9:44 pm    Post subject: Reply with quote

That's not quite an IP address.

Try something like: 66.94.234.13
Back to top
View user's profile Send private message
dgaffuri
Advocate
Advocate


Joined: 05 Jun 2005
Posts: 2078
Location: Italy

PostPosted: Fri Jul 08, 2005 9:50 pm    Post subject: Reply with quote

May you post ifconfig output, please?
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Fri Jul 08, 2005 9:52 pm    Post subject: Reply with quote

As well as the output of

# netstat -nr
Back to top
View user's profile Send private message
jxn
Guru
Guru


Joined: 27 Aug 2004
Posts: 327
Location: south dakota

PostPosted: Fri Jul 08, 2005 10:08 pm    Post subject: Reply with quote

here's the failed ping:
Code:
# ping 68.142.197.73
connect: Network is unreachable


Here's ifconfig:
Code:

# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0E:A6:C5:B2:74 
          inet addr:10.1.40.241  Bcast:10.1.40.241  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:115994 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20409 errors:0 dropped:0 overruns:0 carrier:0
          collisions:112 txqueuelen:1000
          RX bytes:41944729 (40.0 Mb)  TX bytes:1771840 (1.6 Mb)
          Interrupt:19 Base address:0xb400

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:896 errors:0 dropped:0 overruns:0 frame:0
          TX packets:896 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:64125 (62.6 Kb)  TX bytes:64125 (62.6 Kb)


and here's netstat:
Code:

# netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.1.0.0        0.0.0.0         255.255.0.0     U         0 0          0 eth0
127.0.0.0       127.0.0.1       255.0.0.0       UG        0 0          0 lo

_________________
My Last.fm profile | get e17!
Back to top
View user's profile Send private message
dgaffuri
Advocate
Advocate


Joined: 05 Jun 2005
Posts: 2078
Location: Italy

PostPosted: Fri Jul 08, 2005 10:17 pm    Post subject: Reply with quote

Code:
inet addr:10.1.40.241


That's not a public address. And you've no default gateway.

Code:
# netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.1.0.0        0.0.0.0         255.255.0.0     U         0 0          0 eth0
127.0.0.0       127.0.0.1       255.0.0.0       UG        0 0          0 lo


How are you connected to Internet, do you use a router or a modem?
Back to top
View user's profile Send private message
jxn
Guru
Guru


Joined: 27 Aug 2004
Posts: 327
Location: south dakota

PostPosted: Fri Jul 08, 2005 10:29 pm    Post subject: Reply with quote

well, I suppose now is the point where I should let you know that I'm confounding two problems...
I'm on a campus network, setting up two different servers. One is a gentoo box and will be available only within the campus network (therefore, it's a 10.1.x.x address, not publicly accessable), and it is/was using dhcp before, but when I tried to switch the ip to a static ip address in /etc/conf.d/net, I realized that I could not use a browser/emerge/etc.

The second machine *will* be publicly available, but it's a fedora-core 4 box, and I'm having the exact same problem with it... if i try to set up a static IP, no net. So, I'm thinking it's the same problem...and since the fedora forums are worthless, I tried to get an answer here to see what I might have done wrong... but the info posted above is from the machine that will only be available on the local campus network.

make sense?
_________________
My Last.fm profile | get e17!
Back to top
View user's profile Send private message
dgaffuri
Advocate
Advocate


Joined: 05 Jun 2005
Posts: 2078
Location: Italy

PostPosted: Fri Jul 08, 2005 10:36 pm    Post subject: Reply with quote

jxn wrote:
well, I suppose now is the point where I should let you know that I'm confounding two problems...
I'm on a campus network, setting up two different servers. One is a gentoo box and will be available only within the campus network (therefore, it's a 10.1.x.x address, not publicly accessable), and it is/was using dhcp before, but when I tried to switch the ip to a static ip address in /etc/conf.d/net, I realized that I could not use a browser/emerge/etc.


If you don't set a gateway you'll never reach any host outside the 10.1 subnet. Which gateway (look with netstat -rn) does DHCP assigns you?

jxn wrote:
The second machine *will* be publicly available, but it's a fedora-core 4 box, and I'm having the exact same problem with it... if i try to set up a static IP, no net. So, I'm thinking it's the same problem...and since the fedora forums are worthless, I tried to get an answer here to see what I might have done wrong... but the info posted above is from the machine that will only be available on the local campus network.


The question is still valid, how do you connect to the public network?
Back to top
View user's profile Send private message
jxn
Guru
Guru


Joined: 27 Aug 2004
Posts: 327
Location: south dakota

PostPosted: Sat Jul 09, 2005 1:32 am    Post subject: Reply with quote

Here's the output from when I'm using dhcp on my gentoo (local-network-only) box:
Code:
# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.1.0.0        0.0.0.0         255.255.0.0     U         0 0          0 eth0
127.0.0.0       127.0.0.1       255.0.0.0       UG        0 0          0 lo
0.0.0.0         10.1.0.1        0.0.0.0         UG        0 0          0 eth0


I connect to the network directly from my ethernet card... I don't have a router in between.
_________________
My Last.fm profile | get e17!
Back to top
View user's profile Send private message
jxn
Guru
Guru


Joined: 27 Aug 2004
Posts: 327
Location: south dakota

PostPosted: Sat Jul 09, 2005 1:36 am    Post subject: Reply with quote

hmm... those setting seem to have worked!

Here's what i've got now, and I broadcast http:// and can still access the internet.

Quote:
iface_eth0="10.1.40.241 broadcast 10.1.40.241 netmask 255.255.0.0"
gateway="eth0/10.1.0.1"


I'm going to try similar settings for my fedora machine; hopefully, I'll be back in business.
Is there a place for a good tutorial about this sort of thing? I've looked for man pages, tutorials, and I've re-read all the gentoo/other-distro networking guides and apparently I just didn't understand it.

Also, is there a security risk with sharing my actual IP address (ie, the 192.x.x.x version that I'll be using for the actual webserver)?
_________________
My Last.fm profile | get e17!
Back to top
View user's profile Send private message
jxn
Guru
Guru


Joined: 27 Aug 2004
Posts: 327
Location: south dakota

PostPosted: Sat Jul 09, 2005 1:50 am    Post subject: Reply with quote

Also, on my *real* webserver, would I use that external IP (192.x.x.x) address as the gateway setting, or does it belong in the broadcast setting?
_________________
My Last.fm profile | get e17!
Back to top
View user's profile Send private message
DaveArb
Guru
Guru


Joined: 29 Apr 2004
Posts: 510
Location: Texas, USA

PostPosted: Sat Jul 09, 2005 5:43 pm    Post subject: Reply with quote

jxn wrote:
Also, is there a security risk with sharing my actual IP address (ie, the 192.x.x.x version that I'll be using for the actual webserver)?


A publicly accessible webserver is always at risk. Whether by name (which is just a database entry for the IPA) or by address itself doesn't make any difference.

The gateway is the IP address of the next closer device to the Internet*. So, for a machine hooked to a router, it's the router's address. For the router, it's the ISP's router address. Your network people should give you the proper gateway IPs, if you don't already know them.

The broadcast addresses you have set up are funky. Broadcast is usually the first IPA of the network, i.e. on your 10.1.40.241/255.255.0.0, the broadcast would generally be 10.1.0.0.

Dave
* this is not applicable to complex networks, but for a simple network with a single, default gateway
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum