05-29-2013 09:03 PM - edited 03-07-2019 01:38 PM
Scenario
Problem
The hosts in VLAN 111 and VLAN 110 are not able to see each other even the ip static routes have been configured.
Can anyone help to solve this issue ? May be I have misconfigured some settings but not sure what's the actual problem.
Regards,
Alvin
05-29-2013 09:23 PM
Most likely because you haven't defined VLAN 110 on switch-1 and you haven't defined VLAN 111 on switch-2.
The presence of Layer-3 Vlan interfaces does not automatically mean the layer 2 VLANs exist on the switch.
Create those layer 2 VLANs and try again...
05-29-2013 10:04 PM
Hi Reuben,
I have defined the VLAN 110 and VLAN 111 as below:
Switch1(Config)#vlan 110
Switch1(Config)#name 192.168.1.0/24
Switch2(Config)#vlan 111
Switch2(Config)#name 192.168.3.0/24
Do I need to do anything else ? It still does not work properly.
What I need to do is to allow some hosts connected to VLAN 111 which is created in Switch 1, to access some other hosts connected to VLAN 110 which is created in Switch 2, with the help of static routing.
In this stage, I have a host with IP address 192.168.3.1 connected to Switch 1 which can ping to 192.168.3.254, but it cannot ping to 192.168.1.254, which is the IP address of the VLAN 110 SVI in Switch 2.
Regards,
Alvin
05-29-2013 11:06 PM
Hi Alvin,
The best way to acheive this is to modify your configuration as below
Switch 1
Switch1(Config)#vlan 110
Switch1(Config)#name 192.168.1.0/24
interface Vlan110
ip address 192.168.1.250 255.255.255.0
Switch 2
Switch2(Config)#vlan 111
Switch2(Config)#name 192.168.3.0/24
interface Vlan111
ip address 192.168.3.250 255.255.255.0
You dont need any static routes then as communication will happen over L2.
Hope that helps.
Regards
Najaf
Please rate when applicable or helpful !!!
05-30-2013 12:49 AM
Hi Najaf,
Do you mean I need to define both VLAN 110 and VLAN 111 in all 2 switches and assign the IP addresses to all 4 VLAN interfaces (Switch 1 - VLAN 110 & VLAN 111, Switch 2 - VLAN 110 & VLAN 111) ?
Regards,
Alvin
05-30-2013 01:23 AM
This is what I would recommend, Alvin:
1. Make sure Vlans 110 and Vlans 111 are created on both switches:
vlan 110
name XYZ
!
vlan 111
name ABC
2. Remove interface Vlan interfaces 110 and 111 on the second switch (no interface vlan110 and no interface vlan111)
3. Have Vlan interfaces 110 and 111 ONLY on the first switch
Note: the vlan commands we added in step 1 above just are for enabling Layer 2 connectivity within the VLAN, the commands in step 2 remove the routed (layer 3) interfaces.
The fact that you have an etherchannel between the two switches is not relevant in this case. To keep things simple, just do your inter-vlan routing on one switch, and leave the other as a layer 2 switch.
You won't need any static routes except a default route, as the two subnets will be directly connected to the switch so will automatically be populated in the routing table as routes of type 'C'.
For a host in VLAN 10 make sure it uses the IP address of VLAN10 on the switch as it's default gateway, and likewise for a host on VLAN 11.
If it still doesn't work then please post your latest configs with above changes, and also the result of pings from a host on VLAN 10 pinging the VLAN10 IP on the switch (as well as the same for VLAN 11).
This is a very simple setup so it should be very easy to get to work.
Reuben
05-30-2013 03:44 AM
Hi Reuben,
I have followed what you have suggested and everything seems to be working now. Really appreciate your great help.
Just curious, you approach is actually just enable the Layer 3 Routing (ip routing command) in one of the two C2960G Switches and leave the other one as a normal Layer 2 Switch, is it right ? If so, it seems that the Inter-VLAN Routing can only work in a single switch rather than 2 different switches.
Not sure why it's not working of what I have expected initially, since I have used this document as a reference :
Configuring Static IP Unicast Routing
Thanks for all the buddies who have given me various suggestions.
Regards,
Alvin
05-30-2013 04:13 AM
Hi Alvin
It gets messy if you try and do routing on both. It is certainly do-able, but you then need to run what is called a "routing protocol" between the two switches so that each knows what subnets are on which one. Routing protocols aren't available on the 2960s - you need a 3560 or better to do this. To do this properly and in a highly available setup, you really need a routing protocol (such as OSPF, EIGRP) and likely something like VRRP or HSRP as well to "virtualise" the default gateway IPs.
Just do your routing on one device and keep it simple. You're better to keep it simple and understand it well than try and make it more complicated and not really know what is going on.
The document you hyperlinked to is 100% correct, but it doesn't seem to state one of the key assumptions that you need to get right prior to starting out, which was that you need to have the layer 2 VLANs exist on the switch first. I think that's what your original problem was.
Reuben
05-30-2013 07:15 PM
Totally agree with you.
Thanks, Reuben.
Regards,
Alvin
05-30-2013 02:00 AM
Hello Alvin,
No sure what you are trying to so here, you have trunks setup between the switches, so in that case switching will be performed between them, resulting in the static routes pointing each other will have no meaning.
also looking at your static routes, Switch2 is pointing 192.168.2.0/24 instead of 192.168.3.0/24
If you want L3 routing instead of L2 switching then i purpose:
Otherwise for L2 switching:
res
Paul
Please don't forget to rate any posts that have been helpful.
Thanks.
05-30-2013 02:01 AM
Hi Alvin,
That is correct.
Hope that helps.
Regards
Najaf
Please rate when applicable or helpful !!!
05-31-2013 07:30 AM
A Layer 3 Vlan(an SVI, which will be routing vlan) on both switches can be created. make is traveled in the trunk between switch1 & 2.
Give this vlan ip addresses on both switches. for example.......vlan is 100.......ip on switch1 is 10.100.100.1/30.............10.100.100.2/30 on switch2.
static routes.
switch1(config)#ip route 192.168.1.0 255.255.255.0 10.100.100.2 toward the vlan 110 in switch2
switch2(config)#ip route 192.168.3.0 255.255.255.0 10.100.100.1 toward the vlan 111 in switch1
thanks
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