cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
16989
Views
0
Helpful
28
Replies

catalyst 2960G vlan configuration

shafitokhi
Level 1
Level 1

Hi,

I have got a catalyst cisco 2960G series switch and via this switch I want to creat serveral vlans.

I am getting a dhcp IP from a router and I want to setup my own vlan networks.

I plugged in the Ethernet cable that came from the dhcp router to port 16 of the cisco switch and configured the ports 1,2 and 3 for vlan 1, 2 and 3

the dhcp router has given me this IP 192.168.10.158

defautl gateway is : 192.168.10.1

when I plug in a PC to port 1 or 2 of the cisco switch I still receiving the IP from range 192.168.10.* but not from the range that I configured for the vlan 1 or 2.

Below is my startup configuration:

no file verify auto

spanning-tree mode pvst

spanning-tree extend system-id

!

vlan internal allocation policy ascending

!

interface GigabitEthernet0/1

!

interface GigabitEthernet0/2

switchport access vlan 2

  switchport mode access

!

interface GigabitEthernet0/3

switchport access vlan 3

switchport mode access

!

interface Vlan1

ip dhcp client lease 50 0 0

ip address 192.168.1.1 255.255.255.0

no ip route-cache

!

interface Vlan2

ip address 192.168.2.1 255.255.255.0

no ip route-cache

!

interface Vlan3

ip address 192.168.3.1 255.255.255.0

no ip route-cache

!

ip default-gateway 192.168.10.1

ip http server

----------------

What I want is to get a dhcp IP from vlan based on the subnet that has been specified for subnet. e.g; If I plug in a PC to port 1 (vlan 1) then I expect to get an IP 192.168.1.*   - same case for other vlans.

I'm not sure if I have got the right configuration and really not sure if I have pluged in the Ethernet cable that came from the dhcp router to the right port (16 of the cisco switch) ?

Thanks in advance for your help.

28 Replies 28

You have a very old IOS. It was from 2007. I would definetly upgrade the IOS to newer version. The latest version is

c2960-lanbasek9-mz.150-1.SE.bin.

Stay as far away from 15.0(1) as you can.  It's got a memory leak issue.  When you load this IOS, even without a config, it will cause the memory to go up to a critical level.

Thanks leo for that. What IOS do you recommend?

Errrr ... Depends Kishore.  I mean if you want to enable routing then I'd stick with 12.2(58)SE1 or SE2.  Otherwise, 12.2(55)SE4 is a safe bet because the 58-series also have a similar (not the same) memory leak issue.

Now, the 15.0(1)SE bug, according to Cisco, is ACROSS THE BOARD.  So use this version with caution.  The fix for this version will be on March 2012.  Not happy because you can still download the current version even though you have this issue. 

I tried to download the 12.2(55) SE4, but I couldn't do so, at the top of the page they have published the message:

"

Due to a scheduled maintenance, the Software Download area will be  intermittently available between 5:00 pm PT Saturday, November 5th, 2011  and 7:00 am PT Sunday, November 6th, 2011.

"

This is the url:  http://www.cisco.com/cisco/software/navigator.html?a=a&i=rpm

I just want to know if I have got the right url?

thanks.

That's a scheduled maintenance period for the weekend.  You should be able to download the IOS if your CCO login has a valid Service Contract attached.

I don't know why I can't download the cisco software.

When I try to download the IOS I'm getting the error below:

Authorization Required

This server could not verify that you are authorized to access the document requested.  Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.

I'm trying to download via the firefox browser.

any idea?

thanks.

Hi Shafi,

You need to have valid CCO login with valid smartnet contract.Do you buy you gear directly from cisco or a 3rd party  vendor. If you buy from a vendor then they should be able to give you the IOS you want.

HTH

Regards,

Kishore

For anyone who wants to use the 15.0(1)SE, a new maintenance release is now available.

Release Notes for Cisco IOS Release 15.0(1)SE1

Thanks leolaohoo,

I wonder if IOS 15.0(1)SE1 supports routing?

recently I have upgraded my 2960 cisco switch to IOS 15.0(1)SE1 with the below configuration

vlan2: connected to the dhcp server 192.168.10.1

vlan3: connected to a pc

_______________________________________

ip dhcp pool dhpool3

   network 192.168.3.0 255.255.255.0

   default-router 192.168.3.1

interface FastEthernet0/3

switchport access vlan 3

switchport mode access

interface Vlan2

no ip address

no ip route-cache

!

interface Vlan3

ip address 192.168.3.1 255.255.255.0

ip helper-address 192.168.10.1

no ip route-cache

________________

Now the PC that is connected to the vlan 3 has got an IP of 192.168.3.2. But when I try to ping google.com from the PC, respond me with the message "ping: unknown host www.google.com"

Any idea?

I wonder if IOS 15.0(1)SE1 supports routing?

Starting from 12.2(55)SE3 (and later).

Something is not right with your config ...

You have a DHCP pool assigned to VLAN3.  Next, VLAN3 has an IP helper address. 

Hi,

Let's draw a line with what you have, what is working and what is NOT working:

-you have a 2960G switch that also knows static routing.

-you have configured DHCP pools for each vlan.

What is working:

- the PCs are geting their correct IP addresses.

What is NOT working:

- you cannot ping www.google.com from PCs.

1. you have to have on the switch the command: ip route 0.0.0.0 0.0.0.0 192.168.10.1 (like Kishore said).

BUT you have to have an SVI (switched Virtual Interface) interface that belongs to that subnet (192.168.10.0) first. You can configure interface vlan 1 (or 10) with an IP from 192.168.10.0 and, ofcourse, assign a physical interface to this vlan.

2. you cannot reach www.google.com from PCs because there is not DNS server that can resolve the name www.google.com into IP address. To send the IP address of a DNS server to your PCs you have to have in each DHCP pool: dns-server A.B.C.D

A.B.C.D - IP address of you DNS server.

3. to test connectivity to "internet" try first to send a ping from your switch to 192.168.10.1.

4. if the previous ping works than do a ping from your PCs to192.168.10.1. Now it should work.

I hope it helps,

Bogdan

Thanks for the reply,

I tried to follow the steps which you have mentioned, unfortunately I couldn't complete all the needed steps

I created a SVI interface for the vlan 10 :

ip dhcp pool dpool2

   import all

   network 192.168.3.0 255.255.255.0

   default-router 192.168.3.1

   dns-server ip

interface Vlan10

ip address 192.168.10.5 255.255.255.0

interface Vlan3

ip address 192.168.3.1 255.255.255.0

ip helper-address 192.168.10.1

no ip route-cache

interface GigabitEthernet0/10

switchport mode trunk
switchport trunk encapsulation dot1q  # this command is not working on my switch

ip route 0.0.0.0 0.0.0.0 192.168.10.1

I still can't ping the gateway 192.168.10.1 from the switch.

any idea?

Hi,

Is not important that you could not enter the "command switch trunk encap dot1q" on interface G0/10. Catalyst 2960 knows only dot1q. So, it's normal.

Does your int gi0/10 goes into the router?

You have to have an interface in Vlan 10, in order to have Layer3 connectivity. It's OK with a trunk interface only if this interface goes into the router. In this case the router should be configured with subinterfaces.

Is this your case?

As Shine said, please paste the latest configs of your switch and router!

Cheers,

Bogdan

shine pothen
Level 3
Level 3

Please post the latest config of your switch and router...we will have to see what kind of config done on the router end .....

Sent from Cisco Technical Support iPad App