Sie sind auf Seite 1von 56

IP Networking and the

Internet
Professor Izhak Rubin
rubin@ee.ucla.edu
Electrical Engineering Department
UCLA
2014-2015 by Professor Izhak Rubin

Internet Architectural
Elements

Internet Architecture and


Protocols
Upper
Layer

TELNET, FTP, TFTP, BOOTP, HTTP, SNMP, SMTP

Port Number

BGP
IGPs

EGP

TCP

UDP

RIP

ICMP

IGMP

Transport
Layer

(OSPF)

Protocol Number
ARP

RARP

IP

Internet
Layer

Type Code
IEEE 802.2, PPP, LAPB, Ethernet, RS232, 802.3, 802.5
(c) Prof. Izhak Rubin

Physical/
Link Layer
3

Application Protocols: Providing


Service Directly to the user

Hypertext Transfer Protocol (HTTP)

Simple Message Transfer Protocol (SMTP)

Graphical interface to applications

Trivial File Transfer Protocol (TFTP)

Reliable file transfer

X-Window system

Remote logon

File Transfer Protocol (FTP)

E-mail

TELNET

For WWW information retrieval

Simple file transfer

Network File System (NFS)

Remote virtual storage


(c) Prof. Izhak Rubin

Application Protocols:
Providing Utility Service

Simple network management protocol (SNMP)

Boot protocol (BOOTP) / Dynamic host configuration protocol (DHCP)

Provides a link layer address, given an IP address

Reverse address resolution protocol (RARP)

Directory assistance for using names instead of Internet addresses

Address Resolution Protocol (ARP)

Remote loading and configuration capability for diskless workstations

Domain Name System (DNS)

Network management information

Provides an IP address, given a link layer address

Inverse address resolution protocol (IARP)

Provides an IP address from a hardware (e.g., DLCI for PVC) address

(c) Prof. Izhak Rubin

Illustrative Data Flow using


TFTP/UDP/IP

IP
Header

Call Ethernet
Driver

Ethernet
Header

Transmit
on
Bus

IP
Header

Call IP
UDP
Header

UDP
Header

UDP
Header

TFTP
Header

TFTP
Header

TFTP
Header

TFTP
Header

message

message

message

message

TFTP
Message

UDP
Segment

IP
Datagram

Call UDP

(c) Prof. Izhak Rubin

Ethernet
Frame
6

Internet Addresses
1
0

24

netid

hostid
16 (2^16=65,536 hosts/net)

14

netid
22

Class A

hostid

Class B

8 (2^8=256 hosts/net)

netid

hostid

Class C

Note: Internet Addresses - Network ID and Host ID


Broadcast address on a net is defined (host id = all 1s)
Address refers to connections (not to hosts)
Routing is based on the Network portion of the address. Address used to a host
determines route.
(c) Prof. Izhak Rubin

IP Addressing: An Example
ETHERNET 120.10.0.0
120.10.2.4

HOST
120.4.36.4

120.10.2.5

120.10.2.18

Gateway

HOST

120.4.36.12

120.4.36.7
120.4.36.0

10.2.0.42
Gateway

ARPANET
10.0.0.0

Token Ring
(c) Prof. Izhak Rubin

IP Addressing
Prof. Izhak Rubin

Classes A-C Addresses


Local Address

Network Address
Class

Network Address
(Bytes)

First Number

No. of Local
Addresses

0-127

16,777,216

128-191

65,536

192-223

256

Class D addresses, start with 224-239, for IP multicasting


Class E addresses, start with 240-255, for experimental use
Address blocks reserved for networks not connected to the Internet
(c) Prof. Izhak Rubin

10

Subnets

Class A and B network addresses involve organizations that may have many
subnets
Local address = Subnet address + System address
The organization that owns that part of the address is responsible for size
selection and number assignment for subnets
A local address can be broken up at byte boundaries for class A or B address
For a class C address, the local address may be segmented at selected bit
boundary

Network Address

120.118

Subnet Address

.48

182.30.36

System Address

.123
0011

(c) Prof. Izhak Rubin

B
1101

61

C
11

Subnet Masks

Traffic is routed by looking at the network and subnet parts


The subnet field size is selected by an individual organization
For hosts and routers to recognize the subnet boundary, the system must be configured to
specify the size of the subnet part
The subnet mask is a sequence of 32 bits

Hosts and routers connected to a subnet are configured with the mask for the subnet.

The bits corresponding to the network and subnet parts are set to 1, the system field bits are set to
0.
Example: when the 3rd byte is used for subnet part, the mask is 255.255.255.0
Example: a network with a large number of point-to-point lines has only 2 systems on each line;
may select 14 bit masks 255.255.255.252 (it provides for 16,382 subnets and 2 hosts per subnet)

Reserved addresses:

Do not use 0 for subnet or host addresses


All 1s broadcast address on local link. In DHCP, client sends a request to 255.255.255.255 and uses 0.0.0.0 as its
source IP address
Use a.b.c.255 to broadcast an IP packet to all nodes in the subnet a.b.c.0, or in network a.b.c.0
Broadcast to entire class B network a.b.0.0. By using a.b.255.255
Thus: A network, subnet or host field cannot consist entirely of 1s or of 0s. Hence, a field must contain at least 2
bits.
Any address that starts with 127 (mostly used 127.0.0.1) is reserved as a loopback address; I.e., local clients
communicate via IP within the host.

(c) Prof. Izhak Rubin

12

Supernetting and CIDR

A,B, and C class based addressing structure is inefficient.

Class C address yields only 254 usable addresses


An organization given class B address that needs only a few hundreds or thousands of addresses
wastes its address space

An organization is assigned only the number of bits that it needs


For example, an organization that needs only 4000 addresses is given 12 bits as local
address part. The remaining 20 bits area fixed prefix, used as a new supernetwork or
prefix part of the address. The size of this classless network part is /20.
Initial such allocation taken from the available class C address space.

/20 is equivalent to obtaining 16 contiguous class C addresses.

To route to an organization, using a single routing table entry, a router needs to know:

2^12 = 2^8 * 16 = 4096 addresses

No. of bits in the network prefix


The actual network prefix

This is called Classless Inter-Domain Routing (CIDR)


Unused part of Class A numbering space can be divided up in this manner
ISP are provided large blocks of addresses. Provider assigns sub-blocks to its
customers. Traffic is routed to the ISP using its block prefix. The provider uses longer
prefixes to route to its customers.
(c) Prof. Izhak Rubin

13

Address Resolution Protocol


(ARP)

For mapping Internet Addresses to Physical Addresses; PA = f(IA).


ARP allows a host to find the physical address of a target host on
the same physical network, given only the targets Internet address.
The host broadcasts a request on the network. The destination,
recognizing its internet address, responds with its physical address.
A cache is maintained of recently acquired address bindings.
The source host includes in the request its own address binding; this
is recorded by the destination and other hosts. New hosts
broadcast their address binding.
A diskless machine uses its physical address (determined by the
network interface card) to communicate across its network to
receive from a Server its Internet address, at start time. The
protocol used for this communication is called: Reverse ARP
(RARP).
(c) Prof. Izhak Rubin

14

Connectionless Datagram
Networking: The IP Datagram
Datagram Header
0

Data

VERS LEN

16
TYPE OF SERVICE
IDENT

TIME

31
TOTAL LENGTH
FLAGS

PROTO

FRAGMENT OFFSET
HEADER CHECKSUM

SOURCE IP ADDRESS
DESTINATION IP ADDRESS

OPTIONS

PADDING

DATA . . .
(c) Prof. Izhak Rubin

15

IP Datagram Fields

IP Protocol: connectionless, unreliable, best-effort, packet delivery.


Version (VERS): 4 bits; specifies IP protocol version
Length (LEN): 4 bits; datagram header length (in 32 bit words);
most common header = 20 Octets (LEN = 5)
Total Length: length of IP datagram (in octets, including length of
header and data). Data size computed from Total Length and LEN
fields.
Type of Service: 8 bits; specifies how the datagram should be
handled; has 5 subfields:
PRECEDENCE

UNUSED

Precedence - from 0 (Normal) through 7 (Network Control)


D, T, R bits -specifies the type of service the datagram desires:
- D: low delay; T = high throughput; R = high reliability
- A suggestion to the routing algorithm
(c) Prof. Izhak Rubin

16

IP Datagram: Fragmentation
Control

Control of fragmentation and reassembly of packets


Field IDENT - a unique integer that identifies the datagram;
allows destination to collect all fragments from a datagram.
IDENT field plus destination address used for reassembly.
Field FLAG: low order 2 bits (of 3 bits) control fragmentation.
First bit - do not fragment bit (if set to 1); low order bit specifies last fragment (fragment with highest offset), also
called - more fragments bit.
Field FRAGMENT OFFSET: specifies the offset of the
fragment in the original datagram (in units of 8 Octets, starting
at offset 0). If one or more fragments are lost, the entire
datagram is discarded.
(c) Prof. Izhak Rubin

17

IP Datagram: Other Header


Fields

Time to Live (TTL): species how long (in sec.) the datagram is
allowed to remain in the Internet system. A gateway discards a
datagram if its TTL has expired (reaches 0). Typically, each
transfer is taken to last for 1 unit of time, and each gateway
decrements the TTL by 1 (yielding hop length control).
Field PROTO: Specifies the format and contents of the data by
identifying the higher level protocol type.
Field HEADER CHECKSUM: ensures integrity of Header
values.
SOURCE and DESTINATION IP Addresses: 32 bits Internet
addresses.
PADDING: Octets containing 0, to ensure the header extends
to an integral multiple of 32 bits (note that header length field is
specified in terms of 32 bit words).
(c) Prof. Izhak Rubin

18

IP Datagram: Options

OPTIONS: not required in every datagram; used mostly for network testing or
debugging. Variable length field:

Copy (1bit)+Option Class(2)+Option Number(5).


Option Class 0: Datagram or network control
Option Class 2: Debugging and measurement

Record route Option: Source arranges that each gateway that handles the
datagram adds its name to a list of IP addresses.
Source Route options:

The sender specifies a path across the Internet; e.g...; to test a route.
Strict source routing: includes a sequence of Internet addresses, with the path
between 2 successive addresses consisting of a single physical network
Loose source routing: a sequence of Internet addresses; multiple network hops can
exist between successive addresses.
Time Stamp option: recording of time (in msec since midnight) by each gateway
along a specified list. Used for performance monitoring and evaluation.

(c) Prof. Izhak Rubin

19

Routing IP Datagrams

THE INTERNET IS COMPOSED OF MULTIPLE PHYSICAL NETWORKS


INTERCONNECTED BY GATEWAY COMPUTERS.
HOSTS CONNECT DIRECTLY TO ONE OR MORE PHYSICAL NETS
Both Hosts and gateways participate in IP routing. Host with multiple network
connections can act as gateways.
Direct Routing:

Uses directly the underlying physical transmission system. No gateway is used.


Datagram is encapsulated in the physical frame and maps the IP address to a
physical address (using address resolution methods such as ARP on shared
medium nets) The Internet address of the destination reveals whether it is on the
same physical net as the source.

Indirect Routing: The destination is not located on a directly attached network;


the datagram is first passed to a gateway for delivery.

Datagrams are passed from gateway to gateway until they reach a final gateway
which delivers then directly.

(c) Prof. Izhak Rubin

20

Table Driven IP Routing

Internet Routing Table used at each switching node.


When a datagram arrives at a gateway, IP extracts the destination
Internet address, obtains the network portion, and uses it to make
routing decisions. In this manner, just the structure of the gateway
network is used, and a gateway does not need to store a too large
Table (destination net and not destination host address is used for
routing!)
Routing table contains pairs (N,G), where N = Destination Network
address, G = Internet address of Gateway to which to send
datagrams destined to N. G can be reached directly from the
source.
Per destination Host specific routes can also be configured.
Default routes are use at times.
(c) Prof. Izhak Rubin

21

Illustrative Routing Table: RIP


Router - 1

(c) Prof. Izhak Rubin

22

Illustrative Routing Table: RIP


Router - 2

(c) Prof. Izhak Rubin

23

Illustrative Routing Table: IGRP /


BGP Router - 1

(c) Prof. Izhak Rubin

24

Illustrative Routing Table: IGRP /


BGP Router - 2

(c) Prof. Izhak Rubin

25

Internet Control Message


Protocol (ICMP)

ICMP - a required part of IP, used to report errors, to send control data, and
to provide information about unexpected conditions.
ICMP information is transported in the Data portion of IP Datagrams; used
by Internet software on destined machine (gateway or host).
Every ICMP message starts with a Type field (8 bits) and CHECKSUM (16
bits)
ICMP messages reporting error contain the IP header and the first 64 bits of
the datagram causing the error (these bits may contain higher level protocol
info).
ICMP Echo request message: used to test whether a destination is alive
and reachable. A machine receiving such a request must formulate an echo
reply, returning the same data as in the request.
Destination Unreachable ICMP message: message sent by a gateway to
the original source when it cannot deliver an IP datagram. A Code field is
used to further describe the problem: unreachability by network, or host, or
protocol, or port; fragmentation needed and DF set; source route failed.
(c) Prof. Izhak Rubin

26

Other ICMP Messages

ICMP source quench message: gateway requests source to


slow down. The source lowers its sending rate until its stops
receiving such requests; it can then gradually increase its rate.
ICMP redirect message: used by gateway (which receives
route update by communicating with other gateways) to inform
a host that it uses a non-optimum route. Limited to interaction
between a gateway and a host on a directly connected network.
ICMP time exceeded message: sent by gateway when a
datagram is discarded since it has exceeded its hop count (the
letter reaches 0 at this gateway). Also used by host to report
that fragment reassembly time exceeded.
ICMP parameter problem message: sent by a gateway or
host when it finds a problem with the datagram header and
therefore must discard it.
(c) Prof. Izhak Rubin

27

Additional ICMP Messages

ICMP time stamp request and reply messages: reply


contains originate, receive and transmit timestamps.Round trip
delay and the differences in the clocks can then be estimated.
ICMP information request and reply message: used by a
machine to obtain an Internet address for a network to which it
is attached. (An alternative to RARP.)
ICMP Address Mask request and reply messages: to obtain
an address mask.
Subnet Addressing Mask:

Subnet addressing allows multiple physical networks to share a


single IP network address.
A Subnet Mask (32 bits) is used to identify which bits in the Internet
address correspond to the underlying physical network.
(c) Prof. Izhak Rubin

28

TCP/IP Internet Layering Model


Application
Messages / Streams
Transport
Transport Protocol Packets
Internet
IP Datagrams
Network Interface
Network Specific Frames
Hardware

Note: Transport Reliability control is performed by the Transport protocol on an


end-to-end basis. Corrupted datagrams are discarded by intermediate gateways.
(c) Prof. Izhak Rubin

29

User Datagram Protocol (UDP)

UDP provides for a connectionless transport service - multiple


applications executed on a given host can send and receive
datagrams independently.
Processes on a machine are identified by protocol ports.
Operating systems schedule and queue messages that wish to
access ports and processes which wish to extract data from a
port. Source and destination ports are specified to allow for a
two-way interchange.
Using UDP, senders can distinguish between multiple recipients
on a single machine.
UDP depends on the Internet protocol for UDP message
transfer - hence providing unreliable, connectionless delivery
service. No ACK, no ordering and no feedback rate control.
(c) Prof. Izhak Rubin

30

UDP Message Format


UDP Header
UDP Header - Four 16-bit fields:
0

UDP Data

16

31

Source Port

Destination Port

Length

UDP Checksum

Length: Count of Octets in the UDP datagram, incl... header and data (Min =8,
header alone).
UDP Demultiplexing: UDP datagrams accepted from the IP software are demultiplexed
based on their specified UDP port.
Universal (well known) port assignments: performed by a central authority
Port assignments by dynamic binding by net software and obtained by request & reply.
Internet assigns few port numbers apriori (255 ports), while most are left for local sites or
(c) Prof. Izhak Rubin
31
application programs.

Transmission Control Protocol


(TCP): Features

TCP provides a reliable stream transport layer service.


Key features:
1. Stream integrity - stream of bits / bytes passed in sequence to the destination
(ordered delivery)
2. Virtual Circuit Connection (VCC): call placed, connection set-up by the
corresponding software modules in the 2 operating systems; once a connection is
set-up, the application programs are informed and the transfer can start.
3. Buffered Transfer. Bytes received from the application can be buffered and
collected to make longer transport PDUs. A push force by the sender can be
used to force immediate transfer without waiting to fill the buffer. At the receiver, it
is made available to the application without delay.
4. Unstructured Stream. The stream structure does not affect transfer service.
5. Full Duplex Connection. Concurrent transfer in both directions is allowed.

(c) Prof. Izhak Rubin

32

TCP Functions

As for UDP, TCP ports are used to connect to multiple applications.


Demultiplexing among multiple applications can be used. A connection
must be set-up by the operating systems prior to transfer
The stream units TCP operates on are Octets (Bytes). These are
divided into segments. Usually, each segment is carried in a single IP
datagram.
A sliding window mechanism, using PACK + Timeout procedure, is
used for error control and flow control. It operates at the Byte level.
TCP allows the window size to vary over time. Each ACK, which
specifies how many Bytes have been received, contains a window
advertisement specifying how many additional bytes the receiver is
willing to accept. In this manner, dynamic flow control is implemented,
adapting to the current buffer availability at the receiver.
Piggyback ACK is used.

(c) Prof. Izhak Rubin

33

TCP Segment Format


0

16

SOURCE PORT

31
DESTINATION PORT

SEQUENCE NUMBER

ACKNOWLEDGEMENT NUMBER
OFF.

RES.

CODE

...

CHECKSUM

WINDOW

URGENT POINTER
OPTIONS

PADDING

DATA . . .
DATA . . .
(c) Prof. Izhak Rubin

34

TCP Segment Fields

TCP Header + Data fields


Source and destination port numbers identify the application programs
at the connection ends
Sequence Number - position of byte stream of the data in the segment
ACK Number - position of the highest Byte received by the source
Offset - an integer which specifies the offset of the data portion of the
segment; note that options field varies in length
CODE - determines the purpose and contents of the segment;
indicates how to interpret the subsequent header fields. Segment may
carry an ACK, Data, be a request to establish or close a connection,
etc.
WINDOW - used by TCP to advertise how much data it is willing to
accept by specifying its buffer size
Urgent - high priority data indicated; notify application to enter urgent
mode. (Such data is called at times out of band data)
(c) Prof. Izhak Rubin

35

TCP Segment Fields - Cont.

Options field - used to communicate with the TCP software at the other end
of the connection. Can be used to specify Max Segment Size it is willing to
receive.
Small segment size can lead to overhead & throughput inefficiencies; about 40
Bytes are used for IP and TCP headers, so that a 1 Byte data field leads to
throughput level of only 1/40.

Too large segment sizes can lead to performance degradations. Large datagrams
may be fragmented for the transmission across the Internet. Fragments are not
independent - all must arrive, otherwise all have to be retransmitted. Hence, when
fragments can be lost, when the segment size is > fragment length, throughput
degradations can occur.
TCP Checksum - to verify integrity of TCP segment header and the data
ACKs - specify the number of the next byte that the receiver expects to receive (stream
and not packet based) - cumulative ACK.
ACK timeout estimates can be performed dynamically based on current round trip
delay observations (new one is weighted by q<1 against old estimate). It is desirable
for the TCP set-up to respond to congestion in the network by reducing feed rate.

(c) Prof. Izhak Rubin

36

TCP Connection

Connection establishment - by 3-way handshake. Connection


is set-up as full duplex. Initial sequence numbers are then
agreed on.
Connection closing. One direction can be closed before the
other.
Push operation used to force transmission of data. A PSH bit
is set to force receiver to deliver data to the application. e.g..,
used push function after each keystroke at an interactive
terminal.
Urgent indicator used for high priority transfer.
Reserved and unreserved TCP port numbers.
(c) Prof. Izhak Rubin

37

IPv6: The Header


Ver. Prio.

Payload Length

Flow Label

Next Header

Hop Limit

Source Address
Source Address
Source Address
Source Address
Destination Address
Destination Address
Destination Address

Destination Address
(c) Prof. Izhak Rubin

38

IPv6 Notes

Internet Protocol version 6 (IPv6) is a version of the Internet Protocol that is designed to succeed IPv4, the first
publicly used implementation, which is still in dominant use currently. It is an Internet Layer protocol for packetswitched internetworks. The main driving force for the redesign of Internet Protocol is the foreseeable IPv4
address exhaustion. IPv6 is specified by the Internet Engineering Task Force (IETF) and described in Internet
standard document RFC 2460, which was published in December 1998.
IPv6 has a vastly larger address space than IPv4. This results from the use of a 128-bit address, whereas IPv4
uses only 32 bits. The new address space thus supports 2 128 (about 3.41038) addresses. This expansion provides
flexibility in allocating addresses and routing traffic and eliminates the primary need for network address translation
(NAT), which gained widespread deployment as an effort to alleviate IPv4 address exhaustion.
IPv6 also implements new features that simplify aspects of address assignment (stateless address
autoconfiguration) and network renumbering (prefix and router announcements) when changing Internet
connectivity providers. The IPv6 subnet size has been standardized by fixing the size of the host identifier portion
of an address to 64 bits to facilitate an automatic mechanism for forming the host identifier from Link Layer media
addressing information (MAC address).
Network security is integrated into the design of the IPv6 architecture. Internet Protocol Security (IPsec) was
originally developed for IPv6, but found widespread optional deployment first in IPv4 (into which it was backengineered). The IPv6 specifications mandate IPsec implementation as a fundamental interoperability
requirement.
In December 2008, despite marking its 10th anniversary as a Standards Track protocol, IPv6 was only in its
infancy in terms of general worldwide deployment. IPv6 has been implemented on all major operating systems in
use in commercial, business, and home consumer environments.

Reference: Wikipedia, Sept. 2010

(c) Prof. Izhak Rubin

39

An Illustrative IPv6 Address (in


hexadecimal and binary)

The size of a subnet in IPv6 is 264 addresses (64-bit subnet mask), the square of the size of the
entire IPv4 Internet. Thus, actual address space utilization rates will likely be small in IPv6, but
network management and routing will be more efficient because of the inherent design decisions
of large subnet space and hierarchical route aggregation.
When first connected to a network, a host sends a link-local multicast router solicitation request
for its configuration parameters; if configured suitably, routers respond to such a request with a
router advertisement packet that contains network-layer configuration parameters.[12]
If IPv6 stateless address autoconfiguration is unsuitable for an application, a network may use
stateful configuration with the Dynamic Host Configuration Protocol for IPv6 (DHCPv6) or hosts
may be configured statically.
Routers present a special case of requirements for address configuration, as they often are
sources for autoconfiguration information, such as router and prefix advertisements. Stateless
configuration for routers can be achieved with a special router renumbering protocol.
Reference: Wikipedia, Sept. 2010

(c) Prof. Izhak Rubin

40

Routing Simplifications in IPv6

The packet header in IPv6 is simpler than that used in IPv4, with many rarely used
fields moved to separate options; as a result, although the addresses in IPv6 are four
times larger, the option-less IPv6 header is only twice the size of the option-less IPv4
header.
IPv6 routers do not perform fragmentation. IPv6 hosts are required to either perform
PMTU discovery, perform end-to-end fragmentation, or to send packets no larger
than the IPv6 default minimum MTU size of 1280 octets.
The IPv6 header is not protected by a checksum; integrity protection is assumed to
be assured by both a link layer checksum and a higher layer (TCP, UDP, etc.)
checksum. (UDP/IPv4 may actually have a checksum of 0, indicating no checksum;
IPv6 requires UDP must have its own checksum.) Therefore, IPv6 routers do not
need to re-compute a checksum when header fields (such as the TTL or Hop Count)
change. This improvement may have been made less necessary by the development
of routers that perform checksum computation at link speed using dedicated
hardware, but it is still relevant for software based routers.
The Time-to-Live field of IPv4 has been renamed to Hop Limit, reflecting the fact that
routers are no longer expected to compute the time a packet has spent in a queue.
(c) Prof. Izhak Rubin

41

IPv6 Simplifications

Fixed format headers

Header checksum removed

Note that encapsulation procedures include a packet checksum; checksums


also used at the MAC frame layer and ATM adaptation layers

Removal of hop-by-hop segmentation procedure

extension headers used

No fragmentation in the Internet; end-to-end fragmentation; path MTU


discovery used to establish MTU
Transmission of large packets which are segmented into small segments
can result in excessive retransmissions and throughput degradation; hence,
no segmentation used
IPv6 networks are required to carry a payload of 536 Octets; when no
discovery used, small packets can be sent.

Removal of Type of Service field, which indicates preference for path


selection. IPv6 provides mechanisms for handling such preferences.
(c) Prof. Izhak Rubin

42

IPv6 Header Parameters

Payload length; length of the data carried after the header (which contains
40 Bytes)
Next header type; e.g..; UDP or TCP; or Extension Header.
Hop limit; counts the number of hops.
New fields; facilitate handling of realtime traffic:

Priority (16 levels)


Flow Label; used to distinguish packets which require the same treatment.

Extension Headers; arranged in a daisy chain; includes:

Hop by hop options header


Routing header
Fragment header
Authentication header
Encrypted security payload
Destination options header
(c) Prof. Izhak Rubin

43

Extension Headers
IPv6 Header

Routing Header

Next Header=Routing Next header=TCP

TCP Header + Data

Routing Header; consists of a set of parameters followed by a list of addresses, used for
source routing (strict or loose sense)
Fragment header; for end-to-end fragmentation; a fragment header is inserted in each
fragment packet between the IPv6 header and the payload. Each fragment is routed
independently. The fragment header contains information allowing the destination to
concatenate the fragments. (Fields: Next header, Fragment Offset, M, Identification.)
Destination Options header; options header contains an option field in which option data
can be inserted. Each option is identified by an Option Type No.
Hop by Hop options; e.g..; jumbo payload option: since a 16 bit payload length field is
used, the max payload length is 64 KB. For longer packets, this option is used,
providing a 32 bit packet length field.
Extension header order; recommended: IPv6 header;Hop by hop options; destination
options (1); routing; fragment; authentication; destination options (2); upper layer
headers (such as TCP, UDP)
(c) Prof. Izhak Rubin

44

ICMP Evolution

Format: type, code, checksum (ICMP packet and fixed fields of


the IPv6 header), variable length body.
14 different types currently defined: destination unreachable;
packet too big; time exceeded; parameter problem; echo
request; echo reply; group membership query , report and
termination; router solicitation and advertisement; neighbor
solicitation and advertisement; redirect.
Error ICMP packet are not generated for multicast packets (can
create avalanche) and not in response to ICMP packets.
Reassembly timer is set at start of packets reassembly of
fragments; timeout levels of 1-2 minutes can be set.
Echo request and reply serve as IPv6 Ping.
(c) Prof. Izhak Rubin

45

IPv6 Specification Issues

8 bit hop count - 255 hops. Hop count used to prevent


long looping of packets.
16 bits length field - 64 KB packets. Segmentation of
large messages into 64KB packets induces only
40B/64KB = 0.06% overhead. Jumbogram option field
can be used to code a jumbo packet length using 32 bits
field. This is hop by hop option which is acceptable for
supercomputers (mostly directly connected).
No checksum used in IPv6.

(c) Prof. Izhak Rubin

46

Address Architecture

Increasing the address length from 32 bits to 128 bits allow the use of more degrees of
hierarchy, beyond the basic IPv4 layers of: Network, Subnet, Host
The address identifies an interface connected to a subnetwork, not a station. A
multihomed station will have as many addresses as interfaces. IPv6 allows an interface
to be identified by several addresses to facilitate routing or management.
IPv6 address categories: Unicast, Multicast, Anycast. Anycast address indicates that
the packet should be delivered to the nearest member of the group.
Address Notation: Eight 16-bit integers separated by colons; each integer is
represented by hexadecimal digits. e.g..; BC95:FEBD:6574:432A: etc..
Prefixes used for addresses employed by selected entities; e.g.., provider based
addresses. This consists of the following IDs: registry, provider, subscriber,
subnetwork, interface.
Special addresses: Unspecified; Loopback; IPv4; Site local (not sent on the Internet;
incl.. IDs for subnet and station); Link local (for stations on the same link; incl.. station
ID; not handled by a router).

(c) Prof. Izhak Rubin

47

Interdomain Routing

Routing Tables become very large if an entry is maintained for every network
in the Internet.
To reduce routing table size, we must aggregate several routing entries.
Hence, construct an hierarchy of addresses and use interdomain routing.
IPv6 solution: use provider addresses; they have a good relation with the
networks topology (geographical and organization based boundaries can be
ineffective).
Routes exchanged through the Interdomain Routing Protocol (IDRP).
For current IPv4, growth of routing tables is dealt with by deploying Classless
Interdomain Routing (CIDR). Within CIDR, IPv4 addresses are not
considered as composed of fixed length network numbers, but replaced by
variable length prefixes.
For IPv6, a station can have multiple addresses associated for interface to
networks run by multiple providers. Connection/packets can use any of these
networks.
(c) Prof. Izhak Rubin

48

Interdomain Routing: BGP-4


to IDRP

IPv4 Internet is an autonomous system, consisting of a collection of


subnetworks managed by a single entity. For example, a network provider
network, or that of a large company.
Autonomous systems use Exterior Gateway Protocol (EGP) to exchange
reachability information, to describe the destination. The Exterior Gateway
Protocol (EGP) was defined in 1982 and has been gradually replaced by
successive versions of the Border Gateway Protocol (BGP).
BGP-4 supports the routing table aggregation required by CIDR. It is a path
vector protocol. Border routers (linking 2 adjacent autonomous systems)
are allowed to announce paths. BGP is optimized for 32 bit addresses.
The Exterior Gateway Protocol (EGP) used by IPv6 is not based on BGP but
on IDRP (which is part of the OSI model). It is also in the path vector family,
and allows the use of multiprotocol routing and compute routing tables for
several families of addresses.
BGP messages are exchanged over TCP, while IDRP PDUs are carried over
a datagram service. IDRP runs directly on top of IPv6.
(c) Prof. Izhak Rubin

49

Intradomain Routing

An interior routing protocol is used to compute routes and maintain connectivity within a
routing domain or an autonomous system.
For the current Internet, domain managers have to chose an IGP. Updated version of
IPv4 protocols are composed: updated OSPF and RIP. Other: IS-IS, EIGRP.
OSPF (Open Shortest Path First) is the recommended protocol for intra-domain routing.
It is a link state protocol. All routers maintain a copy of a data base which contains link
state records (containing the status of links in the network area of interest). OSPF can
run on top of IPv6 between IPv6 capable nodes. The corresponding IPv4 OSPF can
operate in parallel (no integration).
RIP is a distance vector type routing protocol. Metric pairs used to describe reachable
destinations. Path length is identified in terms of the hop length (so that link status
identifiers., incl.. throughput and delay parameters, may not be included). Simpler to
implement but not as efficient. Can be used in small areas or for simple networks.
RIP for IPv6 is a simple update of RIP for IPv4. Requests sent to trigger an immediate
response about a destination status; responses sent every 30 sec to all neighbors.
Metric field contains the no. of hops required to reach a destination. RIP messages
exchanged in UDP datagrams.
(c) Prof. Izhak Rubin

50

Other Routing Protocols

Dual IS-IS is an extension of the routing protocol defined for CLNP in the
OSI Suite. It is a line state protocol, trying to perform integrated routing. A
single data base describes the links between all the routers in the network.
Included is also protocol specific addressing information. Dual IS-IS is able
to handle CLNP with IPv4. Extension to IPv6 defined.
IGRP (Cisco) - has an extended version EIGRP. It is capable of supporting
several network protocols in parallel, as IS-IS.
Notes: Some believe that routing should be tied with flows; resource
reservation can then be applied across a flows path to effectively support
realtime applications. Assign a route based on current congestion levels so
that the required QOS level is attained. A source route (derived from map
servers) will require high addressing overhead (128 bits for each
intermediate router). Alternative: VC route and VCIs - a flow setup model.
But this is an approach which is completely different than the Internets
scheme, and has yet to be proven.
(c) Prof. Izhak Rubin

51

Address Resolution: Neighbor


Discovery Process

The neighbor Discovery Process is used by IPv6 for address


resolution, to determine the subnet or media address of the destination
station. It includes and replaces the IPv4 ARP and route discovery.
It is defined as part of IPv6 ICMP. Initially, messages are sent to
multicast addresses. For IEEE 802 family (incl.. Ethernet or FDDI), a
48 bits multicast address is obtained.
If destination is not local, the first hop will be to a neighboring router.
The media address of this router is either already known (from past
use, and is cached), or it is obtained by sending a neighbor solicitation
message (which is an ICMP multicast address).
For access through Non-Broadcast Multiple Access (NBMA) network,
such as ATM or X.25 or circuit-switched network, it is not feasible to
multicast neighbor solicitation messages. Rather, the host is
configured with the ATM address of at least one router. It can then
send solicitations to this router, and receive router advertisements in
responses. The preferred router will be taken by the host as the next
hop.
(c) Prof. Izhak Rubin

52

Realtime Support and Internet


Flows

To support realtime applications, a flow is defined; the IPv6 header


fields of flow label and priority class are used.
A flow is a sequence of packets sent from a particular source to a
particular (unicast or multicast) destination for which the source
desires special handling by the intervening routers.
Packets making a flow have the same source-destination stations and
the same 24-bit flow label. Null flow labels are used when flows are
not designated by the application (as by current SMTP mailers, FTP
file transfers and HTTP web browsers). To be used by applications
with strict realtime objectives.
The flow label may be used in conjunction with the routing header: a
source route can be defined; all packets (through belonging to multiple
applications and multiple streams) using this route will require special
processing.
Flows are not equivalent to virtual circuits; the labeling of flows does
not affect routing.
(c) Prof. Izhak Rubin

53

Realtime Support:
Reservations

Flow labels can be used with resource reservation to ensure


that resources are pre-allocated at the nodes to support
realtime streams; datagram packet switching does not support
well hard realtime applications such as video or voice transfers.
Example: packet voice - 64 Kbps PCM, with packets containing
160 samples, or 20 msec of voice. Rate = 50 packets/sec sent
through the Internet. Quality drops as the network becomes
congested. Delay variances induce long playback delays
(reducing interactivity); packet losses result in crackles.
Use reservations to configure the queueing and scheduling of
designated packets at the network nodes. Such a resource
reservation protocol: RSVP. IPv6 labeling is used in
conjunction with this protocol.
(c) Prof. Izhak Rubin

54

Reservation and Scheduling

Reservation procedure is used to declare the realtime flows


and to inform the routers as to their resource requirements.
In front of the outgoing interface of a router, each realtime
stream is provided its own queue. All other traffic shares a
data queue. A realtime queue is served at its requested rate,
thus regulating its packet delays. The data queue is served
on a best effort basis.
R1

Server
R2

Data

(c) Prof. Izhak Rubin

55

Multimedia Over the Internet

Recent Internet approaches: Fair queueing methods employed in contrast with


reservations, combined with class based queueing. Use of hierarchical encoding.
Adaptive operations:

In 1988, the use of slow start for TCP (Van Jacobsen). Start at slow rate and increase rate
gradually. Include a feedback loop that slows down the application if the network becomes
congested. Problems with multi-media open loop applications.
Video quality can be traded with network congestion - adaptive rate regulation.
Adaptive voice (and video) encoding - use embedded encoding and congestion based no.
bits/sample (recent papers by I.Rubin and K.K. Chang)
Hierarchical encoding uses the IPv6 priority field: Bits 0-7 for congestion controlled traffic (7 =
highest priority, for control traffic); bits 8-15 for realtime traffic (15=highest priority)

Fair queueing: the server allocates its resources to each user in a fair manner. For example, by
queueing the packets of each active user in separate queues and serving them in a Round Robin
fashion. No explicit reservations need be used. Different queueing classes can be defined (e.g.., a class
per destination, per source, per TCP connection, etc..). Resources can be reserved for a queueing class,
and fair queueing used to share resources within a class. Leads to schemes: Processor Sharing (PS);
generalized Processor Sharing (GPS). But to relate QOS with allocated resource, source traffic (flow)
needs to be policed.

(c) Prof. Izhak Rubin

56

Das könnte Ihnen auch gefallen