0% found this document useful (0 votes)
58 views11 pages

Networking Notes

This document discusses various layers of the OSI model including the application layer, presentation layer, and session layer. It then discusses concepts related to the transport layer such as ports, protocols, TCP, UDP, and the three-way handshake process for TCP connection establishment. The document also covers networking fundamentals such as data packets, MTU, segmentation vs fragmentation, and when to use TCP vs UDP.

Uploaded by

Test Alethe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views11 pages

Networking Notes

This document discusses various layers of the OSI model including the application layer, presentation layer, and session layer. It then discusses concepts related to the transport layer such as ports, protocols, TCP, UDP, and the three-way handshake process for TCP connection establishment. The document also covers networking fundamentals such as data packets, MTU, segmentation vs fragmentation, and when to use TCP vs UDP.

Uploaded by

Test Alethe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

OSI Model

Application Layer
1. An Application Layer is a Layer at which the data is generated or created which we need to
transfer over the Network.
2. This layer also serves as a window for the application services to access the network and
displaying the received information to the user.
3. The Application layer of the TCP/IP models handles the high-level protocols issue of
representation, encoding and dialog control.

Presentation Layer
1. This layer is responsible for presenting the data in the required format which may include
encryption, decryption, compression & decompression.
2. This layer is responsible to represent the data for the Application Layer.

PDU: DATA
Session Layer

1. This Session establish, manage and terminates session betweentwo communication hosts.
Ex. Client Server Login
Protocol used: Network Time Protocol. (123)
PDU: Formatted Data

Port Number
i. A Port number is a way to identify a specific process to which an internet or other
network message is to be forwarded when it arrives at a server.
ii. It works at Layer 4 used by TCP & UDP.
iii. A port no. is a 16 bit integer that is put in the header appended to a message unit.
iv. Range 0 – 65535; 0-1023 is well known, 1024-65535 are Random.
i.e.: - FTP(20,21), SSH(22), Telnet(23), SMTP(25), DNS(53), DHCP(67,68), TFTP(69).

Protocol Number
i. It is used in Layer 3
ii. Range 0-255
iii. Protocol number is used to identify that which type of
Data is generated in the transport layer.
iv. Protocol no. is present in IPv4 header which is of 8 bytes.
v. The protocol number is used by the layer-3 protocol.
(IPv4 or IPv6) to determine to which layer-4 protocol in
The network stack it should send the payload of the packet .

<icmp-1>
Data Packet: A Packet is the single unit of data that is routed between a source and destination
on the Network. Each Packet contains information to help device or switch the packet to its
destination & actual data is known as Payload.

MTU (Maximum Transmission Unit)


a. A unit on the size of data to transmit from a node.
b. MTU of Ethernet is 1500 byte.

c. A MTU is the Largest size packet or frame, specified in octet (eight bit= byte), that can be
sent in a packet or frame based Network such as the internet.
d. The internet’s TCP uses the MTU to determine the max size of each packet in any
transmissions.
What is MSS?
The Maximum Segment Size is the largest amount of data, specified in bytes, that a
communication device can handle in a single, un-fragmented piece.
For optimum communication, the number of bytes in the data segment and the header
must add up to less than the number of bytes in the MTU.
Difference betweenSegmentation and Fragmentation
S.NO. Segmentation Fragmentation
Segmentation takes place at
Layer 4. Fragmentation takes place at Layer 3
1 i.e. Transport Layer i.e. Network Layer
During the original creation of
packet when a set of data
doesn’t fit within the “Maximum During the original creation of frame where the
Segment Size” the data is then Network Layer must sends packets down to the
chopped into multiple segment data link layer for transmission. Some Data link
referred as “Protocol data unit”. layer technologies have limits on the length of the
This Process is known as data that can be sent.
2 Segmentation. In Shorts some links have smaller MTU.
Something about MSS: MSS is set
as a TCP option initially in the
TCP SYN Packet during the 3 way
Handshake. This Value cannot be
changed after the connection is If the Packet that is to be sent is larger than the
established. MTU than it is chopped. This process is known as
fragmentation. These pieces are re-assembled
Default Maximum TCP segment once they arrived at the Network Layer of the
3 size=576 bytes destination.
In order to avoid fragmentation
(No. of Bytes in the data
4 segment + The Header) < Header Fragmentation can be avoided
MTU- Max Transmission Unit
Max limit of data that can be transmitted through
interface at once.
MSS- define the Max Limit of 1500 – 20 byte(TCP header)+20 byte(IP Header)
5 Segment size +1460 MSS
Transport Layer
1. The 4th Layer in TCP/IP model.
2. Deals with logical communication between processes.
3. Responsible for delivering messages between network hosts.
4. Accept the data from Application Layer and prepare it for addressing at Network Layer.
5. Transport the data across the Network Reliably by breaking up data from sender and
reassembling it at receiver (client) end.
6. It decides if data transmission should be parallel or single path.
7. Multiplexing or splitting are done by this.
8. Provide additional Quality of Services.
9. Converting messages into smaller units
10. Responsible for end-to-end delivery of complete messages.
11. Provide transparent transfer of data between end users by providing reliable
data transfer service to the upper layer.
12. Controls the reliability through flow control, segmentation, De-
segmentation & error control.
13. Also provides the acknowledgement of the successful data transmission and
sends the data if no errors occurred.

Services:

2. Connection-less Services  Data Transfer in a very fast speed. Operated by Operating


System.

Function of Transport Layer


a. Provides the segmentation of data.
b. Ensure process –to-process delivery rather than a single unit.
c. Error correction is done through retransmission.

Notes: PDU- Segment.

A Port no. is used to identify which type of request is generated in the


application layer.

1. 0-1023 are well known ports mostly used as a destination port.


2. 1024-65535 are unknown/random mostly used as source Port.

Only 2 Protocols used in Transport Layer Mainly

A. TCP: Transmission Control Protocol


B. UDP: User Data Gram Protocol
UDP (User Data Gram Protocol)
1. UDP is a transport layer connection-less, unreliable protocol.
2. Used 8 bytes to sends data.
3. Widely used in video conferencing, live gaming control, voice or video connections and
real time services.
4. Use IP protocol no. 17 (0X11) in hexa.

UDP Header.
1. UDP header is 8 bytes fixed and simple header.
2. First 8 byte consists of all necessary header information and remaining part consist of
data.

3. Checksum calculation is not mandatory in UDP. No error control or flow control is


provided by UDP.
4. Hence UDP depends on IP and ICMP for error reporting.

Application of UDP
1. Used for simple request response communication when size of Data is less and hence
there is lesser concern about flow and error control.
2. It is a suitable protocol for multicasting (support packet switching).
3. Used for some routing update protocol like RIP.
4. Normally used for real time application which cannot tolerate uneven delays between
sections of a received message.
5. Following protocol uses UDP-
NTP (Network Time Protocol), DNS (Use TCP also), BootP, DHCP, NNP, TFTP,
RTSP, RIP, OSPF.
6. Application layer can do some of the tasks through UDP like Traceroute, Record
Route, and Time Stamp.
7. UDP takes datagram from Network Layer, attach its header and send it to the user so it
works fast.
8. UDP is null protocol if remove checksum field.
When to use UDP
1. Reduce the requirement of Computer resources.
2. When using multicast or Broadcast to transfer typically used for streaming media.
3. UDP is also known as Stateless Protocol.

TCP (Transmission Control Protocol).


1. TCP is fully duplex connection oriented, reliable protocol.
2. Acknowledgement, flow control, sequencing and error control (checksum) are its features.
3. Use 3-way handshake for establishing connection.
4. Lots of overhead due to such features leads to increased cost.
5. In TCP, the large block of information from an application comes and the transport layer breaks them into
segments.
6. The segments get a sequence number so that at destination the segments can put back into the sequence
no. in TCP stack.
7. When these segments are sent over the network it wait for the acknowledgement of the receiving ends then
retransmitted to the next segment.
8. Before sending any segments, the TCP first establishes a handshake or “Virtual Circuit” with receive ends
using 3-way handshake process. This type of communication is known as “Connection Oriented
Communication”.

Three-way Handshake
1. Client want to establish a connection with server so the first “connection agreement”
segment is request for (synchronization) SYN (syn. seq no.), which inform server that the
client want to start communication with server. (Initial SYN sequence no. is random).
2. SYN+ACK Now the server respond the client with segment ACK request & establishing
connection parameter rules between hosts.Server also sends it SYN Bit set. So that bi-
directional communication can be started.
3. ACK Client Acknowledged the server with the final segment which notifies the server that
the connection agreement has been accepted. Now both establish a reliable connection an
actual data transfer can be started.
4. TCP negotiate maximum segment size (MSS).
5. TCP Header is of 20 byte or up to 24 byte with options.
TCP Header

Source Port Number


1. Port no. of the Application on the host sending the data. Probably random/unknown port
no. used here.
2. Used 2 byte for source port no.
Destination Port Number
1. Port no. of the application requested on the destination host.
2. Used well known ports here. i.e., Telnet 23, SSH22, DHCP 67/68, DNS53,
RIP520 etc.
3. Used 2 bytes for Destination Port.
Sequence Number
1. A number used by TCP that puts the data back in the correct order or retransmits missing or
damaged data during a process called sequencing.
2. Used 4 byte for sequence number.
Acknowledgement Number
1. The value is the TCP octet that is expected next (next sequence number).
2. 4-byte size of ACK number.
Header Length(Data off-set)
1. Specifies the size of TCP Header in 32-bit(4 Byte) words.
2. The min. size of header is 5 words & the max is 15 words. Thus, giving the min. size of 20
byte & max 60 byte.
3. Allowing 40 byte of option in the Header.
Reserved
1. For future use & always set to zero.
Control bits/Flags
Control functions are used to setup and terminates a session. There are 9 Flags in TCP.

1. Nonce Sum: - It is an experimental Flag, used to help protect against accidental Malicious
Concealment of Packet from the Sender. It is 1 bit Flag.
2. CWR: - It stands for Congestion Window reduced is used by sending host to indicate that it
received a packet with the ECE Flag set.
3. ECN-echo: - It stands for explicit Congestion Notification. ECN allows end-to-end
notification of network congestion without dropping packets. (rfc 3168).
4. Synchronization (SYN)
a. Used in first step of connection establishment phase or 3 way handshake process
between two hosts. Only the first packet from the sender as well as receiver should
have this flag set.
b. Used for synchronizing sequence numbers.
c. Tell the other end which sequence no. they should expect.
5. Acknowledgement (ACK)
a. Used to acknowledge packets those are successfully received by the host.
b. Flag is set if the Acknowledgement number field contains a valid acknowledgement
number.

6. Finish (FIN) – It is used to request for connection termination i.e. when there is no more
data from the sender, it requests for connection termination. This is the last packet sent by
sender. It frees the reserved resources and gracefully terminate the connection.
7. Reset (RST) – It is used to terminate the connection if the RST sender feels something is wrong
with the TCP connection or that the conversation should not exist. It can get send from receiver
side when packet is sent to particular host that was not expecting it.

8. Urgent (URG)
a. Data inside a segment with URG = 1 flag is forwarded to application layer immediately
even if there are more data to be given to application layer.
b. It is used to notify the receiver to process the urgent packets before processing all
other packets.
c. The receiver will be notified when all known urgent data has been received.
9. Push (PSH)
a. Transport layer by default waits for some time for application layer to send enough
data equal to maximum segment size so that the number of packets transmitted on
network minimizes which is not desirable by some application like interactive
applications (chatting).
b. Similarly transport layer at receiver end buffers packets and transmit to application
layer if it meets certain criteria.
c. This problem is solved by using PSH. Transport layer sets PSH = 1 and immediately
sends the segment to network layer as soon as it receives signal from application layer.
Receiver transport layer, on seeing PSH = 1 immediately forwards the data to
application layer.
In general, it tells the receiver to process these packets as they are received instead of
buffering them.
d. PUSH Function asks to Push the Buffered data to the receiving application.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy