cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2383
Views
0
Helpful
7
Replies

second switch can't get DHCP IP address

Mary
Level 1
Level 1

I have one router R1 (DHCP server)two port, G0/0 and g0/1, G0/0 connect to switch1 f0/0, G0/1 connect to switch2 f0/1, now switch 1 get dhcp ip, but switch2 didn't.

R1: int g0/0

      ip add 192.168.10.1/24

   no shut

    int g0/1

    no shut

SW1:  int f0/0

          switchport access vlan 10

          int vlan 10

          ip address DHCP

SW2:  int f0/1

          switchport access vlan 10

          int vlan 10

          ip address DHCP

how to correct error?

7 Replies 7

Milos Megis
Level 3
Level 3

Please provide configuration of DHCP pools on router.

Also interface g0/1 doesn´t have IP address, so it doesn´t know from which DHCP pool it should provide IP address.

And don´t forget that every port of router must be on different IP subnet.

DHCP in R1:

ip dhcp pool vlan10

network 192.168.10.0/24

default-router 192.168.10.1

so how to config g0/1 in router? I can't use 192.168.10.1

Of course that you cannot use same subnet.

Use something different and also configure next DHCP pool for created subnet.

But this cause that you will have switches in different subnets.

If you want to have both switches in same subnet, then connect second switch to the first switch (which is connected to router g0/0 port.)

so I will use f0/1 in switch 2 to connect to switch 1 f0/23 port, can you list out additional config I need and setting for F0/1 in switch 2 and f0/23 in switch 1?

Which models of switches do you use ?

If it is lab only, then put these ports into VLAN 10. It should work.
If you are using default configuration only with changes described above then it should suffice on switch 1 type commands:
interface Fa0/23
switchport mode access
switchport access vlan 10

Or you can make trunk between switch 1 and Switch 2

No. 2960 i'm using

switch2:

int f0/23

switchport mode trunk

 int f0/1

          switchport access vlan 10

          int vlan 10

          ip address DHCP

++++++++++

switch 1:

int f0/23

switchport mode trunk

++++++++++

switch 2 didn't get dhcp ip. but switch1 get, issue still same

You wrote that SW1 - Fa0/23 is connected to SW2 - Fa0/1 so put command switchport mode trunk on SW2 - Fa0/1

Or connect SW1-Fa0/23 -- SW2-Fa0/23 and it should work.

If not, then please include full running config from router and both switches