Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

SIOCADDRT: Network is unreachable (solved)

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
11 posts • Page 1 of 1
Author
Message
complexity
n00b
n00b
User avatar
Posts: 67
Joined: Thu Apr 14, 2005 8:04 pm

SIOCADDRT: Network is unreachable (solved)

  • Quote

Post by complexity » Mon May 29, 2006 8:47 pm

When I start net.eth0
root@gen3:/etc/init.d# ./net.eth0 start
* Starting eth0
* Bringing up eth0
* dhcp
* Running dhcpcd ...
Error, dhcpConfig: fopen /etc/resolv.conf: Permission denied [ ok ]
* eth0 received address 66.63.118.241/24
* Adding routes
* default gw 192.168.0.1 ...
SIOCADDRT: Network is unreachable

I gave the resolv.conf no permission so that it wouldn't be written over when the computer started for a quick fix.

But anyway I can ping use this computer fine, but anyone else connected to the network has no luck.
Last edited by complexity on Mon May 29, 2006 9:15 pm, edited 1 time in total.
spammy links removed
Top
magic919
Advocate
Advocate
Posts: 2182
Joined: Fri Jun 17, 2005 7:31 am
Location: Berkshire, UK

  • Quote

Post by magic919 » Mon May 29, 2006 8:52 pm

You've got an IP address, but the default gateway is on an entirely different subnet and the machine has no route to it.
Top
complexity
n00b
n00b
User avatar
Posts: 67
Joined: Thu Apr 14, 2005 8:04 pm

  • Quote

Post by complexity » Mon May 29, 2006 8:54 pm

Strange I forgot to mention that this just started happening today. For no apparent reason. So what should I look at to fix it.
spammy links removed
Top
magic919
Advocate
Advocate
Posts: 2182
Joined: Fri Jun 17, 2005 7:31 am
Location: Berkshire, UK

  • Quote

Post by magic919 » Mon May 29, 2006 8:58 pm

Have a look at /etc/conf.d/net, perhaps? It can be completely empty for your set-up, even if that's not the perfect way.
Top
complexity
n00b
n00b
User avatar
Posts: 67
Joined: Thu Apr 14, 2005 8:04 pm

  • Quote

Post by complexity » Mon May 29, 2006 9:00 pm

2 Lines

config_eth0=( "192.168.0.1 netmask 255.255.255.0" )
routes_eth0=( "default gw 192.168.0.1" )
spammy links removed
Top
janiskr
n00b
n00b
User avatar
Posts: 56
Joined: Sun May 09, 2004 3:38 pm
Location: Riga, Latvia

  • Quote

Post by janiskr » Mon May 29, 2006 9:07 pm

pleace set something diferent from 192.168.0.1 because thisis your gateway adress and try restarting netowrking through init.d
umm... amd64 then...
Top
troymc
Guru
Guru
Posts: 553
Joined: Wed Mar 22, 2006 8:48 am

Re: SIOCADDRT: Network is unreachable

  • Quote

Post by troymc » Mon May 29, 2006 9:08 pm

complexity wrote:

Code: Select all

root@gen3:/etc/init.d# ./net.eth0 start
 * Starting eth0
 *   Bringing up eth0
 *     dhcp
 *       Running dhcpcd ...
Error, dhcpConfig: fopen /etc/resolv.conf: Permission denied              [ ok ]
 *       eth0 received address 66.63.118.241/24
 *   Adding routes
 *     default gw 192.168.0.1 ...
SIOCADDRT: Network is unreachable
Where is it getting that default gateway from? That is an invalid gateway for a network with a host 66.63.118.241/24.
complexity wrote: I gave the resolv.conf no permission so that it wouldn't be written over when the computer started for a quick fix.
What problem were you trying to fix?
complexity wrote: But anyway I can ping use this computer fine, but anyone else connected to the network has no luck.
Are you pinging by hostname or IP?


troymc
Top
janiskr
n00b
n00b
User avatar
Posts: 56
Joined: Sun May 09, 2004 3:38 pm
Location: Riga, Latvia

  • Quote

Post by janiskr » Mon May 29, 2006 9:10 pm

forgot to add that pleace try to look in /etc/conf.d/net.example for configuration you need, this is well documented file. pleace read.
umm... amd64 then...
Top
complexity
n00b
n00b
User avatar
Posts: 67
Joined: Thu Apr 14, 2005 8:04 pm

  • Quote

Post by complexity » Mon May 29, 2006 9:15 pm

Well...

Before

config_eth0=( "192.168.0.1 netmask 255.255.255.0" )
routes_eth0=( "default gw 192.168.0.1" )


After

config_eth0=( "192.168.0.1 netmask 255.255.255.0" )
routes_eth0=( "default gw 127.0.0.1" )


I changed them lines to that. And now it all works.

Thanks for all the help, really appreciate it.
spammy links removed
Top
troymc
Guru
Guru
Posts: 553
Joined: Wed Mar 22, 2006 8:48 am

  • Quote

Post by troymc » Mon May 29, 2006 9:18 pm

complexity wrote: routes_eth0=( "default gw 127.0.0.1" )
8O



troymc
Top
UberLord
Retired Dev
Retired Dev
User avatar
Posts: 6838
Joined: Thu Sep 18, 2003 10:26 am
Location: Blighty
Contact:
Contact UberLord
Website

Re: SIOCADDRT: Network is unreachable (solved)

  • Quote

Post by UberLord » Tue May 30, 2006 9:57 am

complexity wrote:
root@gen3:/etc/init.d# ./net.eth0 start
* Running dhcpcd ...
Error, dhcpConfig: fopen /etc/resolv.conf: Permission denied [ ok ]
I gave the resolv.conf no permission so that it wouldn't be written over when the computer started for a quick fix.
Duh problem and solution - give root write access to resolv.conf as dhcpcd NEEDS it overwrite it unless given the -R option.
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Top
Post Reply

11 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic