cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
932
Views
5
Helpful
8
Replies

Layer 2 'routing'

swain9063058
Level 1
Level 1

Hi All,

 

I'm wanting to know whether it's possible to use a 2960 or C1000 layer 2 switch to allow/route traffic between two subsets.

PC1 192.168.45.1 255.255.255.0 to needs to talk to PC2 which is 192.168.46.1 255.255.255.0.

 

Is this possible just using either one or two layer 2 switches?

 

Thanks

 

Swain90

8 Replies 8

Jon Marshall
Hall of Fame
Hall of Fame

 

If your 2960 switch has IOS 12.2(55)SE or later then it may well support basic L3 routing and that is all you need to route between the two vlans. 

 

Jon

are this for study lab ??
try using emulate software because the network not end in connect two SW, when you deep study you will need two , three four and ......more SW and you need router one two and more. 
so simply use emulate SW give you as many as you want "depend on RAM you have" and you can do any lab you want.
packet tracer 
GNS3 
EVE-NG 
are some emulate SW.

There are things that we do not know about this environment and knowing them might change our advice. In particular we do not know whether this environment is using a single vlan or is using 2 vlans.

The original post identifies 2 hosts that are in 2 subnets. Generally that would indicate that there are 2 vlans. (usually we assume a one to one relationship of vlan to subnet). But it is possible to have 2 subnets in a single vlan.

The original post describes a specific question "PC1 192.168.45.1 255.255.255.0 to needs to talk to PC2 which is 192.168.46.1 255.255.255.0" If there is a single vlan then both devices are in a single broadcast domain. And that means that it might be possible for them to arp for each other and to be able to communicate. Note that the masks used make it unlikely that they would arp for each other. But we do not know if they are configured with a default gateway. If there is not a configured gateway for both hosts then they might be able to arp for each other.

 If there are 2 vlans in this environment then the devices are in different broadcast domains and that means that a layer 2 switch would not be able to allow them to communicate.

Jon focuses on the part of the question that identifies the network device as 2960 and identifies a possible solution in which the switch has limited layer 3 capability. But my reading of the original post is that it is quite specific in asking if a layer 2 switch can do this.

I believe that the bottom line is that if there is a single vlan then a layer 2 switch might allow both hosts to communicate (even though they are in different subnets) but if there are 2 vlans then a layer 2 switch is not able to allow both hosts to communicate.

HTH

Rick

Hello
The two pcss connect to a single switch but where do the two subnets of these pcs reside?


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

swain9063058
Level 1
Level 1

Thanks All

I purposely wanted to keep the scenario high level to see what options were available.

 

For the final solution, 2 separate VLANs would be the ideal solution.

 

Does the IOS version relates to the sdm prefer command? If it is, would I need to configure static routes, or is it a matter just running the ip routing command and giving each VLAN  an IP (VLAN45=192.168.45.254 & VLAN46=.192.168.46.254) like I would on a native Layer 3 switch?

Thanks

2960 supports SVIs (interval routing will work) and 16 static routes. You have not mentioned exact model of 2960 switch, 2960S or 2960X/XR. SDM template should be configurable in switch running LAN Base image.

 

Thanks

 

They would be connected interfaces so you would not need any static routes unless you need connectivity to other subnets. 

 

Jon

If there are 2 subnets and 2 vlans then you need a routing solution and not a switching solution. In the original question I focused more on the specification that it was a layer 2 switch. And a layer 2 solution does not work. Jon focused more on the part suggesting a 2960 and suggested that a routing solution would be possible. It looks like Jon was more on the mark than I was. So +5 for Jon.

HTH

Rick
Review Cisco Networking for a $25 gift card