0% found this document useful (0 votes)
20 views49 pages

D.S-Chapter 3 Part-2-Lec-8-2025 - Dr. Samy

The document discusses key concepts in networking and internetworking, focusing on packet delivery methods, including datagram and virtual circuit delivery. It covers routing mechanisms, congestion control techniques, and the structure of Internet addresses. The importance of routing algorithms and their dynamic updates for efficient packet delivery in networks is emphasized.

Uploaded by

mahmoudgemmy581
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)
20 views49 pages

D.S-Chapter 3 Part-2-Lec-8-2025 - Dr. Samy

The document discusses key concepts in networking and internetworking, focusing on packet delivery methods, including datagram and virtual circuit delivery. It covers routing mechanisms, congestion control techniques, and the structure of Internet addresses. The importance of routing algorithms and their dynamic updates for efficient packet delivery in networks is emphasized.

Uploaded by

mahmoudgemmy581
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/ 49

Lec-8

Chapter 3:
Networking and Internetworking

From Coulouris, Dollimore, Kindberg and Blair :


Distributed Systems: Concepts and Design
Edition 5, © Addison-Wesley 2012

Dr. Eng. Samy Elmokadem


Computer Science Department
FISCS – OCT 6th University
OBJECTIVES:

❖Packet delivery
❖Routing in a wide area network
❖Congestion control
❖Internet address structure
❖Firewalls
❖Packet delivery
- There are two approaches to the delivery of packets by the network layer:
(1) Datagram packet delivery. (2) Virtual circuit packet delivery.

➢(1) Datagram packet delivery.


-The term ‘datagram’ refers to the similarity of this delivery mode to the
way in which letters and telegrams are delivered.
-The delivery of each packet is a ‘one-shot’ process; no setup is required,
and once the packet is delivered the network retains no information about it.
In a datagram network a sequence of packets transmitted by a single host to
a single destination may follow different routes and when this occurs they
may arrive out of sequence.
-Every datagram packet contains the full network address of the source and
destination hosts; the latter is an essential parameter for the routing process.
-Datagram delivery is the concept on which packet networks were originally
based, and it can be found in most of the computer networks in use today.
-The Internet’s network layer (IP), Ethernet and most wired and wireless
local network technologies are based on datagram delivery. 3
❖Packet delivery (Cont…)
➢(2) Virtual circuit packet delivery:
Some network-level services implement packet transmission in a manner
that is analogous to. a telephone network A virtual circuit must be set up
before packets can pass from a source host A to destination host B.
-The establishment of a virtual circuit involves the identification of
a route from the source to the destination, possibly passing through
several intermediate nodes. At each node along the route a table entry is
made, indicating which link should be used for the next stage of the
route.
.- Once a virtual circuit has been set up, it can be used to transmit any
number of packets. Each network-layer packet contains only a virtual
circuit number in place of the source and destination addresses.
-The addresses are not needed, because packets are routed at intermediate
nodes by reference to the virtual circuit number.
-When a packet reaches its destination the source can be determined
from the virtual circuit number. 4
❖Packet delivery (Cont…)

-The analogy with telephone networks should not be taken too literally.
- In the POTS a telephone call results in the establishment of a physical circuit from
the caller to the callee, and the voice links from which it is constructed are reserved
for their exclusive use.
- In virtual circuit packet delivery, the circuits are represented only by table entries in
routing nodes, and the links along which the packets are routed are used only for the
time taken to transmit a packet; they are free for other uses for the rest of the time.
- A single link may therefore be employed in many separate virtual circuits.
The most important virtual circuit network technology in current use is ATM

•The requirement for a setup phase does, however, result in a short delay before any
packets can be sent to a new destination.
➢The distinction between datagram and virtual circuit packet delivery in the network
layer should not be confused with a similarly named pair of mechanisms in the
transport layer : connectionless and connection-oriented transmission.
- In the context of the Internet transport protocols, UDP (connectionless) and TCP
(connection-oriented).
5
❑ Routing
• Routing : is a key mechanism and a variety of routing algorithms are used,
of which the distance-vector method is the most basic but effective.

➢Routing : is a function that is required in all networks except those LANs


(such as Ethernets, that provide direct connections between all pairs of attached hosts).

▪In large networks, adaptive routing is employed: the best route for
communication between two points in the network is re-evaluated periodically,
taking into account the current traffic in the network and any faults such as
broken connections or routers.
➢The delivery of packets to their destinations in a network such as the one
shown in Figure 3.7 is the collective responsibility of the routers located at
connection points.
-Unless the source and destination hosts are on the same LAN, the packet
has to be transmitted in a series of hops, passing through router nodes.
-The determination of routes for the transmission of packets to their destinations
is the responsibility of a routing algorithm implemented by a program in the
network layer at each node.
❑ Routing (Cont.…)
➢ A Routing algorithm has two parts :
Part.1 It must make decisions that determine the route taken by each packet as
it travels through the network.
- In circuit-switched network layers : such as X.25 and frame relay
networks such as ATM, the route is determined whenever a virtual circuit
connection is established.
- In packet-switch : the route is determined separately for each packet, and the
algorithm must be particularly Simple and efficient if it is not to degrade network
performance.
Part.2. It must dynamically update its knowledge of the network based on
traffic monitoring and the detection of configuration changes or failures.
(This activity is less time-critical; slower and more computation-
intensive techniques can be used ).
* Both of these activities are distributed throughout the network. The routing
decisions are made on a hop-by-hop basis, using locally held information to
determine the next hop to be taken by each incoming packet. The locally held
routing information is updated periodically by an algorithm that distributes
information about the states of the links (their loads and failure status).
❑ Routing (Cont.…)
❖The delivery of packets to their destinations in a network such as the one shown in
Figure 3.7 is the collective responsibility of the routers located at connection point

Figure 3.7 Routing in ( a wide area network )

Figure 3.7
➢Distributed systems are using fixed routing whereas dynamic and virtual routing is not
used in the distributed system.
-Fixed routing: A path from A to B is specified in advance; the path changes only
if a hardware failure disables it. Since the shortest path is usually chosen, communication
costs are minimized.
❖Routing (Cont.…)

Figure 3.7 9
❑ Routing (Cont…)
➢A simple routing algorithm
• The algorithm that we describe here is a ‘distance vector’ algorithm.
Routing in networks is an instance of the problem of path finding in graphs.
Bellman’s shortest path algorithm,
Figure 3.8 shows the routing tables that would be held at each of the routers
for the network of Figure 3.7. assuming that the network has no failed links
or routers. Each row provides the routing information for packets addressed
to a given destination. The link field specifies the outgoing link for packets
addressed to the destination.
-The cost field is simply a calculation of the vector distance, or ( the number
of hops) to the given destination.
- For store-and-forward networks with links of similar bandwidth, this
gives a reasonable estimate of the time for a packet to travel to the
destination.
-The cost information stored in the routing tables is not used during packet-
routing actions taken by part 1 of the routing algorithm, but it is required for
the routing table construction and maintenance actions in part 2.
10
❑ Routing (Cont…)
A simple routing algorithm
-The routing tables contain a single entry for each possible destination, showing the
next hop that a packet must take towards its destination. When a packet arrives at
a router the destination address is extracted and looked up in the local routing table.
The resulting entry in the routing table identifies the outgoing link that should be
used to route the packet onwards towards its destination.

-For example, when a packet addressed to C is submitted to the router at A, the


router examines the entry for C in its routing table. It shows that the packet should
be routed outwards from A on the link labeled 1. The packet arrives at B and the
same procedure is followed using the routing table at B, which shows that the
onward route to C is via the link labeled 2. When the packet arrives at C the routing
table entry shows ‘local’ instead of a link number.
-This indicates that the packet should be delivered to a local host.
- Now let us consider how the routing tables are built up and how they are
maintained when faults occur in the network – that is, how part 2 of the routing
algorithm described above is performed. Because each routing table specifies only
a single hop for each route, the construction or repair of the routing information can
proceed in a distributed fashion.
11
❑ Routing (Cont.…)
Figure 3.8 Routing tables for the network in Figure 3.7

Routings from A Routings from B Routings from C


To Link Cost To Link Cost To Link Cost
A local 0 A 1 1 A 2 2
B 1 1 B local 0 B 2 1
C 1 2 C 2 1 C local 0
D 3 1 D 1 2 D 5 2
E 1 2 E 4 1 E 5 1

Routings from D Routings from E

To Link Cost To Link Cost


A 3 1 A 4 2
B 3 2 B 4 1
C 6 2 C 5 1
D local 0 D 6 1
E 6 1 E local 0
❑ Routing (Cont.…)
❖Packet delivery

Figure 3.7 13
❑ Routing (Cont.…)

Figure 3.7
❑ Routing (Cont.…)

Figure 3.7
❑ Routing (Cont.…)

Figure 3.7
❑ Routing (Cont.…)

Figure 3.7
❑ Routing (Cont.…)

Figure 3.7
❑ Routing (Cont.…)

Figure 3.7
❑ Routing (Cont.…)

Figure 3.7
❑ Routing (Cont.…)

Figure 3.7
❑ Routing (Cont.…)
❑ Routing (Cont.…)
➢Congestion control
➢Congestion control is needed to prevent overflow of buffers
at the receiver and at intermediate nodes.
-The capacity of a network is limited by the performance of its
communication links and switching nodes. When the load at any
particular link or node approaches its capacity, queues will build up at
hosts trying to send packets and at intermediate nodes holding packets
whose onward transmission is blocked by other traffic.
- If the load continues at the same high level, the queues will continue
to grow until they reach the limit of available buffer space.
▪ Once this state is reached at a node, the node has no option but to drop
further incoming packets. As we have already noted, the occasional
loss of packets at the network level is acceptable and can be remedied
by retransmission initiated at higher levels. But if the rate of packet
loss and retransmission reaches a substantial level , the effect on the
throughput of the network can be devastating.
24
➢Congestion control ( Cont.…)

-It is easy to see why this is the case: if packets are dropped at
intermediate nodes, the network resources that they have already
consumed are wasted and the resulting retransmissions will require
a similar quantity of resources to reach the same point in the network.
- As a rule of thumb : when the load on a network exceeds 80% of its
capacity, the total throughput tends to drop as a result of packet losses
unless usage of heavily loaded links is controlled.

➢Instead of allowing packets to travel through the network until they


reach over congested nodes, where they will have to be dropped, it
would be better to hold them at earlier nodes until the congestion is
reduced. This will result in increased delays for packets but will not
significantly degrade the total throughput of the network.
➢Congestion control is the name given to techniques that are designed to
achieve this.
25
➢Congestion control ( Cont.…)
In general, congestion control is achieved by informing nodes along
a route that congestion has occurred and that their rate of packet
transmission should therefore be reduced. For intermediate nodes, this
will result in the buffering of incoming packets for a longer period.
For hosts that are sources of the packets, the result may be to queue
packets before transmission or to block the application process that is
generating them until the network can handle them.
-All datagram-based network layers, including IP and Ethernets, rely on
the end to-end control of traffic. That is, the sending node must reduce
the rate at which it transmits packets based only on information that it
receives from the receiver.
- Congestion information may be supplied to the sending node by
explicit transmission of special messages (called choke packets)
requesting a reduction in transmission rate, by the implementation of
a specific transmission control protocol (from which TCP derives its
name ) 26
Figure 3.11
Tunnelling for IPv6 migration

IPv6 encapsulated in IPv4 packets

IPv4 network

IPv6 IPv6
A B

Encapsulators
Figure 3.12
TCP/IP layers

Message
Layers

Application
Messages (UDP) or Streams (TCP)

Transport
UDP or TCP packets

Internet
IP datagrams

Network interface
Network-specific frames

Underlying network
Figure 3.13
Encapsulation in a message transmitted via TCP over an Ethernet

Application message

TCP header port

IP header TCP

Ethernet header IP

Ethernet frame
Figure 3.14
The programmer's conceptual view of a TCP/IP Internet

Application Application

TC P UDP

IP
Figure 3.15
Internet address structure, showing field sizes in bits

7 24
Class A: 0 Network ID Host ID

14 16
Class B: 1 0 Network ID Host ID
28

21 8
Class C: 1 1 0 Network ID Host ID

28
Class D (multicast): 1 1 1 0 Mult icast address

27
Class E (reserved): 1 1 1 1 0 unused
Figure 3.16
Decimal representation of Internet addresses

octet 1 octet 2 octet 3 Range of addresses

Network ID Host ID
1.0.0.0 to
Class A: 1 to 127 0 to 255 0 to 255 0 to 255
127.255.255.255

Network ID Host ID

Class B: 128.0.0.0 to
128 to 191 0 to 255 0 to 255 0 to 255
191.255.255.255
Network ID Host ID
192.0.0.0 to
Class C: 192 to 223 0 to 255 0 to 255 1 to 254
223.255.255.255
Multicast address
224.0.0.0 to
Class D (multicast): 224 to 239 0 to 255 0 to 255 1 to 254
239.255.255.255

240.0.0.0 to
Class E (reserved): 240 to 255 0 to 255 0 to 255 1 to 254
255.255.255.255
Figure 3.17
IP packet layout

header

IP address of s ourc e IP address of destination data


up to 64 kiloby tes
Figure 3.18
A typical NAT-based home network
Figure 3.19
IPv6 header layout

Version (4 bits) Traffic class (8 bits) Flow label (20 bits)

Payload length (16 bits) Next header (8 bits) Hop limit (8 bits)

Source address
(128 bits)

Destination address
(128 bits)
Figure 3.20
The Mobile IP routing mechanism

Sender Subsequent IP packets

tunnelled to FA Mobile host MH

Address of FA

returned to sender

First IP packet

addressed to MH

Internet

Foreign agent FA
Home
First IP packet
agent
tunnelled to FA
❖Firewalls
❖Firewalls
-Almost all organizations need Internet connectivity in order to provide
services to their customers and other external users and to enable their
internal users to access information and services.
-The computers in most organizations are quite diverse, running
a variety of operating systems and application software.
-The security of their software is even more varied; some of it may include
state-of-the-art security, but much of it will have little or no capability to
ensure that incoming communications can be trusted and outgoing
communications are private when required.
▪ In summary, in an intranet with many computers and a wide range of
software it is inevitable that some parts of the system will have weaknesses
that expose it to security attacks.
oThe purpose of a firewall is to monitor and control all communication
into and out of an intranet.
37
❖Firewalls (Cont…)
Firewalls
-A firewall is implemented by a set of processes that act as a gateway to
an intranet (Figure 3.21a), applying a security policy determined by the
organization.
-The aims of a firewall security policy may include any or all of the
following:
▪ Service control: To determine which services on internal hosts are
accessible for external access and to reject all other incoming service
requests.
▪ Outgoing service requests and the responses to them may also be
controlled. These filtering actions can be based on the contents of
IP packets and the TCP and UDP requests that they contain.

-For example, incoming HTTP requests may be rejected unless they


are directed to an official web server host.
38
Figure 3.21
Firewall configurations

a) Filtering rout er Prot ec t ed int ranet


Rout er/
f ilt er

I nt ernet

web/ f t p
serv er

b) Filtering rout er and bas tion R/ f ilt er Bast ion

I nt ernet

web/ f t p
serv er

c) Screened subnet f or bast ion R/ f ilt er Bast ion R/ f ilt er

I nt ernet

web/ f t p
serv er
Figure 3.22
IEEE 802 network standards

IEEE No. Name Title Reference

802.3 Ethernet CSMA/CD Networks (Ethernet) [IEEE 1985a]

802.4 Token Bus Networks [IEEE 1985b]

802.5 Token Ring Networks [IEEE 1985c]

802.6 Metropolitan Area Networks [IEEE 1994]

802.11 WiFi Wireless Local Area Networks [IEEE 1999]

802.15.1 Bluetooth Wireless Personal Area Networks [IEEE 2002]

802.15.4 ZigBee Wireless Sensor Networks [IEEE 2003]

802.16 WiMAX Wireless Metropolitan Area Networks [IEEE 2004a]


Figure 3.23
Ethernet ranges and speeds

10Base5 10BaseT 100BaseT 1000BaseT

Data rate 10 Mbps 10 Mbps 100 Mbps 1000 Mbps

Max. segment lengths:

Twisted wire (UTP) 100 m 100 m 100 m 25 m

Coaxial cable (STP) 500 m 500 m 500 m 25 m

Multi-mode fibre 2000 m 2000 m 500 m 500 m

Mono-mode fibre 25000 m 25000 m 20000 m 2000 m


Figure 3.24
Wireless LAN configuration

A B C

Laptops

radio obs truc tion


Wireless
LAN
Palmtop D E

Serv er Base s tation/


ac cess point

LAN
Figure 3.25
Bluetooth frame structure

bits: 72 18 18 18 0 - 2744

Access code Header Header Header Data for transmission


copy 1 copy 2 copy 3

Header

bits: 3 1 1 1 4 8

Destination Flow Ack Seq Type Header checksum

Address within = ACL, SCO,


Piconet poll, null

SCO packets (e.g. for voice data) have a 240-bit payload containing 80 bits
of data triplicated, filling exactly one timeslot.
Q. Describe the difference between broadcast, multicast , Unicast and Anycast and
give an application of all three.
Answer.
broadcast : message without destination reaching all reachable neighbors.
multicast : message sent to a given set of destinations.Example: IP multicast.
Unicast : One-to-one
Destination – unique receiver host address
Anycast :message delivered to one destination out of a set of possible ones.
Example: DNS requests to root servers

Unicast :One-to-one
Destination – unique receiver host address
Broadcast :One-to-all
Destination – address of network
Multicast :One-to-many
Multicast group must be identified
Destination – address of group
Q. You are designing a client-server system and have to decide between a thin
and a fat client. What criteria do you use to make your decision?
Answer. Two important criteria are: resource availability at the client side and
network bandwidth between client and server. If the client has few resources,
then a thin client is preferable. Then the client usually only needs to support
an interface and the application logic is at the server side
On the other hand, a thin client usually requires more network bandwidth
between client and server.

Q. Compare between. Datagram packet delivery


and Virtual circuit packet
delivery ?.
Q. What are routing techniques?
AN: Routin
g : is a process that is performed by layer 3 (or network layer) devices in order to deliver the
packet by choosing an optimal path from one network to another.
Static routing : is a process in which we have to manually add routes to the routing table.

Q. How many routing techniques are there?


An: Routing can be classified into three categories:
1- Static Routing. 2- Default Routing. 3- Dynamic Routing.

Q. What are the different types of routing algorithms?


An: Routing Algorithms can be classified based on the following:
▪ Static or Dynamic Routing,
▪ Distributed or Centralized,
▪ Single path or Multi-path,
▪ Flat or Hierarchical,
▪ Intra Domain or Inter-Domain,
▪ link State or Distance Vector.
❖A distance-vector routing protocol:
in data networks determines the best route for data packets based on distance. Distance-vector
routing protocols measure the distance by the number of routers a packet has to pass, one router
counts as one hop. Some distance-vector protocols also take into account network latency and
other factors that influence traffic on a given route.

-To determine the best route across a network, routers, on which a distance-vector protocol is
implemented, exchange information with one another, usually routing tables plus hop counts for
destination networks and possibly other traffic information. Distance-vector routing protocols also
require that a router informs its neighbours of network topology changes periodically.

Distance-vector routing protocols use the Bellman–Ford algorithm to calculate the best route.
Another way of calculating the best route across a network is based on link cost, and is
implemented through link-state routing protocols.

The term distance vector refers to the fact that the protocol manipulates vectors (arrays) of
distances to other nodes in the network. The distance vector algorithm was the original ARPANET
routing algorithm and was implemented more widely in local area networks with the Routing
Information Protocol (RIP).
Que. Which routing technique is used in distributed system?
b. virtual routing
c. dynamic routing
d. all of the mentioned
Answer: all of the mentioned

What is static and dynamic routing?

A static routing table is created, maintained, and updated by a network administrator,


manually. A static route to every network must be configured on every router for full
connectivity. ... A dynamic routing table is created, maintained, and updated by a routing
protocol running on the router
Thanks

Any Questions?

You might also like