Announcement

Collapse
No announcement yet.

Setting up DHCP for SG300-10 VLAN

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setting up DHCP for SG300-10 VLAN

    Hi

    I have a Cisco SG300-10 switch. The switch has L2/L3.

    I setup 2 VLANs 100 and 200 and setup the switch to Layer 3 mode. Is it possible to have the switch act as a DHCP server for each of those vlans or I need a real router to assign the DHCP addresses?

    How would I do that? Ideally I'd like to have the switch be my DHCP if possible. This is a test environment.

    Thanks

  • #2
    Re: Setting up DHCP for SG300-10 VLAN

    I think you will need to have a Helper on each vlan, and then have two scopes..
    Please do show your appreciation to those who assist you by leaving Rep Point https://www.petri.com/forums/core/im.../icon_beer.gif

    Comment


    • #3
      Re: Setting up DHCP for SG300-10 VLAN

      Originally posted by tehcamel View Post
      I think you will need to have a Helper on each vlan, and then have two scopes..
      Thanks. I couldn't figure out how to do it though. The router doesn't have "Encap dot1q" commands, so I am not sure how to set it up.

      I did:
      interface gigabitethernet 1
      ip helpder-address all 192.168.1.50 (address of my L3 switch which is also the dhcp server)

      then I could no longer access anything.

      Comment


      • #4
        Re: Setting up DHCP for SG300-10 VLAN

        No need for the ip helper statement when the L3 switch is configured as the DHCP server for all of your networks

        On the L2/L3 switch, create the SVI's (vlans), then create the DHCP scopes that match the netblock used by the SVI.

        Code:
        int vlan 100
          description Data vlan for desktops
          ip address 10.10.100.254 255.255.255.0
        
        int vlan 200
          description Voice vlan
          ip address 10.10.200.254 255.255.255.0
        
        ! Exclude IP addresses 1-49
        ip dhcp excluded-address 10.10.100.1 10.10.100.49
        ip dhcp excluded-address 10.10.200.1 10.10.200.49
        
        ! Configure the DHCP scopes for vlan 100 and 200
        ip dhcp pool Desktops
            network 10.10.100.0 255.255.255.0
            domain-name mydomain.com
            dns-server 10.10.100.10 10.10.104.10 
            netbios-name-server 10.10.100.10 10.10.104.10 
            netbios-node-type h-node
            default-router 10.10.100.254
        
        ip dhcp pool IP-Phones
            network 10.10.200.0 255.255.255.0
            domain-name mydomain.com
            dns-server 10.10.100.10 10.10.104.10 
            default-router 10.10.200.254
            option 150 ip 10.1.200.10 10.1.200.11
        
        ! L2 switch port configuration
        interface range gigabitethernet 1-8
          description Standalone PC or PC connected to port via IP phone
          switchport access vlan 100
          switchport voice vlan 200

        Comment


        • #5
          Re: Setting up DHCP for SG300-10 VLAN

          Originally posted by scowles View Post
          No need for the ip helper statement when the L3 switch is configured as the DHCP server for all of your networks

          On the L2/L3 switch, create the SVI's (vlans), then create the DHCP scopes that match the netblock used by the SVI.
          Thank you very much. It worked.
          Can you tell me when I would need the IP Helper? or what it is for? I thought it was necessary to get the vlans to talk to each other.

          Comment


          • #6
            Re: Setting up DHCP for SG300-10 VLAN

            The "ip helper-address" is used as a DHCP relay agent.

            Using your test environment as a reference: You now have a DHCP server running on an AD controller on VLAN 100 (not the switch). The DHCP server has both vlan 100 and 200 scopes defined. In this case, you would add the "ip helper-address" to the vlan 200 interface definition so the DHCP DISCOVER packet from a device on vlan 200 would be relayed to the AD controller via unicast. Without the "ip helper-address", clients on vlan 200 would never get an IP address via DHCP.

            Comment


            • #7
              Re: Setting up DHCP for SG300-10 VLAN

              Originally posted by sedky View Post
              Thanks. I couldn't figure out how to do it though. The router doesn't have "Encap dot1q" commands, so I am not sure how to set it up.

              I did:
              interface gigabitethernet 1
              ip helpder-address all 192.168.1.50 (address of my L3 switch which is also the dhcp server)

              then I could no longer access anything.
              What router?
              Please do show your appreciation to those who assist you by leaving Rep Point https://www.petri.com/forums/core/im.../icon_beer.gif

              Comment


              • #8
                Re: Setting up DHCP for SG300-10 VLAN

                Originally posted by tehcamel View Post
                What router?
                Sorry, I meant the switch in L3 mode.

                Comment


                • #9
                  Hi! Greetings,

                  Last edited by biggles77; 14th May 2015, 13:55. Reason: Spammer idiot

                  Comment


                  • #10
                    Hi, I am new to this forum and I am thinking of purchasing this switch. Could you please tell me if the switch operates as separate dhcp servers for each vlan or whether it is one dhcp server that covers both vlans. I've read the user manual and this post but I'm still not clear. Thanks

                    Comment

                    Working...
                    X