Chapter Two
Chapter Two
together
Used to transfer information or files, share resources, etc.
Basic types:
Peer-2-Peer:
Client/Server:
Different servers perform different tasks: File server, network server, etc
Protocols and protocol layering (TCP/ IP)
A protocol is required when two entities need to
communicate. When communication is not simple, we may
divide the complex task of communication into several
layers. In this case, we may need several protocols, one for
each layer.
Protocols mean set of rules.
The key elements of a protocol are:_
Syntax
Syntax refers to the structure or format of the data, meaning
the order in which they are presented.
Semantics
Semantics refers to the meaning of each section of bits.
Timing
Timing refers to when data should be sent and how fast it
can be sent.
Conn…
In computer networks, reference models
give a conceptual framework that
standardizes communication between
heterogeneous networks.
The two popular reference models are −
OSI Model
TCP/IP Protocol
The main benefits of the OSI model include the following:
Helps users understand the big picture of
networking
Helps users understand how hardware and
software elements function together
Makes troubleshooting easier by separating
networks into manageable pieces
Defines terms that networking professionals
can use to compare basic functional
relationships on different networks
Helps users understand new technologies as
they are developed
Conn…
Conn…
Conn…
Conn…
TCP/IP is a set of protocols developed to allow
cooperating computers to share resources across
a network.
TCP/IP combines the presentation and session
layer into its application layer.
TCP/IP combines the OSI data link and physical
layers into one layer
TCP/IP appears simpler because it has fewer
layers.
TCP/IP transport layer using UDP does not always
guarantee reliable delivery of packets as the
transport layer in the OSI model does.
Con…
Conn…
TCP/IP carefully defines how information
moves from sender to receiver. First,
application programs send messages or
streams of data to one of the Internet
Transport Layer Protocols, either the User
Datagram Protocol (UDP) or
the Transmission Control
Protocol (TCP).
TCP vs UDP
Transmission Control Protocol (TCP)
TCP is one of the main protocols of the Internet protocol suite
which are used in providing reliable delivery services.
It is a connection-oriented protocol for communications that helps
in the exchange of messages between different devices over a
network. The Internet Protocol (IP), which establishes the
technique for sending data packets between computers, works
with TCP.
Step 1 (SYN): In the first step, the client wants to
establish a connection with a server, so it sends a segment
with SYN(Synchronize Sequence Number) which informs
the server that the client is likely to start communication
and with what sequence number it starts segments with
Step 2 (SYN + ACK): Server responds to the client
request with SYN-ACK signal bits set.
Acknowledgement(ACK) signifies the response of the
segment it received and SYN signifies with what sequence
number it is likely to start the segments with
Step 3 (ACK): In the final part client acknowledges the
response of the server and they both establish a reliable
connection with which they will start the actual data
transfer
User Datagram Protocol (UDP)
UDP is a Transport Layer protocol. UDP is a part of the Internet
Protocol suite, referred to as the UDP/IP suite. Unlike TCP, it is an
unreliable and connectionless protocol. So, there is no need to
establish a connection before data transfer.
The UDP helps to establish low-latency and loss-tolerating
connections establish over the network. The UDP enables process-
to-process communication.
TCP vs UDP
Conn…
Conn…
Where TCP is Used?
Sending Emails
Transferring Files
Web Browsing
FTP,SMTP,HTTP
packets; most only attach headers. ESP (part of the IPsec suite)
is one example of a network layer protocol that attaches trailers
to packets
Network device
Network Interface Cards (NIC)
Also called network adapter
Receive data and convert it into electrical signals
Receive electrical signals and convert them into
data
Determine if the data received is for a particular
computer
Control the flow of data through the cable
Conn…
Repeater - A repeater is a device which regenerates or amplifies
the data or signal so that it can be travel to the other segment of
cable.
It is use to connect two networks that uses same technology and
protocol.
It does not filter or translate any data.
Work in physical layer
Hub – A hub is a basically multi-port repeater. A hub connects
multiple wires coming from different branches, for example, the
connector in star topology which connects different stations.
It has direct connection to a node (point to point connection).
It suffers from high collision of data, results to data loss.
A hub takes data from input port and retransmits the input data on
output port.
Conn…
Bridge – It is used to connect two networks.
It divides the collision domain based on number of ports or interface
present in a bridge.
It uses the packet switches that forward and filter the frames using LAN
destination address.
Bridge examines the destination address of frame and forwards it to the
interface or port which leads to the destination.
It uses the routing table for routing frame from one node to other using
MAC address.
It works in Data Link Layer.
Switch – It is similar to bridge. It has more number of interfaces as
compared to bridge.
It allows direct communication between the nodes.
It works in Data Link Layer.
It uses MAC address for data transmission and communication.
switch divides the collision domain of hosts, but the broadcast domain
remains the same
Conn…
Routers – It is used to connect different types of network (types-
architecture/ Protocol).
It work similar to bridge but it uses IP address for routing data.
Router can't be used for connecting Systems.
It works in Network Layer.
Gateway – A gateway is basically a device or a hardware which acts
like a “gate” among the networks.
Gateways make communication possible between systems that use
different communication protocols, data formatting structures,
languages and architectures.
Gateways repackage data going from one system to another.
Gateways are usually dedicated servers on a network and are task-
specific.
Addressing
Four levels of addresses are used in an internet employing the
TCP/IP protocols: physical address, logical address, port address,
and application-specific address. Each address is related to a one
layer in the TCP/IP architecture
The physical address, also known as the link
address, is the address of a node as defined by
its LAN or WAN.
Logical addresses are used by networking
software to allow packets to be independent of
the physical connection of the network, that is,
to work with different network topologies and
types of media
IP Addresses
An IP address is a unique address that identifies
a device on the internet or a local network.
At present the Internet protocol is at version 4
and this address consists of four bytes, or 32
bits.
In the future this will be extended, in a new
version of the Internet protocol IPv6, to allow
more IP addresses since we are rapidly using up
the available addresses.
The addresses will also be structured differently.
The form of an IP address in IPv4 is
aaa.bbb.ccc.mmm
Conn…
There are two prevalent notations to show an IPv4 address:
binary notation and dotted-decimal notation.
Binary Notation
In binary notation, the IPv4 address is displayed as 32 bits.
Each octet is often referred to as a byte.
So it is common to hear an IPv4 address referred to as a 32-bit address or a 4-
byte address.
Example: - 01110101 10010101 00011101 00000010
Dotted-Decimal Notation
To make the IPv4 address more compact and easier to read,
Internet addresses are usually written in decimal form with a decimal point
(dot) separating the bytes.
The following is the dotted-decimal notation of the above address:
117.149.29.2
Conn…
Conn…
Conn…
Conn…
Conn…
IPv4 addresses are divided into two
categories:
Public address: The public address is also
known as an external address as they are
grouped under the WAN addresses
Private address: A private address is also
known as an internal address, as it is grouped
under the LAN addresses
10.0.0.0 - 10.255.255.255 (10/8 prefix)
172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
private address
192.168.0.0 - 192.168.255.255 (192.168/16 prefix)
Port address
There are two different ways to map the IP address into the MAC
address, which are given below:
o Static Mapping
o Dynamic Mapping
Internet Control Message Protocol (ICMP)
Internet Control Message Protocol (ICMP) is a network layer protocol