Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Networking problems with static IP
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
shoot
n00b
n00b


Joined: 20 Sep 2006
Posts: 9

PostPosted: Wed Sep 20, 2006 1:09 pm    Post subject: Networking problems with static IP Reply with quote

Hello there, I have a major problem with my eth0-config. I recently installed gentoo on my server to act as a webserver and a router. The problem is that I haven't really got started yet since my network seems to be giving me huge amounts of problems. I have a friend that has tried helping me to fix it, I'll get more to what we've already tried later, but first I'll give you some info about ifconfig eth0 and my ISPs settings.

First, I'm using a static ISP directly connecting to internet (no dhcp or automatic IP). this is my ifconfig eth0:

eth0 link encap: Ethernet HWaddr FF:FF:FF:FF:FF:FF
inet addr: 83.227.xxx.xxx Bcast: 83.227.xxx.0 Mask:xxx.xxx.xxx.xxx
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1

there's also some more stuff below here but it's nothing of importance I think and it doesn't look suspicious either so. Anyway me and my friend has tried changing broadcast-ip and some other stuff(therefore the Bcast atm is 83.227.xxx.0, we think the problem is something with broadcast-ip since I can surf under windows on two other computers in the network easily.)

My ISP has given me some information for the static ip, such as the ip, netmask, gateway, dns1 and dns2. However, none about broadcast-ip. Also a note here is that my ISP is bredbandsbolaget. (http://bredbandsbolaget.se)

When I do /etc/init.d/net.eth0 restart it gives me zero errors, only "OK"'s. Pinging 127.0.0.1 works fine, but pinging my gateway or dnsservers just gives me "destination host unreachable". Btw, I've added the gateway using "route add default gw 83.227.xxx.xxx".

Has anyone experienced this before, or is it just me? Since I can't seem to find any other thread that gives a valid help enough for me to get my net up.

Regards
shoot
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Wed Sep 20, 2006 1:34 pm    Post subject: Reply with quote

You need to explicitly give it the IP, the subnet mask and the default gateway. Your gateway may well be x.x.x.1. You can verify these from the Windows machine, dare I suggest.
Back to top
View user's profile Send private message
shoot
n00b
n00b


Joined: 20 Sep 2006
Posts: 9

PostPosted: Wed Sep 20, 2006 1:56 pm    Post subject: Reply with quote

I have the information needed, I think. I have my static ip, gateway. netmask and two dns servers. I set eth0 up with ifconfig eth0 ${IP_ADDR} broadcast ${BROADCAST} netmask ${NETMASK} up.
I've also typed route add default gateway 83.227.xxx.xxx

I have no idea what to type as broadcastadress, I've tried my ip and 0 or 255 in the end instead of mine, which didn't work(Actually this is what net-setup eth0 told me to do first time. That's why I typed 83.227.xxx.255/0. I've also tried 0.0.0.0 with no success.)

Regards
shoot
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Wed Sep 20, 2006 2:10 pm    Post subject: Reply with quote

Why do you feel the need to specify the broadcast address anyway?

Destination host unreachable suggests routing problem. Skip the broadcast address, get the other stuff right and test. Post then ifconfig and route outputs.

Would be much easier if you'd just substitute dummy numbers as you are just making it harder to help. I'd have just hidden the first 2 octets personally and changed the third octet to help obscure if you must.
Back to top
View user's profile Send private message
shoot
n00b
n00b


Joined: 20 Sep 2006
Posts: 9

PostPosted: Wed Sep 20, 2006 2:56 pm    Post subject: Reply with quote

Sorry.

First I ran ifconfig eth0 83.227.xxx.216 netmask 255.255.255.192 up
Then route add default gw 83.227.xxx.193

After that i edited /etc/resolv.conf:
Quote:
nameserver 195.54.122.200
nameserver 195.54.122.204


I am positive that I use the right numbers because this works on my two other
machines with windows.

ifconfig eth0 output:

Quote:

eth0 Link encap:Ethernet HWaddr FF:FF:FF:FF:FF:FF
inet addr:83.227.xxx.216 Bcast:83.227.xxx.0*(again, I've tried 255 in the end and 0.0.0.0)* Mask:255.255.255.192
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:133: errors:0 dropped:0 overruns:0 frame:0
TX packets: 68 errors:0 dropped:0 overruns:0 frame:0
collisions:0 txqueuelen:1000
RX bytes:7980 (7.7kb) TX bytes:8320 (8.1kb)
Interrupt:2 Base address:0xa000




Quote:

PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.040 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.040 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.040 ms
--- 127.0.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms


Quote:

PING 83.227.xxx.193 (83.227.xxx.193) 56(84) bytes of data.
From 83.227.xxx.216 icmp_seq=1 Destination Host Unreachable
From 83.227.xxx.216 icmp_seq=1 Destination Host Unreachable
From 83.227.xxx.216 icmp_seq=1 Destination Host Unreachable
--- 83.227.xxx.193 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 1999ms


Am I doing something wrong here?

Regards
shoot
Back to top
View user's profile Send private message
P3SM
Tux's lil' helper
Tux's lil' helper


Joined: 13 Apr 2006
Posts: 93
Location: Gronsveld - The Netherlands

PostPosted: Wed Sep 20, 2006 3:20 pm    Post subject: Reply with quote

Just my 2c:

Your broadcast address should be 255 as that is the last address in your subnet which runs from 83.227.xxx.192 (network address) till 83.227.xxx.255 (broadcast address) when your address is 216 with a /26 subnet.

I normally use the following command to put in my default route:

Code:
route add -net default gw a.b.c.d netmask 0.0.0.0 metric 1 eth0


I think it should be machine independent (I use it on Sparc).

Last thing I can think of: did you try pinging the default gw from your windows machines? Meaning are you sure the default gw returns pings :?
_________________
Smaug: Sun Netra T1 105, UltraSPARC-IIi 440MHz, 512MB, 2*36GB 10kRPM; 2 Sun Netra D130: 6*36GB 10kRPM, swraid 0
Haku: Dual P3 Xeon 500MHz, 512MB; Sun Multipack: 12*18GB 10kRPM, hwraid 5
Falkor: Sun SparcStation LX, 128 MB, 2.1GB
Back to top
View user's profile Send private message
shoot
n00b
n00b


Joined: 20 Sep 2006
Posts: 9

PostPosted: Wed Sep 20, 2006 3:31 pm    Post subject: Reply with quote

Firstly, thanks for the idea, I'll try it out soon(I'm making dinner now so it's quite a bad timing to test it right now :P)
Second, regarding this:

Quote:
Last thing I can think of: did you try pinging the default gw from your windows machines? Meaning are you sure the default gw returns pings :?



I tried it now, and it does work:

Quote:
Sending signals to 83.227.xxx.193 with 32 byte data:

Answer from 83.227.xxx.193: byte=32 tid=20ms TTL=255
Answer from 83.227.xxx.193: byte=32 tid=20ms TTL=255
Answer from 83.227.xxx.193: byte=32 tid=20ms TTL=255
Answer from 83.227.xxx.193: byte=32 tid=20ms TTL=255



Regards
shoot
Back to top
View user's profile Send private message
shoot
n00b
n00b


Joined: 20 Sep 2006
Posts: 9

PostPosted: Wed Sep 20, 2006 5:11 pm    Post subject: Reply with quote

P3SM wrote:
Just my 2c:

Your broadcast address should be 255 as that is the last address in your subnet which runs from 83.227.xxx.192 (network address) till 83.227.xxx.255 (broadcast address) when your address is 216 with a /26 subnet.

I normally use the following command to put in my default route:

Code:
route add -net default gw a.b.c.d netmask 0.0.0.0 metric 1 eth0


I think it should be machine independent (I use it on Sparc).

Last thing I can think of: did you try pinging the default gw from your windows machines? Meaning are you sure the default gw returns pings :?


Ok, so I did type this in:

Code:
route add -net default gw 83.227.xxx.193 netmask 255.255.255.192 metric 1 eth0


Restarted eth0 with /etc/init.d/net.eth0 restart and it gives no error or anything. Pinging my gateway or anything else for that matter still doesn't work.

Regards
shoot
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Wed Sep 20, 2006 5:38 pm    Post subject: Reply with quote

You'd have to say that even without a gateway defined you should be able to ping the gateway as it is on the same subnet. I'd drop out all the unnecessary.
Back to top
View user's profile Send private message
shoot
n00b
n00b


Joined: 20 Sep 2006
Posts: 9

PostPosted: Wed Sep 20, 2006 5:44 pm    Post subject: Reply with quote

magic919 wrote:
You'd have to say that even without a gateway defined you should be able to ping the gateway as it is on the same subnet. I'd drop out all the unnecessary.


Yes, you'd have to say. To bad it doesn't work that way. That's why I'm asking if someone has any ideas to whats going on!

Regards
shoot
Back to top
View user's profile Send private message
shoot
n00b
n00b


Joined: 20 Sep 2006
Posts: 9

PostPosted: Wed Sep 20, 2006 7:47 pm    Post subject: Reply with quote

I've now tried turning my modem off for 20 mins to see if it was some trouble regarding mac adresses. I fired everything up and still no success with pinging neither gateway nor dns's. I redid everything this time using net-setup eth0 and that didn't give me any success either. Has noone ever experienced this problem?

Btw, I can ping my gateway from other internet connections(!)

Regards
shoot

Edit:

Ok, so I once again restarted the computer. Booted into gentoo again and also once again set up net-setup eth0 according to how my ip's are set. /etc/init.d/net.eth0 restart gave me some error response though, my friend pointed out that I should check /var/log/messages/ and this is what it says:

Quote:
You are using a depreciated configuration syntax for eth0
You are advised to read /etc/conf.d/net.example and upgrade it accordingly
No loaded modules provide "broadcast" (broadcast_start)
No loaded modules provide "netmask" (netmask_start)


This has only occured this time and the first time I set ifconfig for eth0 up.
Back to top
View user's profile Send private message
P3SM
Tux's lil' helper
Tux's lil' helper


Joined: 13 Apr 2006
Posts: 93
Location: Gronsveld - The Netherlands

PostPosted: Wed Sep 20, 2006 9:29 pm    Post subject: Reply with quote

Shoot wrote:
Ok, so I did type this in:

Code:
route add -net default gw 83.227.xxx.193 netmask 255.255.255.192 metric 1 eth0




Sorry for being unclear, but I actually meant using 0.0.0.0 where it said so and not the netmask belonging to the subnet!

Then again: I'm using this on a 2.4 kernel on Sparcs!
_________________
Smaug: Sun Netra T1 105, UltraSPARC-IIi 440MHz, 512MB, 2*36GB 10kRPM; 2 Sun Netra D130: 6*36GB 10kRPM, swraid 0
Haku: Dual P3 Xeon 500MHz, 512MB; Sun Multipack: 12*18GB 10kRPM, hwraid 5
Falkor: Sun SparcStation LX, 128 MB, 2.1GB
Back to top
View user's profile Send private message
shoot
n00b
n00b


Joined: 20 Sep 2006
Posts: 9

PostPosted: Thu Sep 21, 2006 9:03 am    Post subject: Reply with quote

Aha! :oops:
I'll try the new one then :lol:

Regards
shoot


Edit:

I have now tried two things. First the stuff about route add -net etc. This gave no success either. I had a chat with my friend and we figured out since I do have username and password (however I never use them to access internet) I should try to check if it had pppoe. So I setup pppoe-setup and did pppoe-start. Still no success.

Am I supposed to use my username/password anywhere, even though I have never done so? What I know they are only used on the website for my ISP. Actually, I have used to username/password once, and that was when I activated my internet the first time.
Back to top
View user's profile Send private message
x22
Apprentice
Apprentice


Joined: 24 Apr 2006
Posts: 208

PostPosted: Thu Sep 21, 2006 10:34 am    Post subject: Re: Networking problems with static IP Reply with quote

shoot wrote:

eth0 link encap: Ethernet HWaddr FF:FF:FF:FF:FF:FF


The MAC address does not seems to be correct. There may be hardware or driver problem.
Back to top
View user's profile Send private message
shoot
n00b
n00b


Joined: 20 Sep 2006
Posts: 9

PostPosted: Thu Sep 21, 2006 11:03 am    Post subject: Re: Networking problems with static IP Reply with quote

x22 wrote:
shoot wrote:

eth0 link encap: Ethernet HWaddr FF:FF:FF:FF:FF:FF


The MAC address does not seems to be correct. There may be hardware or driver problem.


That could be true, it's just that I've tried almost all steps for eth0 with eth1 aswell that has a correct MAC adress.

Regards
shoot

PS. Eth1 card is Marvell Technology Group Ltd. 88E8001 Gigabit Ethernet Controller. It seems to be using a driver called "skge". Eth0 is a Realtek card.(I do not have the information about that at the moment but I'll get back with the correct name soon).

Edit:

Eth0: RealTek RTL8129.
Back to top
View user's profile Send private message
blueaura
n00b
n00b


Joined: 05 Sep 2005
Posts: 66

PostPosted: Wed Sep 27, 2006 12:44 pm    Post subject: Reply with quote

I have the exact same problem with a marvell and nvidia controller. Neither seem to realise 192.168.0.1 is a router although a route is set up. Bizzare!
Back to top
View user's profile Send private message
wynn
Advocate
Advocate


Joined: 01 Apr 2005
Posts: 2421
Location: UK

PostPosted: Wed Sep 27, 2006 1:08 pm    Post subject: Reply with quote

A builtin card here showed Ethernet HWaddr FF:FF:FF:FF:FF:FF and it was a card fault (hardware)
_________________
The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details.
Back to top
View user's profile Send private message
blueaura
n00b
n00b


Joined: 05 Sep 2005
Posts: 66

PostPosted: Wed Sep 27, 2006 1:10 pm    Post subject: Reply with quote

Give something like this a go...

/etc/conf.d/net
Code:
config_eth0=( "192.168.0.20 netmask 255.255.255.0 brd 192.168.0.255" )
routes_eth0=( "default gw 192.168.0.1" )
gateways_eth0=( "192.168.0.1" )
dns_servers_eth0=( "192.168.0.1" )


Fixed it for me. Of course adapt the IPs to your needs.
Back to top
View user's profile Send private message
jtp755
l33t
l33t


Joined: 01 Sep 2003
Posts: 691
Location: USA

PostPosted: Sun Oct 08, 2006 6:21 am    Post subject: Reply with quote

just thought id let yall know that the last post fixed the problem for me too.
_________________
www.EternalFireProof.com
Registered Linux User #334610
Back to top
View user's profile Send private message
z1-tram
n00b
n00b


Joined: 18 Jun 2005
Posts: 11
Location: Melbourne, Australia

PostPosted: Sun Oct 29, 2006 8:20 am    Post subject: Reply with quote

Fixed my problem too! :D Thanks blueaura!
Back to top
View user's profile Send private message
daN-the-man
n00b
n00b


Joined: 30 Oct 2005
Posts: 2

PostPosted: Thu Nov 09, 2006 1:57 pm    Post subject: Reply with quote

and mine too! thank you very much! :D
Back to top
View user's profile Send private message
blueaura
n00b
n00b


Joined: 05 Sep 2005
Posts: 66

PostPosted: Mon Jan 08, 2007 2:36 pm    Post subject: Reply with quote

It also fixed mine again on another new install on a different machine. Must be a new build of something which needs dns servers and gateways to be defined.
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