Networking and Internetworking - Home

Download Report

Transcript Networking and Internetworking - Home

Slides for Chapter 3:
Networking and Internetworking
From
Coulouris,
Dollimore
and
Kindberg
Distributed
Systems:
Concepts and Design
Edition 4, © Pearson Education 2005
IS473 Distributed Systems
CHAPTER 3
Networking and Internetworking
OUTLINE
 Communication Subsystem.
 Types of Network.
 Principles of Network.
 Internet Protocols.
 Network Case studies.
Dr. Almetwally mostafa
3
Communication Subsystem
 The hardware and software within a distributed
system which provides the communication facilities
is known as the communication subsystem.
 Consists of:



Transmission
media:
providing
the
physical
connectivity, e.g. wire, cable, fibre and wireless channels;
Hardware devices: providing the linkage, e.g. routers,
bridges, hubs, repeaters, network interfaces and
gateways;
Software components: managing the communication,
e.g. protocol stacks, communication handlers and drivers.
Dr. Almetwally mostafa
4
Impact on Distributed Systems
 The communication impact on a distributed system will be
one of the delay introduced by the message passing.
 The delay experienced by each individual message can be
broken down into two factors:


Latency: is the time which is necessary to set up the
communication, i.e. it is the delay incurred from the time the
message is sent until it starts to arrive at the destination.
Transmission delay: determined by the length of the message
and the data transfer rate, the speed of data transfer between two
computers in the network, usually in bits per second.
Message transmission time = latency + length / data transfer rate
 Above equation is valid only for messages shorter than the
maximum allowable length by the underlying network.
 Longer messages are segmented and the transmission time
is the summation of segments transmission times.
Dr. Almetwally mostafa
5
Network Types
 Local Area Networks (LANs)

High-speed communication on proprietary grounds (on-campus).

Based on twisted copper wire, coaxial cable or optical fibre.

Total system bandwidth is high and latency is low.

Most typical solution: Ethernet with 100 Mbps
 Metropolitan Area Networks (MANs)

High-speed communication for nodes distributed over medium-range
distances, usually belonging to one organization.

Based on high bandwidth copper and optical fibre.

Providing "back-bone" to interconnect LAN's.

Technology often based on ATM, FDDI or DSL.
Dr. Almetwally mostafa
6
Network Types
 Wide Area Networks






Communication over long distances (cities, countries, or continents).
Covers computers of different organizations.
High degree of heterogeneity of underlying computing infrastructure.
Involves routers to manage network and route messages to their destinations.
Speeds up to a few Mbps possible, but around 50-100 Kbps more typical.
Most prominent example: the Internet.
 Wireless Networks


End user equipment accesses network through short or mid range radio or
infrared signal transmission
Wireless WANs:
• GSM (up to about 20 Kbps), UMTS (up to Mbps), PCS.

Wireless LANs/MANs:
• WaveLAN (2-11 Mbps, radio up to 150 meters).

Wireless Personal Area Networks:
• Bluetooth (up to 2 Mbps on low power radio signal, < 10 m distance).
Dr. Almetwally mostafa
7
Figure 3.1
Network performance
Example
Range
Bandwidth Latency
(Mbps)
(ms)
LAN
Ethernet
1-2 kms
10-1000
WAN
IP routing
worldwide
0.010-600 100-500
MAN
ATM
250 kms
1-150
10
worldwide
0.5-600
100-500
0.5-2
5-20
Wired:
Internetwork Internet
1-10
Wireless:
WPAN
Bluetooth (802.15.1) 10 - 30m
WLAN
WiFi (IEEE 802.11)
0.15-1.5 km 2-54
5-20
WMAN
WiMAX (802.16)
550 km
1.5-20
5-20
worldwide
0.01-02
100-500
WWAN
GSM, 3G phone nets
Instructor’s Guide for Coulouris, Dollimore and
Kindberg Distributed Systems: Concepts and
Design Edn. 4
© Pearson Education 2005
Network Types
 Internetworks

Several networks linked
communication facilities.
together
to

Needed for developing open distributed systems that contain very
large numbers of computers.

Integrate a variety of local and wide area network technologies to
provide the network capacity needed by each group of users.

Interconnected by dedicated switching computers, routers, and
general purpose computers, gateways.

Addressing and transmission of data to included computers are
supported by a software layer.
Dr. Almetwally mostafa
provide
common
data
9
Network Principles
Packet transmission
 A packet is a sequence of binary data with
addressing information to identify the source and
destination computers.
 A network message with arbitrary length is divided
before transmission into packets of restricted length.
 Restricted length packets are used:


To allow each computer in the network to allocate
sufficient buffer storage to hold largest possible incoming
packet.
To avoid long waiting for communication channels to be
free if long messages ware transmitted without
subdivision.
Dr. Almetwally mostafa
10
Network Principles
Switching Schemes
 A switching system is required to transmit information
between two arbitrary nodes in the network using
shared communications link.
 Four types of switching are used in computer network:

Broadcast:
• Requires no switches.
• All messages are sent to all connected computers.
• Each computer is responsible extracting messages addressed to
itself.
• Used approach in Ethernet and wireless networks.
Dr. Almetwally mostafa
11
Network Principles
Switching Schemes

Circuit switching:
• Approach taken in the telephone system.
• A physical link is established between the sender and the receiver.

Packet switching:
• Otherwise known as store-and-forward (postal system).
• At each switching node (connection point) a computer manages
the packets by reading each one into memory, examining its
destination, and choosing an outgoing circuit appropriately.

Frame relay:
• Reading in and storing the whole of each packet introduces a
performance overhead which can become significant.
• In ATM networks a frame of fixed size is used in place of a packet
and only its header needs to be examined.
• The remainder of the frame is simply relayed as a stream of bits.
Dr. Almetwally mostafa
12
Network Principles
Protocols
 A well-known set of rules and formats used for communication
between processes to perform a given task.
 Implemented by a pair of software modules located in the sending
and receiving computers.
 Protocol software modules are arranged in a hierarchy of layers.
 A complete set of protocol layers is referred to as a protocol suite
or protocol stack.
 Protocol layering brings benefits in simplifying and generalizing the
software interface for access to the communication services, but it
also carries significant performance costs.
 The application, presentation, and session layers are not
distinguish in the Internet protocol stack:


The application and presentation layers are implemented as a single
middleware layer.
The session layer is integrated with the transport layer.
Dr. Almetwally mostafa
13
Figure 3.2
Conceptual layering of
protocol software
Message received
Message sent
Layer n
Layer 2
Layer 1
Sender
Communication
medium
Instructor’s Guide for Coulouris, Dollimore and
Kindberg Distributed Systems: Concepts and
Design Edn. 4
© Pearson Education 2005
Recipient
Figure 3.3
Encapsulation as it is applied
in layered protocols
Application-layer mes sage
Present ation header
Sess ion header
Trans port header
Netw ork header
Instructor’s Guide for Coulouris, Dollimore and
Kindberg Distributed Systems: Concepts and
Design Edn. 4
© Pearson Education 2005
Network Principles
Protocols
Mess age receiv ed
Mess age s ent
Lay ers
Applic ation
Pres entation
Sess ion
Transport
Netw ork
Data link
Phy sical
Sender
Communic ation
medium
Recipient
Protocol layers in the ISO model
Dr. Almetwally mostafa
16
Network Principles
Protocols
Layer
Application
Description
Protocols that are designed to meet the communication requirements of specific
applications, often defining the interface to a service.
Presentation Protocols at this level transmit data in a network representation that is
independent of the representations used in individual computers, which may
differ. Encryption is also performed in this layer, if required.
Session
At this level reliability and adaptation are performed, such as detection of
failures and automatic recovery.
Transport
This is the lowest level at which messages (rather than packets) are handled.
Messages are addressed to communication ports attached to processes.
Network
Transfers data packets between computers in a specific network. In a WAN or
an internetwork this involves the generation of a route passing through routers.
In a single LAN no routing is required.
Data link
Responsible for transmission of packets between nodes that are directly
connected by a physical link. In a WAN transmission is between pairs of routers
or between routers and hosts. In a LAN it is between any pair of hosts.
Physical
The circuits and hardware that drive the network. It transmits sequences binary
data by analogue signalling (on cable circuits), light signals (on fibre optic
circuits) or other electromagnetic signals (on radio and microwave circuits).
Dr. Almetwally mostafa
17
Network Principles
Protocols
 The task of dividing messages into packets before
transmission and reassembling them at receiving computer is
performed in the transport layer.
 The transport layer is responsible for delivering messages to
destinations with transport addresses.
 A transport address is composed of the network address
number of a host computer (an IP number in the Internet)
and a port number.
 Ports are software-definable destination
communication within a host computer.
points
for
 In the Internet there are typically several ports at each host
computer with well-known numbers, each allocated to a
given Internet service.
Dr. Almetwally mostafa
18
Figure 3.6
Internetwork layers
Mess age
Lay ers
Applic ation
Internetw ork
protocols
Transport
Internetw ork
Internetw ork pac kets
Netw ork int erf ace
Netw ork-spec if ic packet s
Underly ing netw ork
Instructor’s Guide for Coulouris, Dollimore and
Kindberg Distributed Systems: Concepts and
Design Edn. 4
© Pearson Education 2005
Underly ing
netw ork
protocols
Network Principles
Routing
 A function required in all networks except LANs.
 The best route for communication between points in the network is
re-evaluated periodically to take into account the current traffic
and any faults in the network: adaptive routing.
 Packets delivery to their destinations is the collective responsibility
of the routers located at connection points.
 Routing algorithm, implemented by a program in the network layer
at each point, has two functions:
1. Decide the routes for packets transmission (on hop-by-hop basis):
• Whenever a virtual circuit or connection is established in case of circuitswitched and frame-relay network layers.
• Separately for each packet in case of packet-switched network layers.
2. Update its knowledge of the network based on traffic monitoring and
the detection of failures.
Dr. Almetwally mostafa
20
Network Principles
Routing
A
Hosts
or local
networks
1
B
2
3
Links
4
C
5
D
6
E
Routers
Routing in wide area network
Dr. Almetwally mostafa
21
Network Principles
Routing
Routings from A
To
Link
Cost
Routings from B
To
Link
Cost
Routings from C
To
Link
Cost
A
B
C
D
E
A
B
C
D
E
A
B
C
D
E
local
1
1
3
1
0
1
2
1
2
1
local
2
1
4
1
0
1
2
1
2
2
local
5
5
Routings from D
To
Link
Cost
Routings from E
To
Link
Cost
A
B
C
D
E
A
B
C
D
E
3
3
6
local
6
1
2
2
0
1
4
4
5
6
local
2
1
0
2
1
2
1
1
1
0
Routing tables for the previous network
Dr. Almetwally mostafa
22
Figure 3.9 Pseudo-code for RIP (router
information prototcol)routing algorithm
Send: Each t seconds or when Tl changes, send Tl (local table)on
each non-faulty outgoing link.
Receive: Whenever a routing table Tr is received on link n:
for all rows Rr in Tr {
if (Rr.link | n) {
Rr.cost = Rr.cost + 1;
Rr.link = n;
if (Rr.destination is not in Tl) add Rr to Tl;
// add new destination to Tl
else for all rows Rl in Tl {
if (Rr.destination = Rl.destination and
(Rr.cost < Rl.cost or Rl.link = n)) Rl = Rr;
// Rr.cost < Rl.cost : remote node has better route
// Rl.link = n : remote node is more authoritative
Instructor’s Guide for Coulouris, Dollimore and
}
Kindberg Distributed Systems: Concepts and
}
Design Edn. 4
}
© Pearson Education 2005
Network Principles
Internetworking
 Many subnets based on many network technologies are
integrated to build an internetwork.
 To make this possible, the following are needed:



A unified internetwork addressing scheme enables packets to be
addressed to any host connected to any subnets (provided by IP
addresses in the Internet).
A protocol defining the format of internetwork packets and giving
rules of handling them (IP protocol in the Internet).
Interconnecting components that route packets to their destination
in terms of internetwork addresses (performed by internet routers in
the Internet).
 The next figure shows a small part of the Internet comprises
several subnets interconnected by routers and contains also
many connection devices as switches, gateways, and hubs.
Dr. Almetwally mostafa
24
Network Principles
Internetworking
138.37.95.241
138.37.95.240/29
subnet
Campus
router
hammer
Staff subnet
138.37.88.251
138.37.88
compute
server
138.37.94.251
Eswitch
bruno
138.37.88.249

router/ firewall
Student subnet
138.37.94
file server/
gateway
Eswitch
custard
138.37.94.246
dialup
server
henry
138.37.88.230
other
servers
file
server
hotpoint
138.37.88.162
printers
web
server
copper
138.37.88.248
hub
desktop computers
138.37.95.248/29
subnet
hub
desktop computers
138.37.88.xx
sickle
138.37.95.249
router/ firewall
Eswitch:
Campus
router
Dr. Almetwally mostafa
138.37.94.xx
100 Mbps Ethernet
1000 Mbps Ethernet
Ethernet switch
25
Network Principles
Internetworking
 Routers:

Interconnected through subnets in an internetwork.

Have distinct identities (IP addresses) within each subnet.

Responsible for forwarding the internetwork packets arrived
on any connection to the correct outgoing connection and
maintain routing tables for that purpose.
 Bridges:

Link networks of different types.
 Bridge/Routers:

Link networks of the same type and perform routing
functions.
Dr. Almetwally mostafa
26
Network Principles
Internetworking
 Hubs:

Connecting together several segments of LAN cables.

Have a number of sockets.

A host computer can be connected to each socket.
 Switches:



Perform a similar function to routers but for LANs only.
Routing the incoming packets only to the connected
hosts.
Build up routing tables by the observation of traffic.
Dr. Almetwally mostafa
27
Internet Protocols
 The Internet emerged from the development of the TCP/IP
protocol suite.
 TCP stands for Transmission Control Protocol and IP for
Internet Protocol.
 Many application services and application-level protocols now
exist based on TCP/IP including:

The Web (HTTP).

E-mail (SMTP, POP).

File transfer (FTP).

Net News (NNTP).

Telnet (telnet).
Dr. Almetwally mostafa
28
Internet Protocols
Layers
Message
Application
Messages (UDP) or Streams (TCP)
Transport
UDP or TCP packets
Internet
IP datagrams
Network interface
Network-specific frames
Underlying network
TCP/IP layers
Dr. Almetwally mostafa
29
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
Instructor’s Guide for Coulouris, Dollimore and
Kindberg Distributed Systems: Concepts and
Design Edn. 4
© Pearson Education 2005
Internet Protocols
 TCP is a transport protocol that can be used to support
applications directly or additional protocols can be layered on
it to provide additional features.
 TCP is a reliable connection-oriented protocol used to
transport streams of data.
 Another transport protocol (User Datagram Protocol UDP) is
used to meet traditional message-based communication.
 IP is the underlying network protocol that provide the basic
transmission mechanism for the Internet and other subnets.
 Success of TCP/IP is based on their independence of
underlying transmission technology enabling internetworks to
built up from many heterogeneous networks and data links.
Dr. Almetwally mostafa
31
Internet Protocols
Application
Application
TCP
UDP
IP
A programmer’s conceptual view of
an Internet TCP/IP
Dr. Almetwally mostafa
32
Internet Protocols
IP Addressing
 Used scheme for assigning addresses to networks and the
computers connected to them must satisfy the following
requirements:

Universal: any host on Internet can send a message to any other.
• Assign Unique IP address to each host in the Internet.

Sufficient: defining large addressing space and using it efficiently.
• IPv4 (1984): 32-bit addresses for 232 (~ 4 billion) addresses, but
insufficient due to:
i) Unforeseen growth of internet.
ii) Inefficient use of address space.
• IPv6 (1994): 128-bit addresses for 2128 (~ 3x1038) addressable nodes.

Routing: support a flexible and efficient routing scheme, but
addresses themselves should not contain routing information.
Dr. Almetwally mostafa
33
Internet Protocols
IP Addressing
 The IP address:

32-bit numeric identifier containing:
• A unique network identifier within the Internet, allocated by the Internet
Network Information Center (NIC).
• A unique host identifier within that network, assigned by its manager.

Written as a sequence of four decimal numbers separated by dots.

Has equivalent symbolic domain name represented in a hierarchy.

Has five classes:
• Class A: reserved for very large networks (224 hosts on each).
• Class B: allocated for organization networks contain more than 255 hosts.
• Class C: allocated to all other networks (less than 255 hosts on each).
• Class D: reserved for multicasting but this is not supported by all routers.
• Class E: unallocated addresses reserved for future requirements.
Dr. Almetwally mostafa
34
Internet Protocols
IP Addressing
Clas s A:
Clas s B:
0
7
24
Netw ork ID
Host ID
1 0
14
16
Netw ork ID
Host ID
21
Clas s C:
1 1 0
8
Netw ork ID
Host ID
28
Clas s D (multicast):
1 1 1 0
Multicast address
27
Clas s E (reserved):
1 1 1 1 0
unused
Internet addressing structure
Dr. Almetwally mostafa
35
Internet Protocols
IP Addressing
octet 1
octet 2
Network ID
Class A:
1 to 127
octet 3
Host ID
0 to 255
0 to 255
Network ID
Class B:
128 to 191
Range of addresses
192 to 223
1.0.0.0 to
127.255.255.255
0 to 255
128.0.0.0 to
191.255.255.255
Host ID
0 to 255
0 to 255
Network ID
Class C:
0 to 255
0 to 255
Host ID
0 to 255
1 to 254
192.0.0.0 to
223.255.255.255
Multicast address
Class D (multicast):
224 to 239
0 to 255
0 to 255
1 to 254
224.0.0.0 to
239.255.255.255
Class E (reserved):
240 to 255
0 to 255
0 to 255
1 to 254
240.0.0.0 to
255.255.255.255
Decimal representation of Internet addressing
Dr. Almetwally mostafa
36
Internet Protocols
IP Protocol
 Network protocol of the Internet protocol stack.
 Transmits datagrams from one host to another via
intermediate routers with the following characteristics:

No guarantee of delivery.

Duplication possible.

Unbounded delay.

No order preservation.
 Address resolution

IP addresses may need to be mapped to physical network addresses.
• Ethernet has 48-bit addresses.

Use Address Resolution Protocol (ARP)
• Either direct relation between IP and physical address, or mapping.
Dr. Almetwally mostafa
37
Internet Protocols
IP Protocol
 When an IP datagram (up to 64 Kbytes) is longer than the
Maximum Transfer Unit (MTU) of the underlying network:


It is broken into smaller packets at the source and reassembled at
its final destination.
Each packet has a fragment identifier to enable out-of-order
fragments to be collected.
header
IP address of source
IP address of destination
data
up to 64 kilobytes
IP packet layout
Dr. Almetwally mostafa
38
Internet Protocols
IP Routing
 IP network layer routes packets from their source to their
destination using a routing algorithm:

Distance-vector algorithm:
• Router Information Protocols (RIP-1, RIP-2, ……).

Link state algorithms class.
• Open Shortest Path First (OSPF) protocol.
 Different routing algorithms may co-exist since routing
tables contain identical information for all algorithms.
 However, for routing table creation and update, the same
algorithm needs to be used.
 Therefore, the Internet is divided into topological areas and
one algorithm used in every area.
Dr. Almetwally mostafa
39
Internet Protocols
IP Routing
 Internet topological map is partitioned into autonomous
systems which are subdivided into areas.



Every autonomous system has a backbone area.
The collection of routers connect non-backbone areas to the
backbone and the links that interconnect those routers are the
Internet backbone.
Backbone links are usually of high bandwidth and are replicated for
reliability.
 Packets addressed to hosts on the local network as the
sender:


Transmitted in a single hope without routing.
IP layer uses the Address Resolution Protocol (ARP) to determine the
network address of local destination host
Dr. Almetwally mostafa
40
Internet Protocols
IP Routing
 The need to store information from every node in the IP
address space to every other node leads to routing table size
explosion.
 Two possible solutions:

Topological grouping of IP addresses, so that addresses in one
topological area are all routed to a central router of that area.
• For example, all addresses 194.0.0.0 to 195.255.255.255 in Europe.
• Routers outside Europe can have a single table entry to route all
addresses in this range to the closest European router, which then
perform detailed routing.
• Problem: before 1993, IP addresses were assigned without regard to
geographic location, still in use.

Usage of default routes:
• Not all nodes in a subnet need to store complete routing information as
long as key routers close to backbone have complete routing information.
Dr. Almetwally mostafa
41
Internet Protocols
IP Routing
A
Hosts
or local
networks
1
B
2
3
Links
4
C
5
D
6
E
Routers
Default Routing
Dr. Almetwally mostafa
Routings from C
To
Link
Cost
B
2
C
local
E
5
Default
5
1
0
1
42
Internet Protocols
IP Routing
 Classless Inter Domain Routing (CIDR) is a scheme
introduced in 1996 to face the shortage of IP addresses.
 CIDR scheme is used to allocate IP addresses and manage
entries of routing tables.
 Main problem: scarcity of Class B addresses, while plenty of
Class C addresses were available.
 Solution: allocate batches of contiguous Class C addresses to
subnets of more than 255 hosts and vice versa.
 For efficient routing: add mask field to routing tables used to
select the portion of an IP address that is compared with the
table entry.

Enables the network/host address to be any portion of the IP address.

More flexible than the old class-based algorithm.
Dr. Almetwally mostafa
43
Internet Protocols
IP Routing
 CIDR Example:
net X: 2048 addresses 194.24.0.0 - 194.24.7.255, mask 255.255.248.0
net Y: 4096 addresses 194.24.16.0 - 194.24.31.255, mask 255.255.240.0
net Z: 1024 addresses 194.24.8.0 - 194.24.11.255, mask 255.255.252.0
mask
address
X
Y
Z
11000010 00011000 00000000 00000000
11000010 00011000 00010000 00000000
11000010 00011000 00001000 00000000
11111111 11111111 11111000 00000000
11111111 11111111 11110000 00000000
11111111 11111111 11111100 00000000
Given address 194.24.17.4, bitwise AND with all masks in table
Only result of and-ing with net Y mask gives valid address:
11000010 00011000 00010001 00000100
11111111 11111111 11110000 00000000
11000010 00011000 00010000 00000000
=> route according to net Y line routing table information.
Dr. Almetwally mostafa
44
Internet Protocols
IP Version 6 (IPv6)
 Adopted in 1994 to face the addressing limitations of IPv4.
 Addresses long are 128-bits (~ 3x1038 addressable entities).
 Address space is partitioned:

One partition will hold the entire range of IPv4 addresses.

Two partitions used to organize the address space:
• One according to the geographical locations of the addressed nodes.
• The other according to their organizational locations.
 Improved routing speed:

No checksum applied to the packet content, only to its header.

No datagram fragmentation occurs inside network
• Supporting a mechanism for determining the smallest datagram size
(MTU) before a packet is transmitted.
Dr. Almetwally mostafa
45
Internet Protocols
IP Version 6 (IPv6)
Version (4 bits) Priority (4 bits)
Payload length (16 bits)
Flow label (24 bits)
Next header (8 bits)
Hop limit (8 bits)
Source address
(128 bits)
Destination address
(128 bits)
IPv6 header layout
Dr. Almetwally mostafa
46
Internet Protocols
IP Version 6 (IPv6)
 Multimedia streams and other real-time data elements can
transmitted in identified flow.


The priority and flow label fields can be used to enable handling specific
packets more rapidly or with higher reliability than others.
Flow labels enable resources to be reserved in order to meet timing
requirements of specific real-time data streams.
 Support multicast (as IPv4 ):

The transmission of packets to multiple hosts using a single address.
 Support a new mode of transmission called anycast:

Deliver a packet to at least one of the hosts subscribed to the relevant
address.
 Allow implementing of security at the IP level without the need
for security-aware implementations of application programs.
 Internet protocol stack, routers software, and application
programs require upgrading to support the migration to IPv6.
Dr. Almetwally mostafa
47
Internet Protocols
MobileIP
 Support for roaming of laptop computers, personal digital
assistants (PDAs), wearable computing devices, etc.
 IP addresses are bound to subnet addresses, but roaming
may leave subnet boundary.
 MobileIP allows IP communication to continue transparently
with respect to current location of the mobile host.
 The mobile host is allocated a permanent IP address,
corresponding to its “home" domain.
 When the mobile host is roaming:


A home agent runs on a fixed machine in the home domain.
A foreign agent correspondingly running on a fixed machine at the
temporary domain.
Dr. Almetwally mostafa
48
Internet Protocols
MobileIP
Sender
2. Address of FA
returned to sender
4. Subsequent IP packets
send to FA directly
Mobile host MH
1. First IP packet
addressed to MH
Internet
Home
agent
Foreign agent FA
3. First IP packet
forwarded to FA
MobileIP routing mechanism
Dr. Almetwally mostafa
49
Internet Protocols
MobileIP
 The home agent keeps track of the current IP address of the
mobile host and acts as a proxy during periods of
disconnection.
 When the mobile machine is registered with the foreign
agent, the foreign agent contacts the home agent, notifying
it of the new temporary IP address.
 Requests for the server are captured by home agent and rerouted, embedded in MobileIP packets, to the foreign agent:

The sender sends first IP packet addressed to the mobile host .

The Home agent receive the packet as a proxy for the mobile host.

The home agent returns the address of the foreign agent to the sender.

The home agent forwards the first IP packet to the foreign agent.

Subsequent IP packets sent to the foreign agent directly.
Dr. Almetwally mostafa
50
Internet Protocols
TCP and UDP
 TCP and UDP provide the communication capabilities of
Internet in a useful form for application programs.
 TCP and UDP are transport protocols that accomplish
process-to-process communication by the use of ports.
 Port numbers are used for addressing messages to
processes within a particular computer and are valid only
within that computer.
 UDP (User Datagram Protocol)

A transport-level replica of IP:
• A UDP datagram is encapsulated inside an IP packet.
• A UDP datagram has a short header includes the source and destination
port numbers, a length field, and a checksum.
Dr. Almetwally mostafa
51
Internet Protocols
TCP and UDP
 UDP (User Datagram Protocol) cont.

Offer unreliable connectionless transport service:
• No guarantee of delivery.
• No guarantee of order preservation.
• No additional reliability mechanisms except the optional checksum.

If the received host finds the checksum field is non-zero:
• Compute a check value from the packet contents.
• Compare the computed check value with received checksum.
• Drop the received packet in case of unmatching.

Transmit messages of up to 64 bytes in size with minimal additional
costs and delays above IP transmission:
• No setup costs.
• No administrative acknowledgement messages.
Dr. Almetwally mostafa
52
Internet Protocols
TCP and UDP
 TCP (Transport Control Protocol)

Offer reliable connection-oriented transport service:
• Guarantee the delivery of all sending data.
• Guarantee of order preservation.
• A bi-directional communication channel between the sending and receiving
process is established.

The sending process divides the data stream into a sequence of data
segments and transmits them as IP packets:
• Each TCP segment is attached with a sequence number.
• Sequence numbers are used by the receiver to order the segments.
• No segment is placed in the input stream of the receiver until all lowernumbered segments.
• Each segment carries a checksum covering the header and data and the
receiver drop any received segment with unmatched checksum.
Dr. Almetwally mostafa
53
Internet Protocols
TCP and UDP
 TCP (Transport Control Protocol) cont.

A segment acknowledgements system is used to control the flow of
stream between the sender and receiving processes:
• The receiver sends from time to time an acknowledgement to the sender
giving the sequence number of the highest successfully received segment.
• Acknowledgements are carried in the normal data segments if there is a
reverse flow of data.
• If any segment is not acknowledged within a specified timeout the sender
retransmits it.

The incoming buffer at the receiver is used to balance the flow between
the sender and the receiver:
• The buffer may overflow if the receive operations more slowly than the send
operations.
• Incoming segments are dropped when the buffer is overflowed.
• The sender is obliged to retransmit that dropped segments.
Dr. Almetwally mostafa
54
Internet Protocols
Domain Names
 The Internet supports a scheme of symbolic domain names
for hosts and networks because IP addresses are not very
memorable for human users.
 The domain name is represented in a hierarchical fashion
designed to reflect the organizational hierarchy and
independent of the physical arrangement of the Internet
(location transparency).
 In order for communication to take place a domain name
must be translated into an IP address.
 The translation of domain names is carried out using the
Domain Name Service (DNS).
 DNS is implemented as a server process can be run on host
computers anywhere in the Internet.
Dr. Almetwally mostafa
55
Internet Protocols
Domain Names
 There are at least two DNS servers in each domain and often
more.
 The servers in each domain hold a partial map of the domain
name tree below their domain.
 The domain map tree must consist of all of the domain and
host names within its own domain; often it will contain more.
 Name resolution is carried out recursively from right to left,
issuing request to other DNS servers in relevant domains as
necessary.
 The resulting translation is cached at the server handling the
original request so that the future requests for the same
domain can be resolved without reference to other servers.
Dr. Almetwally mostafa
56
Internet Protocols
Firewalls
 The purpose of a firewall is to monitor and control all
communication into and out of an intranet.
 A firewall is implemented by a set of processes that act as a
gateway applying a security policy determined by the organization.
 The firewall security policy may include any or all of the following:

Service control: determine which services on internal hosts are accessible
for external access and reject all other incoming service requests.
• Filtering actions are based on the contents of IP packets and the included TCP and
UDP requests.

Behavior control: prevent behavior that infringes the organization’s policies
and forming part of an attack.
• Some filtering actions are applicable at the IP or TCP level but others require higher
level interpretation of messages.

User control: the organization discriminate between its users by allowing
some access to external services but inhibiting others from doing so.
Dr. Almetwally mostafa
57
Internet Protocols
Firewalls
Router/
Protected intranet
filter
Internet
web/ftp
server
Firewall configuration
Dr. Almetwally mostafa
58