6

I am going through a course of networking and want to know the difference between the mentioned devices. I have heard that the switches:

  1. Establish a temporary connection between the devices connected to it and wanting to communicate.

    If this is the case then why does the connection needs to be temporary or where is it helpful?

  2. Reads the destination address from packet header and sends it to the mentioned receiver.

And Bridges:

  1. Establish permanent connection amongst networks.

    If temporary connection is sufficient, why have a permanent one?

  2. Forwards packets only if it were requested by any of the host in the rest of the network. (For which a filter table is maintained)

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).

  • 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)

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

Also I am not convinced by the fact that a protocol needs to be translated into another and hence the need of devices. The reason is that if the networking by definition means that it needs to agree on a protocol, why is there a need of translation? I would be grateful to the answers clearing the doubts(without raising any other :-)).

1
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can post and accept your own answer.
    – Ron Maupin
    Jan 4, 2021 at 22:38

1 Answer 1

10

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.

2
  • 2
    Actually, L2 encapsulates L3, not the reverse as included in your answer.
    – YLearn
    Oct 22, 2013 at 23:27
  • Whoops, right you are. Not enough coffee for me today. Oct 23, 2013 at 3:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.