Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[RESEAU] Comment pour avoir un ip via le dhcp et gw manuell
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
zoltix
Apprentice
Apprentice


Joined: 22 Mar 2004
Posts: 249
Location: Brusssels

PostPosted: Fri Jul 07, 2006 10:16 am    Post subject: [RESEAU] Comment pour avoir un ip via le dhcp et gw manuell Reply with quote

J’ai un serveur dhcp. Qui me fournit mon ip et ma passerelle par défaut du réseau.
Mais j’ai une autre passerelle pour les machines de développement ().
Comment puis-je faire pour avoir un ip via le dhcp et configurer manuellement default gateway ?
car actuellement je fais

Code:

route del default
route add default gw 126.xxx.xxx.xxx eth0


Je pensais faire comme ca. Mais ca ne marche pas depuis que j’ai mis ma gentoo a jour.



Code:


# /etc/conf.d/net:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18 19:39:22 azarah Exp $

# Global config file for net.* rc-scripts

# This is basically the ifconfig argument without the ifconfig $iface
#
iface_eth0="192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0"

iface_eth0="dhcp"

gateway="eth0/126.XXX.XXX.XXX"



Merci de votre aide.
Back to top
View user's profile Send private message
S_Oz
Tux's lil' helper
Tux's lil' helper


Joined: 14 Apr 2003
Posts: 136
Location: france

PostPosted: Fri Jul 07, 2006 10:30 am    Post subject: Reply with quote

Cela devrait fonctionner. (cf: man dhcpcd, less /etc/conf.d/net.example)
/etc/conf.d/net
Code:

...
iface_eth0=( "dhcp" )
dhcpcd_eth0="-G 126.XXX.XXX.XXX"
...


Last edited by S_Oz on Fri Jul 07, 2006 11:02 am; edited 1 time in total
Back to top
View user's profile Send private message
joltz
n00b
n00b


Joined: 06 Jul 2006
Posts: 38

PostPosted: Fri Jul 07, 2006 10:34 am    Post subject: Reply with quote

Salut, tu peux essayer ce qui suit:

Code:

config_ethX=("dhcp")
routes_ethX=("default gw XXX.XXX.XXX.XXX")  # où XXX.XXX.XXX.XXX est l'ip de la passerelle


J'en suis pas sûr mais bon.. :)
Back to top
View user's profile Send private message
zoltix
Apprentice
Apprentice


Joined: 22 Mar 2004
Posts: 249
Location: Brusssels

PostPosted: Fri Jul 07, 2006 12:10 pm    Post subject: Reply with quote

S_Oz wrote:
Cela devrait fonctionner. (cf: man dhcpcd, less /etc/conf.d/net.example)
/etc/conf.d/net
Code:

...
iface_eth0=( "dhcp" )
dhcpcd_eth0="-G 126.XXX.XXX.XXX"
...



Grand merci.
Encore une ou puis je trouver la documentation sur les paramètres /etc/conf.d/net

Merci
Back to top
View user's profile Send private message
S_Oz
Tux's lil' helper
Tux's lil' helper


Joined: 14 Apr 2003
Posts: 136
Location: france

PostPosted: Fri Jul 07, 2006 12:23 pm    Post subject: Reply with quote

Je n'ai pas de réponse précise; moi la lecture du /etc/conf.d/net.example et du script /etc/init.d/net.lo me va.
Il y a des informations dans le handbook: Configuration du réseau sous Gentoo
Back to top
View user's profile Send private message
lesourbe
l33t
l33t


Joined: 24 Nov 2005
Posts: 710
Location: Champagne !

PostPosted: Fri Jul 07, 2006 12:43 pm    Post subject: Reply with quote

l envoi de la passerelle au niveau du DHCP n est qu une option, peut etre peux tu la desactiver a la source ?
_________________
Is that a banhammer ?
LeSourbe, Member of EPowerforce.
Back to top
View user's profile Send private message
geekounet
Bodhisattva
Bodhisattva


Joined: 11 Oct 2004
Posts: 3772

PostPosted: Fri Jul 07, 2006 3:45 pm    Post subject: Reply with quote

joltz wrote:
Salut, tu peux essayer ce qui suit:

Code:

config_ethX=("dhcp")
routes_ethX=("default gw XXX.XXX.XXX.XXX")  # où XXX.XXX.XXX.XXX est l'ip de la passerelle


J'en suis pas sûr mais bon.. :)


En rajoutant :
Code:
dhcp_ethX="nogateway"
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