Results 1 to 12 of 12

Thread: VLANS and DHCP scopes

  1. #1
    Senior Member
    Join Date
    Mar 2005
    Posts
    4,944
    Thanks
    171
    Thanked
    387 times in 314 posts
    • badass's system
      • Motherboard:
      • ASUS P8Z77-m pro
      • CPU:
      • Core i5 3570K
      • Memory:
      • 32GB
      • Storage:
      • 1TB Samsung 850 EVO, 2TB WD Green
      • Graphics card(s):
      • Radeon RX 580
      • PSU:
      • Corsair HX520W
      • Case:
      • Silverstone SG02-F
      • Operating System:
      • Windows 10 X64
      • Monitor(s):
      • Del U2311, LG226WTQ
      • Internet:
      • 80/20 FTTC

    VLANS and DHCP scopes

    Lets say I have a Windows 2003 DHCP server on VLAN 2
    there are VLANS 2,3 4 and 5
    The subnets are as follows:
    192.168.0.0/24 VLAN 2
    192.168.1.0/24 VLAN 3
    192.168.2.0/24 VLAN 4
    192.168.3.0/24 VLAN 5

    On a Cisco stack I set up the IP helper* on VLANs 3,4 and 5 to point to the IP address of my Win2003 DHCP server. There is no IP helper on VLAN 2 since that's where the DHCP server is.
    There are 4 scopes set up on said server
    192.168.0.0/24
    192.168.1.0/24
    192.168.2.0/24
    192.168.3.0/24

    Now I know that when the IP helper forwards DHCP packets to the DHCP server, it puts its gateway in there. Win2003 DHCP then knows which scope to assign IPA's from because it knows the network addresses from which the request came.
    How does it know which scope to use for new clients on the local VLAN (VLAN 2)?
    i.e. If I plug a new PC into a port that is assigned to VLAN 2, how will the Windows 2003 server know to aggidn an address from the 192.168.0.0/24 scope rather than any of the other ones?



    *Microsoft calls the same thing the DHCP relay agent.
    "In a perfect world... spammers would get caught, go to jail, and share a cell with many men who have enlarged their penises, taken Viagra and are looking for a new relationship."

  2. #2
    Jay
    Jay is offline
    Gentlemen.. we're history Jay's Avatar
    Join Date
    Aug 2006
    Location
    Jita
    Posts
    8,365
    Thanks
    304
    Thanked
    568 times in 409 posts

    Re: VLANS and DHCP scopes

    This is a fantastic question...

    I have no idea and world also love to know.

    I am sure that ports have VLAN tag attached, there will also be a scope statements to seperate each scope to each vlan.... This is a tough one.

    Microsoft Corporation
    Last edited by Jay; 19-05-2008 at 04:53 PM.
    □ΞVΞ□

  3. #3
    Senior Member
    Join Date
    Mar 2005
    Posts
    4,944
    Thanks
    171
    Thanked
    387 times in 314 posts
    • badass's system
      • Motherboard:
      • ASUS P8Z77-m pro
      • CPU:
      • Core i5 3570K
      • Memory:
      • 32GB
      • Storage:
      • 1TB Samsung 850 EVO, 2TB WD Green
      • Graphics card(s):
      • Radeon RX 580
      • PSU:
      • Corsair HX520W
      • Case:
      • Silverstone SG02-F
      • Operating System:
      • Windows 10 X64
      • Monitor(s):
      • Del U2311, LG226WTQ
      • Internet:
      • 80/20 FTTC

    Re: VLANS and DHCP scopes

    Just had a thought - is it related to the IPA/network address of the DHCP server itself?
    i.e. since there is no IP address from which the request came, the DHCP server assumes that it should assign an IPA from a scope thats in the same network as the NIC on the DHCP server that the request was recieved by?
    "In a perfect world... spammers would get caught, go to jail, and share a cell with many men who have enlarged their penises, taken Viagra and are looking for a new relationship."

  4. #4
    Gentoo Ricer
    Join Date
    Jan 2005
    Location
    Galway
    Posts
    11,048
    Thanks
    1,016
    Thanked
    944 times in 704 posts
    • aidanjt's system
      • Motherboard:
      • Asus Strix Z370-G
      • CPU:
      • Intel i7-8700K
      • Memory:
      • 2x8GB Corsiar LPX 3000C15
      • Storage:
      • 500GB Samsung 960 EVO
      • Graphics card(s):
      • EVGA GTX 970 SC ACX 2.0
      • PSU:
      • EVGA G3 750W
      • Case:
      • Fractal Design Define C Mini
      • Operating System:
      • Windows 10 Pro
      • Monitor(s):
      • Asus MG279Q
      • Internet:
      • 240mbps Virgin Cable

    Re: VLANS and DHCP scopes

    Each VLAN tunnel has it's own subnet like any other network. It's pretty trivial to deduce which scope to pick when requests are coming in from a particular VLAN. It's the same as having a DHCP box with 4NICs with 4 different scopes for each network, the DHCP server listens on all the addresses say 192.168.n.1/24 (where 'n' is 1-4), any incoming DHCP request is automatically assumed that NICn = Subnet-scope n also. Essentially, VPN is just another network carrier as far as TCP/IP is concerned.
    Quote Originally Posted by Agent View Post
    ...every time Creative bring out a new card range their advertising makes it sound like they have discovered a way to insert a thousand Chuck Norris super dwarfs in your ears...

  5. #5
    Senior Member
    Join Date
    Mar 2005
    Posts
    4,944
    Thanks
    171
    Thanked
    387 times in 314 posts
    • badass's system
      • Motherboard:
      • ASUS P8Z77-m pro
      • CPU:
      • Core i5 3570K
      • Memory:
      • 32GB
      • Storage:
      • 1TB Samsung 850 EVO, 2TB WD Green
      • Graphics card(s):
      • Radeon RX 580
      • PSU:
      • Corsair HX520W
      • Case:
      • Silverstone SG02-F
      • Operating System:
      • Windows 10 X64
      • Monitor(s):
      • Del U2311, LG226WTQ
      • Internet:
      • 80/20 FTTC

    Re: VLANS and DHCP scopes

    Quote Originally Posted by aidanjt View Post
    Each VLAN tunnel has it's own subnet like any other network. It's pretty trivial to deduce which scope to pick when requests are coming in from a particular VLAN. It's the same as having a DHCP box with 4NICs with 4 different scopes for each network, the DHCP server listens on all the addresses say 192.168.n.1/24 (where 'n' is 1-4), any incoming DHCP request is automatically assumed that NICn = Subnet-scope n also. Essentially, VPN is just another network carrier as far as TCP/IP is concerned.
    That makes no sense.
    VPN's and VLANs are not connected. At all.
    A VLAN has nothing to do with tunnels. That's usually used to refer to a VPN - as in a VPN tunnel.

    Anyway, I think I've answered my own question in my previous post.
    "In a perfect world... spammers would get caught, go to jail, and share a cell with many men who have enlarged their penises, taken Viagra and are looking for a new relationship."

  6. #6
    Senior Member
    Join Date
    Mar 2005
    Posts
    4,944
    Thanks
    171
    Thanked
    387 times in 314 posts
    • badass's system
      • Motherboard:
      • ASUS P8Z77-m pro
      • CPU:
      • Core i5 3570K
      • Memory:
      • 32GB
      • Storage:
      • 1TB Samsung 850 EVO, 2TB WD Green
      • Graphics card(s):
      • Radeon RX 580
      • PSU:
      • Corsair HX520W
      • Case:
      • Silverstone SG02-F
      • Operating System:
      • Windows 10 X64
      • Monitor(s):
      • Del U2311, LG226WTQ
      • Internet:
      • 80/20 FTTC

    Re: VLANS and DHCP scopes

    Quote Originally Posted by Jay View Post
    This is a fantastic question...

    I have no idea and world also love to know.

    I am sure that ports have VLAN tag attached, there will also be a scope statements to seperate each scope to each vlan.... This is a tough one.

    Microsoft Corporation
    VLAN tags are just for trunk ports - i.e. ports on which data from multiple VLANs can pass. Some server NIC's support connecting to trunk ports so you only need 1 NIC to connect to every VLAN you have on your network. This is useful for example if you are using a server as a router, or it performs some other service that requires it to have direct access to more than 1 subnet.
    However, experience tells me to avoid that config if at all possible. For DHCP for example, you are better off fixing the VLAN of the port(s) the server connects to and using an IP helper to forward DHCP requests. The problem with a server connected to a trunk port is a slight misconfiguration or probelms with the server NIC can cause havok with all of your network when otherwise it wouldn;t have cause a problem.
    "In a perfect world... spammers would get caught, go to jail, and share a cell with many men who have enlarged their penises, taken Viagra and are looking for a new relationship."

  7. #7
    Senior Member
    Join Date
    Mar 2005
    Posts
    4,944
    Thanks
    171
    Thanked
    387 times in 314 posts
    • badass's system
      • Motherboard:
      • ASUS P8Z77-m pro
      • CPU:
      • Core i5 3570K
      • Memory:
      • 32GB
      • Storage:
      • 1TB Samsung 850 EVO, 2TB WD Green
      • Graphics card(s):
      • Radeon RX 580
      • PSU:
      • Corsair HX520W
      • Case:
      • Silverstone SG02-F
      • Operating System:
      • Windows 10 X64
      • Monitor(s):
      • Del U2311, LG226WTQ
      • Internet:
      • 80/20 FTTC

    Re: VLANS and DHCP scopes

    I will prove my theory tomorrow. I will set up a test DHCP server and the setup mentioned in my first post in a virtual environment. To prove it just uses either the network address or the IP address of the server NIC that recieved the request, I will set up the 4 scopes, change the IPA of the server NIC and get a device to request a new address and see which scope it comes from.
    That will definatively answer the question. Just to make sure its got nothing to do with the server NIC's default gateway, I will put the DG in a different subnet to the IP address. Of course, thats a mental config, but its nice to know the answer for sure, even if it has no relevance in real life
    "In a perfect world... spammers would get caught, go to jail, and share a cell with many men who have enlarged their penises, taken Viagra and are looking for a new relationship."

  8. #8
    Jay
    Jay is offline
    Gentlemen.. we're history Jay's Avatar
    Join Date
    Aug 2006
    Location
    Jita
    Posts
    8,365
    Thanks
    304
    Thanked
    568 times in 409 posts

    Re: VLANS and DHCP scopes

    I am confused. Do you have a diferent NIC for each VLan in the server?
    □ΞVΞ□

  9. #9
    One Great Ordeal!
    Join Date
    Feb 2005
    Posts
    1,764
    Thanks
    201
    Thanked
    56 times in 49 posts

    Re: VLANS and DHCP scopes

    I'd be using cisco switches to create the VLANS, then use a trunk link to the cisco router. The cisco router would then run DHCP and you'd configure a dhcp pool for each sub interface configured..

    AKA switch contains VLAN 1, 2, 3, 4, 5

    Sub interfaces on router xxx.xxx.xx.xx.1
    Sub interfaces on router xxx.xxx.xx.xx.2
    Sub interfaces on router xxx.xxx.xx.xx.3
    Sub interfaces on router xxx.xxx.xx.xx.4
    Sub interfaces on router xxx.xxx.xx.xx.5

    Although i'm guessing I've completly missed the point and your running dhcp on a Windows box for a good reason.

    Quote Originally Posted by Jay View Post
    I am confused. Do you have a diferent NIC for each VLan in the server?
    If the NIC supports trunking it will be able to determine due to VLAN tagging what data is associated with which VLAN. 802.1q will be the protocol responsible for this, or it could be ISL but I doubt it in this case.
    Last edited by digit; 20-05-2008 at 12:49 AM.

  10. #10
    Senior Member
    Join Date
    Mar 2005
    Posts
    4,944
    Thanks
    171
    Thanked
    387 times in 314 posts
    • badass's system
      • Motherboard:
      • ASUS P8Z77-m pro
      • CPU:
      • Core i5 3570K
      • Memory:
      • 32GB
      • Storage:
      • 1TB Samsung 850 EVO, 2TB WD Green
      • Graphics card(s):
      • Radeon RX 580
      • PSU:
      • Corsair HX520W
      • Case:
      • Silverstone SG02-F
      • Operating System:
      • Windows 10 X64
      • Monitor(s):
      • Del U2311, LG226WTQ
      • Internet:
      • 80/20 FTTC

    Re: VLANS and DHCP scopes

    Quote Originally Posted by Jay View Post
    I am confused. Do you have a diferent NIC for each VLan in the server?
    Firstly, these are all theoretical. The network I manage is considerably more complex than that.
    The first case - post 1 I was talking about a server with 1 NIC, but dishing out IPA's for 4 subnets, one of which was its own subnet.

    The second case, post 6 was about VLAN trunk ports and tagging. A single NIC in this case would behave like the server has 4 NIC's, each in a different VLAN/subnet.

    The third case, for my experiment will be done on VMware server. It will have 2 Virtual servers. The first - the DHCP server will have 1 virtual NIC.
    The second will have 2 or more NIC's and be running the DHCP relay agent. The third will be a workstation. I will move it through various virtual switches renewing its IP address and seeing what happens.
    "In a perfect world... spammers would get caught, go to jail, and share a cell with many men who have enlarged their penises, taken Viagra and are looking for a new relationship."

  11. #11
    Jay
    Jay is offline
    Gentlemen.. we're history Jay's Avatar
    Join Date
    Aug 2006
    Location
    Jita
    Posts
    8,365
    Thanks
    304
    Thanked
    568 times in 409 posts

    Re: VLANS and DHCP scopes

    Quote Originally Posted by digit View Post
    If the NIC supports trunking it will be able to determine due to VLAN tagging what data is associated with which VLAN. 802.1q will be the protocol responsible for this, or it could be ISL but I doubt it in this case.
    Thats what I said above but it was said that this wasn't used.
    □ΞVΞ□

  12. #12
    Senior Member
    Join Date
    Mar 2005
    Posts
    4,944
    Thanks
    171
    Thanked
    387 times in 314 posts
    • badass's system
      • Motherboard:
      • ASUS P8Z77-m pro
      • CPU:
      • Core i5 3570K
      • Memory:
      • 32GB
      • Storage:
      • 1TB Samsung 850 EVO, 2TB WD Green
      • Graphics card(s):
      • Radeon RX 580
      • PSU:
      • Corsair HX520W
      • Case:
      • Silverstone SG02-F
      • Operating System:
      • Windows 10 X64
      • Monitor(s):
      • Del U2311, LG226WTQ
      • Internet:
      • 80/20 FTTC

    Re: VLANS and DHCP scopes

    Quote Originally Posted by digit View Post
    Although i'm guessing I've completly missed the point and your running dhcp on a Windows box for a good reason.
    Its all about the options. The switches/firewalls are not capable of supporting the DHCP options we need for the phones and I doubt they support the options needed for our image deployment as well.
    "In a perfect world... spammers would get caught, go to jail, and share a cell with many men who have enlarged their penises, taken Viagra and are looking for a new relationship."

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •