cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1499
Views
0
Helpful
18
Replies

DHCP failed. APIPA being used.

dwallace7023
Level 1
Level 1

I am using packet tracer.  I have a Router, Switch & 4 PC's.  When I go into the PC's Ip configuration & enable DHCP I get the "DHCP failed. APIPA being used" error.   What am I missing or doing wrong?

I used the following for configuration on R1: (only provided info for vlan 10 & 20)

 

ip dhcp excluded-address 172.31.10.1 172.31.10.10

ip dhcp pool VLAN_10

network 172.31.10.0 255.255.255.224

default-router 172.31.10.1

dns-server 209.165.201.14

 

interface g0/0.10

encapsulation dot1Q 10

ip address 172.31.10.1 255.255.255.224

 

ip dhcp excluded-address 172.31.20.1 172.31.20.10

ip dhcp pool VLAN_20

network 172.31.20.0 255.255.255.240

default-router 172.31.20.1

dns-server 209.165.201.14

 

interface g0/0.20

encapsulation dot1Q 20

ip address 172.31.20.1 255.255.255.240

18 Replies 18

What about the switch side? Can you attach the zipped .pkt file?

dwallace7023
Level 1
Level 1

S2#show vlan brief

 

VLAN Name Status Ports

---- -------------------------------- --------- -------------------------------

1 default active Gig0/1, Gig0/2

10 Sales active Fa0/5, Fa0/6, Fa0/7, Fa0/8

Fa0/9

20 Production active Fa0/10, Fa0/11, Fa0/12, Fa0/13

Fa0/14

30 Marketing active Fa0/15, Fa0/16, Fa0/17, Fa0/18

Fa0/19

40 HR active Fa0/20, Fa0/21, Fa0/22, Fa0/23

Fa0/24

1002 fddi-default active

1003 token-ring-default active

1004 fddinet-default active

1005 trnet-default active

share the switch "show run"

 

Or attach the file. 

Show run on Switch

 

interface FastEthernet0/1

switchport mode trunk

!

interface FastEthernet0/2

switchport mode trunk

!

interface FastEthernet0/3

switchport mode trunk

!

interface FastEthernet0/4

switchport mode trunk

!

interface GigabitEthernet0/1

switchport mode access

!

interface GigabitEthernet0/2

switchport mode access

Which switch interface is connected to the router and which one is connected to the PC?

interface g0/0

no shut

I did the interface g0/0, no shut. It is still not working.  

 

Here is what show run looks like:

ip dhcp excluded-address 172.31.10.1 172.31.10.10

ip dhcp excluded-address 172.31.20.1 172.31.20.10

ip dhcp excluded-address 172.31.30.1 172.31.30.10

ip dhcp excluded-address 172.31.40.1 172.31.40.10

!

ip dhcp pool VLAN_10

network 172.31.10.0 255.255.255.224

default-router 172.31.10.1

dns-server 209.165.201.14

ip dhcp pool VLAN_20

network 172.31.20.0 255.255.255.240

default-router 172.31.20.1

dns-server 209.165.201.14

ip dhcp pool VLAN_30

network 172.31.30.0 255.255.255.128

default-router 172.31.30.1

dns-server 209.165.201.14

ip dhcp pool VLAN_40

network 172.31.40.0 255.255.255.192

default-router 172.31.40.1

dns-server 209.165.201.14

!

interface GigabitEthernet0/0

no ip address

duplex auto

speed auto

!

interface GigabitEthernet0/0.10

encapsulation dot1Q 10

ip address 172.31.10.1 255.255.255.224

!

interface GigabitEthernet0/0.20

encapsulation dot1Q 20

ip address 172.31.20.1 255.255.255.240

!

interface GigabitEthernet0/0.30

encapsulation dot1Q 30

ip address 172.31.30.1 255.255.255.128

!

interface GigabitEthernet0/0.40

encapsulation dot1Q 40

ip address 172.31.40.1 255.255.255.192

SW-TRUNK-R


after NO SHUT

 

force the PC to get IP again via DHCP 

When I turn the DHCP on after the "No shut"

It will give me the IPV4 address & Subnet, I still get the "DHCP failed"

Router must connect via trunk "see my above comment"

Pc must connect to access 

Ponit for you

Any port config for trunk not appear in show vlan 

You connect router to g0/0 or g0/1 which is access not trunk?

dwallace7023
Level 1
Level 1

R1(config)#interface gig 0/0

R1(config-if)#no shut

R1(config-if)#interface gig 0/1

R1(config-if)#ip address dhcp

R1(config-if)#no shut

R1(config-if)#

%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up

 

R1#show vlan

 

VLAN Name Status Ports

---- -------------------------------- --------- -------------------------------

1 default active

1002 fddi-default active

1003 token-ring-default active

1004 fddinet-default active

1005 trnet-default active

 

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2

---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

1 enet 100001 1500 - - - - - 0 0

1002 fddi 101002 1500 - - - - - 0 0

1003 tr 101003 1500 - - - - - 0 0

1004 fdnet 101004 1500 - - - ieee - 0 0

1005 trnet 101005 1500 - - - ibm - 0 0

 

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2

---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

 

Remote SPAN VLANs

------------------------------------------------------------------------------

 

--More--

%DHCP-6-ADDRESS_ASSIGN: Interface GigabitEthernet0/1 assigned DHCP address 209.165.200.227, mask 255.255.255.224, hostname R1

 

Primary Secondary Type Ports

------- --------- ----------------- ------------------------------------------

 

Trunk or access config in sw side not in router side.

S2#show run

interface GigabitEthernet0/1

switchport mode access

!

interface GigabitEthernet0/2

switchport mode access

!

Review Cisco Networking for a $25 gift card