Friday, 29 June 2012

Important Concepts about Networking



Before moving to the network configuration part it is needed to discuss some important concepts about networking. I am sure that this post will clear and expose more about networking. 
Data Encapsulation: encapsulation is the process of wrapping data from upper layer data with that specific layer header & trailer. This creates PDU’s (Protocol Data Units) for that specific layer to interact with adjacent layers. Header & Trailers are specific for each layer like Data link layer adds sender receiver MAC addresses, Network layer adds IP addresses to each PDU. Adjacent layer interaction process occurs in the same computer. A specific layer provides services to its upper layer, & requests its lower layer for more functions add.

PDU:  Protocol Data Units are made through data encapsulation process. It consist specific layer (layer n) control information, & adjacent upper layer data encapsulated. Each layer has its own PDU, like L7PDU, L6PDU, L5PDU, L4PDU, L3PDU, L2PDU, and L1PDU. Same layer interaction occurs in two different networked systems on the same layer to communicate through its own header.
The below figure show about data encapsulation and PDU’s making process.
TCP PDUs & Encapsulation

Error Recovery: Error Recovery is the function of Transport layer for TCP protocol for reliable data transmission. Synchronous & Acknowledge bits are used for bits purpose. Figure below shows the TCP ACK & SEQ no without error recovery and with error. The figure A is without error means ACK not need for all received bytes to web server. Its only ACK for next data ACK 3.

TCP ACK with Error


In Figure B web browser does not receive seq 1 data. Since it ACK only seq 1, its means that web browser wants only seq 1 data to retransmit. Since web browser already received seq 2 data. It resembles data and sends it to upper layer. Now client only request for data ACK 3.
Positive Acknowledge & Retransmission: PAR used a timer to count the time when a sender sends a segment. Sender will automatically retransmit the segment if it does not receive the ACK at that time (time out). It helps in two cases as first if segment fails to receive at receiving end, & secondly if the Acknowledge is sends from receiver to sender but lost in the way.  With network security perspective it helps to avoid the “Denial of Services Attacks”.
Multiplexing: Multiplexing allows multiple connections to be established between processes in two end systems. Multiplexing is a feature that allows the transport layer at the receiving end to differentiate between the various connections and decide the appropriate application layer applications to hand over the received and reassembled data. The source and destination Port Number Fields in the TCP and UDP headers and a concept called socket are being used for this purpose.
Port numbers 0 – 1023 are well-known ports, port numbers 1024 – 49151 are registered ports, and port numbers 49152 – 65535 are private vendor assigned and dynamic ports. Below list shows some important Applications & their Port Number.

Application
Protocol
Port Number
HTTP
TCP
80
FTP
TCP
20 for Data, 21 for Control
Telnet
TCP
23
SMTP
TCP
25
POP3
TCP
110
DNS
TCP, UDP
53
TFTP
UDP
69
DHCP
UDP
67, 68
SNMP
UDP
161

Socket is a communication channel between two TCP processes. A client socket is created with IP address & destination Port number to connect to the server. A server is bind to a specified Port number & listens for incoming connections upon started a server application.

Checksum: is a test for ensuring the integrity of data or in simple words it is a test for error detection in packets. It is a number calculated from a sequence of mathematical functions. It is typically placed at the end of the data from which it is calculated, and then recalculated at the receiving end for verification.

Cyclical Redundancy Check: Discovers whether bit errors occurred during the transmission of a frame in Data Link Layer. This value is calculated with a mathematical formula applied to the data in the frame. a frame is discarded if the calculated value and the FCS value are mismatched. Error recovery is the responsibility of other protocols, like TCP Protocol of Transport Layer.

Straight-through cables: are used to connect PCs and routers to hubs or switches. When a PC sends data on pins 1 and 2, the hub receives the electrical signal on pins 1 and 2. Hubs and switches must think oppositely compared to PCs and routers in order to correctly receive data. This is related to the Physical Layer.

Crossover cables: are used to connect devices that use the same pair of pins for transmitting data, like hub to hub, switch to switch, hub to switch, PC to PC, and PC to router. Cables are selected in the Physical Layer.

No comments:

Post a Comment