I have configured 2 vlans on a 2960g switch. ports 1/6 vlan 10
ports 7/12 vlan 11
i want machines on both vlans to communicate with each other. what do I use as default gateway or what is the configuration?
You need 2 create 2 SVIs (one for each vlan) and assign an IP segment to each
interface vlan 2
ip address 10.10.10.2.1 255.255.255.0
interface vlan 11
ip address 10.10.10.11.1 255.255.255.0
You also need the layer-2 vlan for each
assign the proper port to each vlan.
You needs L3 device switch or which can support communication between different subnets,
if same thing you did over L3 switch only enable ip routing can able to communicate between both VLANs,
if you configured these VLANs over L2 switch and used router to route between these VLANs then you can use default gate way or default route
its all on one switch. its a 2960g. I tried ip routing command but does not seem to recognize that. both vlans configured with default mgmt gateway ip. I can ping the gateway ip but not hosts
As 2960G is a layer 2 only switch, you need an L3 switch or L3 router to route between theses vlans. You have two options :
A. Use an L3 switch like 3560/3750, trunk 2960 to this L3 switch and create your vlans. Configure the Vlans SVI's on the L3 switch which will be the gateway for your hosts connected on the 2960 switch.
B. Use a router, connect it to 2960 switch and use router on stick model to configure the sub-interfaces on the router to route the traffic between vlans. Please see the link below for this config.
as i mentioned in my first post (and Amith Singh in recent post) you need to use L3 switch or router
for each of them if you need configuration example visit above link (mentioned by Amith singh) and for more examples search over cisco site /google you will get complete configuration as per your senario.