I agree with @network_ninja but will extend it a bit.
How I'd solve this
Router1--L3--Router2
| |
| |
Switch1--L2--Switch2
| | |
| | |
PC1 PC2--------+
Router1 and Router2 are running VRRP, HSRP, GLBP or CARP to produce virtual default-GW IP address to the LAN.
This protocol will converse over the Switch core to agree which of the routers is owning the default-GW IP address at any given time.
PC2 is redundant linux server, which is using 'bonding' to redundantly connect to the Switches, it should be configured so that if the the virtual default-gw IP address stops responding to ARP WHO HAS, it'll switch to backup connection. IP address itself is not on the physical interfaces, but on the virtual bonding interface.
Equivalent solution is available to other OS, but often not included in base OS package.
PC1 is non-redundant server.
Switches are not running anything special, no spanning tree (as there is no L2 loop) and no LACP. They can be from different vendors and can be taken down for maintenance separately.
Routers are not running any switching, IP addresses are configured directly in the L3 interfaces facing the switches.
If you choose VRRP as your first-hop-redundancy-protocols, routers can be from different vendor. Each router can be taken down for maintenance separately, by gracefully switching VRRP priority before work on the primary.
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.
Best Answer
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.