0% found this document useful (0 votes)
17 views

بروتوكولات الشبكة

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

بروتوكولات الشبكة

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 88

University of Technology

Computer Science

Network Protocols
2023-2024
Second Class

Dr. Asia Ali


Network Protocols

2nd course lecture 1

Subject: Physical Layer in OSI Model


EIA/TIA-232
EIA/TIA-449
TU-T-V-Series
DSL

Lecturer: Dr. Asia Ali


 Physical Layer
As you may have learned from the last year course, the OSI models divides computer network architecture into 7 layers
in a logical progression. The lower layers deal with electrical signals, chunks of binary data, and routing of these data
across networks. Higher levels cover network requests and responses, representation of data, and network protocols as
seen from a user's point of view. This lecture is about the physical layer and what type of communication used.
The most popular serial communications standard in use is certainly the EIA/TIA–232–E specification. This standard,
which has been developed by the Electronic Industry Association and the Telecommunications Industry Association
(EIA/TIA), is more popularly referred to simply as “RS–232” where “RS” stands for “recommended standard”. In recent
years, this suffix has been replaced with “EIA/TIA” to help identify the source of the standard. The official name of the
EIA/TIA–232–E standard is “Interface between Data Terminal Equipment and Data Circuit–Termination Equipment
Employing Serial Binary Data Interchange.
1. EIA-232, EIA-422, EIA-485, EIA-232 (also called RS-232)
defines the functional and mechanical characteristics of the interface between data terminal equipment, typically a
computer, and data communications equipment, typically a modem or terminal server.
In data transmission, every link in the data chain must be reliable. Cable is often the weak link in a poorly designed.
Incorrect cable can result in:
- lost or corrupted data
- damaged equipment
- invalid monitoring results
- lost time and even operator injury.
Straight-through cables connect computers or terminals to modems. Null modem cables connect two computers together,
eliminating the need for modems. Null modem cables should cross all the signals over in a prescribed manner, however
many commercially made "Null modem" cables do not follow the prescribed standard fully or correctly.
- The EIA-232 standard includes one transmit wire, one receive wire and a single reference ground for transmit, receive
and all hardware control signals. It is used for inexpensive, relatively slower communications for short distances.
- Data rates of up to 115K (some special chips can support faster speeds) for short distances but speed decreases with
distance; practical limits are usually 9600-38400 baud with longer cable runs
- Distances from 50-100 feet, depending on environment.
- Can only be used for point-to-point communications.
- The need for 12V to drive RS-232 often led to some complexity in early computer power supplies.
- On PCs, 25-pin and (beginning with the IBM-PC/AT) 9-pin plugs were used for the RS-232 serial ports; 25-pin sockets were used
for parallel ports. See figure 1

Figure 1- 25 pin, 9 pin connectors


RS–232 is a “complete” standard. This means that the standard sets out to ensure compatibility between the host and
peripheral systems by specifying:
1) Common voltage and signal levels,
2) Common pin wiring configurations, and
3) A minimal amount of control information between the host and peripheral systems.
Unlike many standards which simply specify the electrical characteristics of a given interface, RS–232 specifies electrical,
functional, and mechanical characteristics in order to meet the above three criteria. Each of these aspects of the RS–232
standard is discussed below.
a. Electrical Characteristics
The electrical characteristics section of the RS–232 standard includes specifications on voltage levels, rate of change of signal
levels, and line impedance. The RS–232 standard also limits the maximum slew rate at the driver output. The impedance of
the interface between the driver and receiver has also been defined.
b. Functional Characteristics
Since RS–232 is a “complete” standard, it includes more than just specifications on electrical characteristics. The second
aspect of operation that is covered by the standard concerns the functional characteristics of the interface. This essentially
means that RS–232 has defined the function of the different signals that are used in the interface. These signals are divided
into four different categories: common, data, control, and timing. Table 1 illustrates the signals that are defined by the RS–
232 standard.
RS–232 IN MODEM APPLICATIONS
Modem applications are one of the most popular uses for the RS–232 standard. Figure 4 illustrates a typical modem
application utilizing the RS–232 interface standard. As can be seen in the diagram, the PC is the DTE and the modem is the
DCE. Communication between each PC and its associated modem is accomplished using the RS–232 standard.
Communication between the two modems is accomplished via telecommunication. It should be noted that although a
microcomputer is usually the DTE in RS–232 applications, this is not mandatory according to a strict interpretation of the
standard

Data Terminal Equipment (DTE) And Data Communications Equipment (DCE)

Figure 2- a typical modem application utilizing the RS–232 interface standard


2. The RS-449, EIA-449 or TIA-449.
The RS-449 specification, also known as EIA-449 or TIA-449, defines the functional and mechanical characteristics of the
interface between data terminal equipment and data communications equipment. Data rates to 2 Mbit/s.
3-Digital Subscriber Line (DSL)
DSL is a high-speed Internet service for homes and businesses that competes with cable and other forms of broadband
Internet. DSL provides high-speed networking over ordinary phone lines using broadband modem technology. The technology
behind DSL enables Internet and telephone service to work over the same phone line without requiring customers to
disconnect either their voice or Internet connections.
DSL : Stands for "Digital Subscriber Line." DSL is a communications medium used to transfer digital signals over standard
telephone lines. Along with cable Internet, DSL is one of the most popular ways ISPs provide broadband Internet access.
When you make a telephone call using a landline, the voice signal is transmitted using low frequencies from 0 Hz to 4 kHz. This
range, called the "voice band," only uses a small part of the frequency range supported by copper phone lines. Therefore, DSL
makes use of the higher frequencies to transmit digital signals, in the range of 25 kHz to 1.5 MHz. While these frequencies are
higher than the highest audible frequency (20 kHz), then can still cause interference during phone conversations. Therefore,
DSL filters or splitters are used to make sure the high frequencies do not interfere with phone calls. Symmetric DSL (SDSL) splits
the upstream and downstream frequencies evenly, providing equal speeds for both sending and receiving data.
4-ITU-T V series
Data communication over the telephone network. specify the protocols that govern approved modem communication
standards and interfaces.
WHAT DOES THE International Telecommunication union (ITU) DO?
The Study Groups of ITU’s Telecommunication Standardization Sector (ITU-T) assemble experts from around the world to
develop international standards known as ITU-T Recommendations which act as defining elements in the global infrastructure
of information and communication technologies (ICTs).
Standards are critical to the interoperability of ICTs and whether we exchange voice, video or data messages, standards
enable global communications by ensuring that countries’ ICT networks and devices are speaking the same language.
ITU has three main areas of activity organized in ‘Sectors’ which work through conferences and meetings.
- Satellites enable phone calls, television programmes, satellite navigation and online maps.
- Space services are vital in monitoring and transmitting changes in such data as ocean temperature and greenhouse gases –
helping us predict famines, the path of a hurricane, or how the global climate is changing.
- Wireless communications, particularly to provide broadband services, demonstrates the need for global solutions to
address the need for additional radio spectrum allocations and harmonized standards to improve interoperability.
Network Protocols

2nd course lecture 2

Subject: Continue with the Physical Layer


▪ IEEE 802.3
▪ IEEE 802.11
▪ IEEE 802.15
▪ IEEE 802.16
▪ Bluetooth
▪ OSI MODEL
▪ TCP/IP MODEL
▪ An introduction to the Network Layer

Lecturer: Dr. Asia Ali


IEEE 802.3
IEEE 802.3 is a working group and a collection of Institute of Electrical and Electronics Engineers (IEEE) standards produced by
the working group defining the physical layer and data link layer's media access control (MAC) of wired Ethernet*. This is
generally a local area network (LAN) technology with some wide area network (WAN) applications. Physical connections are
made between nodes and/or infrastructure devices (hubs, switches, routers) by various types of copper or fibre cable.

*Ethernet is a way of connecting computers together in a local area network or LAN. It has been the most widely used method of
linking computers together in LANs since the 1990s. The basic idea of its design is that multiple computers have access to it and
can send data at any time.
IEEE 802.11
is a set of media access control (MAC) and physical layer (PHY) specifications for implementing wireless local area network
(WLAN) computer communication in the 900 MHz and 2.4, 3.6, 5, and 60 GHz frequency bands. They are created and
maintained by the Institute of Electrical and Electronics Engineers (IEEE) LAN/MAN Standards Committee (IEEE 802). The base
version of the standard was released in 1997, and has had subsequent amendments.
IEEE 802.15
IEEE 802.15 is the IEEE working group for Wireless Personal Area Networks (WPANs). The working group is developing standards
for short- range communications of devices within a personal operating space. A personal wireless network consists of mobile
devices such as a handheld or pocket computer, PDA, mobile.
The initial version, 802.15.1, was adapted from the Bluetooth specification and is fully compatible with Bluetooth 1.1.
The IEEE 802.15 Working Group proposes two general categories of 802.15, called TG4 (low rate) and TG3 (high rate).
The TG4 version provides data speeds of 20 Kbps or 250 Kbps.
The TG3 version supports data speeds ranging from 11 Mbps to 55 Mbps.
Additional features include the use of up to 254 network devices, dynamic device addressing, support for devices in which
latency is critical, full handshaking, security provisions, and power management.
IEEE 802.16
802.16 is a group of broadband wireless communications standards for metropolitan area networks (MANs) developed by a
working group of the Institute of Electrical and Electronics Engineers (IEEE). It designed for line-of-sight propagation. The
frequency range between 10-66 GHZ. For data transfer the standard uses the following methods:
Time-division multiplexing (TDM) is a method of putting multiple data streams in a single signal by separating the signal into
many segments, each having a very short duration. Each individual data stream is reassembled at the receiving end based on
the timing.
Time division multiple access (TDMA) is a channel access method (CAM) used to facilitate channel sharing without
interference. TDMA allows multiple stations (senders)to share and use the same transmission channel by dividing signals into
different time slots.

Time division duplex (TDD) refers to duplex communication links where uplink is separated from downlink by the allocation of
different time slots in the same frequency band. Users are allocated time slots for uplink and downlink transmission.

Frequency-division duplexing (FDD) is a full-duplex communications link that uses two different radio frequencies for
transmitter and receiver operation. One frequency is used to communicate in one direction, and the other frequency is
required to communicate in the opposite direction.
Bluetooth
Basics:
- Wireless LAN (WLAN) technology enables device connectivity to infrastructure-based services through a wireless carrier
provider.
- Personal area network (PANs) has emerged as the need for personal devices to communicate wirelessly with one another,
without an established infrastructure.
- Bluetooth employs radio frequency (RF) technology for communication. It makes use of frequency modulation to generate
radio waves in the ISM band.
- Low power consumption of Bluetooth technology.
- Offered range of up to 10 meters.
- Video and data transmission 1 M/bit
- The first attempt to define a standard for PANs dates back to Ericsson's Bluetooth project in 1994 to enable communication
between mobile phones using low power and low-cost radio interfaces.
Recently, IEEE has approved a Bluetooth-based standard (IEEE 802.15.1) for wireless personal area networks (WPANs).
ISO/OSI reference model
•presentation: allow applications to interpret meaning of data, e.g., encryption, compression,
machine-specific conventions
•session: synchronization, checkpointing, recovery of data exchange
•Internet stack “missing” these layers!
❖these services, if needed, must be implemented in application
TCP/IP MODEL
Internet protocol stack
•application: supporting network applications
❖FTP, SMTP, HTTP
•transport: process-process data transfer
❖TCP, UDP
•network: routing of datagrams from source to destination
❖IP, routing protocols
•link: data transfer between neighboring network elements
❖Ethernet, 802.111 (WiFi), PPP
•Physical: bits “on the wire
• Network Layer
The Network Layer is concerned with sending the information from the source S all the way to the destination D. This may
require making many hops at intermediate routers along the way.

To achieve this goal the Network Layer must know about the topology of the communication subnet (i.e. the set of routers)
and chose appropriate path through it. The S and D may be in general on different networks, which operate according to
different protocols in some layers. Some of the possibilities various networks can differ;
- Services offered(connection or connectionless)
- Protocols(IP, IPX, ATM)
- Packet size (every network has its own maximum)
- Error handling
- Flow control
- Congestion control
- Security(encryption, privacy rules)
•When two or more networks are connected they form an internet. It is up to the Network Layer to deal with all problems
related to transmission of information through an internet.
The Internet Protocol (IP)
•The glue that holds the whole Internet together is the Network Layer Protocol, or Internet Protocol (IP). The IP was designed
from the beginning for internetwork operation (unlike most of the older network layer protocols). The main job of IP is to
provide a best-effort service to transport information frames (datagrams) from source S to destination D without regard to
belonging of S and D to any particular network.

•The Internet operates in a packet-switched mode. The IP in each host (that communicate directly over the Internet) has a
unique Internet-wide address assigned to it. This is known as the host’s Internet Address, or more usually, host’s IP Address.
Each IP address has two parts: a Network Number/Identifier (netid) and a Host Number/Identifier (hostid). The allocation of
netids is centrally managed by the Internet Corporation for Assigned Names and Numbers (ICANN).
Each access network (e.g. a campus’s LAN) has a unique netid assigned to it. The IP address of a host
attached to an access network contains the unique netid of the access network and a unique hostid of a
given host. Hostids are also centrally allocated, but this time by the local administrator of the access network
to which host is attached.
•Communication in the Internet works as follows.
- The Transport Layer takes data stream and breaks them into frames.
- The source’s IP first adds the S and D IP addresses to the head of each PDU, together with an indication
of the source protocol, TCP or UDP, (TCP – Transmission Control Protocol provides reliable service;
UDP-User Datagram Protocol provides best-effort service).
- The generated new PDU is known as an IP Datagram.
- The IP then forwards the IP datagram to its local network gateway. At this point the IP datagram is often
called a packet.
Network Protocols

2nd course lecture 3

Subject: The Network Layer


 IP (v4 ,and v6)
 The Address Resolution Protocol (ARP) and the Reverse ARP (RARP)
 The Open Shortest Path First (OSPF) protocol
 The Internet Control Message Protocol (ICMP)
 The Internet Group Management Protocol (IGMP)
 The IP datagrams (IPv4)

Lecturer: Dr. Asia Ali


Continue with the Internet Protocol (IP)
Each access gateway is attached to an *internetwork router see Figure 1, and at regular intervals, the IP in these routers
exchange routing information by updating their routing tables. The routing table allows the router to route a packet/datagram
to any other networks/netids that make up the Internet.
On receipt of the packet the router reads the destination netid (D-netid) from the packet header and uses its routing table to
forward the packet on the route through the global internetwork, first to the destination internetwork router, and from there
to the destination access gateway. The destination gateway reads the hosid part of the destination IP address and forwards the
packet to the identified host. The IP in the host strips off the header from the packet and passes the payload to the peer
transport layer protocol indicated in the packet header.

In order to perform various tasks which were summarised on the previous lecture and here, the IP uses a number of
Adjunct Protocols. The role of each protocol is as follows:
*Internetworking the process or technique of connecting different networks by using intermediary devices such as routers or gateway devices. simply an internet.
The Open Shortest Path First (OSPF) protocol is one of major routing protocols used in global IP internetwork. Such protocol
is present in each internet-work router and it is used to build up the routing tables which are used to route the packet across
the global internetwork. However, full operation of internetwork requires to use a few auxiliary (adjunct) protocols, such as
ARP, RARP, ICMP, IGMP, etc.

•The Address Resolution Protocol (ARP) and the Reverse ARP (RARP) are used by the IP in all hosts that are attached to a
broadcast LAN (e.g. Ethernet) to determine the MAC address of a host or gateway given its IP address (APR), and, in case of
RARP, the reverse function of determining the IP address of a host given its MAC address.

•The Internet Control Message Protocol (ICMP) is used by the IP in a host or gateway routers to exchange information with
the IP in another host or gateway about possible transmission errors or to send the other control messages.

•The Internet Group Management Protocol (IGMP) is used with multicasting to enable a host to send a copy of a datagram
to the other hosts that are part of the same multicast group.

Unicast means sending a message from one node to another node in the network; it is also called one to one.
Multicast means sending a packet or simply a message from one node to many nodes in the network.
Broadcast means sending one packet /message from one node to all nodes in the network.
The IP datagrams (IPv4)
•The Header (H) has 20-byte Fixed Part (FP) and a variable Options (Op) part (40 bytes). Total 20 to 60 bytes.
•The Header includes a number of fields:
The Version field which defines the version of IP used to create the datagram (needed to ensure that all systems processing the datagram
during its transfer from S to D across the Internet interpret all fields correctly).
The current version is 4 and the IP is referred to as IP version 4 or IPv4.
•The Intermediate Header Length (IHL)
specifies the actual length of the header in multiples of 32–bit (4- byte) words.
The minimum length (without Options) is 5. The IHL indicates the end of a Header and start of Payload. The IHL field is 4 bits, so maximum
permissible length is 2^4-1=15=(1111). This limits the Header to 32*15=480 bits=60 bytes.
• IP Header Payload (IP Data)
•The IP is a connectionless protocol and all data are transferred in the payload part of a datagram (or packet). The IP datagram consists of a
Header part and a Payload part each of which contains a number of fields
IP addressing (IPv4)
•Each host, gateway and router has a unique Internet-wide IP address (IP = netid + hostid). In case of a host/computer, the
netid identifies the network to which the host is attached, the hostid identifies the host on this network. In case of an access
gateway or router, each network interface of the gateway or router has different netid assigned to it, i.e. the gateway or
router may have a few IP addresses for each interface. In IPv4 all IP ad-dresses are 32 bits long, which means that there are
232=4,294,967,296 different addresses. Network addressing affects efficiency and implementation of Internet routing and
transmission of datagrams within routers.

•There are 5 different schemes used for assigning IP addresses:


(i) Class-based addresses also known as Classful addressing: A 32-bit address space is divided into 5 address classes: A, B, C, D,
E. Each of the classes A, B, C has a defined boundary between the netid part and hosid part of the address space; Class D is
used for multicasting; class E is reserved.

(ii) Subnetting: It is designed to overcome the problem of need of large number of IP addresses for a site which has many
LANs attached to one IP router. With subnetting only a single IP address is required at each site.

(iii) Classless addresses (CIDR): The network part of an IP address is not constrained to the fixed class boundary. It can be any
number of bits. This leads to a more efficient use of the total address space.

(iv) Network address translation (NAT): For each access network only a single IP address is allocated, and this is used by all
hosts when communicating outside of their local access network. For communicating within the access network every host is
assigned its private IP address.
(v) IPv6: This is a completely new version of IP (version 6). It was developed to overcome the limited address space of IPv4
by increasing of the address space to 128 bit.

The 32-bit address space is divided into 5 different address formats (address classes). A, B, C are used for unicast (between
a pair of hosts); D for multicast. The IP address formats are shown in figure 2. Each class is intended for use with a
different size of network. The class to which an address belongs is determined by the position of first 0 bit in the first 4
bits. The remaining bits specify the netid and hostid parts with fixed boundaries.

IPv4 addressing – Class-based addresses


•Class A is marked by 0 as a first bit; the next 7 bits are used for the netid and 24 bits for hostid.
•Class B is marked by 10 as first two bits.
•Class C is marked by 110 as first three bits.
•Class D is marked by 1110 as first 4 bits.
•Class E is marked by 1111 as first 4 bits.
•The first bits indicating class in each address, are fixed and cannot be changed.
•Class A addresses are suitable for net-works with large number of hosts (up to 224).
•Class C is suitable for large number of networks each attached to a small number of hosts (up to 28=256).
•Class B is just right balance of A and C.
•Class D is for multicast use. In case of LANs the group address is a MAC address and the class D IP address extends this
mode of operation to the complete Internet.
Examples of classful addresses: 00001010 00000000 00000000 00000000 = 10.0.0.0 – class A, netid 10 10000000
00000011 00000010 00000011 = 128.3.2.3 – class B, netid 128.3. hostid 2.3 The presentation of all classful addresses is
simplified by dividing 32 bits into 4 bytes; each byte then is converted into its equivalent decimal form; the total IP
address is represented as 4 decimal numbers with a dot between them – dotted decimal notation.

Figure 2- The IP address formats


The range of possible host addresses for each class (in dotted decimal notations) are shown below:

Important: Observe that each class has a fixed number of the most significant bits (msbs). These bits are called a prefix.
This is necessary in order to fix the position of the first 0 bit on the left which determines the corresponding class. This in
turn means that, for example, all Class C addresses will have the prefix 110 which must be kept unchanged for all Class C
addresses. Therefore, in Class C there are in total (24-3)=21 bits to be used for netids, i.e. Class C address can handle in
total 221 = 2,097,152 networks (not 224 = 16, 777,216 networks!). One also should exclude all 0s and all 1s as they are for
the special netid addresses which are discussed next.
Network Protocols

2nd course lecture 4

Subject: IP v4
 Classes
 IP Mask

Lecturer: Dr. Asia Ali

1
Continue with class-based addresses also known as classful addressing (IPv4)

Class A: 00000000.00000000.00000000.00000000 to 1 byte=8 bits


01111111.11111111.11111111.11111111 Example: 192.1.1.1
Network Hosts
In decimal notation:
Class A: 0.0.0.0 to 1st Octet 2nd Octet 3rd Octet 4th Octet
:127.255.255.255

Network Hosts

Class B: 10000000.00000000.00000000.00000000 to
10111111.11111111.11111111.11111111
Network Hosts

In decimal: 128.0.0.0 to
191.255.255.255

Network Hosts
2
Class C: 11000000.00000000.00000000.00000000 to
11011111.11111111.11111111.11111111

Network Hosts

In decimal: 192.0.0.0 to
223.255.255.255
Network
Hosts

Class D: 11100000.00000000.00000000.00000000 to
11101111.11111111.11111111.11111111

Multicast address
In decimal: 224.0.0.0 to
239.255.255.255

3
Class E: 11110000.00000000.00000000.00000000 to
11111111.11111111.11111111.11111111

Reserved for future


use
In decimal: 240.0.0.0 to
240.255.255.255

As you know the 8 bit =1 byte, the most significant bit is 27 and least significant bit is 20 as shown
Each bit in the 8 bit format: 0 0 0 0 0 0 0 0

27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1

Note that when we say the address starts from 0 to 255 it means=256, the highest number you can see is 255.

4
HW:
Q\ In which class are the following IP addresses?
1- 10.10.10.1
2- 20.90.1.5
3-162.90.220.20
4- 127.1.1.200
5- 129.1.1.1
6- 200.1.1.200
7- 190.10.40.50
8- 226.30.60.10
9- 245.1.0.1
10- 216.255.255.0

5
IP Mask
Example: Which portion of the following IP address is network and which is the host ID:
IP:192.168.1.15
MASK:255.255.255.0

Solution: The first step is to write down the binary representation for the IP address and the MASK, put first the binary
representation of the IP address then the binary representation of the MASK value.

IP:192.168.1.15
11000000.10101000.00000001.00001111
AND
MASK: 11111111.11111111.11111111.00000000
AND OPERATION: 1AND 1=1,
11000000.10101000.00000001.00000000
0 AND 0=0
1 AND 0=0
192.168.1.0/24 bit The result is always first host IP address 0 AND 1=0

Note that the 24 bit is represent the network and the left IP 192.168.1.0 address is the host.
The mask “on” or (1) bits= network portion of the IP. Hence, counting the number of 1’s in the mask you will know directly
that the 24 bit is received for the net work and the remaining 8 bit is for hosts.

6
Example: if we have the mask 255.255.0.0 , IP: 192.168.1.35 what is the network and host

Solution: The first step is to write down the binary representation for the IP address and the MASK, put first the binary
representation of the IP address then the binary representation of the MASK value.

IP:192.168.1.35
11000000.10101000.00000001.00100011 AND
MASK: 11111111.11111111.00000000.00000000

The result:11000000.10101000.00000000.00000000 The result is always first host IP address

As we have explained before the number of 1’s in mask address represent the network so counting the 1’s will show, the 16
bits are for the network and the remaining values o’s are for the hosts addresses.
MASK: 11111111.11111111.00000000.00000000

network Host id(s)

As the result above shows 11000000.10101000.00000000.00000000 which is equivalent to 192.168.0.0/16 bit


network and 16 bit host address

7
Example: IP:192.168.1.15 if the mask is 255.255.255.0 then the class is C. as shown below:
IP:192.168.1.15
11000000.10101000.00000001.00001111

Class c
The mask 255.255.255.0 is : 11111111.11111111.11111111.00000000

Now if we change the mask from 255.255.255.0 to 255.0.0.0 how many network and hosts are available?
The mask value 255.0.0.0 which means the
IP:192.168.1.15
11000000.10101000.00000001.00001111 AND
MASK: 11111111.00000000.00000000.00000000
The result:11000000.00000000.00000000.00000000 The result is always first host IP address

The result: 192.0.0.0/8bit, this means the 8 bit only for the network and the remaining bits are to define hosts

8
More about the mechanism of the MASK
Example: IP:10.25.3.99
Mask: 255.255.0.0
What is the network, host, number of bits for the network?

Solution: first we focus on the Mask, the first octet is 255, the second octet is 255 which means 16 bit is for the
Network and the other 16 bit is for the host .

Hence, the IP:10.25.3.99

16 bit for network 16 bit for host

Do you think the first host address is :10.25.0.0/16 bit is right or not?

9
Network Protocols

2nd course lecture 5

Subject: IP v4
 Sub-netting

Lecturer: Dr. Asia Ali

1
Creating New IP Networks By Borrowing(stealing) Host Bits
How to divide the IP address that can have one network and divide it to increase the number of the networks using the same IP
Follow the Rules:
1- Identify the number of subnet needed.
2- How many bits to give
3- Identify the number of bits to sacrifice.(ex. 2 host bit)
4- Let everyone know.(modify the mask).
Example: if we have the following topology, and we need to create three subnets and fit them all in the IP: 192.168.5.0/24
R3

R5
Subnet Subnet B
R2 Subnet
A
R2 C
R6
R1

1- The solution is to use the sub netting.


2- The above IP address (192.168.5.0/24) can be interpreted as the following
IP:192.168.5.0
Mash:255.255.255.0
3- We need to take some of the host bits and give them to the network address.
4- As you can see that the mask value is showing that 24 bits are already for the network. However, we need more for the
sub netting. hence, we will steal some bits from the host. The last byte (8 bits) in the mask value is for the host.
2
We need to create three subnet, follow the rules in the previous slide.
1- Identify the number of subnets needed ( 3 sub nets)
2- Identify the number of bits to sacrifice (2 bits).
As you know the 8 bit =1 byte, the most significant bit is 27 and least significant bit is 20 as shown
Each bit in the 8 bit format: 0 0 0 0 0 0 0 0
27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1
Host
0 0 The first IP for the 1st subnet: 192.168.5.0
0 1
1 0 The second IP for the 2nd subnet:192.168.5.64
1 1
The third IP for the 3rd subnet: 192.168.5.128
Network The 4th subnet IP:192.168.5.192

IP:192.168.5.0/26 bit because(24 bits+2 bits)=26 bits


The mask value should now changed according to the above changes. We have taken 2 bits from the host these are in
position 27 and 26 =128+64=192 
The new Mask address= 255.255.255.192
Now: what is the address for the 3 created subnets?

3
IP:192.168.5.0
11000000.10101000.00000101.00000000
AND
New MASK: 11111111.11111111.11111111.11000000
AND OPERATION: 1 AND 1=1,
New IP :11000000.10101000.00000101.00000000
0 AND 0=0
1 AND 0=0
The first subnet address IP:192.168.5.0 0 AND 1=0

There is another method that we can use to determine the second subnet and the third subnet:
Computing the block size for the subnet.
Bit used: 1 2 3 4 5 6 7 8
Mask value: 128 192 224 240 248 252 254 255
Weight: 128 64 32 16 8 4 2 1
1 1

This is the block size for each subnet which means: the 1st subnet IP: 192.168.5.0 +64
This is the block size for each subnet which means: the 2nd subnet IP: 192.168.5.64 +64
This is the block size for each subnet which means: the 3rd subnet IP: 192.168.5.128 +64
This is the block size for each subnet which means: the 3rd subnet IP: 192.168.5.192

4
Example: Suppose you have the IP:10.0.0.0/8 bit(Mask)----- > this is a standard Mask
Net Mask : 255.0.0.0
How many bits we need to create 42 subnets?

Solution: (1)- we need to know how many bits we have to take from the given IP address to create 42 subnets
I need to know how many bits should I use to represent 42 subnets, is 25 is enough ? No, it gives us only 32
Sub net while we need 42 subnet. Hence, we need a bigger number the 26 this will give us 64 more than enough for us
because we need 42.
(2)-table
Bit used: 1 2 3 4 5 6 7 8 (4)- This is the value for the New Mask:
Mask value: 128 192 224 240 248 252 254 255 The given mask is 8 bit it was:255.0.0.0
Weight: 128 64 32 16 8 4 2 1 To create the subnets we added 6 bits to
1 1 1 1 1 1 Create the sub nets New Mask:255.252.0.0
8 bits+6 bits=14 bits
Host
Network 0 (3) -The block size specify
4 the address of the
8 subnets
12
16
20

5
The new Mask is 8 bit+ new 6 bits=12 bits for the new mask
New Mask :255.252.0.0

(5)-The addresses for the created subnets, add the block size
to each new subnet starting from zero as follow:
1st subnet: 10.0.0.0/14 bit +4
2nd subnet:10.4.0.0/14 bit +4
3rd subnet:10.8.0.0/14 bit +4
4th subnet:10.12.0.0/14 bit +4
5th subnet:10.16.0.0/14 bit +4
6th subnet :10.20.0.0/14 bit +4
7th subnet: 10.24.0.0/14 bit +4
.…….etc

It is important to follow this rule to determine the subnets:


1- Determine Block Size (B.S.)-LSB of new Mask.
2- Begin at zero, then add B.S. to create the subnets

6
Example: suppose you have the IP:10.0.0.0/8 bit (Mask)----- > this is a standard Mask
Network Mask : 255.0.0.0
How many bits we need to create 5-12 subnets?

Solution: (1)-we need to know how many bits we have to take from the given IP address to create 5-12 subnets
I need to know how many bits should I use to represent 5-12 subnets, is 24 is enough ?yes it give us 16 more than
enough for us because we need maximum 12 subnets.
(2)- table (4)-This means we took 4 bits from
Bit used: 1 2 3 4 5 6 7 8 the 24 host bits, then the New mask
Mask value: 128 192 224 240 248 252 254 255 will be (8 bit+4 bits)=12 bit
Weight: 128 64 32 16 8 4 2 1 New Mask:255.240.0.0
1 1 1 1
(3)- The block size specify
the address of the
subnets we add Block size
to each new subnet

(5)- The addresses for the created subnets:


1st subnet: 10.0.0.0/12 bit 6th subnet: 10.80.0.0/12 bit
2nd subnet:10.16.0.0/12 bit 7th subnet:10.96.0.0/12 bit
3rd subnet:10.32.0.0/12 bit 8th subnet:10.112.0.0/12 bit
4th subnet:10.48.0.0/12 bit 9th subnet:10.128.0.0/12 bit
5th subnet:10.64.0.0/12 bit …….etc 7
Example: suppose you have the IP:10.50.0.0/16 bit (Mask), create 5-12 subnets?

Solution: (1)-we need to know how many bits we have to take from the given IP address to create 5-12 subnets
I need to know how many bits should I use to represent 5-12 subnets, is 24 is enough ? yes it give us 16 more than
enough for us because we need maximum 12 subnets.
(2)- table
Bit used: 1 2 3 4 5 6 7 8 (4)-This means we took 4 bits from
Mask value: 128 192 224 240 248 252 254 255 the 16 host bits, then the New mask
Weight: 128 64 32 16 8 4 2 1 will be (16 bit+4 bits)=20 bit
1 1 1 1 0 0 0 0 New Mask:255.255.240.0
(3)- The block size specify
the address of the
subnets we add Block size
to each new subnet

(5)- The addresses for the created subnets:


1st subnet: 10.50.0.0/20 bit 6th subnet: 10.50.80.0/20 bit
2nd subnet:10.50.16.0/20 bit 7th subnet: 10.50.96.0/20 bit
3rd subnet:10.50.32.0/20 bit 8th subnet:10.50.112.0/20 bit
4th subnet:10.50.48.0/20 bit 9th subnet:10.50.128.0/20 bit
5th subnet:10.50.64.0/20 bit …….etc
8
Example: suppose you have the IP:25.35.65.0/24 bit (Mask), create 5-6 subnets?

Solution: (1)- we need to know how many bits we have to take from the given IP address to create 5-6 subnets
I need to know how many bits should I use to represent 5-6 subnets, is 23 is enough ?yes it give us 8 more than
enough for us because we need maximum 6 subnets.
(2)- table
Bit used: 1 2 3 4 5 6 7 8 (4)-This means we took 3 bits from
Mask value: 128 192 224 240 248 252 254 255 the 8 host bits, then the New mask
Weight: 128 64 32 16 8 4 2 1 will be (24 bit+3 bits)=27 bit
1 1 1 1 0 0 0 0 New Mask:255.255.255.224
(3) -The block size specify
the address of the
subnets we add Block size
to each new subnet

(5)- The addresses for the created subnets: Or we can write them as:
1st subnet: 25.35.65.0/27 bit x.x.x.0
2nd subnet:25.35.65.32/27 bit x.x.x.32
3rd subnet:25.35.65.64/27 bit x.x.x.64
4th subnet:25.35.65.96/27 bit x.x.x.96
5th subnet:25.35.65.128/27 bit x.x.x.128
6th subnet: 25.35.65.160/27 bit x.x.x.160
9
Example: IP: X.X.0.0 / 16 bit mask. Create 5-12 subnets.
Hint: even if I have not given you the mask in such question you should know it is 16 bit because I have ggiven you the network
part as X.X, the X(s) it means what ever the values are not important..
Solution: (1)-we need to know how many bits we have to take from the given IP address to create 5-12 subnets
I need to know how many bits should I use to represent 5-12 subnets, is 24 is enough ?yes it give us 16 more than
enough for us because we need maximum 12 subnets.
(2)- table
Bit used: 1 2 3 4 5 6 7 8 (4)-This means we took 4 bits from
Mask value: 128 192 224 240 248 252 254 255 the 16 host bits, then the New mask
Weight: 128 64 32 16 8 4 2 1 will be (16 bit+4 bits)=20 bit
1 1 1 1 0 0 0 0 New Mask:255.255.240.0
(3)- The block size specify
the address of the
subnets we add Block size
to each new subnet
(5)- The addresses for the created subnets:
1st subnet: X.X.0.0/20 bit 6th subnet: X.X.80.0/20 bit
2nd subnet:X.X.16.0/20 bit 7th subnet: X.X.96.0/20 bit
3rd subnet:X.X.32.0/20 bit 8th subnet:X.X.112.0/20 bit
4th subnet:X.X.48.0/20 bit 9th subnet:X.X.128.0/20 bit
5th subnet:X.X.64.0/20 bit …….etc
10
HW:
IP:X.X.0.0, take five bits to represent 5-12 subnet, show us the subnet and the new mask
value?

11
Network Protocols

2nd course lecture 6

Subject: IP v4
➢ Subnets
➢ Host Addresses in the Subnet
➢ Identifying The Subnet Range
➢ Mask and the Valid Host Addresses

Lecturer: Dr. Asia Ali

1
IPv4-addressing- Subnetting
The rule for any single class A, B, C address is that the address must refer to one
network (netid) only. If a site’s network consists of a few LANs connected via repeater
hubs the rule means that each network must have its own netid.

In subnetting the same address classes and associated structure are used. The netid is
considered as the Internet part. The hostid part consists of two subfields: a subnetid
part and a local hostid part (together they are called the local part) with no rigid
boundaries between them.

Figure (a) shows a standard class B address structure. Figure (b) shows an example of
the address of class B using subnetting (In the example the initial 16 bits hostid is
divided into two equal parts of 8 bits each for subnet and a local hostid. In general the
division (split) of the hostid part is arbitrary).

To implement subnetting the main router needs to know which class is used for
addressing and to use a subnet mask or an address mask. The subnet mask indicates
the split between (network + subnet) part i.e. (netid + subnetid) and a host part (i.e.
hostid) of the address. Subnet mask consists of binary 1s in those bit positions that
contain a (netid + subnetid) part of the address, and binary 0s in positions that
contain the hostid. Figure below shows schematically the subnet mask for a class B
address (a zero bit is in the second position).

Using dotted decimal notation the mask can be written as:


11111111 11111111 11111100 00000000
= 255.255.252.0.
An alternative notation is 255.255.252.0/22
to indicate that the subnet mask is 22 bits long. Sometime in literature the concept of
default mask is also used.
The default mask is a part of the subnet mask which corresponds to netid only, i.e. 1s
for netid part of the address and 0s for subnetid and hostid part. In the example above
of the class B address the default mask is:
11111111 11111111 00000000 00000000 =255.255.0.0.
Example of subneted address:
SA = 32.84.56.10 = 00100000 01010100 00111000 00001010.

This is class A address (since it starts with a 0 bit).

Suppose this address is associated with the following subnet mask: SM=11111111
11111111 11100000 00000000=255.255.224.0/19.

In order to recover the netid part, the subnetid part, and the hostid part, it is necessary
to carry out a Boolean AND operation of the address SA and the mask SM: SA&&SM

00100000 01010100 00111000 00001010. AND OPERATION


11111111 11111111 11100000 00000000

00100000 01010100 001|00000 00000000


Here the vertical bar (|) indicates the hostid part (to the right). Thus, the netid is given
by the red bits 00100000 (first 8 bits in class A). The subnetid is given by the blue bits
01010100 001 (between the netid part and the hostid part). The hostid part is easy
found from the SA address once we know the netid and the subnetid. The hostid is
11000 00001010.
Boolean AND operation obeys the following rule:

example it is necessary to find Boolean A and B (which is sometime denoted as A&&B),


where A=SA is the subnetted address, and B=SM is the subnet mask:
SA = 32.84.56.10 = 00100000 01010100 00111000 00001010
SM = 255.255.224.0 = 11111111 11111111 11100000 00000000
SA&&SM (Boolean) = 00100000 01010100 00100000 00000000
netid subnetid hostid part
Example:

Subnettings
Sub-netting is logically dividing the network by
extending the 1 s used in SNM

Addressing without applying sub-nets


The network here is : 172.16.0.0

Addressing with applying Subnets


Addressing with applying sub-nets
Listing Valid Host Addresses In The Subnet
To find out the IP address of the Host(s) we need to follow the following rules:
1- List subnet(s)
2-First host :Subnet+1 (first octet)
3-last host: Next subnet-2
4- Broadcast address: Next subnet-1
Example: if we have the following topology, and we need to create seven subnets to be fit in the IP: X.X.X.0/24 bit.
Also, find out the valid IP addresses for the host(s) in one of the created subnets.

subnet1

R3 subnet3
subnet7
subnet5 R5
subnet6
R2
R4
R6 subnet4
R1

subnet2

Solution:
1- Our major network is X.X.X.0/24 bit, and we need to add 7 subnets. This means we need 3 bits to be taken from the MSB of the
available octet i.e the one that is not already taken for the network.
(2)- table
Bit used: 1 2 3 4 5 6 7 8 (4)-This means we took 3 bits from
Mask value: 128 192 224 240 248 252 254 255 the 8 host bits, then the New mask
Weight: 128 64 32 16 8 4 2 1 will be (24 bit+3 bits)=27 bit
1 1 1 0 0 0 0 0 New Mask:255.255.255.224 or
:X.X.X.224
(3) -The block size specify
the address of the
subnets we add Block size
to each new subnet
(5)- The addresses for the created subnets:
1st subnet: X.X.X.0/27 bit In this example I will take the subnet:X.X.X.128,and find out hosts
2nd subnet:X.X.X.32/27 bit address. And follow the indicated rules
3rd subnet:X.X.X.64/27 bit 1- First Host subnet+1:X.X.X.129
4th subnet:X.X.X.96/27 bit 2- last host: next subnet-2:X.X.X.158
5th subnet:X.X.X.128/27 bit 3- board casting address:X.X.X.159
6th subnet: X.X.X.160/27 bit
7th subnet: X.X.X.192/27 bit
Identifying The Subnet Range
To find out the IP address of the Host(s) we need to follow the following rules:
1- List subnet(s)
2-First host :Subnet+1 (first octet)
3-last host: Next subnet-2
4- Broadcast address: Next subnet-1

Q1- You have the IP address: X.X.0.0/16 bit, find 15 new subnets, show the valid IP host for the first 4 subnets.

(1)- table
Bit used: 1 2 3 4 5 6 7 8 (3)-This means we took 4 bits from
Mask value: 128 192 224 240 248 252 254 255 the 8 host bits, then the New mask
Weight: 128 64 32 16 8 4 2 1 will be (16 bit+4 bits)=20 bit
1 1 1 1 0 0 0 0 New Mask:255.255.240.0 or
:X.X.240.0

(2) -The block size specify


the address of the
subnets we add Block size
to each new subnet
(4)- The addresses for the created subnets:
1st subnet: X.X.0.0/20 bit 8th subnet: X.X.112.0/20 bit
2nd subnet:X.X.16.0/20 bit 9th subnet:X.X.128.0/20 bit
3rd subnet:X.X.32.0/20 bit 10th subnet:X.X.144.0/20 bit
4th subnet:X.X.48.0/20 bit 11th subnet:X.X.160.0/20 bit
5th subnet:X.X.64.0/20 bit 12th subnet:X.X.176.0/20 bit…….etc
6th subnet: X.X.80.0/20 bit
7th subnet: X.X.96.0/20 bit

Subnet First host IP Last host IP broadcast


X.X.0.0 X.X.0.1 X.X.15.254 X.X.15.255
X.X.16.0 X.X.16.1 X.X.31.254 X.X.31.255
X.X.32.0 X.X.32.1 X.X.47.254 X.X.47.255
X.X.48.0 X.X.48.1 X.X.63.254 X.X.63.255
Example: If we have X.0.0.0/8 bit, and we need to create 120 new subnets do the following
1- list only first seven subnets
2- first host for the subnets(from 2- to 5) only.
3- last host for the subnets (from 2- to 5) only.
4- broadcast address for the subnets(from 2- to 5) only.

(1)- table (3)-This means we took 7 bits from


Bit used: 1 2 3 4 5 6 7 8 the 8 host bits, then the New mask
Mask value: 128 192 224 240 248 252 254 255 will be (8 bit+7 bits)=15 bit
Weight: 128 64 32 16 8 4 2 1 New Mask:255.254.0.0 or
1 1 1 1 1 1 1 0 :X.254.0.0

(2) -The block size specify


the address of the
subnets we add Block size
to each new subnet
(4)- The addresses for the created subnets:
Subnet First host IP Last host IP broadcast
1st subnet: X.0.0.0/15 bit
2nd subnet:X.2.0.0/15 bit X.2.0.0 X.2.0.1 X.3.255.254 X.3.255.255
3rd subnet:X.4.0.0/15 bit
4th subnet:X.6.0.0/15 bit X.4.0.0 X.2.0.1 X.5.255.254 X.5.255.255
5th subnet:X.8.0.0/15 bit X.6.0.0 X.6.0.1 X.7.255.254 X.7.255.255
6th subnet: X.10.0.0/15 bit
X.8.0.0 X.8.0.1 X.9.255.254 X.9.255.255
7th subnet: X.12.0.0/15 bit
Mask and the Valid Host Addresses
Process:
1- count number of host bits available.
2-use(digits=host bits)
3- subtract 2(cannot assign subnet or broadcast to an interface)
Example: What if we have a mask/27 bit how many valid IP addresses will fit?

Solution:
1- we need to compute the value for the host address that can be vaild in a subnet.
Ipv4 is 32 bit and the mask value is 27 bit, 32-27=5 bits are for the host addresses
The mask 27 means X.X.X.0
Mask
(2)- table
Bit used: 1 2 3 4 5 6 7 8
Mask value: 128 192 224 240 248 252 254 255
Weight: 128 64 32 16 8 4 2 1
1 1 1 0 0 0 0 0

Network Host
block size
(4)- The addresses for the created subnets: Subnet First host IP Last host IP broadcast
1st subnet: X.X.X.0/27 bit
2nd subnet:X.X.X.32/27 bit X.X.X.0 X.X.X.1 X.X.X.30 X.X.X.31
3rd subnet:X.X.X.64/27 bit X.X.X.32 X.X.X.33 X.X.X.62 X.X.X.63
4th subnet:X.X.X.96/27 bit
5th subnet:X.X.X.128/27 bit X.X.X.64 X.X.X.65 X.X.X.94 X.X.X.95
X.X.X.96 X.X.X.97 X.X.X.126 X.X.X.127
Example: What if we have a mask/30 bit how many valid HOST IP addresses will fit?
Solution:
1- we need to compute the value for the host address that can be valid in a subnet.
Ipv4 is 32 bit and the mask value is 30 bit, 32-30=2 bits are for the host addresses
The mask 30 means X.X.X.252
Mask
(2)- table
Bit used: 1 2 3 4 5 6 7 8
Mask value: 128 192 224 240 248 252 254 255
Weight: 128 64 32 16 8 4 2 1
1 1 1 1 1 1 0 0

block size

Subnet First host IP Last host IP broadcast


The addresses for the created subnets:
1- subnet: X.X.X.0 X.X.X.0 X.X.X.1 X.X.X.2 X.X.X.3
2- subnet:X.X.X.4 X.X.X.4 X.X.X.5 X.X.X.6 X.X.X.7
3- subnet:X.X.X.8
X.X.X.8 X.X.X.9 X.X.X.10 X.X.X.11
4- subnet:X.X.X.12
X.X.X.12 X.X.X.13 X.X.X.14 X.X.X.15
Network Protocols

2nd course lecture 7

Subjects:
 Network layer protocols(IPX/ISX, IPsec)
 Transport layer.
 Application layer protocols.
 Data link layer protocol.

Lecturer: Dr. Asia Ali


Continue With Network Layer Protocols
SPX (Sequenced Packet Exchange)
SPX Stands for "Sequenced Packet Exchange." SPX is networking protocol primarily used by Novell Netware, but is also supported
by other operating systems. It is now considered a legacy protocol since it has largely been replaced by TCP/IP. SPX is the
transport layer of the IPX/SPX protocol and IPX is the network layer.

Internet Protocol Security (IPsec)


IPsec is a network protocol suite that authenticates and encrypts the packets of data sent over a network.
• IPsec includes protocols for establishing mutual authentication between agents at the beginning of the session and
negotiation of cryptographic keys to use during the session.
• IPsec can protect data flows between a pair of hosts (host-to-host), between a pair of security gateways (network-to-
network), or between a security gateway and a host (network-to-host).
• Internet Protocol security (IPsec) uses cryptographic security services to protect communications over Internet Protocol (IP)
networks.
• IPsec supports network-level peer authentication, data-origin authentication, data integrity, data confidentiality (encryption),
and replay protection.
• IPsec is an end-to-end security scheme operating in the Internet Layer of the Internet Protocol Suite, while some other
Internet security systems in widespread use, such as Transport Layer Security (TLS) and Secure Shell (SSH), operate in the
upper layers at the Transport Layer (TLS) and the Application layer (SSH).
• IPsec can automatically secure applications at the IP layer.
Transport layer protocols
1. Transmission Control Protocol (TCP)
is one of the main protocols of the Internet protocol suite. It originated in the initial network implementation in which it
complemented the Internet Protocol (IP). Therefore, the entire suite is commonly referred to as TCP/IP. TCP provides reliable,
ordered, and error-checked delivery of a stream of octets (bytes) between applications running on hosts communicating by an IP
network. Major Internet applications such as the World Wide Web, email, remote administration, and file transfer rely on TCP.
Applications that do not require reliable data stream service may use the User Datagram Protocol(UDP), which provides a
connectionless datagram service that emphasizes reduced latency over reliability.

2. User Datagram Protocol (UDP)


UDP is one of the core members of the Internet protocol suite. With UDP, computer applications can send messages, in this case
referred to as datagrams, to other hosts on an Internet Protocol (IP) network. Prior communications are not required in order to
set up communication channels or data paths.
UDP uses a simple connectionless communication model with a minimum of protocol mechanism. UDP provides checksums for
data integrity, and port numbers for addressing different functions at the source and destination of the datagram. It has no
handshaking dialogues, and thus exposes the user's program to any unreliability of the underlying network; There is no
guarantee of delivery, ordering, or duplicate protection. If error-correction facilities are needed at the network interface level, an
application may use the Transmission Control Protocol (TCP) or Stream Control Transmission Protocol (SCTP) which are designed
for this purpose. UDP is suitable for purposes where error checking and correction are either not necessary or are performed in
the application; UDP avoids the overhead of such processing in the protocol stack.
Application layer protocols
This category includes protocols from the Application Layer of the Internet Protocol Suite as well as the protocols of
OSI Layer 7. The Application Layer of the Internet Protocol Suite includes Session Layer protocols and Presentation
Layer protocols from OSI.
1. Border Gateway Protocol (BGP)
BGP is a standardized exterior gateway protocol designed to exchange routing and reachability information among
autonomous systems (AS) on the Internet. The protocol is often classified as a path vector protocol but is sometimes
also classed as a distance-vector routing protocol.
The BGP makes routing decisions based on paths, network policies, or rule-sets configured by a network
administrator and is involved in making core routing decisions. BGP may be used for routing within an autonomous
system. In this application it is referred to as Interior Border Gateway Protocol, Internal BGP, or iBGP. In contrast, the
Internet application of the protocol may be referred to as Exterior Border Gateway Protocol, External BGP, or eBGP.
2. File Transfer Protocol (FTP)
FTP is a standard network protocol used for the transfer of computer files between a client and server on a computer network.
FTP is built on a client-server model architecture and uses separate control and data connections between the client and the
server FTP users may authenticate themselves with a clear-text sign-in protocol, normally in the form of a username and
password, but can connect anonymously if the server is configured to allow it. For secure transmission that protects the
username and password, and encrypts the content, FTP is often secured with SSL/TLS (FTPS).
3. Dynamic Host Configuration Protocol (DHCP)
DHCP is a network management protocol used on TCP/IP networks whereby a DHCP server dynamically assigns an IP
address and other network configuration parameters to each device on a network so they can communicate with
other IP networks.
A DHCP server enables computers to request IP addresses and networking parameters automatically from the
Internet Service Provider (ISP), reducing the need for a network administrator or a user to manually assign IP
addresses to all network devices. In the absence of a DHCP server, a computer or other device on the network needs
to be manually assigned an IP address.
DHCP can be implemented on networks ranging in size from home networks to large campus networks and regional
Internet service provider networks. A router or a residential gateway can be enabled to act as a DHCP server.
Within a local network, a DHCP server assigns a local IP address to each device connected to the network.

4. Domain Name System (DNS)


DNS is a hierarchical decentralized naming system for computers, services, or other resources connected to the
Internet or a private network. It associates various information with domain names assigned to each of the
participating entities. Most prominently, it translates more readily memorized domain names to the numerical IP
addresses needed for locating and identifying computer services and devices with the underlying network protocols.
5. Hypertext Transfer Protocol (HTTP)
HTTP is an application protocol for distributed, collaborative, and hypermedia information systems. HTTP is the foundation of
data communication for the World Wide Web. Hypertext is structured text that uses logical links (hyperlinks) between nodes
containing text.
HTTP is the protocol to exchange or transfer hypertext.
6. Internet Message Access Protocol (IMAP)
In computing, the Internet Message Access Protocol (IMAP) is an Internet standard protocol used by e-mail clients to retrieve e-
mail messages from a mail server over a TCP/IP connection. IMAP was designed with the goal of permitting complete
management of an email box by multiple email clients; therefore clients generally leave messages on the server until the user
explicitly deletes them.
Virtually all modern e-mail clients and servers support IMAP. IMAP and the earlier POP3 (Post Office Protocol) are the two most
prevalent standard protocols for email retrieval, with many webmail service providers such as Gmail, Outlook.com and Yahoo!
Mail also providing support for either IMAP or POP3.

7. Network News Transfer Protocol (NNTP)


NNTP is an application protocol used for transporting Usenet news articles (netnews) between news servers and for reading and
posting articles by end user client applications. Readers and posters logged into these computers reading the articles directly
from the local disk. As local area networks and Internet participation increased, it became desirable to allow newsreaders to be
run on personal computers connected to local networks. The resulting protocol was NNTP, which resembled the Simple Mail
Transfer Protocol (SMTP) but was tailored for exchanging newsgroup articles. A newsreader, also known as a news client, is a
software application that reads articles on Usenet, either directly from the news server's disks or via the NNTP.
8. Network Time Protocol (NTP)
NTP is a networking protocol for clock synchronization between computer systems over packet-switched, variable-latency data
networks.
The protocol is usually described in terms of a client-server model, but can as easily be used in peer-to-peer relationships where
both peers consider the other to be a potential time source. They can also use broadcasting or multicasting, where clients
passively listen to time updates after an initial round-trip calibrating exchange. NTP supplies a warning of any impending leap
second adjustment, but no information about local time zones or daylight saving time is transmitted.

9. Post Office Protocol (POP)


In computing, the Post Office Protocol (POP) is an application-layer Internet standard protocol used by local e-mail clients to
retrieve e-mail from a remote server over a TCP/IP connection. POP has been developed through several versions, with version 3
(POP3) being the last standard in common use before largely being made obsolete by the more advanced IMAP as well as
webmail.

10. Routing Information Protocol (RIP)


RIP is one of the oldest distance-vector routing protocols which employ the hop count as a routing metric. RIP prevents routing
loops by implementing a limit on the number of hops allowed in a path from source to destination. The largest number of hops
allowed for RIP is 15, which limits the size of networks that RIP can support. RIP implements the split horizon, route poisoning
and hold-down mechanisms to prevent incorrect routing information from being propagated.
11. Session Initiation Protocol (SIP)
SIP is a communications protocol for signalling and controlling multimedia communication sessions in applications of Internet
telephony for voice and video calls, in private IP telephone systems, as well as in instant messaging over Internet Protocol (IP)
networks.
The protocol defines the specific format of messages exchanged and the sequence of communications for cooperation of the
participants. SIP is a text-based protocol, incorporating many elements of the Hypertext Transfer Protocol (HTTP) and the Simple
Mail Transfer Protocol (SMTP).

12. Simple Mail Transfer Protocol (SMTP)


SMTP is an Internet standard for electronic mail (email) transmission which is the protocol in widespread use today.
Although electronic mail servers and other mail transfer agents use SMTP to send and receive mail messages, user-level client
mail applications typically use SMTP only for sending messages to a mail server for relaying. For retrieving messages, client
applications usually use either IMAP or POP3.
SMTP communication between mail servers uses TCP port 25. Mail clients on the other hand, often submit the outgoing emails
to a mail server on port 587. Despite being deprecated, mail providers sometimes still permit the use of nonstandard port 465
for this purpose.
13. Simple Network Management Protocol (SNMP)
SNMP is an Internet Standard protocol for collecting and organizing information about managed devices on IP networks and
for modifying that information to change device behaviour. Devices that typically support SNMP include cable modems,
routers, switches, servers, workstations, printers, and more.
SNMP is widely used in network management for network monitoring. SNMP exposes management data in the form of
variables on the managed systems organized in a management information base (MIB) which describe the system status and
configuration. These variables can then be remotely queried (and, in some circumstances, manipulated) by managing
applications.
14. Telnet is a protocol
Telnet is a protocol used on the Internet or local area networks to provide a bidirectional interactive text-oriented
communication facility using a virtual terminal connection. User data is interspersed in-band with Telnet control information in
an 8-bit byte oriented data connection over the Transmission Control Protocol (TCP).

15. Network File System (NFS) is a protocol that allows UNIX and Linux systems remotely mount each other's file
systems.
Data Link Layer Protocols
1. Address Resolution Protocol (ARP)
ARP is a communication protocol used for discovering the link layer address associated with a given IPv4 address, a
critical function in the Internet protocol suite. ARP is used for mapping a network address such as an IPv4 address.

2. Point-to-Point Protocol (PPP)


PPP is a data link layer (layer 2) communications protocol used to establish a direct connection between two nodes. It connects
two routers directly without any host or any other networking device in between. It can provide connection authentication,
transmission encryption and compression.
PPP is used over many types of physical networks including serial cable, phone line, cellular telephone, specialized radio links,
and fiber optic links.
Network Protocols

2nd course lecture 8

Subject:
 Data link layer protocol.

Lecturer: Dr. Asia Ali


Data-link layer
Data-link layer has the responsibility of transferring data gram from one node to physically adjacent node over a link. The data
link layer is divided into two sublayers: Logical Link Control (LLC) and Media Access Control (MAC).
The LLC sublayer manages communications between devices over a single link of a network. The MAC sublayer governs
protocol access to the physical network medium.
Main Services Provided by Data link layer
• Framing
• ErrorControl
• FlowControl

The main job of elementary data link layer protocols is to receive packets from network layer, create the frame and send it to
physical layer, or vice versa.
Layer 2 protocols specify the encapsulation of a packet into a frame. For the data to be transferred across a number
of different media, different media access control methods may be required during a single communication.
Each network environment that packets encounter as they travel from a local host to a remote host can have different
characteristics.

The media access control methods described by the Data Link layer protocols define the processes by which network
devices can access the network media and transmit frames in diverse network environments.
Elementary data link layer protocols:
The main job of elementary data link layer protocols is to receive packets from network layer, create the frame and send it
to physical layer, or vice versa. These are some elementary data link layer protocols:

An Unrestricted Simplex Protocol (SP) =one direction transmitted data


A simplex Stop-and-Wait Protocol(SWP) = Flooding control
A Simplex Protocol for a Noisy Channel(SPN) =limit send and receive between sender and receiver, capacities are limited

The next three protocols are bidirectional protocols that belong to a class called sliding window protocols.
Sliding Window Protocols: The bidirectional protocols that belong to a class called sliding window protocols.
A One-Bit Sliding Window Protocol(SWP) =1-assign variable 2- define frame 3-accept frame
A Protocol Using Go Back N protocol=Discarding & Buffering
A Protocol Using Selective Repeat(SRP)= accept and buffer delay and effected frames without ACK
• Go Back N Protocol
If there is one frame k missing, the receivers imply discards all subsequent frames k+1,k+2…., sending no
acknowledgments. So, the sender will retransmit frames from k on wards. This can be a waste of band width.

• Selective repeat Protocol SRP


Another strategy is to re-send only the ones that are actually lost or damaged. The receiver buffers all the
frames after the lost one. When the sender finally noticed the problem (e.g. no ack for the lost frame is
received within time- out limit), the sender retransmits the frame in question.
PPP–Point to Point Protocol
Carry network data of any network layer protocol at the same time Error detection (no correction) Has a very simple
mechanism for error control (A CRC field is used to detect errors) Does not provide flow control Connection life, signal link,
negotiator.

Address Resolution Protocol(ARP)


The delivery of a packet to a host or a router requires two levels of addressing: logical and physical.
ARP Maps IP addresses to MAC addresses
ARP Request is a broadcast, but ARP reply is Unicast.
ARP tables contain the MAC and IP addresses of other devices on the network
• Spanning Tree Protocol (STP)
Spanning Tree Protocol (STP) was developed to prevent the broadcast storms caused by switching loops. Spanning
Tree Protocol (STP) is a Layer2 protocol that runs on bridges and switches. The main purpose of STP is to ensure
that you do not create loops when you have redundant paths in your network.

A bridge is a product that connects a local area network (LAN) to another local area network that uses the
same protocol.
Routing allows multiple networks to communicate independently and yet remain separate, whereas bridging connects
two separate networks as if they were a single network.
The method of media access control used depends on:
•Media sharing and how the nodes share the media
•Topology - How the connection between the nodes appears to the Data Link layer.
Media Access Control for Shared Media
Some network topologies share a common medium with multiple nodes. At any one time, there may be a number of devices
attempting to send and receive data using the network media. There are rules show how these devices share the media.
There are two basic media access control methods for shared media:
•Controlled - Each node has its own time to use the medium
•Contention-based - All nodes compete for the use of the medium
1- Controlled Access for Shared Media
When using the controlled access method, network devices take turns, in sequence, to access the medium. This method is also
known as scheduled access or deterministic. If a device does not need to access the medium, the opportunity to use the
medium passes to the next device in line. When one device places a frame on the media, no other device can do so until the
frame has arrived at the destination and has been processed by the destination.
Although controlled access is well-ordered and provides predictable throughput, deterministic methods can be inefficient
because a device has to wait for its turn before it can use the medium.
2- Contention-based Access for Shared Media
To prevent complete chaos on the media, these methods use a Carrier Sense Multiple Access (CSMA) process to first detect if
the media is carrying a signal.

CSMA/Collision Detection
In CSMA/Collision Detection (CSMA/CD), the device monitors the media for the presence of a data signal. If the media is free,
the device transmits the data. If signals are then detected that show another device was transmitting at the same time, all
devices stop sending and try again later.
CSMA/Collision Avoidance
In CSMA/Collision Avoidance (CSMA/CA), the device examines the media. If the media is free, the device sends a notification
across the media of its intent to use it. The device then sends the data. This method is used by 802.11 wireless networking
technologies.
Media Access Control for Non-Shared Media

Media access control protocols for non-shared media require no control before placing frames onto the media. In point-to-
point topologies, the media interconnects just two nodes. In this arrangement, the nodes do not have to share the media with
other hosts or determine if a frame is destined for that node. Therefore, Data Link layer protocols have little to do for
controlling non-shared media access.

Full Duplex and Half Duplex


In point-to-point connections, the Data Link layer has to consider whether the communication is half-duplex or full-duplex.

Half-duplex communication means that the devices can both transmit and receive on the media but cannot do so
simultaneously. Ethernet has established arbitration rules for resolving conflicts arising from instances when more than one
station attempts to transmit at the same time.

In full-duplex communication, both devices can transmit and receive on the media at the same time. The Data Link layer
assumes that the media is available for transmission for both nodes at any time. Therefore, there is no media arbitration
necessary in the Data Link layer. The details of a specific media access control technique can only be examined by studying a
specific protocol.
Full-duplex communication Half-duplex communication

You might also like