[dhcp ad-hoc] configuration dhcpcd en ad-hoc (résolu)

Applications, problèmes de configuration réseau
xyoos
Hankyu
Messages : 49
Inscription : lun. 14 févr. 2011, 19:39

[dhcp ad-hoc] configuration dhcpcd en ad-hoc (résolu)

Message par xyoos »

Bonjour,
Suite à un topic sur le forum, j'ai réussi à creer une passerelle ethernet -> wifi entre 2 ordinateur sous archlinux avec ses scripts
script coté serveur
#!/bin/bash
/etc/rc.d/wicd stop
killall dhcpcd
dhcpcd eth0
ifconfig wlan0 down
iwconfig wlan0 mode ad-hoc channel 1 essid xyoos key off
ifconfig wlan0 10.42.43.1 up
sudo echo "nameserver 208.67.222.222" > /etc/resolv.conf
script coté client
#!/bin/bash
/etc/rc.d/wicd stop
ifconfig wlan0 down
iwconfig wlan0 mode ad-hoc channel 1 essid xyoos key off
ifconfig wlan0 10.42.43.2 up
route add default gw 10.42.43.1 wlan0
sudo echo "nameserver 208.67.222.222" > /etc/resolv.conf
rc.conf
#
# /etc/rc.conf - Main Configuration for Arch Linux
#

# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime", any other value will result
# in the hardware clock being left untouched (useful for virtualization)
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="fr_FR.utf-8"
HARDWARECLOCK="localtime"
TIMEZONE="Europe/Paris"
KEYMAP="fr-latin9"
CONSOLEFONT="lat9w-16"
CONSOLEMAP=
USECOLOR="yes"

# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
# MOD_BLACKLIST: Prevent udev from loading these modules
# MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
#
# NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
#
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=(ath_pci)

# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="xyoos_netbook"

# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
# - prefix an entry in INTERFACES with a ! to disable it
# - no hyphens in your interface names - Bash doesn't like it
#
# DHCP: Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#

#Static IP example
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
eth0="dhcp"
wlan0="dhcp"
INTERFACES=(lo eth0)
WIRELESS_INTERFACE="wlan0"
# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
# - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 10.42.43.1"
ROUTES=(!gateway)

# Setting this to "yes" will skip network shutdown.
# This is required if your root device is on NFS.
NETWORK_PERSIST="no"

# Enable these network profiles at boot-up. These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
# - set to 'menu' to present a menu during boot-up (dialog package required)
# - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
#NETWORKS=(main)

# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
# - prefix a daemon with a ! to disable it
# - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng dbus @wicd @alsa @sshd @httpd @mysqld)
Entre deux machines archlinux ceci marche mais quand windows ou ubuntu essaye de se connecter, ceci ne marche pas je veux configurer le serveur dhcpcd:
/etc/dhcpcd.conf
# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

# Inform the DHCP server of our hostname for DDNS.
hostname
# To share the DHCP lease across OSX and Windows a ClientID is needed.
# Enabling this may get a different lease than the kernel DHCP client.
# Some upstream DHCP servers may also require a ClientID, such as FRITZ!Box.
#clientid

# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# Respect the network MTU.
option interface_mtu
# A ServerID is required by RFC2131.
require dhcp_server_identifier

#pour que le dhcpcd ne touche pas au DNS
nohook resolv.conf
# A hook script is provided to lookup the hostname if not set by the DHCP
# server, but it should not be run by default.
#nohook lookup-hostname
#noipv4ll
#Ddns-update-style ad-hoc;

Subnet 10.42.43.0 netmask 255.0.0.0{
range 10.42.43.2 10.42.43.60;
default-lease-time 86400;
max-lease-time 604800;
option subnet-mask 255.0.0.0;
option domain-name-servers 208.67.222.222;

}
mais quand je restart le network: sudo /etc/rc.d/network restart
ceci donne:
:: Stopping Network [DONE]
:: Starting Network [BUSY] up: error fetching interface information: Device not found
wlan0 Link encap:Ethernet HWaddr 1C:4B:D6:69:D9:69
inet addr:10.42.43.2 Bcast:10.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::1e4b:d6ff:fe69:d969/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5645 errors:0 dropped:0 overruns:0 frame:0
TX packets:3173 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3130976 (2.9 Mb) TX bytes:444830 (434.4 Kb)

Error for wireless request "Set Mode" (8B06) :
SET failed on device wlan0 ; Device or resource busy.
dhcpcd: unknown option -- Subnet
dhcpcd: unknown option -- range
dhcpcd: unknown option -- default-lease-time
dhcpcd: unknown option -- max-lease-time
dhcpcd[2698]: unknown option `subnet-mask 255.0.0.0;'
dhcpcd[2698]: unknown option `domain-name-servers 208.67.222.222;'
dhcpcd: unknown option -- }
[FAIL]
mon but sera de pouvoir être tout le temps sous archlinux au lieu d'ubuntu et de partager ma connexion pour quelqu'un qui est sous windows ou ubuntu.
Dernière modification par xyoos le mer. 09 mars 2011, 21:40, modifié 1 fois.
Avatar de l’utilisateur
Abazigal
Chu Ko Nu
Messages : 313
Inscription : sam. 26 avr. 2008, 14:45
Localisation : Seine et Marne

Re: [dhcp ad-hoc] configuration dhcpcd en ad-hoc (non résolu

Message par Abazigal »

Pourquoi tant de haine et d'options dans le dhcpd.conf ?
Commence par un truc minimaliste, tu verras après pour le reste.

dhcpd.conf:

Code : Tout sélectionner

subnet 10.42.43.0 netmask 255.255.255.0 {
	range	10.42.43.2 10.42.43.60;
	option domain-name-servers 208.67.222.222;
	option routers 10.42.43.1;
}
(rien d'autre de décomenté pour le moment !)

Sur le serveur: ton script habituel, suivi de "/etc/rc.d/dhcpd start"

EDIT: HOLA ! J'avais mal lu ton post. C'est dhcpd (/etc/dhcpd.conf; paquet "dhcp") qu'il faut configurer sur le serveur, pas dhcpcd (/etc/dhcpcd.conf; paquet "dhcpcd") (celui là tu n'as pas à y toucher, ni sur le serveur, ni sur les clients)!
dhcpd -> Démon pour fournir le service DHCP aux machines du réseau
dhcpcd -> Démon client de service DHCP
Si les cons savaient voler, il ferait nuit tout le temps ...
xyoos
Hankyu
Messages : 49
Inscription : lun. 14 févr. 2011, 19:39

Re: [dhcp ad-hoc] configuration dhcpcd en ad-hoc (non résolu

Message par xyoos »

tout d'abord merci d'avoir répondu,
alors j'ai tester le dhcpd.conf
et voila le resultat lors de l'exécution du script server

Code : Tout sélectionner

:: Stopping wicd Daemon                                         [DONE] 
dhcpcd: aucun processus trouvé
dhcpcd: unknown option -- Subnet
dhcpcd: unknown option -- range
dhcpcd: unknown option -- default-lease-time
dhcpcd: unknown option -- max-lease-time
dhcpcd[3270]: unknown option `subnet-mask 255.0.0.0;'
dhcpcd[3270]: unknown option `domain-name-servers 208.67.222.222;'
dhcpcd: unknown option -- }
dhcpcd[3270]: version 5.2.11 starting
dhcpcd: unknown option -- Subnet
dhcpcd: unknown option -- range
dhcpcd: unknown option -- default-lease-time
dhcpcd: unknown option -- max-lease-time
dhcpcd[3270]: unknown option `subnet-mask 255.0.0.0;'
dhcpcd[3270]: unknown option `domain-name-servers 208.67.222.222;'
dhcpcd: unknown option -- }
dhcpcd[3270]: eth0: rebinding lease of 172.16.33.246
dhcpcd[3270]: eth0: acknowledged 172.16.33.246 from 192.168.55.55 `belfort4'
dhcpcd[3270]: eth0: checking for 172.16.33.246
dhcpcd[3270]: eth0: leased 172.16.33.246 for 3600 seconds
dhcpcd[3270]: forked to background, child pid 3277
:: Starting DHCP Server                                         [FAIL] 
Avatar de l’utilisateur
Abazigal
Chu Ko Nu
Messages : 313
Inscription : sam. 26 avr. 2008, 14:45
Localisation : Seine et Marne

Re: [dhcp ad-hoc] configuration dhcpcd en ad-hoc (non résolu

Message par Abazigal »

C'est normal: tu as flinguer ta conf de dhcpcd, et dans ton script serveur, tu utilises dhcpcd.

Bon, repartons sur de bonnes bases, en remettant le fichier de conf par défaut :)

Code : Tout sélectionner

pacman -S dhcpcd
mv /etc/dhcpcd.conf.pacnew /etc/dhcpcd.conf
Ensuite, as-tu le paquet "dhcp" d'installé ? (apparement oui)
Si oui, as-tu bien mis dans son fichier de conf (/etc/dhcpd.conf (PAS dhcpcd.conf)) ce que je t'ai donné dans mon premier post ? (aux commentaires près, bien sur ...)
Si oui, relance ton script sur serveur, et dis nous ce qui se passe.
Si les cons savaient voler, il ferait nuit tout le temps ...
xyoos
Hankyu
Messages : 49
Inscription : lun. 14 févr. 2011, 19:39

Re: [dhcp ad-hoc] configuration dhcpcd en ad-hoc (non résolu

Message par xyoos »

oui oui j'avais deja reinstaller le dhcpcd
ensuite oui le dhcp est installé et le dhcpd.conf est configurée comme le post précedant
voila le résultat

Code : Tout sélectionner

:: Stopping wicd Daemon                                                                                                                  [DONE] 
dhcpcd: aucun processus trouvé
dhcpcd[3482]: unknown option `domain-name "example.org";'
dhcpcd[3482]: unknown option `domain-name-servers ns1.example.org, ns2.example.org;'
dhcpcd: unknown option -- default-lease-time
dhcpcd: unknown option -- max-lease-time
dhcpcd: unknown option -- log-facility
dhcpcd: unknown option -- subnet
dhcpcd: unknown option -- }
dhcpcd: unknown option -- subnet
dhcpcd: unknown option -- range
dhcpcd[3482]: unknown option `routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;'
dhcpcd: unknown option -- }
dhcpcd: unknown option -- subnet
dhcpcd: unknown option -- range
dhcpcd[3482]: unknown option `broadcast-address 10.254.239.31;'
dhcpcd[3482]: unknown option `routers rtr-239-32-1.example.org;'
dhcpcd: unknown option -- }
dhcpcd: unknown option -- subnet
dhcpcd: unknown option -- range
dhcpcd[3482]: unknown option `domain-name-servers ns1.internal.example.org;'
dhcpcd[3482]: unknown option `domain-name "internal.example.org";'
dhcpcd[3482]: unknown option `routers 10.5.5.1;'
dhcpcd[3482]: unknown option `broadcast-address 10.5.5.31;'
dhcpcd: unknown option -- default-lease-time
dhcpcd: unknown option -- max-lease-time
dhcpcd: unknown option -- }
dhcpcd: unknown option -- host
dhcpcd: unknown option -- hardware
dhcpcd: unknown option -- filename
dhcpcd: unknown option -- server-name
dhcpcd: unknown option -- }
dhcpcd: unknown option -- host
dhcpcd: unknown option -- hardware
dhcpcd: unknown option -- fixed-address
dhcpcd: unknown option -- }
dhcpcd: unknown option -- class
dhcpcd: unknown option -- match
dhcpcd: unknown option -- }
dhcpcd: unknown option -- shared-network
dhcpcd: unknown option -- subnet
dhcpcd[3482]: unknown option `routers rtr-224.example.org;'
dhcpcd: unknown option -- }
dhcpcd: unknown option -- subnet
dhcpcd[3482]: unknown option `routers rtr-29.example.org;'
dhcpcd: unknown option -- }
dhcpcd: unknown option -- pool
dhcpcd: unknown option -- allow
dhcpcd: unknown option -- range
dhcpcd: unknown option -- }
dhcpcd: unknown option -- pool
dhcpcd: unknown option -- deny
dhcpcd: unknown option -- range
dhcpcd: unknown option -- }
dhcpcd: unknown option -- }
dhcpcd[3482]: version 5.2.11 starting
dhcpcd[3482]: unknown option `domain-name "example.org";'
dhcpcd[3482]: unknown option `domain-name-servers ns1.example.org, ns2.example.org;'
dhcpcd: unknown option -- default-lease-time
dhcpcd: unknown option -- max-lease-time
dhcpcd: unknown option -- log-facility
dhcpcd: unknown option -- subnet
dhcpcd: unknown option -- }
dhcpcd: unknown option -- subnet
dhcpcd: unknown option -- range
dhcpcd[3482]: unknown option `routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;'
dhcpcd: unknown option -- }
dhcpcd: unknown option -- subnet
dhcpcd: unknown option -- range
dhcpcd[3482]: unknown option `broadcast-address 10.254.239.31;'
dhcpcd[3482]: unknown option `routers rtr-239-32-1.example.org;'
dhcpcd: unknown option -- }
dhcpcd: unknown option -- subnet
dhcpcd: unknown option -- range
dhcpcd[3482]: unknown option `domain-name-servers ns1.internal.example.org;'
dhcpcd[3482]: unknown option `domain-name "internal.example.org";'
dhcpcd[3482]: unknown option `routers 10.5.5.1;'
dhcpcd[3482]: unknown option `broadcast-address 10.5.5.31;'
dhcpcd: unknown option -- default-lease-time
dhcpcd: unknown option -- max-lease-time
dhcpcd: unknown option -- }
dhcpcd: unknown option -- host
dhcpcd: unknown option -- hardware
dhcpcd: unknown option -- filename
dhcpcd: unknown option -- server-name
dhcpcd: unknown option -- }
dhcpcd: unknown option -- host
dhcpcd: unknown option -- hardware
dhcpcd: unknown option -- fixed-address
dhcpcd: unknown option -- }
dhcpcd: unknown option -- class
dhcpcd: unknown option -- match
dhcpcd: unknown option -- }
dhcpcd: unknown option -- shared-network
dhcpcd: unknown option -- subnet
dhcpcd[3482]: unknown option `routers rtr-224.example.org;'
dhcpcd: unknown option -- }
dhcpcd: unknown option -- subnet
dhcpcd[3482]: unknown option `routers rtr-29.example.org;'
dhcpcd: unknown option -- }
dhcpcd: unknown option -- pool
dhcpcd: unknown option -- allow
dhcpcd: unknown option -- range
dhcpcd: unknown option -- }
dhcpcd: unknown option -- pool
dhcpcd: unknown option -- deny
dhcpcd: unknown option -- range
dhcpcd: unknown option -- }
dhcpcd: unknown option -- }
dhcpcd[3482]: eth0: rebinding lease of 172.16.33.246
dhcpcd[3482]: eth0: acknowledged 172.16.33.246 from 192.168.55.55 `belfort4'
dhcpcd[3482]: eth0: checking for 172.16.33.246
dhcpcd[3482]: eth0: leased 172.16.33.246 for 3600 seconds
dhcpcd[3482]: forked to background, child pid 3497
:: Starting DHCP Server                                                                                                                  [FAIL] 
EDIT: le fichier /etc/dhcpcd.conf a été réinitialiser avec un cp /etc/dhcpcd.conf.save /etc/dhcpcd.conf
Dernière modification par xyoos le mar. 08 mars 2011, 23:17, modifié 1 fois.
Avatar de l’utilisateur
Abazigal
Chu Ko Nu
Messages : 313
Inscription : sam. 26 avr. 2008, 14:45
Localisation : Seine et Marne

Re: [dhcp ad-hoc] configuration dhcpcd en ad-hoc (non résolu

Message par Abazigal »

Tu n'as pas fait le mv après avoir réinstallé dhcpcd ... donc tu as toujours ton fichier de conf moisi (d'où les erreurs).
Allez, rebelotte ! :lol:
Si les cons savaient voler, il ferait nuit tout le temps ...
xyoos
Hankyu
Messages : 49
Inscription : lun. 14 févr. 2011, 19:39

Re: [dhcp ad-hoc] configuration dhcpcd en ad-hoc (non résolu

Message par xyoos »

non jai fait un cp /etc/dhcpcd.conf.save /etc/dhcpcd.conf (le fichier /etc/dhcpcd.conf.pacnew nexiste pas )
Avatar de l’utilisateur
Abazigal
Chu Ko Nu
Messages : 313
Inscription : sam. 26 avr. 2008, 14:45
Localisation : Seine et Marne

Re: [dhcp ad-hoc] configuration dhcpcd en ad-hoc (non résolu

Message par Abazigal »

Ok, dans ce cas là tu n'as pas juste réinstallé, tu as
- supprimé (pacman a garder ton fichier de conf actuel sous .pacsave)
- réinstallé (ce qui a mis un dhcpcd.conf propre)
- copié ton ancien fichier moisi sur le nouveau qui était propre :P
Autrement dit, ca n'a rien fait.

Bon, alors maintenant, fais "juste"

Code : Tout sélectionner

pacman -S dhcpcd
mv /etc/dhcpcd.conf.pacnew /etc/dhcpcd.conf
(au moment de l'installation de dhcpcd, il va voir qu'il y a déjà un dhcpcd.conf, et va donc mettre le nouveau (le propre) en .pacnew; après, tu écrase l'ancien par le nouveau)
Si les cons savaient voler, il ferait nuit tout le temps ...
xyoos
Hankyu
Messages : 49
Inscription : lun. 14 févr. 2011, 19:39

Re: [dhcp ad-hoc] configuration dhcpcd en ad-hoc (non résolu

Message par xyoos »

c'est ce que j'avai déjà fait, mais toujours pas de dhcpcd.conf.pacnew à l'horizon,
Avatar de l’utilisateur
Abazigal
Chu Ko Nu
Messages : 313
Inscription : sam. 26 avr. 2008, 14:45
Localisation : Seine et Marne

Re: [dhcp ad-hoc] configuration dhcpcd en ad-hoc (non résolu

Message par Abazigal »

toi tu avais fait un pacman -R dhcpcd, avant, non ? (là je te demande de faire ces cmd sans désinstaller avant)
Si les cons savaient voler, il ferait nuit tout le temps ...
xyoos
Hankyu
Messages : 49
Inscription : lun. 14 févr. 2011, 19:39

Re: [dhcp ad-hoc] configuration dhcpcd en ad-hoc (non résolu

Message par xyoos »

je ne l'ai jamais désintaller, d'ailleurs si je lance la désinstale wicd le requiert, je ne l'ai pas desinstaller
ps: si je supprime je fais toujours un pacman -Rsn, mais je n'ai pas désinstaller ce paquet et j'ai refait un réinstallation comme demandé
Avatar de l’utilisateur
Abazigal
Chu Ko Nu
Messages : 313
Inscription : sam. 26 avr. 2008, 14:45
Localisation : Seine et Marne

Re: [dhcp ad-hoc] configuration dhcpcd en ad-hoc (non résolu

Message par Abazigal »

bon, ok, au temps pour moi, dans ce cas.
après avoir fait un pacman -S dhcpcd, tu as un donc un dhcpcd.conf propre ?
sans "subnet", "range", tout ca tout ca ?
Si les cons savaient voler, il ferait nuit tout le temps ...
xyoos
Hankyu
Messages : 49
Inscription : lun. 14 févr. 2011, 19:39

Re: [dhcp ad-hoc] configuration dhcpcd en ad-hoc (non résolu

Message par xyoos »

j'ai tout les paramètres par défault :
/etc/dhcpcd.conf

Code : Tout sélectionner

# dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#

# option definitions common to all supported networks...
option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;

default-lease-time 600;
max-lease-time 7200;

# Use this to enble / disable dynamic dns updates globally.
#ddns-update-style none;

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
#authoritative;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

# No service will be given on this subnet, but declaring it helps the 
# DHCP server to understand the network topology.

subnet 10.152.187.0 netmask 255.255.255.0 {
}

# This is a very basic subnet declaration.

subnet 10.254.239.0 netmask 255.255.255.224 {
  range 10.254.239.10 10.254.239.20;
  option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
}

# This declaration allows BOOTP clients to get dynamic addresses,
# which we don't really recommend.

subnet 10.254.239.32 netmask 255.255.255.224 {
  range dynamic-bootp 10.254.239.40 10.254.239.60;
  option broadcast-address 10.254.239.31;
  option routers rtr-239-32-1.example.org;
}

# A slightly different configuration for an internal subnet.
subnet 10.5.5.0 netmask 255.255.255.224 {
  range 10.5.5.26 10.5.5.30;
  option domain-name-servers ns1.internal.example.org;
  option domain-name "internal.example.org";
  option routers 10.5.5.1;
  option broadcast-address 10.5.5.31;
  default-lease-time 600;
  max-lease-time 7200;
}

# Hosts which require special configuration options can be listed in
# host statements.   If no address is specified, the address will be
# allocated dynamically (if possible), but the host-specific information
# will still come from the host declaration.

host passacaglia {
  hardware ethernet 0:0:c0:5d:bd:95;
  filename "vmunix.passacaglia";
  server-name "toccata.fugue.com";
}

# Fixed IP addresses can also be specified for hosts.   These addresses
# should not also be listed as being available for dynamic assignment.
# Hosts for which fixed IP addresses have been specified can boot using
# BOOTP or DHCP.   Hosts for which no fixed address is specified can only
# be booted with DHCP, unless there is an address range on the subnet
# to which a BOOTP client is connected which has the dynamic-bootp flag
# set.
host fantasia {
  hardware ethernet 08:00:07:26:c0:a5;
  fixed-address fantasia.fugue.com;
}

# You can declare a class of clients and then do address allocation
# based on that.   The example below shows a case where all clients
# in a certain class get addresses on the 10.17.224/24 subnet, and all
# other clients get addresses on the 10.0.29/24 subnet.

class "foo" {
  match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
}

shared-network 224-29 {
  subnet 10.17.224.0 netmask 255.255.255.0 {
    option routers rtr-224.example.org;
  }
  subnet 10.0.29.0 netmask 255.255.255.0 {
    option routers rtr-29.example.org;
  }
  pool {
    allow members of "foo";
    range 10.17.224.10 10.17.224.250;
  }
  pool {
    deny members of "foo";
    range 10.0.29.10 10.0.29.230;
  }
}
Avatar de l’utilisateur
Abazigal
Chu Ko Nu
Messages : 313
Inscription : sam. 26 avr. 2008, 14:45
Localisation : Seine et Marne

Re: [dhcp ad-hoc] configuration dhcpcd en ad-hoc (non résolu

Message par Abazigal »

Ce que tu me paste là est le fichier dhcpd.conf .......
Nous depuis tout à l'heure, on s'evertue à remettre la conf par défaut pour dhcpcd.conf (que tu n'aurais jamais dû modifier).
Le fichier dhcpd.conf (sans c), on s'en occupera après.


La question actuelle est: qu'est-ce que tu as dans ton dhcpcd.conf ?
Dernière modification par Abazigal le mar. 08 mars 2011, 23:43, modifié 1 fois.
Si les cons savaient voler, il ferait nuit tout le temps ...
xyoos
Hankyu
Messages : 49
Inscription : lun. 14 févr. 2011, 19:39

Re: [dhcp ad-hoc] configuration dhcpcd en ad-hoc (non résolu

Message par xyoos »

oui je sais mais jai éditer le fichier dhcpcd.conf
pourtant c vrai que dans l'entete la description et dhcpd.conf
mon dhcpcd.conf et le dhcpd.conf sont identiques... sauf que le dhcpd.conf j'ai tout commenter sur le dhcpd.conf et rajouter c que vous m'avez dis au debut subnet...

EDIT: c'est bon j'ai enfin recupérer le vrai fichier issu d'un autre archlinux

Code : Tout sélectionner

# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

# Inform the DHCP server of our hostname for DDNS.
hostname
# To share the DHCP lease across OSX and Windows a ClientID is needed.
# Enabling this may get a different lease than the kernel DHCP client.
# Some upstream DHCP servers may also require a ClientID, such as FRITZ!Box.
#clientid

# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# Respect the network MTU.
option interface_mtu
# A ServerID is required by RFC2131.
require dhcp_server_identifier

# A hook script is provided to lookup the hostname if not set by the DHCP
# server, but it should not be run by default.
nohook lookup-hostname
noipv4ll
Dernière modification par xyoos le mar. 08 mars 2011, 23:49, modifié 1 fois.
Avatar de l’utilisateur
Abazigal
Chu Ko Nu
Messages : 313
Inscription : sam. 26 avr. 2008, 14:45
Localisation : Seine et Marne

Re: [dhcp ad-hoc] configuration dhcpcd en ad-hoc (non résolu

Message par Abazigal »

Je sens que cette histoire va m'enervé ...
Bon ... désinstalle "dhcp" (le serveur dhcp (fichier dhcpd.conf)). Ca en fera un qui nous em***** plus.

Code : Tout sélectionner

pacman -R dhcp
Ensuite, on va y aller bourrin:

Code : Tout sélectionner

rm /etc/dhcp*
(pour supprimer tous les .pacsave .pacnew .pactruc .confpourris etc)

Puis, réinstalle dhcpcd:

Code : Tout sélectionner

pacman -S dhcpcd
Puis paste moi ton /etc/dhcpcd.conf.
On va y arriver, t'inquiète pas ...
Si les cons savaient voler, il ferait nuit tout le temps ...
xyoos
Hankyu
Messages : 49
Inscription : lun. 14 févr. 2011, 19:39

Re: [dhcp ad-hoc] configuration dhcpcd en ad-hoc (non résolu

Message par xyoos »

alors j'ai récupérer le vrai fichier issu d'un autre archlinux bizarre que la reinstalle n'ai pas remis le fichier conforme
ensuite j'ai tester le script server
voila ce que ca donne, faut il que je réinstalle tout les dhcp comme vous l'avez suggerer ou est ce suffisant ?

Code : Tout sélectionner

:: Stopping wicd Daemon                                         [DONE] 
dhcpcd: aucun processus trouvé
dhcpcd[3795]: version 5.2.11 starting
dhcpcd[3795]: eth0: rebinding lease of 172.16.33.246
dhcpcd[3795]: eth0: broadcasting for a lease
dhcpcd[3795]: eth0: offered 172.16.33.246 from 192.168.55.55 `belfort4'
dhcpcd[3795]: eth0: acknowledged 172.16.33.246 from 192.168.55.55 `belfort4'
dhcpcd[3795]: eth0: checking for 172.16.33.246
dhcpcd[3795]: eth0: leased 172.16.33.246 for 3600 seconds
dhcpcd[3795]: forked to background, child pid 3816
:: Starting DHCP Server                                         [FAIL] 
 
Avatar de l’utilisateur
Abazigal
Chu Ko Nu
Messages : 313
Inscription : sam. 26 avr. 2008, 14:45
Localisation : Seine et Marne

Re: [dhcp ad-hoc] configuration dhcpcd en ad-hoc (non résolu

Message par Abazigal »

Bon, cool que dhcpcd soit de nouveau operationnel (je te conseille d'enlever les /etc/dhcpcd.conf.*, histoire de faire propre).

Maintenant, qu'est-ce qu'il y a dans ton dhcpd.conf ? (sans le c, hein)
A la suite de ton script, sur le serveur, as-tu bien ton ip en 10.42.43.1 sur wlan0 ?
Si les cons savaient voler, il ferait nuit tout le temps ...
xyoos
Hankyu
Messages : 49
Inscription : lun. 14 févr. 2011, 19:39

Re: [dhcp ad-hoc] configuration dhcpcd en ad-hoc (non résolu

Message par xyoos »

oui c'est déjà fait j'ai supprimé le fichier dhcpcd.conf.save
et le fichier dhcpd.conf est comme ceci

Code : Tout sélectionner

# dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#

# option definitions common to all supported networks...
#option domain-name "example.org";
#option domain-name-servers ns1.example.org, ns2.example.org;

#default-lease-time 600;
#max-lease-time 7200;

# Use this to enble / disable dynamic dns updates globally.
#ddns-update-style none;

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
#authoritative;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
#log-facility local7;

# No service will be given on this subnet, but declaring it helps the 
# DHCP server to understand the network topology.

#subnet 10.152.187.0 netmask 255.255.255.0 {
#}

# This is a very basic subnet declaration.

#subnet 10.254.239.0 netmask 255.255.255.224 {
#  range 10.254.239.10 10.254.239.20;
#  option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
#}

# This declaration allows BOOTP clients to get dynamic addresses,
# which we don't really recommend.

#subnet 10.254.239.32 netmask 255.255.255.224 {
#  range dynamic-bootp 10.254.239.40 10.254.239.60;
#  option broadcast-address 10.254.239.31;
#  option routers rtr-239-32-1.example.org;
#}

# A slightly different configuration for an internal subnet.
#subnet 10.5.5.0 netmask 255.255.255.224 {
#  range 10.5.5.26 10.5.5.30;
#  option domain-name-servers ns1.internal.example.org;
#  option domain-name "internal.example.org";
#  option routers 10.5.5.1;
#  option broadcast-address 10.5.5.31;
#  default-lease-time 600;
#  max-lease-time 7200;
#}

# Hosts which require special configuration options can be listed in
# host statements.   If no address is specified, the address will be
# allocated dynamically (if possible), but the host-specific information
# will still come from the host declaration.

#host passacaglia {
#  hardware ethernet 0:0:c0:5d:bd:95;
#  filename "vmunix.passacaglia";
#  server-name "toccata.fugue.com";
#}

# Fixed IP addresses can also be specified for hosts.   These addresses
# should not also be listed as being available for dynamic assignment.
# Hosts for which fixed IP addresses have been specified can boot using
# BOOTP or DHCP.   Hosts for which no fixed address is specified can only
# be booted with DHCP, unless there is an address range on the subnet
# to which a BOOTP client is connected which has the dynamic-bootp flag
# set.
#host fantasia {
#  hardware ethernet 08:00:07:26:c0:a5;
#  fixed-address fantasia.fugue.com;
#}

# You can declare a class of clients and then do address allocation
# based on that.   The example below shows a case where all clients
# in a certain class get addresses on the 10.17.224/24 subnet, and all
# other clients get addresses on the 10.0.29/24 subnet.

#class "foo" {
#  match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
#}

#shared-network 224-29 {
#  subnet 10.17.224.0 netmask 255.255.255.0 {
#    option routers rtr-224.example.org;
#  }
#  subnet 10.0.29.0 netmask 255.255.255.0 {
#    option routers rtr-29.example.org;
#  }
#  pool {
#    allow members of "foo";
#    range 10.17.224.10 10.17.224.250;
#  }
#  pool {
#    deny members of "foo";
#    range 10.0.29.10 10.0.29.230;
 # }
#}
subnet 10.42.43.0 netmask 255.255.255.0 {
		range 10.42.43.2 10.42.43.60;
		option domain-name-servers 208.67.222.222;
		option routers 10.42.43.1;
}
EDIT: oui oui le wlan0 est ok en 10.42.43.1 tout le reste est en 2 eme page ;)
Dernière modification par xyoos le mer. 09 mars 2011, 00:08, modifié 2 fois.
Avatar de l’utilisateur
Abazigal
Chu Ko Nu
Messages : 313
Inscription : sam. 26 avr. 2008, 14:45
Localisation : Seine et Marne

Re: [dhcp ad-hoc] configuration dhcpcd en ad-hoc (non résolu

Message par Abazigal »

Ok, parfait, puis-je avoir un "ifconfig wlan0" ?
Et tant qu'on y est, "grep dhcpd /var/log/daemon.log" ?

EDIT: Ok pour l'IP (j'aimerai quand même un ifconfig wlan0, plz =)
Dernière modification par Abazigal le mer. 09 mars 2011, 00:04, modifié 1 fois.
Si les cons savaient voler, il ferait nuit tout le temps ...
Répondre