cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
571
Views
4
Helpful
7
Replies

DHCP and Trunk Question

lamav
Level 8
Level 8

If I have a device configured with interfaces in 3 vlans, and its configured for DHCP, and it plugs into a trunk port on a switch, with the 3 vlans allowed on that trunk, on which vlan will the DHCP request from the device go out?

Thanks

VL

1 Accepted Solution

Accepted Solutions

You got it. :-)

HTH, John *** Please rate all useful posts ***

View solution in original post

7 Replies 7

andrew.prince
Level 10
Level 10

Victor,

Which ever VLAN SVI the DCHP request has originated from the layer 2 switch port?

e.g

vlans SVI Switchport

2 2 2

4 4 4

6 6 6

IP DHCP pool ranges:-

vlan2 - 192.168.2.0/24

vlan4 - 192.168.4.0/24

vlan6 - 192.168.6.0/24

if a device connected to a switch port is in vlan 6, then the dhcp request will leave the vlan 6 SVI, and request an IP address from the 192.168.6.0/24 range.

HTH>

John Blakley
VIP Alumni
VIP Alumni

If I understand your question right, your design is like this?

Vlan1 Vlan2 Vlan3

Server has 3 NICs with a connection in to the switch, and one on each VLAN?

Is this a L3 switch? If so, why do you have 3 separate connections in separate vlans? I would either team the connection, and then put it on one VLAN. If you're wanting to restrict access, do it by an ACL on the VLAN that the server is a member of. Otherwise, if you HAVE to have it like this, then if you can't specify the VLAN that the device is sending out on, it's probably going to send on VLAN1 (native) or whatever you've changed your native vlan to.

--John

HTH, John *** Please rate all useful posts ***

OK, heres the setup in more detail:

the end-device that is operating in 3 vlans is a wireless AP -- Cisco 1242.

The AP is connected to a switchport that is set up as a dot1q trunk. The single physical ethernet interface on the AP is configured as a router on a stick to support all 3 vlans.

The trunk allows all 3 vlans.

There are no configurations on the AP that specifcy the vlan on which DHCP requests will go out.

So what is the default?? On which vlan will the AP broadcast its DHCP request?

Thanks

VL

From which ever SSID is alocated to the VLAN.

That request will be tagged with the VLAN-ID, which will be processed by the relevant VLAN SVI

HTH>

Do you have a scope on your router?

Normally, you'll have the following set up:

AP:

do0.1

encap dot1q 1 native

do0.2

encap dot1q 2

do0.3

encap dot1q 3

fa0.1

encap dot1q 1 native

bridge 1

fa0.2

encap dot1q 2

bridg 2

fa0.3

encap dot1q 3

bridg 3

bvi1

ip address xx.xx.xx.xx 255.255.255.0

On your router:

int fa0.1

ip address 10.200.0.1 255.255.255.0

int fa0.2

ip address 10.200.1.1 255.255.255.0

int fa0.3

ip address 10.200.2.1 255.255.255.0

It depends on what ssid your clients connect to. The router won't give an address at all (that I'm aware of) if you don't have a scope, and don't have a helper pointing to a dhcp server. The helper address tells it where to direct it's traffic to for an ip address. In the AP, you can tell it the native vlan, and it will come in on vlan 1 (or whatever your native is). You'd, of course, have to change your native on your router too.

Is there some sort of goal you're trying to reach? That may be easier to answer. ;-)

--John

HTH, John *** Please rate all useful posts ***

John:

Ishould have been more specific.

Its the AP itself that is supposed to attain an IPaddress for itself (management purposes). So, i am not even talking about users -- just the AP itself.

The native vlan is set to be one of the 3 vlans, not vlan 1, so I think the answer is that the AP will broadcast a DHCP request on the native vlan, and the native vlan will either have a DHCP server on the local segment, OR there will have to be a helper address on the native vlans SVI. Then the AP will get its management address this way.

You got it. :-)

HTH, John *** Please rate all useful posts ***
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco