0% found this document useful (0 votes)
18 views95 pages

Unit 4

Uploaded by

viswasbkurian179
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views95 pages

Unit 4

Uploaded by

viswasbkurian179
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 95

MODULE-4

Syllabus

• Network and Transport layers: Repeaters, Bridges, Gateways, and


routers.

• Logical addressing – IPV4 and IPV6 addressing,

• Internet protocol - IPV4 and IPV6.

• Connectionless and Connection-Oriented Services: UDP and TCP.

• Congestion Control, Quality of Service


Connecting Devices

• To connect LANs or segments of LANs, we use connecting devices.

• Connecting devices can operate in different layers of the Internet


model.
Those that operate below the physical layer such as a passive hub.

Those that operate at the physical layer (a repeater or an active hub).

Those that operate at the physical and data link layers (a bridge or a
two-layer switch).

Those that operate at the physical, data link, and network layers (a
router or a three-layer switch).

Those that can operate at all five layers (a gateway).


Passive Hubs

• A passive hub is just a connector.

• It connects the wires coming from different branches.

• In a star-topology Ethernet LAN, a passive hub is just a point where


the signals coming from different stations collide; the hub is the
collision point.

• Location in the Internet model is below the physical layer.


Repeater/Active Hub

• A repeater is a device that operates only in the physical layer.

• Signals that carry information within a network can travel a fixed


distance before attenuation endangers the integrity of the data.

• A repeater receives a signal and regenerates the original bit pattern


before it becomes too weak or corrupted.

• The repeater then sends the refreshed signal.


Repeater/Active Hub

• A repeater can extend the physical length of a LAN

• A repeater connects segments of a LAN

• A repeater forwards every frame; it has no filtering capability.

• A repeater is a regenerator, not an amplifier.

• When it receives a weakened or corrupted signal, it creates a copy, bit


for bit, at the original strength.
• A repeater placed on the line before the legibility of the signal
becomes lost can still read the signal well enough to determine the
intended voltages and replicate them in their original form.
Bridges

• A bridge operates in both the physical and the data link layer.

• It can check the physical (MAC) addresses (source and destination) in


the frame.

• A bridge has filtering capability.


• It can check the destination address of a frame and decide if the frame
should be forwarded or dropped.

• If the frame is to be forwarded, the decision must specify the port.

• A bridge has a table that maps addresses to ports.

• A bridge does not change the physical addresses contained in the


frame.
Example

• If a frame destined for station 712B13456142 arrives at port 1, the


bridge consults its table to find the departing port.

• According to its table, frames for 7l2B13456142 leave through port 1;


therefore, forwarding is unnecessary, and the frame is dropped.

• On the other hand, if a frame for 712B13456141 arrives at port 2, the


departing port is port 1 and the frame is forwarded.
Transparent Bridges
• A transparent bridge is a bridge in which the stations are completely
unaware of the bridge's existence.
• If a bridge is added or deleted from the system, reconfiguration of the
stations is unnecessary.
Routers
• A router is a three-layer device that routes packets based on their logical
addresses (host-to-host addressing).
• A router normally connects LANs and WANs on the Internet and has a
routing table for making decisions about the route.
• The routing tables are normally dynamic and are updated using routing
protocols.
• Figure 15.11 shows a part of the Internet that uses routers to connect LANs
and WANs.
Gateway
• A gateway is normally a computer that operates in all five layers

• A gateway takes an application message, reads it, and interprets it.

• This means that it can be used as a connecting device between two


internetworks that use different models.

• That is, a network designed to use the OSI model can be connected to
another network using the Internet model.

• Gateways can provide security.


Network Layer: Logical Addressing
• Communication at the network layer is host-to-host (computer-to-
computer);
• A computer somewhere in the world needs to communicate with another
computer somewhere else in the world.
• Usually, computers communicate through the Internet.
• The packet transmitted by the sending computer may pass through
several LANs or WANs before reaching the destination computer.
• For this level of communication, we need a global addressing scheme;
we call this logical addressing
• We use the term IP address to mean a logical address in the network
layer of the TCP/IP protocol suite.
IP Addresses
IPv4 ADDRESSES

• An IPv4 address is a 32-bit address that uniquely and universally


defines a system on the internet.

• IPv4 addresses are unique- Two devices on the Internet can never have
the same address at the same time.

• The IPv4 addresses are universal -the addressing system must be


accepted by any host that wants to be connected to the Internet.
Example
Address Space

• An address space is the total number of addresses used by the internet


protocol.

• If a protocol uses N bits to define an address, the address space is 2N


because each bit can have two different values (0 or 1) and N bits can
have 2N values.

• 2N addresses
Address Space of IPv4

• IPv4 uses 32-bit addresses, which means that the address space (total
no: of addresses)is 232 or 4,294,967,296 (more than 4 billion).

• This means that,if there were no restrictions, more than 4 billion


devices could be connected to the Internet.
Address Space- Notation
• There are two prevalent notations to show an IPv4 address:

1. Binary notation

2. Dotted-decimal notation.
Binary Notation

• In binary notation, the IPv4 address is displayed as 32 bits.

• Each octet is often referred to as a byte.

• So it is common to hear an IPv4 address referred to as a 32-bit address


or a 4-byte address.

• The following is an example of an IPv4 address in binary notation:

• 01110101 10010101 00011101 00000010


Dotted-Decimal Notation

• To make the IPv4 address more compact and easier to read, Internet
addresses are usually written in decimal form with a decimal point
(dot) separating the bytes.
Classful Addressing

• Classful IP addressing is a way of organizing and managing IP


addresses, which are used to identify devices on a network.
• The 32-bit IP address is divided into five sub-classes. These are given
below:
• Class A
• Class B
• Class C
• Class D
• Class E
Each of these classes has a valid range of IP
addresses
Classes D and E are reserved for multicast
and experimental purposes respectively.
Netid and Hostid
• In class A, one byte defines the netid and three bytes define the hostid.
• In class B, two bytes define the netid and two bytes define the hostid.
• In class C, three bytes define the netid and one byte defines the hostid.
• Note that the concept does not apply to classes D and E.
Note

• Say for example -NID(Network ID) = 8bit, and HID(Host ID) = 24bit.
• So there are 28 that is 256 total network are created and 224 that is 16M
Host per network.
Blocks
Class A
• IP addresses belonging to class A are assigned to the networks that contain a
large number of hosts.
• The network ID is 8 bits long.
• The host ID is 24 bits long.
Class B
• IP address belonging to class B is assigned to networks that range from
medium-sized to large-sized networks.
• The network ID is 16 bits long.
• The host ID is 16 bits long.
Class C
• IP addresses belonging to class C are assigned to small-sized networks.
• The network ID is 24 bits long.
• The host ID is 8 bits long.
Class D
• IP address belonging to class D is reserved for multi-casting. The higher-
order bits of the first octet of IP addresses belonging to class D is always
set to 1110.
Class E
• IP addresses belonging to class E are reserved for experimental and
research purposes. IP addresses of class E range from 240.0.0.0 –
255.255.255.255.
Mask
• Mask is a 32-bit binary number that separates an IP address into two
parts: the network and the host
• The mask can help us to find the netid and the hostid.
• The concept does not apply to classes D and E
• Example, the mask for a class C address has 24 1s, which means the
first 24 bits of any address in class C define the netid; the next 8 bits
define the hostid
Subnetting

• During the era of classful addressing, subnetting was introduced.

• If an organization was granted a large block in class A or B, it could


divide the addresses into several contiguous groups and assign each
group to smaller networks (called subnets) or, in rare cases, share part
of the addresses with neighbours.

• Subnetting increases the number of 1s in the mask.


Supernetting

• The time came when most of the class A and class B addresses were
depleted; however, there was still a huge demand for midsize blocks.

• The size of a class C block with a maximum number of 256 addresses


did not satisfy the needs of most organizations.

• Even a midsize organization needed more addresses.

• One solution was supernetting.


• In supernetting, an organization can combine several class C blocks to
create a larger range of addresses.

• In other words, several networks are combined to create a supernetwork or a


supernet.

• An organization can apply for a set of class C blocks instead of just one.

• For eg, an organization that needs 1000 addresses can be granted 4


contiguous class C blocks.
• The organization can then use these addresses to create one
supernetwork.

• Supernetting decreases the number of 1s in the mask.

• For example, if an organization is given four class C addresses, the


mask changes from /24 to /22.

• The classless addressing eliminated the need for supernetting.


Drawback of classful addressing
• In classful addressing, a large part of the available addresses were
wasted
• Classful addressing, which is almost obsolete, is replaced with
classless addressing.
Classless Addressing

• To overcome address depletion and give more organizations access to


the Internet, classless addressing was designed and implemented.

• In this scheme, there are no classes, but the addresses are still granted
in blocks.
Address Blocks
• In classless addressing, when an entity, small or large, needs to be
connected to the Internet, it is granted a block (range) of addresses.
• The size of the block (the number of addresses) varies based on the nature
and size of the entity.
• For example, a household may be given only two addresses;
• a large organization may be given thousands of addresses.
• An ISP, as the Internet service provider, may be given thousands or
hundreds of thousands based on the number of customers it may serve.
Restrictions

• To simplify the handling of addresses, the Internet authorities impose


three restrictions on classless address blocks:
1. The addresses in a block must be contiguous, one after another.

2. The number of addresses in a block must be a power of 2 (1, 2, 4, 8...).

3. The first address must be evenly divisible by the number of addresses.


Mask- in classless addressing
• A mask is a 32-bit number in which the n leftmost bits are 1s and the
32 - n rightmost bits are 0s.

• However, in classless addressing the mask for a block can take any
value from 0 to 32
• It is very convenient to give just the value of n preceded by a slash.
Network Addresses
• A very important concept in IP addressing is the network address.
• When an organization is given a block of addresses, the organization is
free to allocate the addresses to the devices that need to be connected to
the Internet.
• The first address in the class, however, is normally (not always) treated
as a special address.
• The first address is called the network address and defines the
organization network.
• It defines the organization itself to the rest of the world.
• The first address is the one that is used by routers to direct the message
sent to the organization from the outside.
Network Address Translation (NAT)
• The number of home users and small businesses that want to use the
Internet is ever-increasing.
• Many have created small networks with several hosts and need an IP
address for each host.
• With the shortage of addresses, this is a serious problem
• A quick solution to this problem is called network address translation
(NAT).
• NAT enables a user to have a large set of addresses internally and one
address, or a small set of addresses, externally
• The traffic inside can use the large set; the traffic outside, the small
set.
• To separate the addresses used inside the home or business and the
ones used for the Internet, the Internet authorities have reserved three
sets of addresses as private addresses
• Any organization can use an address out of this set without permission from
the Internet authorities.

• Everyone knows that these reserved addresses are for private networks.

• They are unique inside the organization, but they are not unique globally.

• No router will forward a packet that has one of these addresses as the
destination address.

• The site must have only one single connection to the global Internet through
a router that runs the NAT software.
• The router that connects the network to the global address uses one
private address and one global address.
The private network is transparent to the rest of the Internet; the rest
of the Internet sees only the NAT router with the address 200.24.5.8.
• Address Translation All the outgoing packets go through the NAT router, which
replaces the source address in the packet with the global NAT address.
• All incoming packets also pass through the NAT router, which replaces the
destination address in the packet (the NAT router global address) with the
appropriate private address.
IPv6 Addresses
• An IPv6 address consists o- 16 bytes
(octets); it is 128 bits long.

• To make addresses more readable,


IPv6 specifies hexadecimal colon
notation.

• In this notation, 128 bits is divided


into eight sections, each 2 bytes in
length.
IPv6 Addresses

• IPv6 has a much larger address


space; 2128 addresses are available.
Address Space

• IPv6 has a much larger address space; 2128 addresses are available(340
billion ).

• The address can be divided into several categories.

• A few leftmost bits, called the type prefix, in each address define its
category.

• The type prefix is variable in length.


IPV6 Addressing Methods
Unicast Addresses

• A unicast address defines a single computer.

• The packet sent to a unicast address must be delivered to that specific


computer.

• One to one

• IPv6 defines two types of unicast addresses:


• Geographically based • Provider-based
• Type identifier. This 3-bit field defines the address as a provider-
based address.

• Registry identifier. This 5-bit field indicates the agency that has
registered the address.

Currently, three registry centers have been defined.

• INTERNIC (code 11000) is the center for North America;

• RIPNIC (code 01000) is the center for European registration;

• APNIC (code 10100) is for Asian and Pacific countries.


• Provider identifier. This variable-length field identifies the provider for
Internet access (such as an ISP). A 16-bit length is recommended for this
field.

• Subscriber identifier. When an organization subscribes to the Internet


through a provider, it is assigned a subscriber identification. A 24-bit
length is recommended for this field.
• Subnet identifier. Each subscriber can have many different
subnetworks, and each subnetwork can have an identifier. The subnet
identifier defines a specific subnetwork under the territory of the
subscriber. A 32-bit length is recommended for this field.

• Node identifier. The last field defines the identity of the node
connected to a subnet. A length of 48 bits is recommended for this
field to make it compatible with the 48-bit link (physical)address used
by Ethernet.
Multicast Addresses
• Multicast addresses are used to define a group of hosts
• A packet sent to a multicast address must be delivered to each member of the
group.
• One to many
• The second field is a flag that defines the group address as either
permanent or transient.

• A permanent group address is defined by the Internet authorities and


can be accessed at all times.

• A transient group address, on the other hand, is used only temporarily.


Systems engaged in a teleconference, for example, can use a transient
group address.

• The third field defines the scope of the group address.


Anycast Addresses

• An anycast address, like a multicast address, defines a group of nodes.

• However, a packet destined for an anycast address is delivered to only


one of the members of the anycast group, the nearest one (the one with
the shortest route).
Reserved Addresses
• Another category in the address space is the reserved address. These
addresses start with eight 0s (the type prefix is 00000000).
• An unspecified address is used when a host does not know its own address and
sends an inquiry to find its address.

• A loopback address is used by a host to test itself without going into the network.

• A compatible address is used during the transition from IPv4 to IPv6.It is used
when a computer using IPv6 wants to send a message to another computer using
IPv6, but the message needs to pass through a part of the network that still operates in
IPv4.

• A mapped address is also used during the transition. However, it is used when a
computer that has migrated to IPv6 wants to send a packet to a computer still using
IPv4.
Local Addresses
• These addresses are used when an organization wants to use IPv6
protocol without being connected to the global Internet. Nobody
outside the organization can send a message to the nodes using these
addresses.

• Two types of addresses are defined for this purpose.

• A link-local address is used in an isolated subnet; a site-local address


is used in an isolated site with several subnets.
Position of IPV4 in TCP/IP
• IPv4 is an unreliable and connectionless datagram protocol-a best-
effort delivery service.

• The term best-effort means that IPv4 provides no error control or flow
control.

• IPv4 assumes the unreliability of the underlying layers and does its
best to get a transmission through to its destination.

• IPv4 is also a connectionless protocol for a packet-switching network


that uses the datagram approach.
• Each datagram is handled independently, and each datagram can
follow a different route to the destination.

• This implies that datagrams sent by the same source to the same
destination could arrive out of order.

• Also, some could be lost or corrupted during transmission.

• Again, IPv4 relies on a higher-level protocol to take care of all these


problems.
Datagram
• Packets in the IPv4 layer are called datagrams.

• A datagram is a variable-length packet consisting of two parts:


1. Header Part.

2. Data Part.

• The header is 20 to 60 bytes in length and contains information


essential to routing and delivery.
IPV4 Datagram
IPV4 DATAGRAM HEADER

• Version (VER): This 4-bit field defines the version of the IPv4
protocol. Currently, the version is 4. However, version 6 (or IPng) may
totally replace version 4 in the future.

• Header length (HLEN): This 4-bit field defines the total length of the
datagram header in 4-byte words. This field is needed because the
length of the header is variable (between 20 and 60 bytes).
IPV4 DATAGRAM HEADER

• Services- 8-bit field. This field, previously called service type, is now
called differentiated services.

Service Type

• In this interpretation, the first 3 bits are called precedence bits.

• The next 4 bits are called type of service (TOS) bits,

• and the last bit is not used.


Precedence

• It is a 3-bit subfield ranging from 0 (000 in binary) to 7 (111 in


binary).

• The precedence defines the priority of the datagram in issues such as


congestion.

• If a router is congested and needs to discard some datagrams, those


datagrams with the lowest precedence are discarded first.
TOS(Type of Service) bits

• It is a 4-bit subfield with each bit having a special meaning.

• Although a bit can be either 0 or 1, one and only one of the bits can
have the value of 1 in each datagram.

• The patterns and their interpretations are given in Table.


• Total Length: Length of header + Data (16 bits), which has a
minimum value of 20 bytes and a maximum is 65,535 bytes
Identification: Unique Packet ID for identifying the group of
fragments of a single IP datagram (16 bits)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy