بروتوكولات الشبكة
بروتوكولات الشبكة
Computer Science
Network Protocols
2023-2024
Second Class
*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
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.
(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.
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
Subject: IP v4
Classes
IP Mask
1
Continue with class-based addresses also known as classful addressing (IPv4)
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
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
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
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 .
Do you think the first host address is :10.25.0.0/16 bit is right or not?
9
Network Protocols
Subject: IP v4
Sub-netting
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
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
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
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
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
Subject: IP v4
➢ Subnets
➢ Host Addresses in the Subnet
➢ Identifying The Subnet Range
➢ Mask and the Valid Host Addresses
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).
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
Subnettings
Sub-netting is logically dividing the network by
extending the 1 s used in SNM
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
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
Subjects:
Network layer protocols(IPX/ISX, IPsec)
Transport layer.
Application layer protocols.
Data link layer protocol.
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.
Subject:
Data link layer protocol.
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:
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.
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.
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