Internetworking
Internetworking
Sources:
“Computer Networks” by Peterson and Davie
“Distributed Systems” by Coulouris, Dollimore, Kindberg
OCT 1
Basics
• When we speak of a network we will be
speaking about a single technology
network (Ethernet, Token Ring, ATM,
Point to Point, WaveLan, etc.)
• An internetwork is an interconnected
collection of such networks.
• The Internet Protocol (IP) is the key toll
used today to build scalable,
heterogeneous internetworks
OCT 2
Conceptual layering of protocol
software
Message sent Message received
Layer n
Layer 2
Layer 1
Sender Communication Recipient
medium
OCT 3
Encapsulation as it is applied in
layered protocols
Application-layer message
Presentation header
Session header
Transport header
Network header
OCT 4
Protocol layers in the ISO Open
Systems Interconnection (OSI)
model Message sent Message received
Layers
Application
Presentation
Session
Transport
Network
Data link
Physical
Sender Communication Recipient
medium
OCT 5
OSI protocol summary
Layer Description Examples
Application Protocols that are designed to meet the communication requirements of HTTP,FTP , SMTP,
specific applications, often defining the interface to a service. CORBA IIOP
Presentation Protocols at this level transmit data in a network representation that is Secure Sockets
independent of the representations used in individual computers, which may (SSL),CORBA Data
differ. Encryption is also performed in this layer, if required. Rep.
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. TCP, UDP
Messages are addressed to communication ports attached to processes,
Protocols in this layer may be connection-oriented or connectionless.
Network Transfers data packets between computers in a specific network. In a WAN IP, ATM virtual
or an internetwork this involves the generation of a route passing through circuits
routers. In a single LAN no routing is required.
Data link Responsible for transmission of packets between nodes that are directly Ethernet MAC,
connected by a physical link. In a WAN transmission is between pairs of ATM cell transfer,
routers or between routers and hosts. In a LAN it is between any pair of hosts. PPP
Physical The circuits and hardware that drive the network. It transmits sequences of Ethernet base- band
binary data by analogue signalling, using amplitude or frequency modulation signalling, ISDN
of electrical signals (on cable circuits), light signals (on fibre optic circuits)
or other electromagnetic signals (on radio and microwave circuits).
OCT 6
TCP or UDP Over IP
Message
Layers
Application
Messages (UDP) or Streams (TCP)
Transport
UDP or TCP packets
Internet
IP datagrams
Network interface
Network-specific frames
Underlying network
OCT 7
Encapsulation in a message
transmitted via TCP over an
Ethernet
Application message
IP header TCP
Ethernet header IP
Ethernet frame
OCT 8
The programmer's conceptual
view of a TCP/IP Internet
Transport Control Protocol User Datagram Protocol
Application Application
TCP UDP
IP
OCT 9
IP packet layout
header
IP address of source IP address of destination data
up to 64 kilobytes
OCT 10
IEEE 802 network standards
IEEE No. Title Reference
802.3 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 Wireless Local Area Networks [IEEE 1999]
OCT 11
Example Internetwork
H7 H8
H1 H2 H3
Network 1 (Ethernet)
Network 2 (Ethernet)
Router R3
Router R1
Network 4 (point to point link)
H4
Router R2
Network 3
(Token Ring)
Suppose H1 wants to send a message to
H5 H6 H8.
OCT 12
H1 To H8
H1 H8
TCP TCP
R1 R2 R3
IP IP
IP IP IP
Protocol Layering
OCT 13
IP
• Requires that lower level protocols provide
services…
• And therefore was designed to be
undemanding…
• In this way, IP can make use of a wide
variety of underlying networks
OCT 14
IP
• Has an addressing scheme which
identifies each host on the internetwork
• Has a best effort datagram delivery model
• Could be run over carrier pigeons
• Many of the technologies that IP runs on
were invented well after IP was defined.
OCT 15
Addressing
Every Ethernet device has a network adapter
with a 48-bit globally unique ID. Each
manufacturer is assigned 24 bits. The other 24
bits are assigned by the manufacturer. These
addresses have little structure and provide very
few clues as to their location.
OCT 16
Has a fixed Ethernet address
as well as an IP address for its
network interface
Has the IP address of H8
H7 H8
H1 H2 H3
Network 1 (Ethernet)
Each host on this network
Network 2 (Ethernet) This interface
has the same IP network address and
has the same
a different host IP address
IP network
address as H8
Router R1
Router R3
H4
Router R2 These interfaces
have the same IP
Network 3
network address
(Token Ring)
These interfaces have because they are on
H5 H6 the same IP network the same network
address as H6
OCT 17
IP Addressing
• Every IP datagram contains the IP address of the
destination host
• The “network part” of an IP address uniquely identifies a
single physical network that is part of the larger Internet
• All hosts and routers that share the same network part of
their address are connected to the same physical
network and can thus communicate with each other by
sending frames over the network
• Every physical network that is part of the Internet has at
least one router that, by definition, is also connected to
at least one other physical network; this router can
exchange packets with hosts or routers on either
network
OCT 18
H1 has the IP address of H8. Does H8
have the same network part address
as my interface? No, so choose the router. H7 H8
H1 H2 H3
Network 1 (Ethernet)
Network 2 (Ethernet)
Router R1
Router R3
H4
Router R2
Network 3
(Token Ring)
H5 H6
OCT 19
H7 H8
H1 H2 H3
Network 1 (Ethernet)
H4
Router R2
Network 3
(Token Ring)
H5 H6
OCT 20
H7 H8
H1 H2 H3
Network 1 (Ethernet)
Network 2 (Ethernet)
Router R1
Router R3
H4
Router R2
H4
Router R2
Network 3
(Token Ring)
H5 H6
OCT 22
ARP
• Address Resolution Protocol
OCT 25
ARP
• Host A wants to contact host B on the same
network.
• First, A checks its cache to see if it already
contains the IP address, physical address pair. If
it does then use the physical address.
• If it does not then broadcast the IP address to all
hosts on this network. The matching host sends
back its physical address. A then adds this
mapping to its cache.
• Other hosts on the network will see this
interaction and build tables of their own.
OCT 26
H1 has H2’s IP address. It finds H2’s physical address with ARP.
H7 H8
H1 H2 H3
Network 1 (Ethernet)
Network 2 (Ethernet)
Router R1
Router R3
H4
Router R2
Network 3
(Token Ring)
H5 H6
OCT 27
DHCP
• Dynamic Host Configuration Protocol
• Ethernet addresses are globally unique and
fixed during the manufacture of Ethernet
devices.
• IP addresses cannot be configured once into a
host. The IP address has a network part and a
host part. (You could never move the host to a
different network!)
• Devices need IP addresses and the address of
the default router.
OCT 28
DHCP
• A DHCP server provides configuration
information to hosts.
• But how does the host find a DHCP
server?
• Service discovery:
The host broadcasts a DHCPDISCOVER
over UDP/IP and the DHCP server sends
back a leased IP address
OCT 29
H8 contacts H9
H9 asks for an IP address using DHCP. using H9’s IP address
H7 H8
H9 H3 contacts H9
H1 H2 H3
using ARP
Network 1 (Ethernet)
Network 2 (Ethernet)
R1 contacts H9 using
Router R1 ARP
Router R3
H4
Router R2
Network 3
(Token Ring)
H5 H6
OCT 30
Routers
• Keep messages flowing between
networks rather than within networks
• Come in different sizes
• The largest have more in common with
supercomputers than office servers - MIPS
processors
OCT 31
Routing in a wide area network
A 1 B
Hosts 2
3 Links 4
or local C
networks 5
D 6 E
Routers
OCT 32
Initial Routing tables for the
Routings from A
network
Routings from B Routings from C
To Link Cost To Link Cost To Link Cost
A local 0 A 1 1 A - inf
B 1 1 B local 0 B 2 1
C - inf C 2 1 C local 0
D 3 1 D - inf D - inf
E - inf E 4 1 E 5 1
OCT 35
Updated Routing tables
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
sickle
Campus138.37.95.248/29 100 Mbps Ethernet
router subnet 138.37.95.249 router/
firewall 1000 Mbps Ethernet
Eswitch: Ethernet switch
OCT 37
Simplified view of the QMW
Computer Science Network
router/ (2) Hammer gets
Campus138.37.95.240/29 138.37.95.241 firewall
router subnet hammer the Ethernet
Staff subnet Student subnet address using ARP.
240=11110000 138.37.88 138.37.88.251 138.37.94.251 138.37.94
compute file server/
248=11111000 server Eswitch Eswitch
gateway
bruno
138.37.88.249 custard
232=11101000 138.37.94.246 printers
dialup
server
henry
(1) Suppose we have 138.37.88.230
other
An IP packet for servers 138.37.95.232/29
file
Cooper server subnet
138.37.88.248 hotpoint
138.37.88.162
web
server
copper
138.37.88.248 (3) Final route
hub hub selected based on
Ethernet address.
sickle
Campus138.37.95.248/29 100 Mbps Ethernet
router subnet 138.37.95.249 router/
firewall 1000 Mbps Ethernet
Eswitch: Ethernet switch
OCT 38
A typical NAT-based home
network
DSL or Cable 83.215.152.95
connection to ISP 192.168.1.xx subnet
Modem / firewall / router (NAT enabled)
192.168.1.1
Ethernet switch
printer
WiFi base station/
access point 192.168.1.2 192.168.1.10
PC 1
192.168.1.5
Laptop
192.168.1.104 PC 2
192.168.1.101
Bluetooth
Game box adapter
192.168.1.105
Bluetooth
TV monitor printer
Media hub
192.168.1.106 Camera
OCT 39
A typical NAT-based home
network
One single IP
for this home.
DHCP runs
DSL or Cable 83.215.152.95 on the router to
connection to ISP 192.168.1.xx subnet
Modem / firewall / router (NAT enabled)assign IP’s
192.168.1.1
Wired
Ethernet switch
printer
WiFi base station/
Unregistered IP access point 192.168.1.2 192.168.1.10
addresses
Assigned
PC 1 An IP
192.168.1.5 manually
Laptop
192.168.1.104 PC 2
192.168.1.101
Bluetooth
Game box adapter
192.168.1.105
Bluetooth
TV monitor printer
Media hub
192.168.1.106 Camera
OCT 40
NAT router maintains an address
translation table.
For outgoing TCP or UDP messages:
- save internal IP and Port in table
- replaces internal IP with external IP
- replaces internal port with table index
Ethernet switch
printer
WiFi base station/
access point 192.168.1.2 192.168.1.10
PC 1
192.168.1.5
Laptop
192.168.1.104 PC 2
192.168.1.101
Bluetooth
Game box adapter
192.168.1.105
Bluetooth
TV monitor printer
Media hub
192.168.1.106 OCT Camera 41
NAT router maintains an address
translation table.
For incomming TCP or UDP messages:
- Use the port number to look up
internal address in table
Ethernet switch
printer
WiFi base station/
access point 192.168.1.2 192.168.1.10
PC 1
192.168.1.5
Laptop
192.168.1.104 PC 2
192.168.1.101
Bluetooth
Game box adapter
192.168.1.105
Bluetooth
TV monitor printer
Media hub
192.168.1.106 OCT Camera 42
But how do we serve?
DSL or Cable 83.215.152.95
connection to ISP 192.168.1.xx subnet
Modem / firewall / router (NAT enabled)
192.168.1.1
Configure router to
Ethernet switch Send all requests to
printer
WiFi base station/ Port 80 to 192.168.1.5
access point 192.168.1.2 192.168.1.10
PC 1
192.168.1.5
Laptop
192.168.1.104 PC 2
192.168.1.101
Bluetooth
Game box adapter
192.168.1.105
Bluetooth
TV monitor printer
Media hub
192.168.1.106 Camera
OCT 43
The MobileIP 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
agent First IP packet
tunnelled to FA
The case of a Mobile host making a request is easy – it has a new IP on the
new network. No problem.
The case of the Mobile host acting as a server is described in the picture.
Messages to it must be re-routed to its new home.
OCT 44
Wireless LAN configuration
A B C
Laptops
radio obstruction
Wireless
D LAN
Palmtop E
LAN
Challenges to the CSMA/CD approach:
Hidden stations: A may not be able to sense D’s signal to E.
Fading: A may not be able to detect a transmission by C.
Collision Masking: Locally generated signals are stronger than distant signals.
OCT 45
Wireless LAN configuration
A B C
Laptops
radio obstruction
Wireless
D LAN
Palmtop E
LAN
Slot reservation protocol (CSMA/Collision Avoidance):
A sends a request to send (RTS) message carrying a duration to E.
E responds with a clear to send (CTS) message repeating the duration.
All those near A or E back off for that
OCTperiod. 46