TCP

TCP provides connection oriented delivery. TCP requires that a session be established before hosts can exchange data. TCP is a means for building a reliable communication stream on top of the unreliable packet INTERNET PROTOCOL(IP).

TCP is the protocol that support nearly all internet applications.
the sending machine expects an acknowledgment for each packet. If a period elapses without an acknowledgment, it assumes that the information did not arrive and automatically resends it. Incase the packet delivered is damaged a negative acknowledgment NACK is sent. After this packet is resent again.

the other functions are allocating sequence number to each packet transmitted and handling flow control to make sure that the sender does not flood the receiver with packets.

HUBS

A HUB is a small rectangular box includes a series of ports that each accept a network cable. hub joins multiple computers together to form a single network segment. on this segment, all computers can communicate directly with each other.
HUBS are also known as multiport repeaters or concentrators. they connect various segments and acts like a repeater.this enables every segment to receive signals from any other segment.

Loop Avoidance

Redundant links are used to help stop complete network failures if one link fails. Even though redundant links are extremely helpful, they cause more problems than they solve. Because frames can be broadcast down all redundant links simultaneously, network loops can occur, among other problems.
If no loop avoidance schemes are put in place, the switches will flood broadcasts endlessly throughout the internetwork.

A device can receive multiple copies of the same frame since the frame can arrive from different segments at the same time.

One of the biggest problems is multiple loops generating throughout an internetwork. This means that loops can occur within other loops. If a broadcast storm were to then occur, the network would not be able to perform packet switching.

When a frame arrives at a switch interface, the destination hardware address
is compared to the forward/filter MAC database. If the destination hardware
address is known and listed in the database, the frame is only sent out the
correct exit interface. The switch does not transmit the frame out any interface
except for the destination interface. This preserves bandwidth on the
other network segments and is called
frame filtering
.
If the destination hardware address is not listed in the MAC database,
then the frame is broadcasted out all active interfaces except the interface the
frame was received on. If a device answers the broadcast, the MAC database
is updated with the device location (interface).