cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
25686
Views
0
Helpful
24
Replies

PC not getting IP from Switch

mahesh18
Level 6
Level 6

Hi Everyone,

I have 2 switches running as HSRP and both have DHCP  config  on them.

Both these switches have connection  to 3rd switch where PC is connected.

Connection between HSRP switches and 3rd switch is not trunk it is access port only.

VLAN 10 is HSRP running switches and 3rd switch has also int vlan 10 configured.

I ran the debug ip dhcp server packets on HSRP switches but no output comes out.

From Switch where PC is connected i can ping the HSRP Virtual IP which is 192.168.10.3

Thanks

MAhesh

24 Replies 24

Hi REza,

I did as per Alain

Here is info now from switch connected to PC

sh span
R1#sh spanning-tree vlan 10

VLAN0010
  Spanning tree enabled protocol ieee
  Root ID    Priority    24586
             Address     0019.556b.a900
             Cost        19
             Port        45 (FastEthernet1/0/41)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32778  (priority 32768 sys-id-ext 10)
             Address     0019.e849.d380
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------

Fa1/0/1             Desg FWD 19        128.3    P2p Edge
Fa1/0/31            Altn BLK 19        128.35   P2p
Fa1/0/41            Root FWD 19        128.45   P2p

Now HSRP Active is in Root state and Standby is in blocking state

Thanks

mahesh

Hi Mahesh,

Ok, so the spanning tree is good to go.

for test purpose. if you assign a static ip to the pc

example

192.168.10.100

255.255.255.0

192.168.10.3

can you ping

192.168.10.1

192.168.10.2

192.168.10.3

if yes. than change the PC back to use DHCP and this time on the pool assign the physical address of the active switch to it. I am assuming 10.1 is the active HSRP physical address

ip dhcp pool vlan10

   network 192.168.10.0 255.255.255.0

   default-router 192.168.10.1

   lease 3

and test again

HTH

Reza

Hi Reza,

I will test this on monday as this site is remote site and currently no user is there.

Monday i will let you know how it goes.

Thanks

Mahesh

Hi Reza,

Today we tried to do ipconfig release and renew  on laptop but no luck.

User connected laptop directly to HSRP active switch still no IP it was getting IP 169.254.x.x.

Then from HSRP active switch i removed these lines from config

Before change

ip dhcp excluded-address 192.168.10.5 255.255.255.0 ***********

ip dhcp excluded-address 192.168.10.2 255.255.255.0********         lines removed

ip dhcp excluded-address 192.168.10.1 255.255.255.0************
ip dhcp excluded-address 192.168.10.3 255.255.255.0***********

ip dhcp excluded-address 192.168.10.1 192.168.10.5

After change

ip dhcp excluded-address 192.168.10.1 192.168.10.5

Now PC was able to get IP from HSRP active switch and also from 3rd Switch which is connected to HSRP active switch.

Any idea how removing above lines fixed the issue?

Thanks

Mahesh

Hi Mahesh,

No sure exactly what was the issue, but I know in my second post I suggested to add only this line

ip dhcp excluded-address 192.168.10.1 192.168.10.5
and not individual ip addresses.
On the other hand, some times, when you remove a portion of the IOS config and apply it again, it will fix the issue.
I am glad, it is all working now.

Thanks for the update!
Reza

Hi Reza,

Before i add the line

ip dhcp excluded-address 192.168.10.1 192.168.10.5 it has also 4 line in config which i later deleted.

Thanks again for all the help

Regards

MAhesh

Mahesh,

the command structure is:

ip dhcp excluded-address []

http://www.cisco.com/en/US/docs/ios-xml/ios/ipaddr/command/ipaddr-i1.html#GUID-1B6734A2-7EB1-4FEE-85F6-8DE18B7283B9

In summary, by setting  to 255.255.255.0, you excluded the whole pool.

Best regards,

Rolf

Hi Rolf and Alain,

Many thanks for all the helpfull posts.

Regards

Mahesh


Hi Rolf,

Many thanks for figuring out the issue.

I got it now

Regards

MAhesh

Mahesh,

you're welcome.

Great, that you finally found the problem by yourself and everything works now as it should.

And thanks a lot for rating so generous - today I got my first little star for earning 100 points ;-)

Best regards

Rolf