cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4510
Views
0
Helpful
8
Replies
tomasmulugeta31
Beginner

DHCP and VLAN COnfiguration

Dear All

we have Catalyst 2960CX-8PC-L Switch and i want to configure DHCP and VLAN on it and here i have attached screen shot and config of what i have done on the switch. but some how the vlan status is up but the protocol link shows down. when i connect a laptop on G0/7 or G0/9 it doesn't give out IP address from the dhcp.

here is some of the configuration from the switch.

!
no aaa new-model
system mtu routing 1500

!
ip routing
ip dhcp excluded-address 192.168.20.1 192.168.20.21
!
ip dhcp pool Vlan10
 network 192.168.20.0 255.255.255.0
 default-router 192.168.20.1
 dns-server 8.8.8.8 213.55.96.148
!
!
no ip domain-lookup

!
!
!
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface GigabitEthernet0/3
!
interface GigabitEthernet0/4
!
interface GigabitEthernet0/5
!
interface GigabitEthernet0/6
!
interface GigabitEthernet0/7
 switchport access vlan 10
 switchport mode access
!
interface GigabitEthernet0/8
!
interface GigabitEthernet0/9
 switchport access vlan 10
 switchport mode access
!
interface GigabitEthernet0/10

!
interface GigabitEthernet0/11
!
interface GigabitEthernet0/12
!
interface Vlan1
 no ip address
!
interface Vlan10
 ip address 192.168.20.1 255.255.255.0
!
interface Vlan20
 ip address 172.16.1.1 255.255.255.0
!

8 REPLIES 8
cofee
Contributor

Please check following items:

a) When you connect your laptop to port 7 or 9, does the switchport show as connected or up?

b) type "show spanning-tree vlan 10" once port 7 or 9 is up and switch should have an instance for vlan 10.

c) Under inter vlan 10, try shut and no shutdown

1.yes when i connect the laptop to port number 7 or 9 the stastu and protocols are up up.but the vlan status is up but the protocol is down as the screen shot above shows.

2.when i type show spanning-tree vlan 10, it displays spanning tree instance for vlan 10 does not exist.

3.and i did try shut and no shut under vlan 10 but it still doesn't show up up.

it displays spanning tree instance for vlan 10 does not exist  - That means something is wrong at layer 2. You mentioned both ports 7 and 9 are up and both assigned to vlan 10, then why switch doesn't have spanning-tree instance for vlan 10. Corresponding layer 2 vlan which is vlan 10 in your case must have a spanning-tree instance before layer 3 (SVI) for vlan 10 comes up.

Per the screen shots you shared everything appears to be correct with your configuration and it should have a spanning-tree instance for vlan 10. You need to focus at layer 2 before you fix the layer 3 issue. if you have a spare switch can you connect it to the switch you are having issues with and configure the link as a trunk. A trunk connection will also run spanning-tree instance for any vlans that are configured on the local switch, and for this you won't need port7 and 9 connected. This test is to narrow down the issue.

Once you have a trunk connection, but spanning-tree for vlan 10 still doesn't exist then it's an issue either with the switch/image or vlan.dat file. First I would suggest to delete the vlan.dat from flash and reload the switch, re-create vlans and test again.

 

other test to check if vlan 10 is working can be done by just connecting two end hosts to port 7 and 9, assign those switchports to vlan 10 which I think they already are. Assign end host static ip addresses in the same subnet and then try to ping each other. They should be able to ping each other and this test has nothing to do with SVI for vlan 10.

KJackson50
Beginner

What do you get with show commands 'show ip dhcp pool' and 'show ip dhcp server statistics'?

here i have attached the screen shot for the show ip shcp pool and show ip shcp server statistics command.

joselgo2
Cisco Employee

Hello Tomas!

Could you verify the status of your interfaces?, maybe you can share the command "show ip interfaces brief", to know if the interfaces are up, and then verify if your laptop is configurated for take an ip automatically.

Greetings!

I have attached the show ip interface brief command out put on the first requestit is under the screen shot ip.png and the laptop is also configured to take IP automatically.