View previous topic :: View next topic |
Author |
Message |
Jarhead Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Star Wars/movie_star_wars_at-at_driver.gif)
Joined: 26 Mar 2004 Posts: 474
|
Posted: Sun Jul 08, 2007 2:42 pm Post subject: static ip problems |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
nixnut Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/29856733845fd04c0f3d8c.gif)
Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
Posted: Sun Jul 08, 2007 2:55 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
PaulSorensen Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 15 Apr 2004 Posts: 80 Location: Chicago, USA
|
Posted: Sun Jul 08, 2007 8:23 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Jarhead Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Star Wars/movie_star_wars_at-at_driver.gif)
Joined: 26 Mar 2004 Posts: 474
|
Posted: Mon Jul 09, 2007 12:22 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
think4urs11 Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/8534934054bad29b51e5fa.jpg)
Joined: 25 Jun 2003 Posts: 6659 Location: above the cloud
|
Posted: Mon Jul 09, 2007 5:56 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Jarhead Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Star Wars/movie_star_wars_at-at_driver.gif)
Joined: 26 Mar 2004 Posts: 474
|
Posted: Mon Jul 09, 2007 4:24 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
schally Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/38454028540cebd23f23d7.jpg)
Joined: 13 May 2004 Posts: 207
|
Posted: Tue Jul 10, 2007 12:23 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|