Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

i have linux running and use dhcp3server which manages my ip-addresses in my network. Now i got a zyxel-access-point and want to drive it on a different ip-range than my wired network. Is it possible to run one dhcp-server managing two ip-ranges?

If yes, how would that be established?

Peace

Ice

Update: My network is on IP-Range 192.168.1.x. My Gateway-PC running the DHCP-server has two networkcards eth0 for extern (internet) and eth1 with 192.168.1.1. If i configure the AP on a IP like 172.16.1.2 nothing works unless i define a second IP-Adress like 172.16.1.1 on my Gateway-PC's network eth1 (sudo ifconfig eth1:1 172.16.1.1 up).

Now i'm able to configure the Access-Point e.g. MAC-Filters and WEP-Key's. But the WLan-Clients don't get a IP-Adress unless the DHCP-Server serves the requests on eth1:1 with the given IP-Range-Adresses.

Last but not least there must be a route to eth0 to access to the internet.

Is there anybody who can help me thru the needed steps?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

It's definitely possible if you can add another NIC to your server. So if your WAN is on eth0, your LAN on eth1, you need another NIC to be eth2. You'd set eth2 to a 172.16.x.x address and plug the wireless AP into that NIC. (You can do this with the steps below; just change references for eth1:1 to eth2.)

It may be possible with an ethernet alias to your LAN-side NIC, but I'm not sure. Due to the way DHCP works (see examples of DHCP initiation packets at Wikipedia), I don't believe the server will be able to distinguish DHCPRequest packets from the AP from those on the LAN -- they're both coming in on the same wire.

But I could be wrong; your edit seems to suggest it's possible. (Are your wireless clients actually getting assigned the correct addresses?)

This Ubuntu dhcp3-server documentation gives an example of a multi-subnet configuration. It sounds like you need three things:

  1. Add your 172.16.x.x alias permanently. Edit /etc/networks/interfaces and add a definition of your alias. I don't believe you'll need to change anything for routing; eth0 should already be your default route for anything other than 192.168.1.0, and this interface should automatically add another exception for 172.16.1.0. Use /sbin/route to check your routes to be sure.

    auto eth1:1
    iface eth1:1 inet static
    address 172.16.1.1
    netmask 255.255.255.0
    
  2. Configure your /etc/defaults/dhcp3-server to make it active on eth1 and eth1:1:

    INTERFACES="eth1 eth1:1"
    
  3. Configure your /etc/dhcp/dhcp.conf to include the options needed for both subnets:

    subnet 192.168.1.0 netmask 255.255.255.0 {
    
    
      option routers                  192.168.1.1;
      option subnet-mask              255.255.255.0;
      option broadcast-address        192.168.1.255;
      option domain-name-servers      192.168.1.1;
      option ntp-servers              192.168.1.1;
      option netbios-name-servers     192.168.1.1;
      option netbios-node-type 2;
      default-lease-time 86400;
      max-lease-time 86400;
    
    
      host bla1 {
          hardware ethernet DD:GH:DF:E5:F7:D7;
          fixed-address 192.168.1.2;
      }
      host bla2 {
          hardware ethernet 00:JJ:YU:38:AC:45;
          fixed-address 192.168.1.20;
      }
    }
    
    
    subnet  172.16.1.0 netmask 255.255.255.0 {
    
    
      option routers                  172.16.1.1;
      option subnet-mask              255.255.255.0;
      option broadcast-address        172.16.1.255;
      option domain-name-servers      192.168.1.1;
      option ntp-servers              172.16.1.1;
      option netbios-name-servers     172.16.1.1;
      option netbios-node-type 2;
    
    
      default-lease-time 86400;
      max-lease-time 86400;
    
    
      host bla3 {
         hardware ethernet 00:KK:HD:66:55:9B;
         fixed-address 172.16.1.2;
      }
    }
    
share|improve this answer

I don't know the specific DHCP server software you mention, but it's certainly possible in general. You need to create multiple DHCP "scopes", which would allow you to configure all settings independently. (I presume you'd also want to give them a different default gateway, etc.)

share|improve this answer
    
It is the ISC DHCP - Service running on Ubuntu 8.04 LTS. I understand 'scopes' as subnet, right? –  Ice Nov 22 '09 at 22:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.