cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3069
Views
5
Helpful
4
Replies

DHCP service does not work on subinterface

Serpent2010
Level 1
Level 1

Hi,

Please your help in this weird matter. I created sub interfaces on two different physical interface then I enabled DHCP on each sub interface as shown below but non of the clients pick IP from its designated sub interface!!

Note: In my lab, those clients are connected directly to the physical interface (WS1 to Gig0/1 and WS2 to Gig0/2)

any help is appreciated

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Interface GigabitEthernet0/1

no ip address

no nameif

no description

no security-level

no shutdown

!

Interface GigabitEthernet0/1.40

vlan 40

no shutdown

nameif inside1

ip address 172.16.10.1 255.255.255.0

security-level 70

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Interface GigabitEthernet0/2

no ip address

no nameif

no description

no security-level

no shutdown

!

Interface GigabitEthernet0/2.50

vlan 50

no shutdown

nameif inside2

ip address 172.16.30.1 255.255.255.0

security-level 80

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

      dhcpd address 172.16.10.30-172.16.10.250 inside1

      dhcpd enable inside1

      dhcpd dns 10.80.80.18 10.80.80.11 interface inside1

     

 

      dhcpd address 172.16.30.30-172.16.30.250 inside2

      dhcpd enable inside2

      dhcpd dns 10.80.80.18 10.80.80.11 interface inside2

    

1 Accepted Solution

Accepted Solutions

Francesco Molino
VIP Alumni
VIP Alumni

Hi

The configuration done on router with sub interfaces needs that traffic is tagged. I mean, for example, on sub g0/1.40, all traffic tagged with vlan 40 will passthrough this interface and then get an IP from dhcp.

In your test lab, your PC is directly connected to the router interface and all traffic going out of your PC is untagged then it will never passthrough this sub interface and never get an IP. To test it, you need to add a switch, put your pc in vlan 40 and connect this switch with the router in trunk mode. The other solution would be (some PC supports that) to configure your OS to tag traffic with vlan 40.

Hope this is clear.

Thanks

PS: Please don't forget to rate and mark as correct answer if this solved your issue.


Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

View solution in original post

4 Replies 4

Francesco Molino
VIP Alumni
VIP Alumni

Hi

The configuration done on router with sub interfaces needs that traffic is tagged. I mean, for example, on sub g0/1.40, all traffic tagged with vlan 40 will passthrough this interface and then get an IP from dhcp.

In your test lab, your PC is directly connected to the router interface and all traffic going out of your PC is untagged then it will never passthrough this sub interface and never get an IP. To test it, you need to add a switch, put your pc in vlan 40 and connect this switch with the router in trunk mode. The other solution would be (some PC supports that) to configure your OS to tag traffic with vlan 40.

Hope this is clear.

Thanks

PS: Please don't forget to rate and mark as correct answer if this solved your issue.


Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

Awesome! it does support Vlan tag on my NIC.

Cool! Nice to hear that everything is working

Thanks


Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

johnlloyd_13
Level 9
Level 9

hi,

i agree, either you insert a L2 switch or do as below:

no Interface GigabitEthernet0/1.40
no Interface GigabitEthernet0/2.50

Interface GigabitEthernet0/1
no shutdown
nameif inside1
ip address 172.16.10.1 255.255.255.0
security-level 70

Interface GigabitEthernet0/2
no shutdown
nameif inside2
ip address 172.16.30.1 255.255.255.0
security-level 80

Review Cisco Networking for a $25 gift card