Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
static ip problems
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
Jarhead
Guru
Guru


Joined: 26 Mar 2004
Posts: 474

PostPosted: Sun Jul 08, 2007 2:42 pm    Post subject: static ip problems Reply with quote

I am doing a fresh install on my desktop, which is in the process of being re-purposed. I have never had networking problems with this machine or the cards in question before.

The livecd networking worked fine, and, since I think I will be swapping parts out of the system as needed, I used genkernel as a time-saver. When I reboot the machine, the 8139 card (driver 8139too) receives the static IP fine, but cannot ping sites. I swapped the card in favor of an e100 card, which shows up in /etc/init.d as net.eth0, but is not recognized as a valid interface.

I am puzzled over this, as the driver is loaded, and the configuration should be correct (config_eth0="192.bla.bla.bla"). Is this a known issue?
_________________
Hats off to everyone in leadership, developmental, or administrative capacities for Gentoo Linux. Your hard work is very much appreciated.
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Sun Jul 08, 2007 2:55 pm    Post subject: Reply with quote

Is the driver for the the e100 loaded?
Did you specify a default route too?
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
PaulSorensen
Tux's lil' helper
Tux's lil' helper


Joined: 15 Apr 2004
Posts: 80
Location: Chicago, USA

PostPosted: Sun Jul 08, 2007 8:23 pm    Post subject: Reply with quote

Quote:
I used genkernel as a time-saver. When I reboot the machine, the 8139 card (driver 8139too) receives the static IP fine, but cannot ping sites.


If you are playing around with different cards, gentoo might not be using eth0 for your card - use "ifconfig -a" to see all of your network interfaces. The file:

Code:
/etc/udev/rules.d/70-persistent-net.rules


might have the MAC address of your original NIC hard-coded to eth0.

Also, if all that is ok - what is the output of "route". The card might be setup ok, but if you are setting up a static IP then you need to specify a gateway to get out of your internal network.
Back to top
View user's profile Send private message
Jarhead
Guru
Guru


Joined: 26 Mar 2004
Posts: 474

PostPosted: Mon Jul 09, 2007 12:22 am    Post subject: Reply with quote

I put the original network card back in, rebooted into the livecd, and got the output of "192.168.2.0" from route. My /etc/conf.d/net now reads:

Code:

config_eth0="192.168.2.2"
routes_eth0="default via 192.168.2.0"


I get the "network unreachable" error.

I have always used dhcpcd to get an IP, so I may have configured it wrong. If I did, where?

Thanks
_________________
Hats off to everyone in leadership, developmental, or administrative capacities for Gentoo Linux. Your hard work is very much appreciated.
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Mon Jul 09, 2007 5:56 am    Post subject: Reply with quote

two possible issues with your current config

a) the netmask is missing (it might work without though)
not exactly sure if your config would fallback to a netmask /24 (255.255.255.0) by default
b) the default route is most probably wrong as .0 is in most cases the network address
to be precise the 'smallest' netmask i can think of where 192.168.2.0 could be a 'normal' host would be /22 (255.255.252.0) - which would give network 192.168.0.0, broadcast 192.168.3.255, leaving everything in between for host addresses

better config would be
Code:
config_eth0="192.168.2.2/24"
routes_eth0="default via 192.168.2.1"
(guessing on the correct router address)
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
Jarhead
Guru
Guru


Joined: 26 Mar 2004
Posts: 474

PostPosted: Mon Jul 09, 2007 4:24 pm    Post subject: Reply with quote

You are correct. I am able to ping the router with the config

Code:

config_eth0="192.168.2.5/24"
routes_eth0="192.168.2.1"


The router address is 192.168.2.1, but I had tried that before without the /24 in the "_config" line without success. I guess that is what made the difference.

I still can't access the internet though, and the system does not like it when the netmask and brd are defined. Suggestions?
_________________
Hats off to everyone in leadership, developmental, or administrative capacities for Gentoo Linux. Your hard work is very much appreciated.
Back to top
View user's profile Send private message
schally
Apprentice
Apprentice


Joined: 13 May 2004
Posts: 207

PostPosted: Tue Jul 10, 2007 12:23 pm    Post subject: Reply with quote

Sry haven't been under linux for a while but there is a simple rule for networking,...

default gateway toward internet,...

so like Think4UrS11 said the right configuration would probably be:

config_eth0="192.168.2.2/24"
routes_eth0="default via 192.168.2.1"

and not

config_eth0="192.168.2.5/24"
routes_eth0="192.168.2.1" --> cause this would perhaps only route it to a network called this way (cause it got no mask and not this "default via"-thing ,... but i'm not sure,...

Cisco routing would look like:

ip route 0.0.0.0 0.0.0.0 192.168.2.1 --> for default gateway by the way,...



on your router is nothing like nat, pat or similar?
_________________
Our glory is not in never falling but in rising again every time we fall -Konfuzius

greetz
- schally
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