cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
473
Views
0
Helpful
6
Replies

DHCP not working for Vlans

DHCP not working for Vlans.

See config

Not sure what I'm doing wrong.

Thanks

 


SL-Core-SW#show run
Building configuration...

Current configuration : 3971 bytes
!
version 12.2
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname SL-Core-SW
!
!
no aaa new-model
system mtu routing 1500
ip subnet-zero
ip routing
!
ip dhcp pool vlan50
network 192.168.50.0 255.255.255.0
default-router 192.168.1.1
!
ip dhcp pool vlan100
network 192.168.100.0 255.255.255.0
default-router 192.168.1.1
!
!
!
!
no file verify auto
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
switchport access vlan 50
switchport mode access
!
interface FastEthernet0/18
switchport access vlan 50
switchport mode access
!
interface FastEthernet0/19
switchport access vlan 50
switchport mode access
!
interface FastEthernet0/20
switchport access vlan 50
switchport mode access
!
interface FastEthernet0/21
switchport access vlan 50
switchport mode access
!
interface FastEthernet0/22
switchport access vlan 50
switchport mode access
!
interface FastEthernet0/23
switchport access vlan 50
switchport mode access
!
interface FastEthernet0/24
switchport access vlan 50
switchport mode access
!
interface FastEthernet0/25
switchport access vlan 50
switchport mode access
!
interface FastEthernet0/26
switchport access vlan 50
switchport mode access
!
interface FastEthernet0/27
switchport access vlan 50
switchport mode access
!
interface FastEthernet0/28
switchport access vlan 50
switchport mode access
!
interface FastEthernet0/29
switchport access vlan 50
switchport mode access
!
interface FastEthernet0/30
switchport access vlan 50
switchport mode access
!
interface FastEthernet0/31
switchport access vlan 50
switchport mode access
!
interface FastEthernet0/32
switchport access vlan 50
switchport mode access
!
interface FastEthernet0/33
switchport access vlan 100
switchport mode access
!
interface FastEthernet0/34
switchport access vlan 100
switchport mode access
!
interface FastEthernet0/35
switchport access vlan 100
switchport mode access
!
interface FastEthernet0/36
switchport access vlan 100
switchport mode access
!
interface FastEthernet0/37
switchport access vlan 100
switchport mode access
!
interface FastEthernet0/38
switchport access vlan 100
switchport mode access
!
interface FastEthernet0/39
switchport access vlan 100
switchport mode access
!
interface FastEthernet0/40
switchport access vlan 100
switchport mode access
!
interface FastEthernet0/41
switchport access vlan 100
switchport mode access
!
interface FastEthernet0/42
switchport access vlan 100
switchport mode access
!
interface FastEthernet0/43
switchport access vlan 100
switchport mode access
!
interface FastEthernet0/44
switchport access vlan 100
switchport mode access
!
interface FastEthernet0/45
switchport access vlan 100
switchport mode access
!
interface FastEthernet0/46
switchport access vlan 100
switchport mode access
!
interface FastEthernet0/47
switchport access vlan 100
switchport mode access
!
interface FastEthernet0/48
switchport access vlan 100
switchport mode access
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface GigabitEthernet0/3
!
interface GigabitEthernet0/4
!
interface Vlan1
ip address 192.168.1.33 255.255.255.0
shutdown
!
ip default-gateway 192.168.1.1
ip classless
ip http server
!
!
control-plane
!
!
line con 0
line vty 0 4
password cisco
login
transport input telnet
line vty 5 15
password cisco
login
transport input telnet
!
end

 

6 Replies 6

dbeattie
Level 1
Level 1

Assuming that you are running a layer 3  switch and image, you don't appear to have SVIs created for VLANs 50 & 100:

 

interface Vlan50
ip address 192.168.50.1 255.255.255.0

no shut

interface Vlan100
ip address 192.168.100.1 255.255.255.0

no shut

 

Additionally, your scopes need to point the default router to the SVIs:

ip dhcp pool vlan50
network 192.168.50.0 255.255.255.0
default-router 192.168.50.1
!
ip dhcp pool vlan100
network 192.168.100.0 255.255.255.0
default-router 192.168.100.1

 

 

Hope this helps.

Wow, thanks, it worked but but why is my connection 100 Mbps.

The switch ports are 1 Gig and the PC Network Card is also 1 Gig

Most of the ports are showing as "FastEthernet", so are only able to run at 10Mbps or 100Mbps. The uplink ports are "GigabitEthernet" so if they are RJ45 they will be able to do 1Gbps as well as the lower speeds. If they are SFP ports they will only be able to do 1Gbps.

 

Hope this helps.

Ok, good.  It worked like a cham.  Thank  you

But i have another question.

So I have 2 vlans, 50 and 100.  Surprisingly, I was able to ping the PC on vlan50 from the PC on vlan100 and vice versa.  I thought vlans were unable to communicate.  Please explain.   If i need to open another discussion for this I have no issues doing so.

 

Thanks

VLANs able to communicate when you enable ip routing and SVI interfaces in L3 switch this is called inter vlan routing, we can do inter vlan routing by using router that setup is called router on a stick. L3 Device can route a packet to different VLAN if it has a Route in the Routing table 

As Sivam says, this is inter-VLAN routing. The VLANs are still separate broadcast domains, so that many failure conditions will not pass from one to the other. If you want to control traffic flows between the VLANs, you can use Access Lists on the SVIs or use a firewall.

 

Inter-VLAN routing is a key concept in building large-scale networks.

 

Hope this Helps,

 

Please remember to mark posts as helpful if they are.

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