Download Course Notes

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

IEEE 802.1aq wikipedia , lookup

SIP extensions for the IP Multimedia Subsystem wikipedia , lookup

AppleTalk wikipedia , lookup

Network tap wikipedia , lookup

Asynchronous Transfer Mode wikipedia , lookup

Net bias wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Peering wikipedia , lookup

Multiprotocol Label Switching wikipedia , lookup

I²C wikipedia , lookup

Computer network wikipedia , lookup

Airborne Networking wikipedia , lookup

List of wireless community networks by region wikipedia , lookup

Wake-on-LAN wikipedia , lookup

Internet protocol suite wikipedia , lookup

Deep packet inspection wikipedia , lookup

IEEE 1355 wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Routing in delay-tolerant networking wikipedia , lookup

Zero-configuration networking wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Transcript
CEG-4188
Lecture 2:
Internetworking and
the Internet Protocol (IP)
Prof. Gregor v. Bochmann
SITE - University of Ottawa
These course notes are based on slides prepared by Drs. Makrakis and
Shirmohammadi
Fall 2010
CEG 4188
2-1
Network Layer
Provides the upper layers with
independence from the data
transmission and physical
networking technologies.
Responsible for sending data
from source to destination.
This includes the nodes inbetween (and therefore it is
not end-to-end)
Responsible for requesting
network facilities, such as
priority, bit-rate, etc…
Responsible for routing.
Fall 2010
CEG 4188
Application Layer
Presentation Layer
Session Layer
Transport Layer
Network Layer
Data Link Layer
Physical Layer
2-2
Basic network functions
• Data transfer (in packet switching mode)
• Two modes of transfer:
– Connection-oriented (end-to-end connection must be
established before data transfer can occur)
– Connection-less
• Addressing
– Address identifies destination
– Multicasting (broadcasting only over small networks)
• Additional features:
– Ordered delivery
– Flow control
– Error control
Fall 2010
CEG 4188
2-3
Connection-oriented vs.
Connection-less
• Debate in the 1970ies
• The connection-less IP protocol was adopted
– Simpler to realize, especially for inter-networking
– Cannot provide ordered delivery, flow control and error
control (if this is required by application, TCP must be
used)
• Circuit-switched networks favor connectionoriented service. Also in optical networks,
technology favors connection-orientation.
However, IP is expected to remain the main
internetworking protocol.
Fall 2010
CEG 4188
2-4
Internetworking

Internetworking is a scheme for
interconnecting multiple networks of not
identical technologies
Uses both hardware and software
• Extra hardware positioned between networks
• Software on each attached computer

System of interconnected networks is
called an internetwork or an internet
Fall 2010
CEG 4188
2-5
TCP/IP Protocol Suite vs. OSI
Fall 2010
CEG 4188
2-6
Internetworking architecture
Fall 2010
CEG 4188
2-7
Autonomous System (AS)
• AS is a set of routers and networks
managed by a single organization.
• AS consists of a group of routers
exchanging information via a common
routing protocol.
• Claiming that an AS is “connected”, means
that (excluding times of failures) there is
always a “path” between any pair of nodes.
Fall 2010
CEG 4188
2-8
Example: A 2-AS formed Internet
Fall 2010
CEG 4188
2-9
A “possible” Internet Architecture(1)
Fall 2010
CEG 4188
2-10
A “possible” Internet Architecture(3)
AS-5
AS-4
AS-1
AS-2
Fall 2010
AS-3
CEG 4188
2-11
Routing
• Autonomous System
(AS): set of networks
and routers operated
by a single
organization.
• Interior Router
Protocol (IRP):
passing routing
information within
and AS.
• Exterior Router
Protocol (ERP):
passing routing
information
between different
ASs.
Fall 2010
CEG 4188
2-12
Routing Approaches
• Distance Vector Routing: each node exchanges
information with its neighboring nodes; e.g.
Routing Information Protocol (RIP).
• Link-state Routing: sends link costs of each of its
network interfaces to all routers (not just
neighboring). Typically used with a Dijksterabased algorithm; e.g., Open Shortest Path First
(OSPF).
• Path-vector Routing: router provides information
about which networks can be reached by a given
router and the ASs that must be crossed; e.g.
Border Gateway Protocol (BGP).
Fall 2010
CEG 4188
2-13
Internet Protocol (IP) v4
• defined in RFC 791
• part of TCP/IP suite
• will (eventually) be replaced by IPv6
Fall 2010
CEG 4188
2-14
IP Header
Fall 2010
CEG 4188
2-15
IP Header Fields
• Version (4 bits): currently 4
• Internet Header Length (4 bits)
– Minimum is 5, for 20 octets
– Header may include options and padding
• Type of Service (8 bits)
– rarely used, for differentiated services and congestion notification
• Total Length (16 bits) of datagram, in octets (header & data)
• Identification (16 bits)
– Sequence number
– Together with addresses and user protocol, this field identifies the
datagram uniquely (used for fragmentation)
• Flags (3 bits)
– Only 2 bits used for fragmentation: More bit, and Don’t Fragment
bit
Fall 2010
CEG 4188
2-16
IP Header Fields (…)
• Fragmentation offset ( 13 bits)
• Time to Live (8 bits)
• Protocol (8 bits)
– Next higher layer to receive data field at destination
• Header Checksum (16 bits)
– Re-verified and recomputed at each router
– 16 bit ones-complement sum of all 16 bit words in the header
• Source Address (32 bits)
• Destination Address (32 bits)
• Options (Security, timestamp, …)
• Padding, to fill to multiple of 32 bits long
Following the header: Data field (contains user data): maximum
lengths 65 535 octets
Fall 2010
CEG 4188
2-17
Internetworking Requirements
Are they satisfied by IP ?
Design requirements: accommodate differences in
constituting sub-networks:
1.
2.
3.
4.
5.
Different maximum packet size
Different addressing schemes
Different network access mechanism
Different maximum packet lifetime
Different transmission modes (connection-oriented,
connectionless)
6. Error control
7. Flow control
Fall 2010
CEG 4188
2-18
(1) Fragmentation and Reassembly: Why?
• Main reason: Different maximal packet sizes
– Lower-level protocols may need to break data up into
smaller blocks, an action called fragmentation
– Each network only accepts blocks of a certain size, or it has a minimum
and maximum limit for the allowed size of data blocks (e.g.
• ATM: 53 bytes cell size (48 payload + 5 control)
• Ethernet frames: minimum size = 72 bytes; maximum size = 1526 bytes
• Other reasons
–
–
–
–
more efficient error control & smaller retransmission units
fairer access to shared facilities
Less waiting times of packets of higher priority in queues
smaller buffers
• Disadvantages
– more bandwidth wasted in overhead related data
– more interrupts & processing time
Fall 2010
CEG 4188
2-19
PDUs and Fragmentation
Fall 2010
CEG 4188
2-20
Fragmentation Example
Fall 2010
CEG 4188
2-21
(2) Different Addressing Schemes
• Introduce IP address as a global address
• All hosts on the Internet must have a unique
IP address
– Exception: techniques such as NAT (network
address translation) allow private IP addresses
that might be duplicated somewhere else.
– NAT is very common (because IP v4 does not
have enough address space)
Fall 2010
CEG 4188
2-22
IP Address

Each IP address is divided into a prefix
and a suffix
• prefix identifies the network to which the computer is
attached
• suffix identifies the computer within that network
• we allocate some bits for prefix, some for suffix (total of
32 bits)
» large prefix, small suffix - many networks, few hosts per
network
» small prefix, large suffix - few networks, many hosts per
network

Network numbers are unique
• assignment of network numbers must be coordinated
globally; assignment of host addresses can be managed
locally
Fall 2010
CEG 4188
2-23
IP Address format
32
8
0
netid
hostid
Class A
16
10
32
netid
hostid
Class B
24
110
netid
32
hostid
Class C
32
1110
Fall 2010
multicast
CEG 4188
Class D
2-24
IP Address format
11110
Address Class
Reserved for future use
No. of Networks
No. of Hosts
Class E
Comments
A
126
16777214
Very Large Networks
B
16384
65534
Medium Size Network
C
2097151
254
Large number of
small networks
Host id 0 is never assigned to an individual host. It refers to the network itself.
Fall 2010
CEG 4188
2-25
Example
Class A
Class B
Class C
Fall 2010
CEG 4188
2-26 26
Subnets and Subnet Masks
• Allow arbitrary complexity of internetworked LANs within
organization.
• Insulate overall internet from growth of network numbers
and routing complexity.
• To rest of internet, site looks like single network.
Fall 2010
CEG 4188
2-27
Routing Using Subnets
Fall 2010
CEG 4188
2-28
Address Mapping (ARP)
• Sometimes, in order to reach a destination,
there is no need to go through an IP router.
– E.g.?
• In that case, the physical address can be
used directly.
Fall 2010
CEG 4188
2-29
ARP
(Address Resolution Protocol)
Fall 2010
CEG 4188
2-30
(4) Different maximum packet lifetime
Why limiting the maximum packet lifetime ?
• Datagrams could loop indefinitely
– Consumes resources
– Transport protocol may need upper bound on datagram lifetime
Solution proposed for IP:
– Time To Live (TTL) field in IP header
• the value represents the maximum hop count
• It is decremeted each time the packet passes through a router
– When the value of TTL becomes zero, the datagram is discarded (not
forwarded)
– Note: This does not solve the problem of the Transport protocol, since
the time waiting in a router is not bounded, so there is no enforced
maximum lifetime, only a maximum hop count.
Fall 2010
CEG 4188
2-31
Internetworking Requirements
Design requirements: accommodate differences in
constituting networks:
1. Different maximum packet size
2. Different addressing schemes
3. Different network access mechanism (implemented in
each router, as required)
4. Different maximum packet lifetime
5. Different transmission modes (connection-oriented,
connectionless)
6. Error control (not provided by IP)
7. Flow control (not provided by IP)
Fall 2010
CEG 4188
2-32
IP v6
Why Change IP ?
• Address space exhaustion (this is the main reason)
– growth of networks and the Internet
• Requirements for new types of services
– new addressing features
– flow identification
– features for resource allocation
• New header structure for more efficient processing
Fall 2010
CEG 4188
2-33
IPv6 Enhancements (1)
• Expanded IP address: 128 bit address space
– increase of address space by a factor of 296
– allows (on the order of) 6  1023 unique addresses per square
meter of the surface of the earth, which seems inexhaustible.
• Improved (flexible) option mechanism
– options are placed in separate optional headers ( between IPv6
header & transport- layer header).
– most optional headers are not examined/processed by any internet
router on the packet's path.
– simplifies and speeds up IPv6 (vs. IPv4) packet routing
processing.
– Easier to add additional options.
Fall 2010
CEG 4188
2-34
IPv6 Enhancements (2)
• dynamic address assignment (using address auto-configuration)
• Increased addressing flexibility
– includes anycast & multicast
– anycast: packet is delivered to just one of a set of nodes.
– scalability of multicast routing is improved by adding scope field to
multicast addresses.
• Support for resource allocation
– labelled packet flows
– distinguishes different flows coming from the same (IP address) source
(e.g. can identify a Video over IP or Voice over IP session (having realtime constraints) from a file transfer or web browsing session (which are
fine with best effort treatment).
Fall 2010
CEG 4188
2-35