URL: https://linuxfr.org/forums/linux-general/posts/dhcp-v3-et-vlan Title: DHCP v3 et Vlan Authors: syj Date: 2008年10月01日T15:12:26+02:00 Tags: debian Score: 0 Bonjour, J'ai un petit problème sur lequel je butte. Je cherche à configurer un DHCPv3 d'une debian sur une interface réseau. Le DHCP doit attribuer une IP d'un sous-reseau en fonction du VLAN du client. Le poste client se connectant via Wifi. Voici ma configuration IP: _ #ifconfig -a eth1 Link encap:Ethernet HWaddr 00:10:5C:EA:58:81 inet addr:192.168.16.9 Bcast:192.168.16.255 Mask:255.255.255.0 inet6 addr: fe80::210:5cff:feea:5881/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:100686 errors:0 dropped:0 overruns:0 frame:0 TX packets:52188 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:9306449 (8.8 MiB) TX bytes:21034362 (20.0 MiB) Interrupt:11 Base address:0x8000 eth2 Link encap:Ethernet HWaddr 00:05:5D:07:06:22 inet addr:10.100.100.80 Bcast:10.100.100.255 Mask:255.255.255.0 inet6 addr: fe80::205:5dff:fe07:622/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:37264 errors:0 dropped:0 overruns:0 frame:0 TX packets:30345 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:12435248 (11.8 MiB) TX bytes:3083951 (2.9 MiB) Interrupt:5 Base address:0xa000 eth2.2 Link encap:Ethernet HWaddr 00:05:5D:07:06:22 inet addr:10.90.90.80 Bcast:10.90.90.255 Mask:255.255.255.0 inet6 addr: fe80::205:5dff:fe07:622/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:10168 errors:0 dropped:0 overruns:0 frame:0 TX packets:3446 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:598501 (584.4 KiB) TX bytes:262404 (256.2 KiB) eth2.3 Link encap:Ethernet HWaddr 00:05:5D:07:06:22 inet addr:10.0.0.80 Bcast:10.0.0.255 Mask:255.255.255.0 inet6 addr: fe80::205:5dff:fe07:622/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:34 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:7660 (7.4 KiB) _ Voici ma configuration dhcp. _ root@srvpxe:/etc/network# cat /etc/dhcp3/dhcpd.conf |grep -v "^#" ddns-update-style none; option domain-name "mon-domaine.org"; option domain-name-servers 192.168.16.3,192.168.16.6; default-lease-time 600; max-lease-time 7200; log-facility local7; shared-network "coleth2" { option domain-name-servers 192.168.16.3,192.168.16.6; subnet 10.100.100.0 netmask 255.255.255.0 { range 10.100.100.2 10.100.100.60; } subnet 10.90.90.0 netmask 255.255.255.0 { range 10.90.90.2 10.90.90.60; } subnet 10.0.0.0 netmask 255.255.255.0 { range 10.0.0.2 10.0.0.60; } } _ Les routes configuraient: _ route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.0.0.0 * 255.255.255.0 U 0 0 0 eth2.3 192.168.32.0 * 255.255.255.0 U 0 0 0 eth1 10.90.90.0 * 255.255.255.0 U 0 0 0 eth2.2 10.100.100.0 * 255.255.255.0 U 0 0 0 eth2 default 192.168.16.1 0.0.0.0 UG 0 0 0 eth1 _ J'ai lu qu'il fallait utiliser _shared-network _ et de m'assurer que mes routes sont bien configuré. Je ne comprends pas pourquoi çà cloche. Si je sniffe avec tcpdump, je vois bien ma trame arrivait via le eth2.2 pour un client sur le vlan 2 par contre l'ip que lui attribue le DHCP est 10.100.100.59 c'est à dire sans vlan. Merci de votre aide.

AltStyle によって変換されたページ (->オリジナル) /