Networking Basics & OSI Reference Model
Networking Basics & OSI Reference Model
&
OSI Reference Model
Networking: An Overview
Handles errors in the physical layer and also ensures that the
frames reaches the destination .
Any errors are detected and corrected .
Adds some bits at the beginning and end of each frame plus the
checksum. Receiver verifies the checksum.
Medium Access Control (MAC) defines who can use the network
when multiple computers are trying to access it simultaneously
(i.e. Token passing, Ethernet [CSMA/CD]).
Layer 1 and Layer 2 are required for all types of
communication
irrespective of whether it is LAN or WAN.
Layer 3 : Network Layer
Connection-Oriented :
Sender and receiver first establish a connection, possibly
negotiate on a protocol. (virtual circuit)
Transmit the stream of data.
Release the connection when done.
Eg.Telephone connection.
Connectionless
No advance setup is needed.
Transmit the message ( datagrams ) when sender is ready.
uWhile the Data Link layer is confined within the LAN , the
Transport layer provides this function beyond the LAN
segment.
uData arrives as a sequence of packets and this layer identifies
the original sequence and resequencing to retain the original
sequence before they are passed to the Sessions layer up.
Application/Process
Internetwork Layer
Message
Application Application
Segment
Transport Transport
Datagram
Network Network
Frame
Application/Process FTP,Telnet,SMTP,SNMP
Routing
Internetwork Layer Protocols,IP,ARP,RARP
Layer 3
The 16-bit source port field contains the number of the port making
the "call." The source port and source IP address function as the
packet's return address.
•Flags:
The 6-bit flags field contains six 1-bit flags that enable the control
functions of the urgent field, the acknowledgment of significant field,
push,reset connection, synchronize sequence numbers, and finished
sending data.
This field is used by the destination machine to tell the source host how
much data it is willing to accept, per TCP segment.
•Checksum (16 bits):
•Padding:
Extra zeros are added to this field to ensure that the TCP header is
always a multiple of 32 bits.
UDP
•Version: The first four bits of the IP header identify the operating
version of IP, such as version 4.
•Internet Header Length: The next four bits of the header contain
the length of the header, expressed in multiples of 32.
•Type of Service: The next eight bits contain 1-bit "flags" that can
be used to specify precedence, delay, throughput, and reliability
parameters for that packet of data.
•Total Length: This 16-bit field contains the total length of the IP
datagram measured in octets. Valid values can range from 576 to
65,535 octets.
•Identifier: Each IP packet is given a unique, 16-bit identifier.
•Flags: The next field contains three 1-bit flags that indicate whether
fragmentation of the packet is permitted and if it is used.
Protocol: This 8-bit field identifies the protocol that follows the IP
header, for example, VINES, TCP, UDP, and so on.
Destination IP Address:
Padding:
Extra zeros are added to this field to ensure that the IP header is
always a multiple of 32 bits.
Protocol Multiplexing & Demultiplexing
Internet IP address
0 8
0 netid hostid Class A
0 1 16
netid hostid Class B
1 0
0 1 2 24
Class C
1 1 0 netid hostid
0 1 2 3
1 1 1 0 multicast Class D
Class E
1 1 1 1 0 Reserved for future use
1. IP address consists of two parts :
network id and host id .
2. Most significant bits are used to determine how many bits are
used for netid & hostid.
A 127 16,777,214
B 16,383 65,534
C 2,097,151 254
Notation of IP address
IP address 144.19.74.201
(in dotted decimal notation)
Calculating an Address Class
The most significant bits in an IP address ( in the binary
form) determines the Class the Address belongs to.
1 Class A
10 Class B
110 Class C
1110 Class D
Class A
Minimum value of first decimal 00000000 =0
Maximum value of first decimal 01111111 = 127
Class B
Minimum value of first decimal 10000000 = 128
Maximum value of first decimal 10111111 = 191
Class C
Minimum value of first decimal 11000000 = 192
Maximum value of first decimal 11011111 = 223
Special IP addresses
149.108.1.2
Internet
All traffic
149.108.0.0
N1 - Network 1
For a second network , the same network number cannot be used
as the router examines the netid and will not be able to
distinguish between the two networks.
149.108.1.2
Internet
149.108.2.1
149.108.2.3 N
2
149.108.2.2
N2-Network 2
Subnetting :
Allows you to break a network into smaller networks using the
same network assignment .
Advantages
Simplified Administration
Restructuring of internal networks without affecting
external networks
Improved security.
Subnet Mask
Routers must understand how the subnetting has been done ,ie.
That the HostId is to be treated - a part for the subnet number and
the other for the host number .
This information is represented to the router as the Subnet Mask
Subnet Mask is used by routers and hosts on a subnet to
interpret the hostid field in such a way as to determine how
many bits are being used for subnetting.
Subnet Mask divides the hostid field into a subnet number and
host number .
netid hostid
Subnet
1 0 number Host number
IP address
Subnet Mask
Subnet Mask is a 32 bit number:
Ones (I’s ) correspond to the netid and subnet number
Zero’s (0’s) correspond to the host number in the IP address.
netid hostid
Subnet
1 0 number Host number
IP address