DHCP configuration with MHSRP

DollarhydeDollarhyde Member Posts: 111
I have been watching Keith Bogart's INE videos and one topic that he mentioned, but not explained is DHCP configuration with MHSRP. When you create one interface and give it two HSRP groups you make it MHSRP. It is not hard to configure it from Cisco side, and that is the only way to do load balancing with HSRP.

You then have 2 default-gateway IP addresses which are usable, one of the solutions is to give half of the hosts manually one IP and other half manually to other half, but that is not ideal.

My question is, how to set up DHCP server to give different default gateway IP addresses. Preferably on round robin, when one host asks for IP, give him .1 and when other host asks for IP give him .2. I have been looking online for solution , but no luck.

I know that on TE there are many skilled people who can help me with this issue.
___________________________________________________________________________________________________________

Comments

  • techfiendtechfiend Member Posts: 1,481 ■■■■□□□□□□
    The easiest is splitting subnet with two scopes with different gateways and the option to create a superscope (in windows). You could do this across 2 DHCP servers for higher availability but there's no control and the fastest response wins. This is possible in OS's and I believe between any 2 routers as well.

    If you're using Server 2012 you can setup 2 DHCP servers with the same scope but different gateways then setup DHCP failover with load balancing as explained at https://technet.microsoft.com/en-us/library/hh831385.aspx?f=255&MSPPError=-2147217396 which gives you some control. Linux can be setup to load balance like this as well.
    2018 AWS Solutions Architect - Associate (Apr) 2017 VCAP6-DCV Deploy (Oct) 2016 Storage+ (Jan)
    2015 Start WGU (Feb) Net+ (Feb) Sec+ (Mar) Project+ (Apr) Other WGU (Jun) CCENT (Jul) CCNA (Aug) CCNA Security (Aug) MCP 2012 (Sep) MCSA 2012 (Oct) Linux+ (Nov) Capstone/BS (Nov) VCP6-DCV (Dec) ITILF (Dec)
  • DollarhydeDollarhyde Member Posts: 111
    techfiend wrote: »
    The easiest is splitting subnet with two scopes with different gateways and the option to create a superscope (in windows). You could do this across 2 DHCP servers for higher availability but there's no control and the fastest response wins. This is possible in OS's and I believe between any 2 routers as well.

    If you're using Server 2012 you can setup 2 DHCP servers with the same scope but different gateways then setup DHCP failover with load balancing as explained at https://technet.microsoft.com/en-us/library/hh831385.aspx?f=255&MSPPError=-2147217396 which gives you some control. Linux can be setup to load balance like this as well.

    That is awesome, exactly what I wanted. I will just read up on this, see how it works, and configure it. Do you have anything that is for linux, I will find it eventually, but if you have something already you can post it. But overall thank you, I really appreciate it, you helped me a lot.
    ___________________________________________________________________________________________________________
  • techfiendtechfiend Member Posts: 1,481 ■■■■□□□□□□
    https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s1-dhcp-configuring-server.html on 2 servers setup option routers with both routers comma separated and split the scope with range. You'll want to setup each dhcp server with both routers so the endpoint will use the secondary if the primary fails before the lease expires.
    2018 AWS Solutions Architect - Associate (Apr) 2017 VCAP6-DCV Deploy (Oct) 2016 Storage+ (Jan)
    2015 Start WGU (Feb) Net+ (Feb) Sec+ (Mar) Project+ (Apr) Other WGU (Jun) CCENT (Jul) CCNA (Aug) CCNA Security (Aug) MCP 2012 (Sep) MCSA 2012 (Oct) Linux+ (Nov) Capstone/BS (Nov) VCP6-DCV (Dec) ITILF (Dec)
  • DollarhydeDollarhyde Member Posts: 111
    So as I have figured out. The option routers means default gateway of the hosts, and IP of the router. The code should go something like this using their example:

    *****************************************************************************************

    subnet 192.168.1.0 netmask 255.255.255.0 {
    option routers 192.168.1.1,192.168.1.100;
    option subnet-mask 255.255.255.0;
    option domain-search "example.com";
    option domain-name-servers 192.168.1.1;
    option time-offset -18000; # Eastern Standard Time
    range 192.168.1.2 192.168.1.99;
    }

    *****************************************************************************************
    And on the other server using this:

    *****************************************************************************************

    subnet 192.168.1.0 netmask 255.255.255.0 {
    option routers 192.168.1.100,192.168.1.1;
    option subnet-mask 255.255.255.0;
    option domain-search "example.com";
    option domain-name-servers 192.168.1.1;
    option time-offset -18000; # Eastern Standard Time
    range 192.168.1.101 192.168.1.200;
    }

    *****************************************************************************************
    If this config is right, the first server should advertise 192.168.1.1 as Default gateway and give range of 192.168.1.2-192.168.1.99

    The other server will advertise 192.168.1.100 as default gateway and give range of 192.168.1.101-192.168.1.200.
    ___________________________________________________________________________________________________________
  • techfiendtechfiend Member Posts: 1,481 ■■■■□□□□□□
    Correct, it should work but I've never set up split scopes in linux and it would be nice to know if it works the way it's intended to.
    2018 AWS Solutions Architect - Associate (Apr) 2017 VCAP6-DCV Deploy (Oct) 2016 Storage+ (Jan)
    2015 Start WGU (Feb) Net+ (Feb) Sec+ (Mar) Project+ (Apr) Other WGU (Jun) CCENT (Jul) CCNA (Aug) CCNA Security (Aug) MCP 2012 (Sep) MCSA 2012 (Oct) Linux+ (Nov) Capstone/BS (Nov) VCP6-DCV (Dec) ITILF (Dec)
Sign In or Register to comment.