I'm stuck with configuring L3 sw + L2 sw + dhcp server. My scheme is:
I can't take ip addresses to computers in different VLAN's.
I have two dhcp pools:
Configuration on L3 switch:
ip routing
spanning-tree mode pvst
interface FastEthernet0/1
switchport trunk allowed vlan 10
switchport trunk encapsulation dot1q
switchport mode trunk
interface FastEthernet0/2
switchport trunk allowed vlan 20
switchport trunk encapsulation dot1q
switchport mode trunk
interface FastEthernet0/3
switchport access vlan 30
switchport mode access
interface Vlan1
no ip address
shutdown
interface Vlan10
mac-address 00d0.ba4b.a601
ip address 192.168.10.1 255.255.255.0
ip helper-address 192.168.1.1
interface Vlan20
mac-address 00d0.ba4b.a602
ip address 192.168.20.1 255.255.255.0
ip helper-address 192.168.1.1
interface Vlan30
mac-address 00d0.ba4b.a603
ip address 192.168.30.1 255.255.255.0
L2 switches with almost similar conf, just different vlan's:
spanning-tree mode pvst
interface FastEthernet0/1
switchport access vlan 10
switchport mode access
interface FastEthernet0/2
switchport access vlan 10
switchport mode access
DHCP server:
static ip: 192.168.1.1
gateway: 192.168.30.1
So, what i did wrong? What should i do for properly work ?
2:07:
I've changed VLAN1 and up this interface, plus set another dhcp ip,so now on my L3:
interface Vlan1
ip address 1.1.1.1 255.255.255.0
ip helper-address 1.1.1.5
!
interface Vlan10
mac-address 00d0.ba4b.a601
ip address 192.168.10.1 255.255.255.0
ip helper-address 1.1.1.5
!
interface Vlan20
mac-address 00d0.ba4b.a602
ip address 192.168.20.1 255.255.255.0
ip helper-address 1.1.1.5
!
interface Vlan30
mac-address 00d0.ba4b.a603
ip address 192.168.30.1 255.255.255.0
ip helper-address 1.1.1.5
!
DHCP server:
IP: 1.1.1.5
Gateway: 1.1.1.1
But it still doesn't work. And i don;t know how to don't set mac-address,i think it was by packet tracker automatically.
Should i up VLAN1's svi on L2 switches?
Best Answer
Your DHCP server address is not in the network where it is connected. It will never use an address in a different network for its gateway. The gateway is, by definition, in the same network as the host, and it is used by the host to get to addresses not in its network.
You either need to change the DHCP server's address, or you need to change the network to match the DHCP server's network.
Also, there is no reason to specifically set the MAC address on any VLAN.
Since you have the DHCP server connected to VLAN 30 on
F0/3
, you can change the DHCP servers address to192.168.30.2
with a gateway of192.168.30.1
. Then just change the helper addresses to192.168.30.2
.