3. Four levels of addresses are used in an internet
employing the OSI and TCP/IP protocols:
◦ Physical address
Ex. Ethernet address, machine address, MAC address
◦ Logical address
IP address
◦ Port number
◦ Specific Names
URL, Email address, domain name
5. PHYSICALADDRESS
•When referring to computers in general or computer
memory, the physical address is the computer memory
address of a physical hardware device.
•When referring to a network address, physical address is
sometimes used to describe the MAC address.
• This is specified by the manufacturer company of the card.
• This address is used by data link layer.
6. MAC address:
• A hardware address that uniquely identifies each node of a
network.
• consist of 48 bits (six bytes) that are presented as 12
hexadecimal digits separated by colons or dashes
• Format of the MAC address:
MM:MM:MM:SS:SS:SS
or
MM-MM-MM-SS-SS-SS
• The first half of the MAC address contains the ID number of
the adapter manufacturer (OUI). These IDs are regulated by an
Internet standards organization. The second half of the MAC
address represents the serial number assigned to the adapter by
the manufacturer.
7. Some link-layer protocols define three types of addresses:
• Unicast
• Multicast
• Broadcast
IEEE Project 802
in 1985, the Computer Society of the IEEE started a project,
called Project 802, to set standards to enable
intercommunication among equipment from a variety of
manufacturers.
it is a way of specifying functions of the physical layer and
the data-link layer of major LAN protocols.
8. The IEEE has subdivided the data-link layer into two sublayers:
1. Logical Link Control (LLC)
2. Media Access Control (MAC)
Logical Link Control (LLC)
In IEEE Project 802, flow control, error control, and part of the
framing duties are collected into one sublayer called the logical
link control (LLC). Framing is handled in both the LLC
sublayer and the MAC sublayer.
The LLC provides a single link-layer control protocol for all
IEEE LANs. This means LLC protocol can provide
interconnectivity between different LANs because it makes the
MAC sublayer transparent.
9. Media Access Control (MAC)
IEEE Project 802 has created a sublayer called media
access control that defines the specific access method for
each LAN. For example, it defines CSMA/CD as the media
access method for Ethernet LANs and defines the token-
passing method for Token Ring and Token Bus LANs. As
we mentioned in the previous section, part of the framing
function is also handled by the MAC layer.
11. LOGICALADDRESS
The identifier used in the IP layer of the TCP/IP protocol suite to
identify the connection of each device to the Internet is called
the Internet Protocol address or IP address.
This address is the combination of Net ID and Host ID
IPAddress versions:
1. IP version 4 (IPv4)
2. IP version 6 (IPv6)
12. IPv4 Address
Is a 32 bit long address, represented in 3 common notations in
binary, dotted-decimal and hexadecimal notations.
In binary notation, an IPv4 address is displayed as 32 bits. To
make the address more readable, one or more spaces are usually
inserted between each octet (8 bits).
To make the IPv4 address more compact and easier to read, it is
usually written in decimal form with a decimal point (dot)
separating the bytes. This format is referred to as dotted-decimal
notation (between 0-255).
IPv4 in hexadecimal digit is equivalent to four bits, this means
that a 32-bit address has 8 hexadecimal digits. This notation is
often used in network programming.
14. IPv4 Network Addressing:
1. Classful Addressing
2. Classless Addressing
CLASSFULADDRESSING
IPv4 address was designed with a fixed-length prefix, but to
accommodate both small and large networks, three fixed-
length prefixes were designed instead of one (n = 8, n = 16,
and n = 24). The whole address space was divided into five
classes (class A, B, C, D, and E). This scheme is referred to as
classful addressing. The first address is the network address
and the last address is the broadcast address.
15. Class AAddress
Network address ranges from 0 – 127 (the first bit always
starts with “0”)
But only 1-126 different networks is usable (N.H.H.H)
127 network is reserved for loopback functions
16,777,214 hosts per network
Subnet mask is /8 or 255.0.0.0
Class B Address
Network address ranges from 128 – 191 (the first 2 bits always
starts with “10”)
16,384 different networks (N.N.H.H)
65,534 hosts per networks
Subnet mask is /16 or 255.255.0.0
16. Class C Address
Network address ranges from 192 – 223 (the first 3 bits always
starts with “110”)
2,097,152 different network (N.N.N.H)
254 hosts per network
Subnet mask is /24 or 255.255.255.0
Class D Address
used for multicast addresses
From 224 – 239 (the first 4 bits starts with “1110”)
Class E Address
From 240 – 255 (first 4 bits of the address starts with “1111”)
Used as experimental addresses
18. Classless Addressing
In classless addressing, variable-length blocks are used that belong to
no classes. We can have a block of 1 address, 2 addresses, 4 addresses,
128 addresses, and so on.
In classless addressing, the whole address space is divided into
variable length blocks. The prefix in an address defines the block
(network); the suffix defines the node (device). Theoretically, we can
have a block of 20
, 21
, 22
, . . . , 232
addresses.
We can say that classful addressing is a special case of classless
addressing.
19. The first question that we need to answer in classless addressing is how to
find the prefix length if an address is given. Since the prefix length is not
inherent in the address, we need to separately give the length of the prefix. In
this case, the prefix length, n, is added to the address, separated by a slash.
The notation is informally referred to as slash notation and formally known
as classless interdomain routing or CIDR strategy. In other words, an
address in classless addressing does not, per se, define the block or network
to which the address belongs; we need to give the prefix length also.
20. Extracting Information from an Address
Given any address in the block, we normally like to know three pieces
of information about the block to which the address belongs: the
number of addresses, the first address in the block, and the last
address. Since the value of prefix length, n, is given, we can easily find
these three pieces of information.
1. The number of addresses in the block is found as N = 232−n
.
2. To find the first address, we keep the n leftmost bits and set the (32
− n) rightmost bits all to 0s.
3. To find the last address, we keep the n leftmost bits and set the (32
− n) rightmost bits all to 1s.
21. Example:
A classless address is given as 167.199.170.82/27. Find the
three pieces of information for the number of addresses in a
network, network address and broadcast address.
22. Address Mask
Another way to find the first and last addresses in the block is to use the
address mask. The address mask is a 32-bit number in which the n
leftmost bits are set to 1s and the rest of the bits (32 − n) are set to 0s. A
computer can easily find the address mask because it is the complement
of (2(32 − n)
− 1). The reason for defining a mask in this way is that it can
be used by a computer program to extract the information in a block,
using the three bit-wise operations NOT, AND, and OR.
1. The number of addresses in the block N = NOT (mask) + 1.
2. The first address in the block = (Any address in the block) AND
(mask).
3. The last address in the block = (Any address in the block) OR [(NOT
(mask)].
23. Example:
A classless address is given as 167.199.170.82/27. Using the
address mask find the above three pieces of information for the
number of addresses in a network, network address and
broadcast address.
24. IPv6 Address
The sixth version of the Internet Protocol
The main reason for migration from IPv4 to IPv6 is the number
of the address space in IPv4.
An IPv6 address is 128 bits or 16 bytes (octets) long, four times
the address length in IPv4.
2128
: about 340 billion billion billion billion different addresses
• 340, 282, 366, 920, 938, 463, 374, 607, 431, 768, 211, 456
48 bits 16 bits 64 bits
128 bits
Internet Routing Subnet ID Interface ID
25. Representation
A computer normally stores the address in binary, but it is clear that
128 bits cannot easily be handled by humans. Several notations have
been proposed to represent IPv6 addresses when they are handled by
humans. The following shows two of these notations: binary and
colon hexadecimal.
Binary notation is used when the addresses are stored in a computer.
The colon hexadecimal notation (or colon hex for short) divides the
address into eight sections, each made of four hexadecimal digits
separated by colons.
26. IPv6 Address Types:
1. Unicast Address - A unicast address defines a single interface (computer or
router). The packet sent to a unicast address will be routed to the intended
recipient.
2. Anycast Address - defines a group of computers that all share a single address.
A packet with an anycast address is delivered to only one member of the group,
the most reachable one. An anycast communication is used, for example, when
there are several servers that can respond to an inquiry. The request is sent to the
one that is most reachable. The hardware and software generate only one copy
of the request; the copy reaches only one of the servers.
3. Multicast Address - A multicast address also defines a group of computers.
However, there is a difference between anycasting and multicasting. In
anycasting, only one copy of the packet is sent to one of the members of the
group; in multicasting each member of the group receives a copy.
28. Colon hexadecimal notation:
addresses are written using 32 hexadecimal digits.
digits are arranged into 8 groups of four to improve the readability.
Groups are separated by colons
805B:2D9D:DC28:0000:0000:FC57:D4C8:1FFF
Dotted-Decimal notation:
addresses are written using 16 decimal digits.
digits are arranged into 4 groups of four to improve the readability.
Groups are separated by dot
128.91.45.157.220.40.0.0.0.0.252.87.212.200.31.255
29. Abbreviation
Although an IPv6 address, even in hexadecimal format, is very long,
many of the digits are zeros. In this case, we can abbreviate the address.
The leading zeros of a section can be omitted. Using this form of
abbreviation, 0074 can be written as 74, 000F as F, and 0000 as 0.
Further abbreviation, often called zero compression, can be applied to
colon hex notation if there are consecutive sections consisting of zeros
only. We can remove all the zeros and replace them with a double
colon.
Note that this type of abbreviation is allowed only once per address. If
there is more than one run of zero sections, only one of them can be
compressed.
30. Leading Zero Suppressed notation:
compression can only be used to compress a single contiguous series
of 16-bit blocks of zeros(“0”) expressed in colon hexadecimal
notation.
You cannot use zero compression to include part of a 16-bit block.
Example of IPv6 Leading Zero Suppressed address:
From the original Colon Hexadecimal notation:
805B:2D9D:DC28:0000:0000:FC57:D4C8:1FFF
805B:2D9D:DC28:0:0:FC57:D4C8:1FFF
31. Zero Compressed notation:
To further simplify the representation of IPv6 addresses, a contiguous
sequence of 16-bit blocks set to 0 in the colon hexadecimal format can
be compressed to “::” (double-colon).
This abbreviation is allowed only once per address.
Example of IPv6 Zero Compressed address
From the original Colon Hexadecimal notation:
805B:2D9D:DC28:0000:0000:FC57:D4C8:1FFF
805B:2D9D:DC28::FC57:D4C8:1FFF
32. Mixed notation:
The notation is mixed with hexadecimal and decimal digits
Example of IPv6 Mixed notation address
From the original Colon Hexadecimal notation:
805B:2D9D:DC28:0000:0000:FC57:D4C8:1FFF
805B:2D9D:DC28::FC57:212.200.31.255
33. The question is, since we are using the zero
compression method to simplify IPv6 address, how
can we determine the number of zero “0” bits that
were compressed and represented by “::”?
34. To determine the number of 0 bits represented by the “::”
1. count the number of blocks in the compressed address
2. (-) subtract this number from 8
3. (*) multiply the result by 16.
Example:
4. 805B:2D9D:DC28::FC57:D4C8:1FFF
5. FF02::2
36. Port Address/Number
Logical entities for Internet communication.
Ports are 16-bit numbers, and the combination of source and
destination port numbers together with the IP addresses of the
communicating end systems uniquely identifies a session of a given
transport protocol.
Port numbers are also known by their associated service names such
as "telnet" for port number 23 and "http" (as well as "www" and
"www-http") for port number 80.
Reference: https://www.iana.org/ and https://ietf.org/
37. Purpose of Ports:
1. it provides a demultiplexing identifier to differentiate transport
sessions between the same pair of endpoints.
2. it also identifies the application protocol and associated service to
which processes connect.
Port Number Groups:
1. the System Ports, also known as the Well Known Ports, from 0-1023
2. the User Ports, also known as the Registered Ports, from 1024-49151
3. the Dynamic Ports, also known as the Private or Ephemeral Ports,
from 49152-65535
*Group 1 and 2 are ports assigned by IANA.
38. Assignable Port States based on the RFC 6335 document of the IETF:
1. Assigned: Assigned port numbers are currently assigned to the
service indicated in the registry.
2. Unassigned: Unassigned port numbers are currently available for
assignment upon request, as per the procedures outlined in this
document.
3. Reserved: Reserved port numbers are not available for regular
assignment; they are "assigned to IANA" for special purposes.
Reserved port numbers include values at the edges of each range,
e.g., 0, 1023, 1024, etc., which may be used to extend these ranges
or the overall port number space in the future.
39. In summary, Ports are used in various ways, notably:
1.as endpoint process identifiers
2.as application protocol identifiers
3.for firewall-filtering purposes
40. Application Protocol Transport Protocol Port Number/Address
File Transfer Protocol
(FTP)
TCP
20/21
Secure Shell (SSH) TCP 22
Telnet TCP 23
Simple Mail Transfer
Protocol (SMTP)
TCP
25
Domain Name System
(DNS)
UDP
53
Dynamic Host
Configuration Protocol
(DHCP)
UDP
67/68
Hypertext Transfer
Protocol (HTTP)
TCP
80
Post Office Protocol
(POP) version 3
TCP
110
Hypertext Transfer
Protocol over SSL/TLS
(HTTPS)
TCP
443
42. Uniform Resource Identifier (URI)
provides a simple and extensible means for identifying a resource. This
specification of URI syntax and semantics is derived from concepts
introduced by the World Wide Web global information initiative, whose
use of these identifiers dates from 1990 and is described in "Universal
Resource Identifiers in WWW" [RFC1630].
URI uniquely specifies how a client can locate a particular resource and
access it so it can be used.
URIs are subdivided into two Uniform Resource Locators (URLs) and
Uniform Resource Names (URNs)
43. Uniform Resource Locator (URL)
refers to the subset of URIs that, in addition to identifying a resource, provide a
means of locating the resource by describing its primary access mechanism (e.g.,
its network "location").
text strings that allow a resource such as a file or other object to be labeled based
on its location on an internetwork and the primary method or protocol by which it
may be accessed. URLs have become the most common type of Uniform
Resource Identifier (URI) used for application layer addressing in TCP/IP
because of their simplicity.
The most general form of syntax for a URL contains only two elements, which
correspond to the two pieces of information just described:
<scheme>:<scheme-specific-part>
44. Uniform Resource Locator (URL)
The term scheme refers to a type of access method, which describes the way that
the resource is to be used; it usually refers to either an application protocol, such
as “http” or “ftp”, or a resource type such as “file”. A scheme name must contain
only letters, plus signs (“+”), periods (“.”) and hyphens (“-”). In practice, they
usually contain only letters. Schemes are case-insensitive but usually expressed in
lower case.
The rest of the URL after the scheme (and the required colon separator) is
scheme-specific-part. This is necessary because various protocols and access
methods require different types and quantities of information to identify a
particular resource.
Example:
https://mail.google.com/mail/u/0/?tab=wm#inbox
45. Characters and Special Encodings
URLs are normally expressed in the standard US ASCII character set, which is
the default used by most TCP/IP application protocols. Certain characters in the
set are called unsafe, because they have special meaning in different contexts,
and including them in a URL would lead to ambiguity or problems in of how
they should be interpreted. The “space” character is the classical “unsafe”
character because spaces are normally used to separate URLs, so including one in
a URL would break the URL into “pieces”. Other characters are “unsafe” because
they have special significance in a URL, such as the colon (“:”).
The “safe” characters in a URL are alphanumerics (A to Z, a to z and 0 to 9) and
the following special characters: the dollar sign (“$”), hyphen (“-”), underscore
(“_”), period (“.”), plus sign (“+”), exclamation point (“!”), asterisk (“*”),
apostrophe (“'”), left parenthesis (“(”), and right parenthesis (“)”). All other
“unsafe” characters can be represented in a URL using an encoding scheme
consisting of a percent sign (“%”) followed by the hexadecimal ASCII value of
the character.
47. Uniform Resource Name (URN)
are intended to serve as persistent, location-independent, resource identifiers and
are designed to make it easy to map other namespaces (which share the properties
of URNs) into URN-space.
where Uniform Resource Locators (URLs) specify a resource based on an access
method and location, Uniform Resource Names (URNs) identify a resource by
name. URN consists of a namespace identifier, which indicates what type of
name it contains, and a resource identifier that specifies the individual resource
within the context of that namespace.
The general syntax of a URN is:
URN:<namespace-ID>:<resource-identifier>
48. Uniform Resource Name (URN)
Since URNs identify resources by name rather than location, they are a more
natural way of identifying resources than using URLs. Unfortunately, this
advantage is also a disadvantage, since URNs don’t, by themselves, provide a
user with the necessary information to find the resource so it can be used. A
process called URN resolution must be performed to transform the URN into a
set of information that allows the resource to be accessed.
Example:
URN:isbn:0-679-73669-7
URN:tel:+0-679-736-697