TCP/IP Naming, Addressing, and Routing
TCP/IP Naming, Addressing, and Routing
TCP/IP Naming, Addressing, and Routing
An IP Tutorial
Tutorial Overview
Part 1: Internet Background Part 2: Internet Basics Part 3: How does data get from A to B? Part 4: IP Routing Part 5: IP QoS Part 6: Internet History, Governance, References
Regional Enterprise
Enterprise
Regional
FDD Net # 1
R1
Ethernet H5 Net # 2
H6
H7
Private Line
H2
R2
H3
H4
Ethernet Net # 3
20M hosts, 18K adds/day 755K www-prefixed hosts, 256% annual growth rate Highest growth rate: USA (1), Japan (2) 1300K Domains (60/40 USA vs. Rest) Largest domain , .com with 4.5M hosts 214 connected IP countries 55 million users
1000
100000
100000000
10000000
1000000
10000
100
10
Hosts
D omains
Networks
# of countries
S ep
100 120 140 160 180 20 40 60 80 0
-9 1 1 -9 2
NAP traffic ~ 1 Gbps, growing at 5x/year Total Internet Bandwidth ~ 350 Gbps Worlds telecom traffic ~ 1 Tbps
Telephone
Lines: CAGR* = 5.1% Cellular Phones: CAGR = 68.9% Internet Users: CAGR = 113.1%
* Compounded Annual Growth Rate
Internet Growth
Tutorial Overview
Part 1: Internet Background Part 2: Internet Basics Part 3: How does data get from A to B? Part 4: IP Routing Part 5: IP QoS Part 6: Internet History, Governance, References
Design Philosophies
Connectionless Paradigm
There is no connection in IP
Packets
can be delivered out-of-order Each packet can take a different path to the destination No error detection or correction in payload No congestion control (beyond drop)
correction is by retransmission
Connectionless Example
H
H H
FDDI
Router
Ethernet
H H H
Private Line
Router
Ethernet
H H H
OSPF
IP
LANs 10/100BaseT
ATM
FR
CDPD
Wireless
OSI Hierarchy
7
6 5 4 3 2 1
Application
Presentation Session Transport Network Link Physical
Physical
SONET,
T1, T3
Link
Ethernet,
Network
Routing,
OSI Hierarchy
7
6 5 4 3 2 1
Application
Presentation Session Transport Network Link Physical
Transport
Error
Globally significant To/From Addresses Finite but variable length content Variable delays Delivery failures Out-of-order deliveries May take different routes
Network delivers postcards best effort Endpoints handle all service actions above best effort Page numbering (ordering, duplicate detection) Positive Acknowledgment Retransmission on Timeout
IP Network Model
The Internet is a network of networks A network is a collection of hosts that can communicate directly among each other
Any
pair can communicate The network defines how the pair exchanges information
IP Network Model
networks involved may be (and usually are) heterogeneous An end-to-end path is achieved by concatenating the transport of data over possibly multiple networks A Router mediates the differences between the preceding and succeeding networks in the concatenation
of state maintained is determined by the application Not all applications require the same amount of state (e.g., reliable delivery)
state is state that can be lost and refreshed without completely losing the connection
Since intermediate systems do not maintain hard state, requested QoS is difficult to manage
When
soft state is lost, intermediate systems will not be able to maintain the QoS (the information on what the QoS was is lost momentarily)
IP routers take actions independent of other routers to forward data toward its destination
IP
routers make local decisions only; there is no network-wide coordination a bad routing decision by one router can be corrected by its neighbors a failure of a router does not affect the forwarding of traffic to a destination not directly attached to the failed router
implementations are highly optimized for the most common case Use of other IP features can cause significant performance degradation
out-of-order datagram deliver use of IP options
Bandwidth Bottlenecks
C3
C2 "Longer" paths become underutilised Path for C1 <> C3 Path for C2 <> C3
Engineering-Out
The Bottlenecks
C3
C2
C3
C2
Source device (S) determines the type of path on the basis of the data
Low delay (preferred for VoIP traffic) High bandwidth (preferred for FTP)
Host
Host
IP Processing
R
IP Subnet (No IP Processing)
Every TCP/IP device (optionally) has a name. Each IP subnet interface on the device has an IP address and one or more subnet specific addresses (sometimes called physical addresses).
Subnet Specific Addresses are often referred to as physical addresses but are really either
true
network addresses (like E.164, ATM End System Addresses) link layer addresses (like Frame Relay DLCIs or ATM VPI/VCI)
Note: the term subnet is also used as a logical subdivision of the IP address space
which
R
IP: C.1
R
VPI/VCI: 555
VPI/VCI: 898
IP: C.2
R
IP: D.2 MAC: 458ef9
VPI/VCI: 666
Name: www.att.com
R
IP: D.3 MAC: b23cd1
H
IP: D.1 MAC: efd462
IP Addresses
IP version 4 addresses are all 24 bits in length Representation is in dotted-decimal notation: A.B.C.D
is the decimal number equivalent to the 8-bit quantity in the first octet B is the decimal number equivalent to the 8-bit quantity in the second octet, etc.
the mask is ANDed with the address to obtain the network part e.g., 255.255.255.0 means that the first 3 octets are network and the last octet is host, or
a
the length is placed after a slash separating the address from the length
A addresses had an 8-bit network and 24-bit host part Class B addresses had a 16-bit network and 16-bit host part Class C addresses had a 24-bit network and 8-bit host part
natural network part could be extended out to, but not including, the host part when this is done, a subnet mask is required to allow various IP processing stages to determine the network/host boundary
can now be any prefix of length 1 to 31 bits this required changes to routing protocols to allow carriage of the subnet length field
IP Packet Structure
Header
...
Data
IP Packet Structure
4-bit 8-bit 4-bit Version Header Type of Service Length (TOS) 16-bit Identification 8-bit Time to Live (TTL) 16-bit Total Length (Bytes) 3-bit Flags
8-bit Protocol
Payload
Tutorial Overview
Part 1: Internet Background Part 2: Internet Basics Part 3: How does data get from A to B? Part 4: IP Routing Part 5: IP QoS Part 6: Internet History, Governance, References
Host Configurations
How
does a host get an IP address? Other fixed configurations: DNS server and default router
Decision:
Address resolution
Getting from A to B
Host address resolution protocol (ARP) and table Host forwarding table
Host Configurations
own IP address The IP address of its DNS server (two are preferred, primary and secondary) The IP address of the default router it will use to reach hosts not on its local (sub)network These can be either static (manual) or dynamic configurations
Host Configurations
A host also needs to know the subnet mask (or prefix length) of its own IP address
subnet
mask uses a 24-bit quantity with logical AND to extract the IP subnet prefix length explicitly indicates what part of the local IP address is the IP subnet
Dynamic Configuration
central administration to maintain a server The protocol uses the hosts Ethernet address (on I/F) to identify it The DHCP server responds with the specific configuration information for that host
DHCP at Bootup
DHCP: Dynamic Host Configuration Protocol
DHCP Response
Ethernet
DHCP Server
DNS
Ethernet
http://www.att.com
Dest. MAC addr. = ef655c Dest. IP Addr.= 135.16.12.44
DNS
ARPS
ATM Network
SVC set-up to ef655c Assign VPI/VCI = 1234
http://www.att.com
VPI/VCI = 1234 Dest. IP Addr.= 135.16.12.44
The resolver is called to map the name to an address A name resolution query is sent to the configured DNS server
address(es) corresponding to the name, if it knows it, or the address of another server that should know more
roadrunner.aspca.org, or aspca.org
but
it
doesnt know about roadrunner.aspca.org but it does know that the name server for aspca.org is called dns.aspca.org at a.b.c.d
dns.aspca.org
finds the entry and replies with the address The server will also respond with any other information it has for that name
com
edu
gov
int
mil
net
org
us
uk
in
att
att
va
www
worldnet
reston
cnri
Top Level Domains are assigned and a set of top level servers are maintained
Internet
Society is owner (http://www.isoc.org) Internet Assigned Number Authority within ISOC contracts actual running of top-level servers (3 sites: US, Europe, Asia/Pacific)
are created and assigned administration is delegated to that subordinate name for each subordinate name, a minimum of two servers must answer for that name: a primary and at least one secondary the primary is the point of administration secondaries are updated automatically using a domain/zone transfer protocol
Once the DNS returns the destination IP address, the host must determine whether it is local or remote
local:
there is a presumption that all local hosts are directly reachable for example all hosts on the same Ethernet are directly reachable
remote:
The determination of local or remote is based on comparing the IP subnet of the source with that of the destination
If
the local IP subnets match, the two hosts are local to each other The assignment of IP addresses must maintain this rule!
you first need to know the destination host Ethernet address (this generalizes for any layer 2 subnet)
Given the IP address of a local destination, use the Address Resolution Protocol (ARP)
ARP
ARP Cache
ARP replies are seen by all local hosts Each host maintains an ARP cache
mapping
between IP address and Ethernet (layer 2) address each cache entry times out (approx. 10 minutes) the cache is consulted for address resolution before an ARP request is sent
send it to the local router the router has a local IP address use ARP or the ARP cache to translate to a layer 2 address
its FIB to determine the next hop the entire process repeats at this point
sending
to the other end is both broadcast and unicast point-to-point examples: private line, frame relay PVC, ATM PVC
Data Transfer
Once the subnet and interface is selected, data transmission uses the underlying layer 2 medium IP is encapsulated in a multiprotocol sublayer (may be different by medium) The multiprotocol PDU is encapsulated using the appropriate layer 2 mechanism for that medium Transmission begins
TCP
IP
TCP
IP
Adaptation
ATM Cells
Tutorial Overview
Part 1: Internet Background Part 2: Internet Basics Part 3: How does data get from A to B? Part 4: IP Routing Part 5: IP QoS Part 6: Internet History, Governance, References
Part 4: IP Routing
Elements of IP Routing Internet Routing Architecture and Autonomous Systems Interior Routing Protocols (RIP, OSPF, IS-IS) Exterior Routing Protocols (BGP)
Elements of IP Routing
IP Subnet
R
IP Subnet
R
IP Subnet
R
IP Subnet
Destination
IP Routing is a dynamic, fully distributed process. Does not rely on any centralized administration. Packet Forwarding is a hop-by-hop process. Each entity (host or router) only forwards the packet to another entity (host or router) attached to its local IP subnet.
Autonomous System: A collection of IP subnets and routers under the same administrative authority. Interior Routing Protocol Exterior Routing Protocol
Uses
Interior Gateway Protocols (IGPs) to determine routing within the Autonomous System Uses Exterior Gateway Protocols (EGPs) to interact with other Autonomous Systems
A Service Provider may have multiple Autonomous Systems within its operating network
The
AT&T WorldNet dial platform and Common Backbone were two separate ASs that have merged There are two ASs within the WorldNet Common Backbone: one for Internet Gateway Routers (IGRs) and one for the rest
Routings 3 Aspects
Acquisition of information about the IP subnets that are reachable through an internet
static
routing configuration information dynamic routing information protocols (e.g., BGP4, OSPF, RIP, ISIS) each mechanism/protocol constructs a Routing Information Base (RIB)
Routing Aspect #2
of a single table from all the Routing Information Bases (RIBs) information about a destination subnet may be acquired multiple ways a precedence is defined among the RIBs to arbitrate conflicts on the same subnet Also called a Forwarding Information Base (FIB)
Routing #3
RIB Construction
routing Interior Gateway Protocols, e.g., OSPF Exterior Gateway Protocols, e.g., BGP
RIB Construction
Each routing protocol builds its own Routing Information Base (RIB) Each protocol has its own view of costs
e.g.,
FIB Construction
An algorithm is used to choose one next-hop toward each IP destination known by any routing protocol
the
set of IP destinations present in any RIB are collected if a particular IP destination is present in only one RIB, that RIB determines the next hop forwarding path for that destination
FIB Construction
a particular IP destination is present in multiple RIBs, then a precedence is defined to select which RIB entry determines the next hop forwarding path for that destination This process normally chooses exactly one next-hop toward a given destination
FIB Contents
IP address of the next hop toward that IP subnet Interface id of the subnet associated with the next hop Optional: cost metric associated with this entry in the forwarding table
Packet Forwarding
Forwarding is the process of determining where a particular datagram should be sent next
involves
searching the FIB for the next hop IP address and interface prefixes may have common upper parts, the longest one matching is used
Distance Vector
Accumulates
Link State
Builds
a network topology database Computes best path routes from current node to all destinations based on the topology
Distance Vector
Attempts to minimize messaging overhead and memory requirements at the expense of slower convergence Needs careful design to avoid problems
packet
H
A.1
IP Subnet A Cost = 2
A.2
IP Subnet C Cost = 2
C.2 B.3
IP Subnet B Cost = 1
B.2 Cost to D = 2 Next Hop = direct
Destination
D.1
D.3
IP Subnet D Cost = 2
Packet Forwarding
Cost to D = 5 Next Hop = A.2
A.1
D.1
IP Subnet A Cost = 2
A.2
A.3
R
D.1
IP Subnet C Cost = 2
C.2
B.1
IP Subnet B Cost = 1
B.2
Cost to D = 2 Next Hop = direct
B.3
Destination
D.1
D.3
D.1
IP Subnet D Cost = 2
H
D.1
D.1
Accumulated cost
cost
is a constant administrative assignment for each subnet assignment is typically 1 for each subnet (equivalent to hop-count) included in routing protocol exchange
the
new entry is used in the RIB the new entry is broadcast to all its neighbors (except the one from which it was received)
Periodically, each router re-advertises all the routes it knows to its neighbors
this
can be done in many ways: from simple neighbor hellos to enumeration of all routes
The broadcast of link state from one router to all others uses a variety of mechanisms
true
broadcast when the layer 2 subnet interconnecting the routers supports broadcast multicast among the routers when the layer 2 subnet supports that (e.g. FrameRelay, ATM) hop-by-hop flooding as a last resort
protocol assumes that the topology databases of all nodes are identical to prevent routing-loops from forming acknowledgments from all neighbors are needed routers must deal with out-of-order delivery of updates, replicates, etc., all of which requires processing time
Topology Database
Router
Sequence
number
Flooding Algorithm
each
router announces itself and each link it is attached to announcements by broadcast or multicast or unicast to all neighbors Designated router used on broadcast nets
to minimize number of adjacencies
neighbors
use hello protocol if a router loses a neighbor, then routes via that neighbor are recomputed send announcements with link metric to lost neighbor set to infinity
yourself as starting point Search outward on the graph and add router IDs as you expand the front
the SPF algorithm needs to deal only in the number of routers, not the number of routes
IP Subnet A Cost =3
A.2
R2
C.1
R1
B.1
IP Subnet C Cost = 2
C.2 B.3
IP Subnet B Cost = 2
B.2
R3
D.2
R2 R3 R4 R1 R2 R3
R4
D.3
IP Subnet D Cost = 3
creation
Differences
Supports policy-based routing by keeping the path of ASs toward the destination
e.g.,
Tutorial Overview
Part 1: Internet Background Part 2: Internet Basics Part 3: How does data get from A to B? Part 4: IP Routing Part 5: IP QoS Part 6: Internet History, Governance, References
Part 5: IP QoS
Philosophy How things work on the Internet
data voice,
video
How IP QoS tries to make them work better The role of ATM
Selectively do resource reservation if you need things to work better Maintain only soft state or no state
Protocol Architecture
Data Voice, Video
HTTP
FTP
RPC
TCP
UDP
IP
delivery not reliable - congestion may cause packet loss sequence may not be preserved - packets may follow different paths delays variable
Competing traffic
Packets experience variable delay (jitter) under best-effort service Receiver can accommodate jitter by adapting the playout point
Sliding Windows
Packets: 1 2 3 4 5 6 7 8 9 10
ACKed by receiver
sent, but not ACKed can send now cant send yet
Receiver acknowledges successfully received packets Sender limits number of packets that have been sent but not acknowledged
Limit
= Window
TCP probes for bandwidth by increasing its window size until loss occurs, then backs off and tries again
loss
Receiver
W=2
D R
of more than one packet per round-trip time typically results in an over-reaction to congestion
Signaling
QoS Routing
Scheduling
hop counts facility speeds bandwidth and delay requirements bandwidth availability
Flow
Sequence of packets defined by common destination address or subnet and possibly also by one or more of the following attributes: Source IP Address/Subnet
Protocol
(TCP or UDP) Source TCP/UDP port number Destination TCP/UDP port number Type of Service (TOS) field
Integrated Services
Flow-Based QoS
signaled via the ReSource reserVation Protocol (RSVP) per-flow reservations requested by receiver, propagated router-by-router difficult to implement; not widely deployed flows mapped into small # of classes packets marked (via TOS field) at network edge and prioritized in network interior based on marking
Services
QoS Goal Reduce Delays Improve Throughput RS VP Guara ntee d QoS Controlled Load Diffe rerential S ervices P riority As s ured
With exception of Guaranteed QoS service, QoS objectives are described qualitatively, not quantitatively
Token bucket defines token rate & bucket depth Use of token buckets common to all Integrated Services Similar to ATM and Frame Relay networks
RSVP
Sender
2.
1.
R
3.
1.Forward data flow established 2. PATH message traces route from sender to receiver 3. RESV message backtracks route of PATH message and installs reservation Soft state periodically refreshed by new PATH and RESV messages Interior routers maintain per-flow state
Receiver
BB
20
BB
D
OK ISP
OK
User Net 2
link bandwidth allocated per-flow or per-class in proportion to a configured weight supports minimum bandwidth guarantees and fair allocation of excess bandwidth randomizes packet loss to optimize TCP performance drop probabilities depend on buffer occupancy and possibly on packet priority (Weighted RED)
Accounts for queueing delay at single DS3 link saturated by background traffic Assumes 9 Mbps of voice With First-In-First-Out queueing (rather than WFQ), voice delays in the hundreds of msec would result
Packetization + Look Ahead (G.729): 45 msec assumes 4 frames per packet 10 msec per frame and 5 msec look ahead DSP Processing: 5 msec Propagation: 50 msec Queueing: 25 msec (gateway-to-gateway) Buildout: 25 msec
To consistently live within budget, voice must be prioritized at links, or links must be dedicated to voice
Link Sharing
155 Mbps
1.0 Customer 1 .14 .05
Priority
.03
Assured
.06
BestEffort
... ...
.12
Assured
.08
BestEffort
Provides characteristics of a private network Implemented via WFQ or other service discipline that guarantees bandwidth shares
experience with layer-2 services (frame relay and ATM) indicates that sub-classes must be queued separately to systematically divide bandwidth between them
Role of ATM
R1 S1 R2 S2 R4
Priority VC Assured VC Best-Effort VC
R3
Link sharing implemented through ATM Virtual Circuits (VCs) About 16K VCs supported per OC12 (today) with queueing and QoS differentiation on a per-VC basis
QoS routing at ATM layer can compensate for lack thereof at IP layer
Tutorial Overview
Part 1: Internet Background Part 2: Internet Basics Part 3: How does data get from A to B? Part 4: IP Routing Part 5: IP QoS Part 6: Internet History, Governance, References
ARPANET
Store-and-forward networks
Email
Telnet and FTP developed (1972/73) Metcalfe outlines ideas behind Ethernet BBN starts Telenet, first public packet data service (1974) UUCP developed at Bell Labs (1976)
Control Protocol (TCP) Internet Protocol (IP) Concatenates heterogeneous networks using IP
Internet Activities Board created (1983) Domain Name System intro. (1984)
UUNET founded for commercial netnews service (1987) First commercial email exchanges via Internet (1989)
MCI
terabyte/month 10 giga-packets/month
from NCSA leads to Netscape Navigator and MS Internet Explorer WWW growth is 341,634% per year
high-speed Backbone Network Service (vBNS) at OC-3, contract to MCI The Internet completely commercial
Internet Governance
Internet Society Internet Activities Board (IAB) Internet Engineering Steering Group (IESG) Internet Engineering Task Force (IETF) Internet Research Task Force (IRTF)
IETF Areas
Application Area Internet Area Operations & Management Area Routing Area Security Area Transport Area User Services Area
Internet Drafts are submitted to IETF working groups Internet Draft to Proposed Standard
stable
independent and interoperable implementations including all options IESG approval Draft Standard is normally considered final
References
Comer, Internetworking with TCP/IP, Prentice-Hall, 1988. Huitema, Routing on the Internet, Prentice-Hall PTR, 1995. Perlman, Interconnections: Bridges and Routers, Addison-Wesley, 1992. Stevens, TCP/IP Illustrated, volumes 1-3, Addison-Wesley, 1995.
References
www.isoc.org
The
Internet Society
www.iab.org
Internet
Activities Board
www.ietf.org
RFCs
www.internic.net
RFCs
and Internet drafts IP address and DNS registration information Databases of various and sundry Internet related stuff
Part 7: Miscellaneous
Load Balancing
A particular routing protocol may determine there are multiple paths toward a destination with the same cost
Typical
If a RIB has multiple entries for the same destination, then the FIB could include one, some, or all of them
Load Balancing
If there is more than one is entry in the FIB for a destination, load balancing is possible
round-robin
paths hashed distribution attempts to keep packets with the same source and destination addresses on the same trunk to minimize out-of-order delivery
IP Multicast
Design and purpose Distributed communication model Class D addresses MBONE
IP Multicast
Designed for efficient support of one-to-many and many-to-many communications, e.g., Conferencing, etc. Sender sends one copy addressed to a multicast group and the network delivers one copy to each multicast group member.
IP Multicast
Based on a fully-distributed communication model that does not require a centralized bridge:
Participants join/drop multicast sessions via the Internet Group Management Protocol (IGMP). Multicast routing protocols (DVMRP, MOSPF, PIM, etc.) are used for packet routing and delivery.
The Internet Multicast Backbone (MBONE) was deployed between 19881992 for experimentation and development of multicast protocols
RIP Messages
Request / Response
1 1 2 2 2 4 Command (Req/Resp) Version reserved Address Family (IP=2) reserved Address May be repeated
8
4
reserved
metric
RIP Protocol
request optional: upon change of metric on destination (e.g., due to link failure)
RIP Protocol
entire RIB is sent, not just entries that changed Convergence sometimes encounters loops
count-to-infinity in RIP means count-to-16 each hop may wait the full period to forward updates