Suppose we have two networks, which are Network A and Network B, with
10.1.1.0/24 and 124.1.1.0/24 respectively. Also, we assume that these two
networks are connected to the same router with interfaces 10.1.1.1/24 and 124.1.1.1/24 respectively. When a client with a mobile device, a laptop, or a desktop wants to access a website, she opens a browser and writes the address of the site, then hit enter. The browser then communicates with the local networking stack and tells that it wants to establish a TCP connection with the server through the HTTP port 80. Then networking stack will check its own subnet and send data through its gateway according to the network interface. The physical layer is the first and lowest layer that defines the physical connections between devices. It performs bit-by-bit data delivery over a physical medium, how the cables, network cards, and other hardware connect computers to the networks and the networks to the rest of the internet. It specifies how bits of data are sent over that cable. It is the second layer and it provides a network connection between hosts on a particular local network. Layer 2 groups together 1’s and 0’s into chunks known as Frames. There is an addressing system that exists at Layer 2 known as the Media Access Control address or MAC address. The MAC address uniquely identifies each individual NIC. The internet protocol basically assumes all computers are part of one very large "web" of nodes that can all pass packets to other nodes. There is always a route from one node to another, even if sometimes a very large number of intermediate nodes get involved. The data link layer makes this assumption true. The Network layer is responsible for packet delivery from end to end. The network layer is responsible for transmitting and routing data packets over the network. The internet uses the internet protocol (IP) as its network layer. Each node on the network has an address which is called the IP address of which data is sent as IP packets. The transportation layer manages network traffic between hosts and end systems to ensure complete data transfers. The first is the transmission control protocol(TCP) and the second one is the user datagram protocol(UDP), they both break up a message that an application wants to send into packets to the intended recipient. On the recipient’s side, both take the payload from the received packets and pass those to the application layer. While sending an email, the email client and server communicate over a reliable TCP connection. The server listens on a certain port until a connection request arrives from the client. The server acknowledges the request and a TCP connection is established. IP ( internet protocol) is the principal protocol in the internet protocol suite for relaying data grams across network boundaries. its routing function enables inter-networking and essentially establishes the internet. TCP port is an endpoint to a logical connection and a way a client program specifies a specific server program on a computer in a network. The port number identifies what type of port it is. The checksum is a small-sized datum derived from digital data for the purpose of detecting errors that may have been introduced during its transmission or storage. The checksum is a simple type of redundancy check that is used to detect errors in data. The routing table is a data table stored in a router or a networked computer that lists the routes to particular network destinations and some cases metrics(distances) associated with those routes.TTL, which is Time-to-live is an internet protocol that tells a network router whether or not the packet has been in the network too long and should be discarded.
Claudia Alves - TCP - IP Protocol, For Beginners - The Ultimate Beginner's Guide To Learn TCP - IP Protocol Step by Step-Independently Published (2021)