Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[internet] host pas reacheable
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
Lutin
n00b
n00b


Joined: 01 Jul 2011
Posts: 9

PostPosted: Fri Jul 01, 2011 8:11 am    Post subject: [internet] host pas reacheable Reply with quote

Bonjour à vous.

J'ai installé une gentoo il y a deux semaines et j'ai (enfin) réussi à compiler le noyau et booter (genkernel all, pas optimisé mais ça marche).

En chroot avec systemrescue cd tout fonctionnait.

En démarrant sur mon noyaux tout neuf, lorsque que je tente d'accéder à internet j'ai : "host unreacheable".
Pourtant dhcpd est lancé au démarrage et mon ifconfig me donne bien mon adresse et j'ai bien mes dns dans le resolv.conf.
J'ai cherché un peu partout mais je ne trouve pas ce qui manque.
(comme la par exemple:
https://forums.gentoo.org/viewtopic-t-304227-highlight-host+unreacheable.html)

De plus, tout ce qui concerne le réseau n'est pas mon point fort.

Auriez vous des idées pour savoir vers où je dois regarder ? (Ou de quelles informations vous avez besoin pour me dépanner).

Merci beaucoup
Back to top
View user's profile Send private message
man in the hill
Veteran
Veteran


Joined: 15 Dec 2005
Posts: 1552
Location: Madinina

PostPosted: Fri Jul 01, 2011 1:07 pm    Post subject: Reply with quote

Salut,

Donne nous plus d'infos:

Code:
ifconfig -a
route -n
cat /etc/resolv.conf

_________________
Get Up and Go !
Back to top
View user's profile Send private message
Lutin
n00b
n00b


Joined: 01 Jul 2011
Posts: 9

PostPosted: Fri Jul 01, 2011 5:39 pm    Post subject: Reply with quote

Voila:

Code:
eth0      Link encap:Ethernet  HWaddr 00:50:8d:b6:2e:fc 
          inet addr:192.168.0.10  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:590 (590.0 B)  TX bytes:590 (590.0 B)
          Interrupt:23 Base address:0x6000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)




Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     2      0        0 eth0
127.0.0.0       -               255.0.0.0       !     0      -        0 -


Code:

# Generated by dhcpcd from eth0
# /etc/resolv.conf.head can replace this line
nameserver 212.27.40.240
nameserver 212.27.40.241
# /etc/resolv.conf.tail can replace this line


Il est bizarre le route -n.
Back to top
View user's profile Send private message
man in the hill
Veteran
Veteran


Joined: 15 Dec 2005
Posts: 1552
Location: Madinina

PostPosted: Fri Jul 01, 2011 6:07 pm    Post subject: Reply with quote

Effectivement tu n'as pas de passerelle par defaut donc tu peux atteindre ton réseau local (192.168.0.0) mais pas les autres réseaux ....
Ajoute la route vers les autres réseaux en ligne de commande et test ta connexion:
Code:
route add default gw ip_routeur

Normalement avec dhcpd tu devrais avoir tous les paramètres d'activés (ip,passerelle,dns) mais désactiver dhpcd et ajouter une ip fixe ds la conf net de gentoo /etc/conf.d/net

La doc http://www.gentoo.org/doc/fr/handbook/handbook-x86.xml?part=4

Si tu utilises OpenRC
Code:
config_eth0="192.168.0.10 netmask 255.255.255.0"
routes_eth0="default via 192.168.0.1"


Sans OpenRC
Code:
config_eth0=( "192.168.0.10 netmask 255.255.255.0" )
routes_eth0=( "default via 192.168.0.1" )


Ajoute tes dns ds /etc/resolv.conf

Ajoute ta carte réseau au démarrage et redemarre ta carte
Code:
rc-update add net.eth0 default
/etc/init.d/net.eth0 restart

_________________
Get Up and Go !
Back to top
View user's profile Send private message
Lutin
n00b
n00b


Joined: 01 Jul 2011
Posts: 9

PostPosted: Fri Jul 01, 2011 9:48 pm    Post subject: Reply with quote

Code:
route add default gw ip_routeur

Merci avec ça ça marche.

Par contre comment mettre ce paramètre automatiquement au démarrage en gardant une ip pas statique, c'est possible ?
Back to top
View user's profile Send private message
man in the hill
Veteran
Veteran


Joined: 15 Dec 2005
Posts: 1552
Location: Madinina

PostPosted: Fri Jul 01, 2011 10:59 pm    Post subject: Reply with quote

Salut,

Je n'utilise pas dhcpcd mais il a un fichier de conf .
http://fr.gentoo-wiki.com/wiki/Dhcpcd
http://www.phystech.com/download/dhcpcd_man.html

Vérifie les options, il doit bien y avoir une option pour demander la passerelle ( ce qui devrais etre par defaut)
Regarde ds les log si il n'y a pas qques chose de bizarre.
_________________
Get Up and Go !
Back to top
View user's profile Send private message
barul
Guru
Guru


Joined: 28 May 2010
Posts: 434

PostPosted: Sat Jul 02, 2011 6:06 am    Post subject: Reply with quote

En général le dhcp s'occupe de mettres toutes les adresses réseaux nécessaires, y compris la gw…
Back to top
View user's profile Send private message
Lutin
n00b
n00b


Joined: 01 Jul 2011
Posts: 9

PostPosted: Sat Jul 02, 2011 4:52 pm    Post subject: Reply with quote

Il ne le fait pas, je doit la rajouter a la main.
Back to top
View user's profile Send private message
jcTux
Apprentice
Apprentice


Joined: 29 Dec 2009
Posts: 276
Location: Tours, France

PostPosted: Sat Jul 02, 2011 5:23 pm    Post subject: Reply with quote

Essaye ce que man in the hill avait conseillé précédemment.
Ma config est similaire :
Code:

config_wlan0=( "192.168.1.27 brd 255.255.255.0" )
routes_wlan0=( "default via 192.168.1.1" )
dns_servers_wlan0="8.8.8.8 8.8.4.4"
Back to top
View user's profile Send private message
Lutin
n00b
n00b


Joined: 01 Jul 2011
Posts: 9

PostPosted: Sat Jul 02, 2011 6:00 pm    Post subject: Reply with quote

Vi je crois que je vais passer en ip statique ça sera plus simple.

J'avais essayé d'ajouter :
routes_eth0=( "default gw 192.168.0.254" )
Mais j'avais un message d'erreur comme quoi le fichier SIOCADDRT existait déjà. J'ai cru comprend que lo attribuait sa route aux autres interfaces (ou alors j'ai rien compris aux messages anglais que j'ai lus).
Back to top
View user's profile Send private message
Poussin
l33t
l33t


Joined: 08 Jun 2007
Posts: 659
Location: Liège

PostPosted: Sat Jul 02, 2011 7:31 pm    Post subject: Reply with quote

jcTux wrote:
Essaye ce que man in the hill avait conseillé précédemment.
Ma config est similaire :
Code:

config_wlan0=( "192.168.1.27 brd 255.255.255.0" )
routes_wlan0=( "default via 192.168.1.1" )
dns_servers_wlan0="8.8.8.8 8.8.4.4"


Cette syntaxe n'est pas celle d'openrc, attention!
Back to top
View user's profile Send private message
Lutin
n00b
n00b


Joined: 01 Jul 2011
Posts: 9

PostPosted: Sat Jul 02, 2011 11:40 pm    Post subject: Reply with quote

Je viens de remarquer que (en gardant la config dhcp, et en ne touchant à absolument rien),
en relançant l'interface (/etc/init.d/net.eth0 restart) la gw est automatiquement detectée, c'est bizarre que ça ne marche pas lorsque c'est lancé lors du boot.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French 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