09-13-2011 10:28 AM - edited 03-07-2019 02:12 AM
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?
09-13-2011 10:31 AM
the switch is a single isolated switch no connection to core or router
09-13-2011 10:38 AM
You need 2 create 2 SVIs (one for each vlan) and assign an IP segment to each
example
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
vlan 2
name test
vlan 11
name test1
assign the proper port to each vlan.
HTH
09-13-2011 10:40 AM
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
09-13-2011 10:58 AM
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
09-13-2011 11:02 AM
maybe the 2960g is a layer 2 switch? can i use static routes to allow communication btw vlans?
09-13-2011 11:13 AM
its L2 switch only,
you can ping Gateway as its on same switch side.
09-13-2011 11:18 AM
so what can i do to ping hosts on other vlan?
09-13-2011 11:23 AM
Hi Tony,
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.
http://www.cisco.com/en/US/tech/tk389/tk815/technologies_configuration_example09186a00800949fd.shtml
HTH,
-amit singh
09-13-2011 11:47 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide