Click here to load reader
Upload
maude-francis
View
215
Download
0
Embed Size (px)
Citation preview
Internet Internetworking : an overview of concepts, terminology, and technology underlying the TCP/IP Internet protocol suite and the architecture of an internetbased on Introduction to TCP/IP and Internetworking by Douglas Comerhttp://www.cs.purdue.edu/people/comer
TCP/IP
TCP IP
, , , , ,
IPX, AppleTalk
Internet Architecture Board
1989
1992 Internet Society
Internet Activities Board
IAB IAB Board that oversees and arbitrates
IRTF(Internet Research Task Force)TCP/IP internetworking Internet Research Steering Group
IETF(Internet Engineering Task Force) engineering Internet Engineering Steering Group8 area Application, General, Operation and ManagementInternet, Routing, Transport, Security, User Servicesworking group(WG)
Internet Society, , 1992 Board of Trustees http://www.isoc.org
Request For Comments(RFCs)TCP/IP , Internet, Edited, not refereedsurveys, proposals, measurements protocol standard Numbered in chronological orderAlways evolvingAvailable on-line
For Your Information Notes(FYIs)Subset of RFCsTCP/IP Internet , RFC 1177 :FYI On Questions and Answers to Commonly Asked New Internet User Questions
Best Current Practices(BCP)Subset of RFCs community IESG RFC 1818
TCP/IP Internet Official Protocol Standards RFC 4 TCP/IP
Standard Trackproposed standarddraft standardfull standard
Internet DraftsPreliminary RFC IETF WG Available on-line6 RFC Internet Monthly Reportsftp://ftp.isi.edu/in-notes/imr
What Is Internetworking? Primarily S/W, not H/WUniversal interconnection
To maximize interoperability of distributed computations across vendors and products
An Internetwork(Internet)Collection of interconnected, cooperative networks ()
TCP/IP On single machine for inter-process communicationAmong some of the machines on a local netAmong machines at multiple sites within a given organization To connect machines at a given site to the rest of the world
TCP/IP Spans all over the worldOriginal R&D (ARPA by DoD)later funded by NSF 100%
TCP/IP
TCP/IP ( )best-effort ( ) reliable delivery
TCP/IP
H/W Physical Network Physical (hardware) addressing
TCP/IP TCP/IP heterogeneous TCP/IP
H/W Connection oriented
Connectionless
Connection Oriented(Circuit Switched Technology)Lease a connection through the network . :
Connectionless(Packet Switched Technology)Accepts and delivers packets of data (utilization) (: less than 1500B)
Local Area Network(LAN)Wide Area Network(WAN)
Categories are informal and qualitative
Local Area NetworksEngineered for high speed
Wide Area Networks(Long Haul Networks)LAN
Wide Area NetsARPANET, NSFNETCommon carrier services Point-to-point Local Area NetsEthernet, Token Ring
ARPANET(1968-1989)Internet WAN around which TCP/IP was developedInitial funding from Advanced Research Project Agency1968-1989 Packet Switched Node(PSNs) 56K bps
NSFNET(1987-1992)Funded by National Science Foundation : 3 Wide area backbone spanning U.S.Many mid-level(regional) networks that attach to backboneCampus networks at lowest levelBecame ANSNET and vBNS
Common Carrier PSSValue-added packet switching services SMDSFrame RelayISDNATM
LAN : Ethernet10 Mbps over coaxial cable or twisted pair 500m IEEE 802.3Twisted pair : 10Base-TFast Ethernet : 100 Mbps
(Ethernet)DestinationSourceTypeData50-1500 octet data field2-octet type field6-octet source address6-octet destination address
02 07 01 00 27 ba 08 00 2b 0d 44 a7 08 00 45 0000 54 82 68 00 00 f f 01 35 21 80 0a 02 03 80 0a02 08 08 00 73 0b d4 6d 00 00 04 3b 8c 28 28 200d 00 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 1516 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 2526 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 3536 37Octets of frame in hexadecimalDestination : 02.07.01.00.27.baSource : 08.00.2b.0d.44.a7Frame type : 08.00 (IP)
Bridge LAN LAN LAN LAN (repeat)1 packet-time Does not forward collisions or noiseDoes forward all broadcast packetsCalled level 2 interconnectMakes multiple LANs appear to be a single, large LAN
Point-to-Point Network serial line data link (framing) formaterror detection/recovery scheme twisted pair coaxmicrowave/satellitedial-up connectionoptical fiber
Physical Network Address unique physical . .
Physical AddressingStaticAssigned by hardware vendorConfigurableAssigned by customerDynamicassigned by software at startup
Physical Network Addressing Static 48-bit address : All 1s address reserved for broadcastOne-half of the addresses reserved for multicast; assigned by customer
How Adaptive Ethernet Bridge Uses AddressesBridge begins with no knowledge of which machines connect to which wire; it forwards all packetsBridge watches source address in packets to form list of which machines reside on each sideBridge uses destination address and location list to decide whether to forward packetBridge always forwards broadcast and multicast packets
Bridge Adapting 123456bridge 1 : 02C 4 : F4D 2 : 1B6 5 : 871 3 : 39A 6 : 5EA
( )Address lists when bridge boots
Lists after hosts 1 and 3 communicate
Lists after hosts 2 and 5 communicate
--02C39A-02C39A1B6871
TCP/IP Physical NetworksThe TCP/IP protocols accommodate all types of physical networks. TCP/IP runs across a local area network such as a Token Ring, a wide area network, a point-to-point link between two machines, or a set of bridged LANs
: To maximize interoperability of distributed computations across vendors and productsUniversal connectivity ,
TCP/IP physical network network hardware, physical addresses, (abstractions)
TCP/IP UsersviewActual connections
Architectural ModelHosts connect to physical networksDedicated computers called IP gateways or IP routers interconnect networks
Addressing ModelAbstract Internet address(IP address) assigned to every host or router that connects to an InternetApplication software on hosts and routers uses Internet addresses when sending and delivering packetsSoftware in the operating system maps Internet addresses into physical hardware addresses automatically
Host forms a packet to be sent including the destination Internet addressIf host can reach the destination directly, it sends the packet over the physical network to its destinationIf host can not reach the destination directly, it sends the packet to the nearest router
If router can reach the destination directly, it sends the packet over the physical network to its destinationIf router can not reach the destination directly, it chooses another router that it can reach directly and sends the packet to that router
Net 1Net 2Net 3R1R2
Net 1
direct
Net 2
direct
Net 3
R2
Other
Error
CompactUniversalWorks with any network hardwareSupports efficient decision makingTest whether a destination can be reached directlyDecide which router to use for indirect deliveryChoose next router along a path to the destination
TCP/IP 32bit, hardware independent addressPrefix of the address uniquely identifies the network to which the host attaches(all machines on the same net share the same prefix)Prefixes assigned by central authority(IANA)Suffix of the address gives a unique id for the networkSuffixes assigned by local network administrator
Prefix Suffix How should division be made?Large prefix, small suffix means many possible networks, but each is limited in sizeLarge suffix, small prefix means each network can be large, but there can only be a few networksInternet address scheme designed to accommodate both possibilities
The Classes of IP Addresses0101001011101111netidhostidnetidhostidnetidhostidIP multicastreservedClass AClass E
Why Partition Internet Address Into Network and Host Portions?Each address must be uniqueWant to make routing efficientPartition allows us to assign unique id to each network, so we can do routing using network portion and delivery using unique host portion
Dotted Decimal NotationSyntactic form for expressing 32-bit addressUsed throughout the Internet and associated literatureRepresents each byte in decimal separated by periods (dots) : 32-bit number in binary10000000 00001010 00000010 00000011dotted decimal notation 128.10.2.3
Network Prefixes and Dotted Decimal FormPrefix is an exact multiple of octets1 octet for Class A2 octets for Class B3 octets for Class C
Dotted decimal makes reading easy
IP Address ConventionsWhen used to refer to a networkHost field contains all 0 bitsBroadcast on the local wireNetwork and host fields both contain all 1 bitsDirected broadcast : broadcast on specific (possibly remote) networkHost field contains all 1 bitsNonstandard for: host field contains all 0 bits
Illustration of IP AddressingRest of the InternetR1H1R3R2Hosts and routersusing other addressesSite with three networksExample host128.10.0.0192.5.48.0128.211.0.0128.211.0.9Router to site
Subnet AddressingNot part of original TCP/IP address schemeAllows a site to use a single network address for multiple physical networksSubdivides the hostid portion of an address into a pair of fields for physical network and hostInterpreted only by routers and hosts at the site; treated like normal address elsewhereLike the IP address scheme in miniature
Subnet Addressing Class B
The form of one possible subnet interpretationnetidhostid0163102416netidphysical nethost31
Illustration of Subnet Addressing
Rest of the Internet
R1
R3
R2
Sunet address treated as normal IP address
Subnetting hornored byusing part of hostportion to identifyphysical net
128.10.1.0
128.10.2.0
128.10.3.0
Router to site
Site using third octet to subnetaddress 128.10.0.0
Subnet Address DetailsEach physical network is assigned subnet maskMask covers netid portion plus zero or more bits of hostid portionWhen mask is applied to a destination address, it gives the address of a subnetSite may choose a different mask for each of its networks (not advisable)Site may assign all 1s or all 0s subnet (not advisable)
Fixed-length IP Subnet AddressingAdvantagesUniformityEase of debugging/maintenanceDisadvantagesNumber of nets fixed for entire organizationSize of physical net fixed for entire organization
Using Fixed-Size Subnets with a Class B AddressBits in mask # subnets #hosts/subnet 16 1 65534 24 254 254 30 16382 2Notes24-bits mask uses third octet for subnetting(typical)All 0s and all 1s values omitted
Variable-Length SubnettingAdvantagesIncreased flexibilityMixture of small and large netsMore complete use of address spaceDisadvantagesDifficult administrationPotential for problemsAddress ambiguityTopology restrictionsExcessive routes
Classless Inter-Domain Routing (CIDR)ProblemExponential Internet growthLimited IP addresses (esp. Class B)Will exhaust address space in a few yearsSolution to problemAssign organization multiple Class C address instead of a single Class BTemporary fix until IpngBackward compatible
CIDR New ProblemExcessive entries in route tablesLarge volume of data during routing updateSolution Classless Inter-Domain RoutingUse network address and countAbbreviation for this network and the next n
Binding IP Addresses to Physical H/W AddressesMust use physical addresses to send and receive packetsTherefore, must map IP addresses to physical addressesMethod depends on underlying H/W technologyS/W to perform mapping built into network interface S/W in the O/S
Static Address BindingUseful when H/W addresses chosen from small, dense setKey ideas :Local site administrator is free to choose host portion of an IP addressChoose IP address that encodes H/W address in its host portion Mapping becomes trivial
Dynamic Address BindingUseful when hardware addresses are large and fixed Requires hardware broadcastBest for local area networkKey ideas:Maintain a table of pairs (Ia, Ha) where Ia is Internet address and Ha is H/W address for machine AUse the network to obtain new bindings
Internet Address Resolution Protocol (ARP)Internet standard for dynamic address bindingAllows machine A to find machine B;s physical address knowing only Bs Internet addressUses hardware broadcastARP only used to map addresses within a single physical network, never across multiple networks
ARP Machine A broadcasts ARP request with Bs IP addressAll machines on local net receive broadcastMachine B replies with its physical addressMachine A adds Bs address information to its tableMachine A delivers packet directly to B
ARP request and reply messagesA broadcasts request for B (across local net only)
B replies to request
AXBYYBXA
ARP Packet Format when used with EthernetHardware-typeProtocol-typeHLENPLENOperationSender HA (octets 0-3)Sender HA (octets 4-5)Sender IA (octets 0-1)Sender IA (octets 2-3)Target HA (octets 0-1)Target HA (octets 2-5)Target IA (octets 0-3)081631
Algorithm for Processing ARP RequestsExtract senders pair, (Ia, Ha) and update local ARP tableIf this is a request and the target is meFill in target h/w addressExchange sender and target entriesSet operation to replySend reply back to requester
ARP detailsARP table is merely a cacheEntries should time out and be invalidatedMachine can broadcast new binding when it boots
Comments on Address BindingConceptual purposeIsolates h/w addresses at low levelAllows application programs to work with Internet addresses onlyConsequencesOccurs at lowest level of systemShould not be used for routingProvides uniform, virtual network interface
Internet Protocol (IP)Provides a connectionless packet delivery serviceDefines the format of packets for the (virtual) InternetSpecifies routing
IP DatagramBasic unit of Internet transferAnalogous to physical network packetComposed of Header that contains source and destination Internet addresses, datagram type field, etc.Data area that contains data being carried
IP Datagram FormatVERSLENType of serviceTotal lengthIdentFragment offsetTimeProtoHeader ChecksumSource IP AddressDestination IP AddressOptions PaddingData..04816192431Flags
EncapsulationIP datagram travels in physical network packet or frameComplete datagram is treated as data by the hardwareTCP/IP defines standards for encapsulation on most network hardware
Datagram Encapsulated in Physical Network Frame
Complete IP datagram is treated as data in physical network frameEncapsulation occurs in network interface s/w as the last step before the datagram is transmittedIP HeaderIP DATAFrame DATAFrame Header
Example Datagram Encapsulated in an Ethernet Frame02 07 01 00 27 ba 08 00 2b 0d 44 a7 08 00 45 0000 54 82 68 00 00 f f 01 35 21 80 0a 02 03 80 0a02 08 08 00 73 0b d4 6d 00 00 04 3b 8c 28 28 200d 00 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 1516 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 2526 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 3536 37IP header follows Ethernet from header and contains twenty octetsIP source : 128.10.2.3 (800a0203)IP destination : 128.10.2.8 (800a0208)IP type : 01 (ICMP)
Routing in an InternetHost delivers datagrams to directly connected machinesHost sends datagrams that can not be delivered directly to routerRouters forward datagrams to other routersFinal router delivers datagram directly
Efficient RoutingRouting decisions based on table lookupRouting tables keep only network portion of addresses (size proportional to number of networks, not number of hosts)Algorithm is efficient and easy to understandEasy to automate routing table update
EX Routing Table Found in an IP Router
to reach net route to this addr 20.0.0.0 deliver direct 30.0.0.0 deliver direct 10.0.0.0 20.0.0.5 40.0.0.0 30.0.0.7Net10.0.020.0.0.030.0.0.040.0.0.0SQR20.0.0.510.0.0.520.0.0.630.0.0.730.0.0.540.0.0.7
Network MTUEach network h/w technology imposes a fixed limit on the maximum size of a packetSize limit called Maximum Transmission Unit (MTU)Encapsulated datagram must be less than network MTU
Possible Ways to Accommodate Networks with differing MTUsForce datagram to be less than smallest possible MTUInefficientCannot know minimum MTUChoose initial datagram size that seems appropriate and handle problems laterIP uses the latter
Datagram FragmentationNeeded when datagram larger than network MTU over which it must travelPerformed by routersDivides datagram into several, smaller datagrams called fragmentsEach fragment routed as independent datagramFinal destination reassembles fragments
Illustration of FragmentationHosts A and B send datagrams of up to 1500 octetsRouter R1 fragments large datagrams from Host A before sending over Net 2Router R2 fragments large datagrams from Host B before sending over Net 2Host AHost BR1R2Net 2MTU=440Net 1MTU=1500Net 3MTU=1500
Datagram Fragmentation DetailsEach fragment is a datagramRouter replicates initial datagram header for all fragmentsOffset field in header gives offset in original datagram for data in this fragmentFragment bit in header indicates this is a fragmentAdditional bit set in header to indicate last fragment
Example of FragmentationOriginal datagram
headerData1400bytesData2400bytesData3400bytesheader1Data1header3Data3header2Data2Fragment #1 (offset of 0)Fragment #2 (offset of 400)Fragment #3(offset of 800)
Offset specifies where data belongs in original datagramOffset actually stored as multiples of 8 octetsLast fragment bit turned on in header of fragment #3
Best Effort DeliveryIP uses best-effort deliveryIP makes an attempt to deliverIP does not guarantee deliveryIn an internet, routers become overrun or change routes, meaning that:Datagrams can be lostDatagrams can be duplicatedDatagrams can arrive out of or or scrambledMotivation : allow IP to operate over the widest possible variety of physical networks
In PracticeIP works extremely wellErrors are the exception, not the ruleIP is designed to tolerate errors in the underlying hardware; it does not introduce them
Error Detection and Reporting MechanismsIP header checksum to detect transmission errorsError reporting mechanism to distinguish between lost datagrams and incorrect addressesHigher level protocols(e.g. TCP) must handle all other problems
Error Reporting MechanismIntegral part of IPInternet Control Message Protocol(ICMP)Used mostly by routers to report delivery or routing problems to original sourceUses IP to carry control messagesNo error messages about error messages
Example ICMP Message Format(Destination Unreachable)TypeCodeChecksumUNUSED (Must be Zero)Internet header + 64 bits of data
Example ICMP Error MessagesDestination UnreachableSource QuenchRedirect (change route)Time ExceededEcho RequestEcho ReplyAddress Mast RequestAddress Mask Reply
ICMP Message Encapsulation
ICMP message has header and data areasComplete ICMP message is treated as data in IP datagramComplete IP datagram is treated as data in physical network frameICMP messageIP dataIP headerFrame dataFrame header
Ex of ICMP Encapsulation in an Ethernet Frame02 07 01 00 27 ba 08 00 2b 0d 44 a7 08 00 45 0000 54 82 68 00 00 f f 01 35 21 80 0a 02 03 80 0a02 08 08 00 73 0b d4 6d 00 00 04 3b 8c 28 28 200d 00 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 1516 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 2526 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 3536 37ICMP header follows IP header, and contains eighty bytesICMP type field specifies echo request message(08)ICMP sequence number is zero
Protocol, Layering, and Network-Level ServicesProblemsCommunication is difficultMany details to handleaddressing, routing, flow controlerror detection and correction out-of-order delivery, duplicated packetsmultiple application programsmultiple protocols
The SolutionDivide the problem into piecesSolve subproblems separatelyCombine into integrated whole
Protocol LayeringConceptual separation of functionalityEach layer solves one part of the communication problemIntended primarily for designersSet of layers is called a protocol stackEnd users may be aware of layering (not desirable)
Examples of LayeringISO 7-layer reference modelApplication, Presentation, SessionTransport, NetworkData Link, PhysicalInternet reference modelApplicationTransport, InternetNetwork interface, Physical
The Layering Principle Software implementing layer n at the destination receives exactly the message sent by software implementing layer n at the source
How Data Passes through Protocol LayersApplicationTransportInternetNetworkInterfaceNetworkInterfaceApplicationInternetTransportPhysical netIdentical messageIdentical PacketIdentical DatagramIdentical frameHost AHost B
Layering In an InternetApplicationTransportInternetNetworkInterfaceNetworkInterfaceApplicationInternetTransportPhysical net1Identical messageIdentical PacketIdentical DatagramIdentical frameIdentical DatagramPhysical net2NetworkInterfaceInternetIdentical frame
Ex of two protocols at network interface layer: SLIP and PPPUsed to send IP across serial lines or dialupSerial Line IPPoint to Point ProtocolEach defines standards for Framing (encapsulation)AddressingIncompatible
Demultiplexing Among Software Modules at each layerIP moduleARP moduleRARP moduleDemultiplexing Basedon Frame typeFrame arrives
ICMP moduleUDP moduleTCP moduleIP ModuleDatagram arrives
Application 1Application 2Application nTCP ModuleSegment arrivesTCP is part of OSTransfer to application program must crossOS boundary
Interface Between Internet Protocol S/W in the OS and Application programsOperating system specificDefines exactly how application programs interact with protocol s/wCalled the socket interface in many systems(BSD UNIX)System may have library of procedures that simulate socket interfaceAT&T System V includes an alternative called the Transport Layer Interface(TLI)
User Datagram Protocol(UDP)Provides application programs with ability to send and receive datagramsProvides for multiple, concurrent application programs on a single machineIncludes (optional) checksum for data transferred Offers unreliable, connectionless transport
UDP DetailsDefines format of messages application programs sendEach message includes small integer protocol port numbers to distinguish among multiple application programsMessages are encapsulated in IP datagrams for delivery
UDP Message FormatSource PortDestination PortLengthUDP checksumData...01631
Demultiplexing Based on protocol port numberPort 1Port 2Port 3UDP: DemultiplexingIP ModuleUDP datagram arrives
Transmission Control ProtocolMajor transport service in the TCP/IP suiteReliable transferStream paradigmFull duplex connectionsFlow controlUses IP for datagram transmission
TCP DetailsAllows sender to generate a stream of bytes in convenient chunksDivides stream into small segments for transmissionSends each segment in IP datagramReceiving TCP returns acknowledgement upon successful receipt of dataSender starts timer after segment sent, and retransmits unless positive acknowledgement arrives
TCP RetransmissionDesigned for internet environmentDelays on one connection vary over timeDelays vary widely between connectionsFixed value for timeout will failWaiting too long introduces unnecessary delayNot waiting long enough wastes network bandwidth with unnecessary retransmissionRetransmission strategy must be adaptive
Adaptive RetransmissionTCP keeps estimate of round trip time on each connectionRound trip estimate derived from observed delay between sending segment and receiving acknowledgementTimeout for retransmission based on current round trip estimateHeuristics can sometimes fail(e.g., round trip delay changes quickly)
TCP DetailsSegment contains checksum for data being sentReceiver acknowledges highest byte received, not each specific segmentProtocol port numbers used to distinguish among multiple application programsReceiver controls flow by telling sender size of currently available bufferCalled window advertisementEach segment contains advertisement, including data segments
Receiver can send additional acknowledgements whenever buffer space becomes availableSender backs off when congestion occursData flow may be shut down in one directionConnections started reliably, and terminated gracefullyConnection established (and terminated) with a 3-way handshake
3-Way handshake for Connection StartupEvent at site 1Network messageEvent at sit 2Send SYN seq=xReceive SYN segmentSend SYN seq=y,ACK x+1Receives SYN+ACK segmentSend ACK y+1Receive ACK segment
TCP Segment Format
Offset specifies header size (offset of data) in 32-bit wordsCode bits specify urgent, ack, push, reset, syn, or finSource portDestination portSequence NumberAcknowledgement numberOff.Res.CodeWindowChecksumUrgent PointerOptionsData...Padding081631
TCP Acknowledgement EXSending ApplicationIUYTRQWENet InterfaceIPTCPReceivingApplicationIURQWENet InterfaceIPTCPInternet* Assume octets 5 & 6 lost* Sender transmits octets 7 & 8* Receiver acknowledgers octets 1-4
EX Packet Trace for TCP Connection
Machines A, B, G bootP1 forms TCP connection to P2, sends one octet of data, and closes connectionGP1P2Monitor pointIP addr=IgEther addr=EgIP addr=Ig2Ether addr=Eg2IP addr=IaEther addr=EaTCP port 99IP addr=IbEther addr=EbTCP port 25AB
Hardware frame Address Resolution Message Src Dst Typ Op Snd IP Snd E Tar IP Tar E1 Ea . ARP REQ Ia Ea Ig ?2 Eg Ea ARP RSP Ig Eg Ia Ea Hardware frame IP datagram TCP segment Src Dst Typ Src Dst Typ Src Dst Typ3 Ea Eg IP Ia Ib TCP 99 25 SYN4 Eg Ea IP Ib Ia TCP 25 99 SYN+ACK5 Ea Eg IP Ia Ib TCP 99 25 ACK6 Ea Eg IP Ia Ib TCP 99 25 DAT7 Eg Ea IP Ib Ia TCP 25 99 ACK8 Ea Eg IP Ia Ib TCP 99 25 FIN+ACK9 Eg Ea IP Ib Ia TCP 25 99 ACK10 Eg Ea IP Ib Ia TCP 25 99 FIN+ACK11 Ea Eg IP Ia Ib TCP 99 25 ACK
Conceptual LayeringReliable Steam (TCP)User Datagram (UDP)Internet (IP)Network Interface
Assignment of Protocol PortsNeed globally fixed ports for globally known servicesNeed dynamically allocated ports for other servicesAccommodate with two port typesStatically assigned portsDynamically assigned portsNote: servers use statically assigned ports; clients use dynamically assigned ports
Statically Assigned PortsCalled well-knownUsed for services like e-mailFixed by IANAUse small valuesIn UNIX, values less than 1000 reserved for privileged programs
Dynamically Assigned PortsAvailable for user applicationsOperating system chooses when application beginsProgrammer responsible for devising mechanism to inform other programsUse large values
Program Interface to Port AssignmentPort numbers should not be encoded in programs as literal constantsMost systems provideDatabase of service namesLibrary routines that use the database to map names into protocol port numbers (e.g., getservbyname)Site can add local definitions to the database
Ex Database for Service Mapping(/etc/services in UNIX)echo 7/tcpecho 7/udpftp 21/tcptelnet 23/tcpsmtp 25/tcptime 37/tcptime 37/tcpnameserver 53/tcpnameserver 53/udpfoobar 2001/udp
Internet Architecture and Protocols for propagating routing informationInternet RoutingIP implements datagram routingBoth hosts and routers have an IP module and both route datagramsIP routing is table-driven
How/When are IP routing table built?Depends on size/complexity of internetStatic routingFixes routes at boot timeUseful only for simplest casesAutomatic routingTable initialized at boot timeValues inserted/updated by protocols that propagate route informationNecessary in large internets
Host Routing EX #1
Architecture: hosts on an isolated EthernetStatic routingHost routing table Destination Route 128.10.0.0 direct128.10.0.0
Host Routing Ex #2
Architecture: hosts on an Ethernet with one routerStatic routinghost routing table Destination Route 128.10.0.0 direct default 128.10.0.200128.10.0.0To Internet128.10.0.200
Host Routing Ex #3128.10.0.0r1r2128.10.0.200128.10.0.209 Architecture: host on an Ethernet with two routers Static routing + ICMP redirects Initial host routing tabledestination128.10.0.0default128.10.0.200directroute
Host generates datagram for 192.5.48.3, which lies beyond r2Host routes datagram to r1ICMP redirect from r1 update hosts routing table128.10.0.0r1r2128.10.0.200128.10.0.209destination128.10.0.0192.5.48.0128.10.0.209directroutedefault128.10.0.200
Routing Tables In RoutersA router must be able to reach all networksAt least one router must know all possible destinations explicitlyHaving all routers (or hosts) know routes for all destinations does not scale
Solution #1Make a small set of core routers have complete informationAllow other routers to know only local destinations and use the core as central routerWorks only for medium size internets
Solution #2Have core routers know routes to all locationsDevise a mechanism that allows other routers to contact the core to learn routes (spread necessary routing information automatically)
Historical View Of Core Routers and Backbone NetworkTCP/IP was initially developed for an architecture that includedA backbone networkCore routers attaching sitesBackbone networkr1rnr2Lan 1Lan 2Lan nCore routers
Ex Route Propagation Protocol(GGP)Gateway to gateway protocolUsed only by original Internet core routersAllows routers to exchange routing informationDistance vector algorithm
Vector Distance AlgorithmOne router sends its routing table to anotherTable contains pairs of destination network and distanceReceiver replaces entries in its table by routes to the sender if routing through the sender is less expensive than the current route
Alternative Routing AlgorithmsUsed by later generations of Internet core routersInvented to avoid instabilities and other problems of distance vector algorithmsLink-state algorithm
Link-State AlgorithmParticipating routers know topologyThink of routers as nodes in a graph, and networks connecting them as edges or linksAll routers propagate status of directly connected links periodicallyAll routers recompute routes from their copy of link informationAlso called Shortest Path First(SPF)
Noncore RouterAny router that is not part of the core systemDoes not participate directly in cores routing information propagation algorithmWill not choose optimal routes if it uses the core except for local delivery
Extra Hop ProblemNoncore router picks one core router to use as router(e.g., r2)Noncore router routes all packets to r2 across backboneRouter r2 routes some packets back across backbone to r1Lan 1backboneLan 2r3r1r2Core routerNoncorerouter
Solving The Extra Hop ProblemNot all routers can participate in a sing routing exchange algorithm (does not scale)Even nonparticipating routers should make routing decisionsNeed mechanism that allows nonparticipating routers to obtain routes automatically
Network AdvertisementRouters that engage in active route propagation may not directly attach to all networksNeed mechanism that allows them to learn about destinations to which they do not attach
Autonomous SystemGroup of networks under one administrative authorityFree to choose internal routing update mechanismCan not use Internet core as central router
Exterior Gateway Protocol (EGP)Standard Internet ProtocolSolves two problemsAllows noncore router to advertise networks hidden in its autonomous systemAllows noncore routes to learn routes from the coreDesigned for communication with the Internet core systemNow used primarily between pairs of AS
Illustration of EGPr1r2Common networkEGP used
EGP DetailsRouter in one autonomous system becomes the peer (neighbor) of a router in another ASThe two peers periodically poll each otherProtocol keeps test of whether neighbor is alive separate from reachability update
Polling rates may be asymmetricEGP supports messages forNeighbor acquisitionLiveness testPoll for updateRoute update
The Truth about EGPEGP is still used in many parts of the InternetEGP does not interpret network distancesEGP is used only to establish a path to a given networkEGP provides reachability information, not routing information
Limitations of EGPEntire routing update must fit into one datagramNo universal agreement on interpretation of distancesDoes not allow multiple paths to a destination
Border Gateway Protocol (BGP)Newer alternative to EGP for exterior route propagationOriginally used inside NSFNETSeparate policies forInternal routing Transit routingCurrent version BGP-4Supports CIDR
BGP DetailsProvides routing among ASBorder routers designated by each ASUses reliable transport (i.e., TCP)Keepalive messagesPropagates path informationCan prevent routing loops
Use of BGP at NAPsRouting arbiter (route server)Stores routing informationProvides third-party routesAccessed via BGPDoes not handle data trafficNSP 1NSP 2NAPRouting arbiterBgp used
Exchanging Routing Information within an ASMechanisms called interior gateway protocols, IGPsChoice of IGP is made by ASA router in the AS advertises network reachability to other Ass with exterior protocol
Illustration of IGPsr1r2IGP1EGPIGP2
Ex IGPsRIPHELLOOSPFProprietary protocols provided by vendors
Routing Information Protocol (RIP)Implemented by UNIX program routedUses hop count metricdistance vector protocolRelies on broadcastAssumes low-delay local area networkUses split horizon and poison reverse techniques to solve inconsistenciesRIP does not include subnet mask
Slow Convergence Problem(Count To Infinity)Net NR1R2R3Routers with routes to net NNet NR1R2R3R1 erroneously routes to R2 after failure
RIP Update FormatUses family field to support multiple protocolsMessage travels in UDP datagramcommandversionreservedFamily of net 1Net 1 addr. Octets 1-2Net 1 address, octets 3-6Net 1 address, octets 7-10Net 1 address, octets 11-14Distance of network 1Family of net 1Net 2 addr., octets 1-2Net 2 address, octets 3-6Net 2 address, octets 7-10Net 2 address, octets 11-14Distance of network 2...
HELLO ProtocolMostly of historical interestDeveloped by Dave MillsUsed by NSFNET fuzzballsUses metric based on delay
How HELLO worksParticipants keep track of delay between pairs of routersHELLO propagates delay information across netRoute chosen to minimized total delay
OSPF (Open SPF)Relatively new protocolDeveloped by IETF working groupUses SPF (link-state) algorithmMore powerful than most predecessorsMore complex to install and manage
Why Distance Interpretation Is DifficultEach autonomous system free to choose an IGP for its internal useNo universal agreement on distance metric among IGPs Given AS can receive updates from other systems via EGPImpossible to have meaningful comparison
Metric Interpretation with EGPAllows IGPs to use small numbers (e.g, less than 128)Maps small distances to higher numbers when crossing AS boundary (e.g, 128 to 192)Forces datagrams to remain inside AS if possible
Gated ProgramOriginally for BSD UNIXSupports multiple IGPs (e.g, RIP and HELLO) as well as EGPUses configuration file to decide which networks to advertise with EGPMaps distances to higher values when crossing EGP boundary
(KIX) , , : 3, , , (KOSINET)94
: : 10M(Global one) : 2M(Imnet) : 2M(Btnet) : : 5, , , ,
98.1backboneKIXPubnet Global GatewayKT IXDacom IXKOSINETKRENKREONETPUBNETI-NET IXUSUK
NMS 24 monitoringKIX IX-Seoul 45M Router Server KIX
High Speed Backbone ATM /