Beruflich Dokumente
Kultur Dokumente
Internet
Professor Izhak Rubin
rubin@ee.ucla.edu
Electrical Engineering Department
UCLA
2014-2015 by Professor Izhak Rubin
Internet Architectural
Elements
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
X-Window system
Remote logon
TELNET
Application Protocols:
Providing Utility Service
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
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
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
Network Address
Class
Network Address
(Bytes)
First Number
No. of Local
Addresses
0-127
16,777,216
128-191
65,536
192-223
256
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
B
1101
61
C
11
Subnet Masks
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:
12
To route to an organization, using a single routing table entry, a router needs to know:
13
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
UNUSED
16
IP Datagram: Fragmentation
Control
17
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:
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.
19
Routing IP Datagrams
Datagrams are passed from gateway to gateway until they reach a final gateway
which delivers then directly.
20
21
22
23
24
25
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
27
28
29
30
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.
32
TCP Functions
33
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
35
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.
36
TCP Connection
37
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.
39
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
40
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
42
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:
43
Extension Headers
IPv6 Header
Routing Header
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
45
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).
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
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
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
52
53
Realtime Support:
Reservations
54
Server
R2
Data
55
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.
56