cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
10758
Views
5
Helpful
9
Replies

DHCP Across a Trunk

niall.wilkins
Level 1
Level 1

Hi everyone,

I am having trouble getting DHCP to work across a trunk port. I have configured DHCP pools for voice and data on a Cisco 2811 router. I have on of the routers FastEthernet 1/3 ports connected to a port 0/23 on a Cisco 2960 switch. On the router I have configured the following on the router:

no ip dhcp use vrf connected

ip dhcp excluded-address 192.168.10.2

ip dhcp excluded-address 192.168.1.2

ip dhcp excluded-address 192.168.10.1

ip dhcp excluded-address 192.168.1.1

ip dhcp excluded-address 192.168.1.3

ip dhcp excluded-address 192.168.10.3

!

ip dhcp pool voice

network 192.168.10.0 255.255.255.0

default-router 192.168.10.2

option 150 ip 192.168.10.2

!

ip dhcp pool Data

network 192.168.1.0 255.255.255.0

default-router 192.168.1.1

!

interface FastEthernet1/3

switchport access vlan 233

switchport mode trunk

switchport voice vlan 10

interface Vlan1

ip address 192.168.1.2 255.255.255.0

!

interface Vlan10

ip address 192.168.10.2 255.255.255.0

!

interface Vlan233

ip address 192.168.233.43 255.255.255.0

On the 2960 switch I have the following configured:

switchport access vlan 233

switchport trunk allowed vlan 1,10,233

switchport mode trunk

interface Vlan1

ip address 192.168.1.1 255.255.255.0

no ip route-cache

!

interface Vlan10

description VOICE

ip address 192.168.10.1 255.255.255.0

no ip route-cache

!

interface Vlan233

ip address 192.168.233.41 255.255.255.0

interface FastEthernet0/1

switchport access vlan 20

switchport mode access

switchport voice vlan 10

When I plug an IP phone into FastEthernet 1/0 which gets is supposed to get an IP address via DHCP it never receives an IP address. How do you get DHCP to work across a trunk port?

Also when configuring the switch on the 2811 router I had to add all VLANS to the trunk I wasnt able to specify VLANS 1, 10 and 233 like I was on the switch.

9 Replies 9

Mark Yeates
Level 7
Level 7

Niall,

You need to use the "ip helper-address" statement on your 2960 uplink to the router. This will direct all DHCP requests to the DHCP server. Please follow the example below.

interface fa0/1

ip helper-address 192.168.1.1

HTH,

Mark

Scratch that....

Rereading the post I realized that is not the correct answer.

Have you created the layer 2 vlan on the 2960 switch?

switch(config)#vlan 10

If possible please post the configs for the switch and the router.

Mark

P.S. Is FastEthernet1/3 on your router the uplink to the switch? I would take out the "switchport access vlan 233" and "switchport voice vlan 10" if that is the case.

Hi,

VLAN 10 has been created on the 2960. FastEthernet 1/3 is the uplink to the FastEthernet 0/23 port on the switch.

wangchangjie
Level 1
Level 1

Hi niall,

C2960 is a L2 switch, hence, only 1 VLAN interface will be reflected up/up.

On the router (where it is doing L3), you might wish to try specify ip helper-address on the VLAN interfaces (1,10,233).

vishwancc
Level 3
Level 3

Hi ,

Could you double check if the DHCP service is running on the router.

use command service dhcp to start the services.

Chao

Vishwa

Amit Singh
Cisco Employee
Cisco Employee

You need to change few configs in order proper troubleshoot the issue.

1. Please configure the port Fa 1/3 i.e the trunk port on the router as below :

interface FastEthernet1/3

switchport mode trunk

REMOVE THE FOLLOWING :

switchport access vlan 233

switchport voice vlan 10

2. Enable DHCP service on the router :

Config t# service dhcp

3. Check if you have a PC connected to the IP phone and its getting an IP address from Vlan 20.

Also remove "switchport access vlan 233" from Fa0/23 port.

Also, Please paste " show interface fa 0/23 switchport " from Switch and Show interface Fa 1/3 switchport " from the router.

-amit singh

The following have been removed:

switchport access vlan 233

switchport voice vlan 10

Here is the info for Fa0/23

Switch#show interfaces fastEthernet 0/23

FastEthernet0/23 is up, line protocol is up (connected)

Hardware is Fast Ethernet, address is 0018.738a.4d17 (bia 0018.738a.4d17)

MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,

reliability 255/255, txload 1/255, rxload 1/255

Encapsulation ARPA, loopback not set

Keepalive set (10 sec)

Full-duplex, 100Mb/s, media type is 10/100BaseTX

input flow-control is off, output flow-control is unsupported

ARP type: ARPA, ARP Timeout 04:00:00

Last input 00:00:01, output 00:00:00, output hang never

Last clearing of "show interface" counters never

Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0

Queueing strategy: fifo

Output queue: 0/40 (size/max)

5 minute input rate 1000 bits/sec, 2 packets/sec

5 minute output rate 19000 bits/sec, 26 packets/sec

147665 packets input, 10715054 bytes, 0 no buffer

Received 147293 broadcasts (147001 multicasts)

0 runts, 0 giants, 0 throttles

0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored

0 watchdog, 147001 multicast, 0 pause input

0 input packets with dribble condition detected

1548378 packets output, 139336093 bytes, 0 underruns

0 output errors, 0 collisions, 1 interface resets

0 babbles, 0 late collision, 0 deferred

0 lost carrier, 0 no carrier, 0 PAUSE output

0 output buffer failures, 0 output buffers swapped out

Please paste the output of this command :

Switch#show interfaces fastEthernet 0/23 switchport --> Please put switchport at the back of it...

Paste it from the router as well.

Ok so its kind of working now. If I plug a PC in it gets an IP but the phone isnt so i will have to check my phone and call manager and dhcp voice pool settings. Thanks for the help.

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:

Review Cisco Networking products for a $25 gift card