Problem with dhcp
THA_DOC
Member Posts: 99 ■■■□□□□□□□
in CCNA & CCENT
I am working on lab in which I am having some problems with dhcp leasing ip address. I setup vlans on one of my switches but it seems my vlans are blocking packets.
Can explain what wrong?
Router cfg:
Can explain what I am doing wrong. I am unable to post diagram of the entire network.
Can explain what wrong?
Router cfg:
hostname Router ip ssh version 1 interface FastEthernet0/0 no ip address duplex auto speed auto ! interface FastEthernet0/0.1 encapsulation dot1Q 1 native ip address 192.168.1.1 255.255.255.0 ! interface FastEthernet0/0.50 encapsulation dot1Q 50 ip address 192.168.50.1 255.255.255.0 ! interface FastEthernet0/0.99 encapsulation dot1Q 99 ip address 192.168.99.1 255.255.255.0 ! interface FastEthernet0/0.150 encapsulation dot1Q 150 ip address 192.168.150.1 255.255.255.0 ! interface FastEthernet0/1 no ip address duplex auto speed auto shutdown ! interface Vlan1 no ip address shutdown ! ip classless ip dhcp pool VOIP network 192.168.150.0 255.255.255.0 default-router 192.168.150.1 ! no cdp run ! line con 0 line vty 0 4 login ! ! end Here on Switch0 is where my problems are occuring: hostname Switch0 ! enable secret 5 $1$mERr$hx5rVt7rPNoS4wqbXKX7m0 ! ! ! interface FastEthernet0/1 switchport trunk allowed vlan 1-99 switchport mode trunk ! interface FastEthernet0/2 ! interface FastEthernet0/3 ! interface FastEthernet0/4 ! interface FastEthernet0/5 switchport mode access ! interface FastEthernet0/6 ! interface FastEthernet0/7 ! interface FastEthernet0/8 ! interface FastEthernet0/9 ! interface FastEthernet0/10 switchport access vlan 50 switchport mode access ! interface FastEthernet0/11 ! interface FastEthernet0/12 ! interface FastEthernet0/13 ! interface FastEthernet0/14 ! interface FastEthernet0/15 ! interface FastEthernet0/16 ! interface FastEthernet0/17 ! interface FastEthernet0/18 ! interface FastEthernet0/19 ! interface FastEthernet0/20 ! interface FastEthernet0/21 ! interface FastEthernet0/22 ! interface FastEthernet0/23 ! interface FastEthernet0/24 switchport access vlan 99 switchport mode access ! interface GigabitEthernet1/1 ! interface GigabitEthernet1/2 ! interface Vlan1 no ip address shutdown ! interface Vlan50 no ip address ! interface Vlan99 ip address 192.168.99.2 255.255.255.0 ! line con 0 ! line vty 0 4 password cisco login line vty 5 15 password cisco login ! ! end
Can explain what I am doing wrong. I am unable to post diagram of the entire network.
An Open Mind, Working to Get IT!:cheers:
DOC
DOC
Comments
-
THA_DOC Member Posts: 99 ■■■□□□□□□□Have you got DHCP Snooping turned on anywhere?
No I don't have DHCP snooping turned on. Should try snooping on for each vlan on both switches?An Open Mind, Working to Get IT!:cheers:
DOC -
keenon Member Posts: 1,922 ■■■■□□□□□□did you take notice of
interface FastEthernet0/0.150
encapsulation dot1Q 150
ip address 192.168.150.1 255.255.255.0
and
interface FastEthernet0/1
switchport trunk allowed vlan 1-99
switchport mode trunk
something is missingBecome the stainless steel sharp knife in a drawer full of rusty spoons -
THA_DOC Member Posts: 99 ■■■□□□□□□□Let me clarify something. This just lab i was working in Packet Tracer. Dhcp snooping is not available in Packet Tracer on the switch or router. Dhcp olnly has two function listed that is pool and exclude.
On the 2nd switch where I have not setup vlans the PC connected to it is receiving ip address from router via Dhcp.An Open Mind, Working to Get IT!:cheers:
DOC -
networker050184 Mod Posts: 11,962 ModDid you see kennon's post? You have DHCP set up for VLAN 150 but then only allow 1-99 through the trunk. You also do not seem to have any switchports set to access 150.An expert is a man who has made all the mistakes which can be made.
-
Hondabuff Member Posts: 667 ■■■□□□□□□□If thats an L2 switch, these commands wont work. If your using a L3 switch, you need the "ip routing" command and int fa0/1 needs to have an ip address/"no switchport" and use a routing protocol to route back to the router.
interface Vlan1
interface Vlan50
interface Vlan99
Im guessing your using a L2 switch and want to have the router handle DHCP since your using sub interfaces on the router and trunking to the switch.
Just add these commands to the switch. And verify with "show vlan brief" command. Or use the 3560 and use it as a router. This is a CCNP level topic. I would drop the vlan pruning also "switchport trunk allowed vlan 1-99".
Vlan1
Vlan50
Vlan99“The problem with quotes on the Internet is that you can’t always be sure of their authenticity.” ~Abraham Lincoln -
THA_DOC Member Posts: 99 ■■■□□□□□□□If thats an L2 switch, these commands wont work. If your using a L3 switch, you need the "ip routing" command and int fa0/1 needs to have an ip address/"no switchport" and use a routing protocol to route back to the router.
interface Vlan1
interface Vlan50
interface Vlan99
Im guessing your using a L2 switch and want to have the router handle DHCP since your using sub interfaces on the router and trunking to the switch.
Just add these commands to the switch. And verify with "show vlan brief" command. Or use the 3560 and use it as a router. This is a CCNP level topic. I would drop the vlan pruning also "switchport trunk allowed vlan 1-99".
Vlan1
Vlan50
Vlan99
You right I am using L2 switch and don't work. Should I still know how to configure Dhcp at CCNA regardless if covered under CCNA. But will hurt myself stressing something under the CCNA, I'll learn afterwards.
ThanksAn Open Mind, Working to Get IT!:cheers:
DOC -
Hondabuff Member Posts: 667 ■■■□□□□□□□Yes you should know DHCP at the CCNA Level. You should make your DHCP pool match the VLAn so its easy to find in the Routers config. Use the commands below and just change the ip address to match the vlan id. For example "vlan 55= Dhcp pool 55"
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip dhcp excluded-address 192.168.55.1 192.168.55.10
Router(config)#ip dhcp pool 55-DATA
Router(dhcp-config)#network 192.168.55.0 255.255.255.0
Router(dhcp-config)#default-router 192.168.55.1
Router(dhcp-config)#dns-server 8.8.8.8 4.2.2.2
Router(dhcp-config)#exit“The problem with quotes on the Internet is that you can’t always be sure of their authenticity.” ~Abraham Lincoln