At what layer of the OSI model does a vSwitch virtual switch or bridge operate at?

Hubs provide a dedicated physical connection for every device, which helps reduce the possibility that a failure of one computer will cause all computers to lose connectivity. However, because a hub is still a shared bandwidth device, connectivity is limited to half-duplex. Collisions remain an issue as well, so hubs do not help improve the performance of the network.

Hubs are essentially multiport repeaters. They ignore the content of an Ethernet frame and simply resend every frame they receive out of every interface on the hub. The challenge is that the Ethernet frames will show up at every device attached to a hub, instead of just the intended destination (a security gap), and inbound frames often collide with outbound frames (a performance issue).

What is a Bridge?

In the physical world, a bridge connects roads on separate sides of a river or railroad tracks. In the technical world, bridges connect two physical network segments. Each network bridge keeps track of the MAC addresses on the network attached to each of its interfaces. When network traffic arrives at the bridge and its target address is local to that side of the bridge, the bridge filters that Ethernet frame, so it stays on the local side of the bridge only.

If the bridge is unable to find the target address on the side that received the traffic, it forwards the frame across the bridge, hoping the destination will be on the other network segment. At times, there are multiple bridges to cross to get to the destination system.

At what layer of the OSI model does a vSwitch virtual switch or bridge operate at?


The big challenge is that broadcast and multicast traffic must be forwarded across each bridge, so every device has an opportunity to read those messages. If the network manager builds redundant circuits, it often results in a flood of broadcast or multicast traffic, preventing unicast traffic flow.

What is a Switch?

Switches play a vital role in moving data from one device to another. Specifically, switches greatly improve network performance compared to hubs, by providing dedicated bandwidth to each end device, supporting full-duplex connectivity, utilizing the MAC address table to make forwarding decisions, and utilizing ASICs and CAM tables to increase the rate at which frames can be processed.

Switches use the best of hubs and bridges while adding more abilities. They use the multi-port ability of the hub with the filtering of a bridge, allowing only the destination to see the unicast traffic. Switches allow redundant links and, thanks to Spanning Tree Protocol (STP) developed for bridges, broadcasts and multicasts run without causing storms.

Switches keep track of the MAC addresses in each interface so they can rapidly send the traffic only to the frame's destination.

The description of switches and bridges is "sort of" correct, "sort of" not.

Bridges typically don't have the capability to filter frames. Switches may have the capability to filter, based on things like access control lists, but that's for a bit later in your networking course.

For right now, consider the following:

A bridge forwards frames from one segment to another segment.

A switch is essentially a multi-port bridge.

To answer your true-or-false questions:

Are the following true or false. Correct them if false:

I can only use either a router or a bridge to connect same protocol following multiple >networks (amongst themselves).

False. You'll typically use switches for this task - in much larger networks, you'll use routers and firewalls between geographically separated sites, but that's beyond the scope of your current studies.

All the devices are gateways falling under different layers of OSI model and have ability >to translate between all the protocols of that layer.(for eg. router is a gateway falling >in network layer and is capable of translating protocols TCP followed by network A to UDP >followed by network B (two of the protocols operating at networking layer) and vice versa)

False. Routers examine Layer 3 packets encapsulated inside Layer 2 frames for network information, and then direct them out interfaces according to their destination. In contrast, a switch looks only at the Layer 2 MAC address to determine its destination. A program (Application Layer) which talks with the UDP protocol will only "talk" on that protocol: the router cannot dynamically change it to "TCP" - it doesn't work that way. The router only encapsulates the data in a format which can traverse links between different Layer 3 networks.

Protocols like TCP and UDP operate at OSI Layer 4 - the "Transport" layer, and they differ in very specific ways and are used for different purposes. For example, UDP has no mechanism to detect whether packets are successfully received at the other end - they might get lost! TCP has a mechanism to detect whether data reaches the other end, and if not, to retransmit the lost packets.

A gateway in general operates in application, session and presentation layer.

False. Gateways operate at Layer 3.

Example: We're going to use a typical home network topology.

Computer A in Los Angeles wants to connect to Website B in New York. Computer A performs a DNS lookup of Website A, which translates to an IP address. Computer A sees that the IP address returned is not on the same network as itself, so it sends the packets to its default gateway. The default gateway is usually a router, which contains a routing table, which tells the router which external networks are reachable through which interfaces - it also has a default route which tells the router which interface or IP address to direct traffic to, if the destination does not appear in its routing table. In this case, because it's a consumer-grade appliance connected to a home network, the gateway sends all packets to unknown destinations upstream to the ISP.

The three major differences between a managed switch and using Linux bridge interfaces are performance, port density, and features.

Most managed switches will embed some of their programmed functionality into specialized hardware. This is not true in all cases, but this specialized hardware will tend to outperform devices that are purely software based (at least for the functionality embedded in the hardware).

Second, if port density is of concern, there aren't many server systems where you can pack 12-48 ports into a 1U chassis, and of the ones I have seen they were designed to be a network device.

Finally, are the features. Managed switches will typically have features that either are not present on a Linux platform, not as easily configured, or may require additional CPU/memory resources that will further impact performance if you use them.

However, aside from the differences in the two platform choices, it sounds like you are setting up some sort of lab/test/dev environment. My primary concern would be that you should try to match your actual/production environment as closely as possible. Your Linux "switches" do not behave the same as your managed switches, so something you implement in the lab may act entirely differently when implemented on your managed switches.