Networking Forums

Networking Forums > Computer Networking > Linux Networking > ONE Linux DHCP Server + Multiple VLANs - Soluble problem?

Reply
Thread Tools Display Modes

ONE Linux DHCP Server + Multiple VLANs - Soluble problem?

 
 
Ad
Guest
Posts: n/a

 
      07-28-2005, 10:00 AM
Hi everyone. I hope some of you could help with this headache problem
because I've really tried thousands of dhcp and interfaces configs
without success why does WinNT4 manage handle it and not the latest
linux kernel...

--- NETWORK SETUP ---

My company have 3 Cisco 3500XL switches and one Cisco Catalyst 4006
router.

Every switch act as a VTP Client to the Catalyst which acts as a VTP
Server. My current configuration uses the old Windows NT4 as DHCP and
DNS server and a linux box as a file server.

I have configured 4 VLANs (100, 200, 300, 400), and my Windows NT4 box
assigns DHCP adresses to the current VLANs with the rigth VLAN IP.
Everything works fine. The servers are in VLAN 100 and the other office
computers are in the others.

Now, I setup a linux box (Debian 3.1 stable, customized 2.6.12 kernel
with 802.1q as a module and VLAN support as static)

I compiled vconfig tool from the kernel sources, I checked if the
driver of my 2 NIC cards (3c509c) is correctly patched to handle VLAN
Trunk. It's ok.

I can add with vconfig new vlan interfaces on my linux box, it works
without freezing the entire box. Until now, no problem.

The DNS server is up and running, I can switch off the windows box and
the linux box can take the job. But...



--- THE REAL TROUBLE ---



I tried to configure the DHCP Server (apt-get install dhcp3-server) to
handle the VLANs. And nothing works from now on...

Here are the steps I think it's supposed to work (I disabled the second
NIC, it will be used in the future to do load balancing with bond0, so
only eth0 is concerned for my test):

0. The linux server adress is 10.50.100.10 with default gateway
10.50.100.1

1. Add 3 virtual network interfaces with vconfig, so

vconfig add eth0 200
vconfig add eth0 300
vconfig add eth0 400

2. Set up IP for the new interfaces

ifconfig eth0.200 10.50.200.5/24 broadcast 10.50.200.255 up
ifconfig eth0.300 10.50.300.5/24 broadcast 10.50.300.255 up
ifconfig eth0.400 10.50.400.5/24 broadcast 10.50.400.255 up

3. DHCP Configuration

subnet 10.50.200.0 netmask 255.255.255.0 {
authoritative; # I TRIED WITH OR WITHOUT IT
option routers 10.50.200.1;
range 10.50.200.10 10.50.200.160;
}

subnet 10.50.300.0 netmask 255.255.255.0 {
authoritative; # I TRIED WITH OR WITHOUT IT
option routers 10.50.300.1;
range 10.50.300.10 10.50.300.160;
}

subnet 10.50.400.0 netmask 255.255.255.0 {
authoritative; # I TRIED WITH OR WITHOUT IT
option routers 10.50.400.1;
range 10.50.400.10 10.50.400.160;
}

That should be enough for the config. I read many notes on internet, I
even tried to put the whole in a shared network or in separate
declaration. Nothing works!

I launched the dhcp server in debug mode to see the details for the
connections. And the problem is that...it isn't even asked to offer an
IP.


--- THE ANALYSIS ---


So I tried to sniff packets with tethereal to see what was going on.
And when I launch it with:
tethereal -V -f "vlan or (port bootpc or port bootps)"

Notings happens (I configured the switches to add VLAN Trunks).

And by chance, I did try to add virtual interfaces with

ifconfig eth0:1 10.50.200.6/48 broadcast 10.50.255.255 up

-> Notice the /48 and the broadcast!

And I tried once again dhcp in debug mode and sniffing packets...and
here is the result when I restard the connection on two Windows 2000
clients:

Multiple interfaces match the same subnet: eth0 eth0.100
Multiple interfaces match the same shared network: eth0 eth0.100
Listening on LPF/eth0.100/00:50:da:66:67:2d/10.50.100.0/24
Sending on LPF/eth0.100/00:50:da:66:67:2d/10.50.100.0/24
Listening on LPF/eth0.200/00:50:da:66:67:2d/10.50.200.0/24
Sending on LPF/eth0.200/00:50:da:66:67:2d/10.50.200.0/24
Listening on LPF/eth0/00:50:da:66:67:2d/10.50.100.0/24
Sending on LPF/eth0/00:50:da:66:67:2d/10.50.100.0/24
Sending on Socket/fallback/fallback-net

DHCPDISCOVER from 00:12:79:68:0c:0e via 10.50.200.2
DHCPOFFER on 10.50.200.160 to 00:12:79:68:0c:0e (w2k) via 10.50.200.2

DHCPDISCOVER from 00:12:79:68:0a:b5 via 10.50.100.2
DHCPOFFER on 10.50.100.160 to 00:12:79:68:0a:b5 (PST2) via
10.50.100.2

DHCPDISCOVER from 00:12:79:68:0c:0e via 10.50.200.2
DHCPOFFER on 10.50.200.160 to 00:12:79:68:0c:0e (w2k) via 10.50.200.3

DHCPDISCOVER from 00:12:79:68:0c:0e via 10.50.200.2
DHCPOFFER on 10.50.200.160 to 00:12:79:68:0c:0e (w2k) via 10.50.200.2

DHCPDISCOVER from 00:12:79:68:0a:b5 via 10.50.100.2
DHCPOFFER on 10.50.100.160 to 00:12:79:68:0a:b5 (PST2) via
10.50.100.2

DHCPDISCOVER from 00:12:79:68:0a:b5 via 10.50.100.3
DHCPOFFER on 10.50.100.160 to 00:12:79:68:0a:b5 (PST2) via
10.50.100.3

 
Reply With Quote
 
 
 
 
Tauno Voipio
Guest
Posts: n/a

 
      07-28-2005, 11:34 AM
Ad wrote:
> Hi everyone. I hope some of you could help with this headache problem
> because I've really tried thousands of dhcp and interfaces configs
> without success why does WinNT4 manage handle it and not the latest
> linux kernel...
>
> --- NETWORK SETUP ---
>
> My company have 3 Cisco 3500XL switches and one Cisco Catalyst 4006
> router.
>
> Every switch act as a VTP Client to the Catalyst which acts as a VTP
> Server. My current configuration uses the old Windows NT4 as DHCP and
> DNS server and a linux box as a file server.
>
> I have configured 4 VLANs (100, 200, 300, 400), and my Windows NT4 box
> assigns DHCP adresses to the current VLANs with the rigth VLAN IP.
> Everything works fine. The servers are in VLAN 100 and the other office
> computers are in the others.
>
> Now, I setup a linux box (Debian 3.1 stable, customized 2.6.12 kernel
> with 802.1q as a module and VLAN support as static)
>
> I compiled vconfig tool from the kernel sources, I checked if the
> driver of my 2 NIC cards (3c509c) is correctly patched to handle VLAN
> Trunk. It's ok.
>
> I can add with vconfig new vlan interfaces on my linux box, it works
> without freezing the entire box. Until now, no problem.
>
> The DNS server is up and running, I can switch off the windows box and
> the linux box can take the job. But...
>
>
>
> --- THE REAL TROUBLE ---
>
>
>
> I tried to configure the DHCP Server (apt-get install dhcp3-server) to
> handle the VLANs. And nothing works from now on...
>
> Here are the steps I think it's supposed to work (I disabled the second
> NIC, it will be used in the future to do load balancing with bond0, so
> only eth0 is concerned for my test):
>
> 0. The linux server adress is 10.50.100.10 with default gateway
> 10.50.100.1
>
> 1. Add 3 virtual network interfaces with vconfig, so
>
> vconfig add eth0 200
> vconfig add eth0 300
> vconfig add eth0 400
>
> 2. Set up IP for the new interfaces
>
> ifconfig eth0.200 10.50.200.5/24 broadcast 10.50.200.255 up
> ifconfig eth0.300 10.50.300.5/24 broadcast 10.50.300.255 up
> ifconfig eth0.400 10.50.400.5/24 broadcast 10.50.400.255 up
>
> 3. DHCP Configuration
>
> subnet 10.50.200.0 netmask 255.255.255.0 {
> authoritative; # I TRIED WITH OR WITHOUT IT
> option routers 10.50.200.1;
> range 10.50.200.10 10.50.200.160;
> }
>
> subnet 10.50.300.0 netmask 255.255.255.0 {
> authoritative; # I TRIED WITH OR WITHOUT IT
> option routers 10.50.300.1;
> range 10.50.300.10 10.50.300.160;
> }
>
> subnet 10.50.400.0 netmask 255.255.255.0 {
> authoritative; # I TRIED WITH OR WITHOUT IT
> option routers 10.50.400.1;
> range 10.50.400.10 10.50.400.160;
> }
>
> That should be enough for the config. I read many notes on internet, I
> even tried to put the whole in a shared network or in separate
> declaration. Nothing works!
>
> I launched the dhcp server in debug mode to see the details for the
> connections. And the problem is that...it isn't even asked to offer an
> IP.
>
>
> --- THE ANALYSIS ---
>
>
> So I tried to sniff packets with tethereal to see what was going on.
> And when I launch it with:
> tethereal -V -f "vlan or (port bootpc or port bootps)"
>
> Notings happens (I configured the switches to add VLAN Trunks).
>
> And by chance, I did try to add virtual interfaces with
>
> ifconfig eth0:1 10.50.200.6/48 broadcast 10.50.255.255 up
>
> -> Notice the /48 and the broadcast!
>
> And I tried once again dhcp in debug mode and sniffing packets...and
> here is the result when I restard the connection on two Windows 2000
> clients:
>
> Multiple interfaces match the same subnet: eth0 eth0.100
> Multiple interfaces match the same shared network: eth0 eth0.100
> Listening on LPF/eth0.100/00:50:da:66:67:2d/10.50.100.0/24
> Sending on LPF/eth0.100/00:50:da:66:67:2d/10.50.100.0/24
> Listening on LPF/eth0.200/00:50:da:66:67:2d/10.50.200.0/24
> Sending on LPF/eth0.200/00:50:da:66:67:2d/10.50.200.0/24
> Listening on LPF/eth0/00:50:da:66:67:2d/10.50.100.0/24
> Sending on LPF/eth0/00:50:da:66:67:2d/10.50.100.0/24
> Sending on Socket/fallback/fallback-net
>
> DHCPDISCOVER from 00:12:79:68:0c:0e via 10.50.200.2
> DHCPOFFER on 10.50.200.160 to 00:12:79:68:0c:0e (w2k) via 10.50.200.2
>
> DHCPDISCOVER from 00:12:79:68:0a:b5 via 10.50.100.2
> DHCPOFFER on 10.50.100.160 to 00:12:79:68:0a:b5 (PST2) via
> 10.50.100.2
>
> DHCPDISCOVER from 00:12:79:68:0c:0e via 10.50.200.2
> DHCPOFFER on 10.50.200.160 to 00:12:79:68:0c:0e (w2k) via 10.50.200.3
>
> DHCPDISCOVER from 00:12:79:68:0c:0e via 10.50.200.2
> DHCPOFFER on 10.50.200.160 to 00:12:79:68:0c:0e (w2k) via 10.50.200.2
>
> DHCPDISCOVER from 00:12:79:68:0a:b5 via 10.50.100.2
> DHCPOFFER on 10.50.100.160 to 00:12:79:68:0a:b5 (PST2) via
> 10.50.100.2
>
> DHCPDISCOVER from 00:12:79:68:0a:b5 via 10.50.100.3
> DHCPOFFER on 10.50.100.160 to 00:12:79:68:0a:b5 (PST2) via
> 10.50.100.3
>
> .
> .
> .
>
> And the tethereal sniffs packets with the correct VLAN ID in it...
>
> But the clients never get their IP. So if anyone could answer why. And
> why does dhcp offer IP when adding the strange interface eth0:1, and by
> chance I remind you of it.
>


Did you notice that 10.50.300.0 and 10.50.400.0 are impossible
IPv4 addresses? A component in the dotted-decimal representation
must be 0 to 255.

--

Tauno Voipio
tauno voipio (at) iki fi


 
Reply With Quote
 
Ad
Guest
Posts: n/a

 
      07-28-2005, 02:18 PM
Sorry it's just a copy and paste mistake, its 10.50.20.0 | 10.50.30.0 |
10.50.40.0 for VLANs. And not 200.0 | 300.0 | 400.0 of course.
I didn't pay attention.

 
Reply With Quote
 
Philippe WEILL
Guest
Posts: n/a

 
      07-28-2005, 02:49 PM


Ad wrote:
> Hi everyone. I hope some of you could help with this headache problem
> because I've really tried thousands of dhcp and interfaces configs
> without success why does WinNT4 manage handle it and not the latest
> linux kernel...
>
> --- NETWORK SETUP ---
>
> My company have 3 Cisco 3500XL switches and one Cisco Catalyst 4006
> router.
>
> Every switch act as a VTP Client to the Catalyst which acts as a VTP
> Server. My current configuration uses the old Windows NT4 as DHCP and
> DNS server and a linux box as a file server.
>
> I have configured 4 VLANs (100, 200, 300, 400), and my Windows NT4 box
> assigns DHCP adresses to the current VLANs with the rigth VLAN IP.
> Everything works fine. The servers are in VLAN 100 and the other office
> computers are in the others.
>
> Now, I setup a linux box (Debian 3.1 stable, customized 2.6.12 kernel
> with 802.1q as a module and VLAN support as static)
>
> I compiled vconfig tool from the kernel sources, I checked if the
> driver of my 2 NIC cards (3c509c) is correctly patched to handle VLAN
> Trunk. It's ok.
>
> I can add with vconfig new vlan interfaces on my linux box, it works
> without freezing the entire box. Until now, no problem.
>
> The DNS server is up and running, I can switch off the windows box and
> the linux box can take the job. But...
>
>
>


you could also use the cisco vlan router to forward dhcp request to your
server with something like

interface vlan 300
ip address xxxx mask
ip helper-address my-dhcp-server-ip
no shutdown

Like this your server as only one ip address needed
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
WDS 2008, DHCP, multiple VLANs, DHCP Relays, help! :-) Brian Day Windows Networking 2 04-01-2008 04:00 PM
Server 2003 obtaining multiple multiple IP addresses via DHCP pbrommer@gmail.com Windows Networking 1 03-29-2007 02:24 AM
Being a gateway for multiple VLANs? spip_yeah@yahoo.com Linux Networking 1 11-09-2006 08:46 AM
Multiple DHCP Scopes associated with VLANs bck Wireless Internet 2 04-10-2006 04:21 PM
DHCP Server servicing different VLANs ik Windows Networking 0 08-12-2005 05:29 PM



1 2 3 4 5 6 7 8 9 10 11