You are not logged in.

#1 2008-11-25 04:03:13

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Setting A Static IP Address

Ive read through the Wiki and try a few different configurations but I still cant get it to work, I definitely have a static IP address so thats not the problem. Heres my config:

eth0="eth0 172.30.131.119 netmask 255.255.255.128 broadcast 172.30.131.127"
INTERFACES=(eth0)

gateway="default gw 172.30.131.1"
ROUTES=(gateway)

Offline

#2 2008-11-25 04:41:55

Mashi
Member
Registered: 2007-02-19
Posts: 38

Re: Setting A Static IP Address

Here are some things that might give you an idea:

Can you successfully connect the card to another device with another IP?

Is this a home network? If so, can you get it working using a 192.168.* address? If not, have you been instructed to set a static IP?

Can you ping the gateway?

Can you bring it up manually?

Offline

#3 2008-11-25 05:53:57

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,217
Website

Re: Setting A Static IP Address

brando56894 wrote:

Ive read through the Wiki and try a few different configurations but I still cant get it to work

How do you know it's not working? You can't browse websites? You can't ping a specific host? ifconfig reports no IP address? A monkey bites you when you try to touch the LAN cable?

A bit more info about any errors you're getting will help get better answers smile

Last edited by fukawi2 (2008-11-25 05:54:36)

Offline

#4 2008-11-25 05:54:43

elmer_42
Member
From: /na/usa/ca
Registered: 2008-10-11
Posts: 427

Re: Setting A Static IP Address

What is the exact model of the router you have? We can check to make sure you are using the correct default gateway IP if we know what kind of router you are using.


[ lamy + pilot ] [ arch64 | wmii ] [ ati + amd ]

Offline

#5 2008-11-25 08:31:27

crouse
Arch Linux f@h Team Member
From: Iowa - USA
Registered: 2006-08-19
Posts: 907
Website

Re: Setting A Static IP Address

brando56894 wrote:

Ive read through the Wiki and try a few different configurations but I still cant get it to work, I definitely have a static IP address so thats not the problem. Heres my config:

eth0="eth0 172.30.131.119 netmask 255.255.255.128 broadcast 172.30.131.127"
INTERFACES=(eth0)

gateway="default gw 172.30.131.1"
ROUTES=(gateway)

This looks really wrong.  Your local ip will NOT be your external IP (which is what looks like you have set in there now).

Mine looks like this:

eth0="eth0 192.168.2.6 netmask 255.255.255.0 broadcast 255.255.255.255"
INTERFACES=(lo eth0)
gateway="default gw 192.168.2.1"
ROUTES=(gateway)

Most of the time your internal network is going to start with 192.168.X.X
and your default gateway is going to be 192.168.X.1
and your default netmask 255.255.255.0 and default broadcast 255.255.255.255
Replacing X with YOUR internal IP number.

HTH's

Offline

#6 2008-11-25 08:38:36

robmaloy
Member
From: Germany
Registered: 2008-05-14
Posts: 263

Re: Setting A Static IP Address

crouse wrote:
brando56894 wrote:

Ive read through the Wiki and try a few different configurations but I still cant get it to work, I definitely have a static IP address so thats not the problem. Heres my config:

eth0="eth0 172.30.131.119 netmask 255.255.255.128 broadcast 172.30.131.127"
INTERFACES=(eth0)

gateway="default gw 172.30.131.1"
ROUTES=(gateway)

This looks really wrong.  Your local ip will NOT be your external IP (which is what looks like you have set in there now).

Mine looks like this:

eth0="eth0 192.168.2.6 netmask 255.255.255.0 broadcast 255.255.255.255"
INTERFACES=(lo eth0)
gateway="default gw 192.168.2.1"
ROUTES=(gateway)

Most of the time your internal network is going to start with 192.168.X.X
and your default gateway is going to be 192.168.X.1
and your default netmask 255.255.255.0 and default broadcast 255.255.255.255
Replacing X with YOUR internal IP number.

HTH's

172.{16-31}.*.* is private range too so thats not the problem


brando: can you ping teh routar?
edit: the "broadcast" option can be omitted, ifconfig will calculate it for you

Last edited by robmaloy (2008-11-25 08:39:54)


☃ Snowman ☃

Offline

#7 2008-11-25 09:11:19

crouse
Arch Linux f@h Team Member
From: Iowa - USA
Registered: 2006-08-19
Posts: 907
Website

Re: Setting A Static IP Address

robmaloy wrote:

172.{16-31}.*.* is private range too so thats not the problem


brando: can you ping teh routar?
edit: the "broadcast" option can be omitted, ifconfig will calculate it for you

So it is, guess i have never used it, or the 10.x.x.x  --- if i recall correctly, the subnet mask is different for the 172.{16-31}.x.x   also. 255.255.0.0 / 255.255.224.0 are acceptable values. So wouldn't his netmask need to be  different than what it's set at now ?

Offline

#8 2008-11-25 18:08:02

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: Setting A Static IP Address

i know its the config and not the cable because whenever i set it to dhcp it works, also this is a college network so that why everything looks weird. i cant browse any websites or do anything internet wise when i set it manually.

Offline

#9 2008-11-25 19:20:46

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Setting A Static IP Address

... and what is the ip-addy you're given if you use dhcp?
Have you actually been given a fixed ip-address? And if so - is it 172.30.131.119, and ... are you quite sure of your gateway address?
If the answer to all that is 'yes' - you also need a nameserver address (/etc/resolv.conf) - it may well be the same as the gateway, but you _do_ need it or you will not be able to look up hosts 'by name' ...
See if you can ping your gateway, though ping might well be disabled on the gateway host (I know _mine_ is, though I can ping the gateway itself)

Btw - your setup seems correct - my guess would be the lack of nameserver.

Last edited by perbh (2008-11-25 19:22:11)

Offline

#10 2008-11-25 22:04:42

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,217
Website

Re: Setting A Static IP Address

{PARTIALLY OFF TOPIC}

crouse wrote:

So it is, guess i have never used it, or the 10.x.x.x  --- if i recall correctly, the subnet mask is different for the 172.{16-31}.x.x   also. 255.255.0.0 / 255.255.224.0 are acceptable values. So wouldn't his netmask need to be  different than what it's set at now ?

10.x.x.x is designated as a Class A private network (ie, 255.0.0.0) while 172.[16-31].x.x is a Class B private network (ie 255.255.0.0). Having said that, you can use any network mask you like within that range as long as it doesn't go outside of those ranges.

For example, at my old work, we used 172.20.0.0/255.255.192.0, my current work uses 10.16.0.x/255.255.255.0 and at home I use 192.168.54.0/255.255.255.224
{/OFF TOPIC}

Offline

Board footer

Powered by FluxBB