Jump to content

DHCP pools on VLANs

ImNotThere

image.png.b2307ea92050f2e56a67c484385d2ac7.png

With this topology:

first 2 pc's on vlan 10

second 2 on vlan 20

third 2 on vlan 30

 

all vlans setup with ip addresses 172.16.0.2 - 5 respectively with the default gateway as 172.16.0.1

 

the DHCP server is on a trunk port with access to all vlans for now on g0/1

 

how can I assign specific pools to each vlan to get ip's?

 

I understand its not worth it right now but this is a theoretical situation with 600 users with 200 on each vlan so I need DHCP

There is no router for now but there will be

Link to comment
Share on other sites

Link to post
Share on other sites

You create a dhcp relay on the SVI or sub interface pointing to the DHCP server and then create a corresponding network for each subnet in the DHCP server itself. With a standard VLAN setup the switch will relay from it's local IP address of the SVI/sub-interface to the server and that IP will correspond to a pool on the DHCP server.

Current Network Layout:

Current Build Log/PC:

Prior Build Log/PC:

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Lurick said:

You create a dhcp relay on the SVI or sub interface pointing to the DHCP server and then create a corresponding network for each subnet in the DHCP server itself. With a standard VLAN setup the switch will relay from it's local IP address of the SVI/sub-interface to the server and that IP will correspond to a pool on the DHCP server.

out of question would this sort of concept be out of the scope for someone without a full CCNA level of knowledge, i'm probably at CCNA 1 and 2 level at this moment, if this is outside of that scope i will just use DHCP on a router instead

Link to comment
Share on other sites

Link to post
Share on other sites

29 minutes ago, ImNotThere said:

out of question would this sort of concept be out of the scope for someone without a full CCNA level of knowledge, i'm probably at CCNA 1 and 2 level at this moment, if this is outside of that scope i will just use DHCP on a router instead

I can't remember what's covered in the CCNA these days but I would say it's not out of scope completely.

Current Network Layout:

Current Build Log/PC:

Prior Build Log/PC:

Link to comment
Share on other sites

Link to post
Share on other sites

9 hours ago, Lurick said:

I can't remember what's covered in the CCNA these days but I would say it's not out of scope completely.

interestingly enough Packet tracer servers have a maximum of two network interfaces, for my purposes i will just be using 3 servers as a simulated server that should have at least a 4 port NIC

Link to comment
Share on other sites

Link to post
Share on other sites

The IP address examples you gave are not possible.

Each VLAN needs its own default gateway and its own subnet.

It would be more like

VLAN 10 : 172.16.1.0 - 255

VLAN 20 : 172.16.2.0 - 255

VLAN 30 : 172.16.3.0 - 255

That assumes using a standard 24-bit 255.255.255.0 subnet. You can use any size subnet you want, but you can't have a single IP subnets, or communication would not be possible.

The smallest possible subnet you could use is a 30 bit subnet, which would allow each VLAN to have a network access, gateway, single PC, and broadcast address. To keep the numbers easier to understand without a calculator, I suggest sticking with 24 bit subnets. It isn't like you are going to run out of possible addresses in a lab.

 

EDIT: seeing that you want 2 PC's per VLAN, then 29 bit subnets are the smallest you can use, they allow for a gateway and up to 5 hosts.

 

Link to comment
Share on other sites

Link to post
Share on other sites

9 minutes ago, sphbecker said:

The smallest possible subnet you could use is a 30 bit subnet, which would allow each VLAN to have a network access, gateway, single PC, and broadcast address.

Actually the smallest subnet you can have is a /31 on a point to point link. A /32 would be used on a loopback :)

 

Yes it's not something relevant to this scenario since OP would use at least a /29 or less but just wanted to add that.

Current Network Layout:

Current Build Log/PC:

Prior Build Log/PC:

Link to comment
Share on other sites

Link to post
Share on other sites

15 minutes ago, Lurick said:

Actually the smallest subnet you can have is a /31 on a point to point link. A /32 would be used on a loopback :)

 

Yes it's not something relevant to this scenario since OP would use at least a /29 or less but just wanted to add that.

Agreed, but the OP's diagram shows an Ethernet switch. Ethernet should never be considered a point-to-point link. If he was using a PPPoE implementation, then yes, but that wasn't stated. Also, 2 PCs per VLAN, so that means /29 is the smallest for the OP's needs.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, sphbecker said:

Agreed, but the OP's diagram shows an Ethernet switch. Ethernet should never be considered a point-to-point link. If he was using a PPPoE implementation, then yes, but that wasn't stated. Also, 2 PCs per VLAN, so that means /29 is the smallest for the OP's needs.

I disagree with the first part and I'll just state that I know at least a dozen large enterprise customers using /31 ethernet links all across their networks to save address space. That however digresses from OP's point and I'll leave it at that. A /29 is minimum there in the diagram but a /24 would technically be the smallest they could use since they mention having 200 clients per VLAN.

Current Network Layout:

Current Build Log/PC:

Prior Build Log/PC:

Link to comment
Share on other sites

Link to post
Share on other sites

13 minutes ago, Lurick said:

I disagree with the first part and I'll just state that I know at least a dozen large enterprise customers using /31 ethernet links all across their networks to save address space. That however digresses from OP's point and I'll leave it at that. A /29 is minimum there in the diagram but a /24 would technically be the smallest they could use since they mention having 200 clients per VLAN.

EDIT: ignore this, lol, read below....

That is a little like using the network address as a host. It might be possible, but it is outside of the spec. Technically a /31 can only be used on a point-to-point link. Ethernet is inherently designated as a multi-point link. Now can it be done? It depends on the operating system, tweaks may be required. Will it cause problems? Other than possible compatibility issues, no, no problems at all. I personally wish it was allowed, but like I said, it isn't in spec.

Link to comment
Share on other sites

Link to post
Share on other sites

12 minutes ago, Lurick said:

I disagree with the first part and I'll just state that I know at least a dozen large enterprise customers using /31 ethernet links all across their networks to save address space. That however digresses from OP's point and I'll leave it at that. A /29 is minimum there in the diagram but a /24 would technically be the smallest they could use since they mention having 200 clients per VLAN.

Oh wow, I am dumb!! I just realized you are completely correct. I was thinking about /32, not /31. Very different things indeed ?

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, sphbecker said:

Oh wow, I am dumb!! I just realized you are completely correct. I was thinking about /32, not /31. Very different things indeed ?

Haha, all good :)

You were right though that a /31 wasn't in spec originally though, it did come about with RFC 3021 in late 2000 though and took a bit to implement. There is a newer spec for using IP unnumbered on ethernet links with works around using a /32 by sourcing everything from a single loopback. If I'm reading the RFC right it was first proposed as part of 5309 in 2008-ish for implementation in more than just MPLS networks. I know it's a standard now to use unnumbered on ethernet links as well since I'm helping validate that as part of a VxLAN implementation but it's definitely a lot newer than using a /31 though.

Current Network Layout:

Current Build Log/PC:

Prior Build Log/PC:

Link to comment
Share on other sites

Link to post
Share on other sites

6 minutes ago, Lurick said:

Haha, all good :)

You were right though that a /31 wasn't in spec originally though, it did come about with RFC 3021 in late 2000 though and took a bit to implement. There is a newer spec for using IP unnumbered on ethernet links with works around using a /32 by sourcing everything from a single loopback. If I'm reading the RFC right it was first proposed as part of 5309 in 2008-ish for implementation in more than just MPLS networks. I know it's a standard now to use unnumbered on ethernet links as well since I'm helping validate that as part of a VxLAN implementation but it's definitely a lot newer than using a /31 though.

Interesting, I am not aware of using native Ethernet with /32, only PPPoE and other point-to-point. I will have to look into that, I have always felt like there should be a better way to make sure of /32 and Ethernet.

 

I was aware of the /31 change, so that was not my point, it was just a brain fart and I was writing /31 while thinking /32.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×