0

I am currently using Cisco SG-350 Series Switch as the DHCP server on the network. I was having 16 VLANs, and my SG350-28 switch was acting as the DHCP server for all the VLANs. All was running fine until I added a few more VLANs and corresponding DHCP Server pools. The issue is, it supports only up to 16 DHCP pools. Whereas I need more DHCP pools.

Is it possible to have an Ubuntu server as the centralized DHCP server on the network for all the VLANs and can I have my SG350-28 switch use the DHCP Relay for each VLAN?

  • How do you route between vlans?? – infra Nov 4 '19 at 10:01
  • My SG350-28 switch already has SVIs for all the VLANs. And Inter VLAN routing is happening as it should. I am planning to have another VLAN for the DHCP server. – Abdul Tayyeb Nov 4 '19 at 10:13
  • 1
    You can certainly set up a separate DHCP server (servers are off-topic here, and you can ask about that on Server Fault for a business network) and use DHCP relay on the switch SVIs. – Ron Maupin Nov 4 '19 at 14:23
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer. – Ron Maupin Dec 15 '19 at 19:53
1

As per your Description You are using SG350 switch as your core switch. Therefore it is not a good idea to Configure DHCP pool in this switch because it make additional overhead on your switch. In addition to that SG350 switch has limited feature for redundancy and therefore if there is a failure you will lost everything.

You can use separate DHCP pool such as ubuntu, windows or separate router such as netgear....etc. But i don't recommend to use DHCP pools on separate locations. You can move to all DHCP pools to separate DHCP pools. Otherwise It will generate additional complexity on your network.

| improve this answer | |
  • I agree with that. SG350 has hardware limitations and moving the DHCP server to a centralized server would be a good option. All I want to know is if I configure an additional Ubuntu server, will it support multiple DHCP pools for each VLAN with DHCP Relay? I was trying to use the ISC DHCP server in Ubuntu but was facing trouble with it. – Abdul Tayyeb Nov 4 '19 at 11:55
  • @AbdulTayyeb, "All I want to know is if I configure an additional Ubuntu server, will it support multiple DHCP pools for each VLAN with DHCP Relay?" That is a question to ask on Server Fault for a business network. Servers and host configurations are off-topic here. – Ron Maupin Nov 4 '19 at 15:34
0

The solution to my problem was quite simple, and I further complicated it by thinking more about it.

While configuring the ISC DHCP server on Linux, you can create classes for each subnet in the DHCP pool. Each class would match the 'giaddr' field in the DHCP requests and this would be the IP address of the DHCP relay agent. Within the subnet definition, match the appropriate class.

Below is the sample configuration.

  subnet 10.0.0.0 netmask 255.255.255.0 { }

  class "VLAN1" {
          match if (binary-to-ascii(10,8, ".", packet(24,4)) ="10.0.1.1");
  }

  class "VLAN2" {
          match if (binary-to-ascii(10,8, ".", packet(24,4)) ="10.0.2.1");
  }

  class "VLAN3" {
           match if (binary-to-ascii(10,8, ".", packet(24,4)) ="10.0.3.1");     
  }

  subnet 10.0.1.0 netmask 255.255.255.0 {
          pool {
                  allow members of                "VLAN1";
                  default-lease-time              86400;
                  max-lease-time                  7200;
                  range                           10.0.1.10 10.0.1.254;
                  option routers                  10.0.1.1;
                  option broadcast-address        10.0.1.255;
                  option subnet-mask              255.255.255.0;
                  option domain-name-servers      4.2.2.2;
  }
  }

  subnet 10.0.2.0 netmask 255.255.255.0 {
          pool {
                  allow members of                "VLAN2";
                  default-lease-time              86400;
                  max-lease-time                  7200;
                  range                           10.0.2.10 10.0.2.254;
                  option routers                  10.0.2.1;
                  option broadcast-address        10.0.2.255;
                  option subnet-mask              255.255.255.0;
                  option domain-name-servers      4.2.2.2;
  }
  }

  subnet 10.0.3.0 netmask 255.255.255.0 {
          pool {
                  allow members of                "VLAN3";
                  default-lease-time              86400;
                  max-lease-time                  7200;
                  range                           10.0.3.10 10.0.3.254;
                  option routers                  10.0.3.1;
                  option broadcast-address        10.0.3.255;
                  option subnet-mask              255.255.255.0;
                  option domain-name-servers      4.2.2.2;
  }
  }
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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