15-441 Computer NetworkingLecture 29 – Final ReviewWhat is Layering?ygUser A User BPeer Layer Peer LayerApplicationTransportpNetworkLinkHostHost2Modular approach to network functionalityThe Internet Protocol SuiteThe Internet Protocol SuiteUDPTCPApplicationsFTP HTTP TFTPNVUDPTCPWaistTCP UDPIPData LinkPhysicalIPNET1NET2NETn…The Hourglass ModelTh i t f ilit t i t bilit3The waist facilitates interoperabilityProtocol Demultiplexingpg•Multiple choices at each layerMultiple choices at each layerFTP HTTP TFTPNVTCP UDPIPTCP/UDPIPIPXNetworkNET1NET2NETn…Port NumberProtocol FieldType Field4Server and ClientServer and Client exchange messages over the tkth hS k t APIClientsnetwork through a commonSocket APIuserServeruser spaceportsTCP/UDPTCP/UDPSocket APIkernel spaceIPIPspaceLecture 3: Applications 5Ethernet AdapterEthernet AdapterhardwareS’ 10One more detail: TCP• TCP connections need to be set up• “Three Way Handshake”:Client ServerSYN (Synchronize)SYN/ACK (Synchronize + Acknowledgement)ACK…Data…2: TCP transfers start slowly and then ramp up the bandwidth used (so they don’t use too much)S’ 106Lecture 3: ApplicationsPersistent Connection SolutionServerClientACKDAT0 RTTServer reads fromClient sends HTTP requestACKACK1 RTTServer reads from diskClient sends HTTP request for HTMLCli t HTMLDATDATDATACK2RTTClient parses HTMLClient sends HTTP request for imageDATServer reads from disk2 RTTImage begins to arriveS’ 107Lecture 3: ApplicationsFrom Signals to PacketsReceiverSenderPacketTransmissionPackets0100010101011100101010101011101110000001111010101110101010101101011010Hd/BdHd/BdHd/BdApplicationPresentationBit Stream00101110Header/BodyHeader/BodyHeader/BodySessionTransport“Digital” SignalBit Stream0 0 1 0 1 1 1 0 NetworkDatalinkAnalog SignalggPhysicalggLecture 4 815-441 © 2008-10Past the Nyquist Limit• More aggressive encoding can increase the channel bandwidth.El d–Example: modems•Same frequency- number of symbols per second• Symbols have more possible valuespskPsk+ AM•Every transmission medium supports Every transmission medium supports transmission in a certain frequency range.– The channel bandwidth is determined by the transmission medium and the quality of the transmitter and receiversqy– Channel capacity increases over timeLecture 4 915-441 © 2008-10Why Encode?0 1 0 1 How many more ones?NRZNRZNRZIManchester1015-441 © CMU 2010Bandwidth-Delay ProductRTTSenderRTTReceiverTimeMax Throughput = Window SizeRoundtrip TimeRoundtrip Time1115-441 © CMU 2010Datalink ArchitecturesDatalink Architecturesz Point-Point with switchesz Media access control.12Datalink ClassificationDatalink ClassificationDatalinkSwitch-based Multiple AccessRandomAccessScheduledAccessPacketSwitchingVirtualCircuitsATMEhTk iBid dATM,framerelayEthernet, 802.11, AlohaToken ring,FDDI, 802.11BridgedLANs13Lecture 615441 © 200813Ethernet MAC (CSMA/CD)Ethernet MAC (CSMA/CD)z Carrier Sense Multiple Access/Collision Packet?NopDetectionSense CarrierSendDetect CollisionNoCarrierDiscard PacketCollisionJam channel YesPacketb=CalcBackoff(); wait(b);attempts++;attempts < 161414attempts == 16Minimum Packet SizeMinimum Packet Sizez What if two people ppsent really small packets» How do you find collision?1515Learning Bridgesgg• Manually filling in bridge tables?Ti i•Time consuming, error-prone• Keep track of source address of packets arriving on every link showing what segment hosts are onlink, showing what segment hosts are on• Fill in the forwarding table based on this informationhost host host host hosthostBridge9-21-06Lecture 8: Bridging/Addressing/Forwarding 16host host host host hosthostSpanning Tree Bridgespg g• More complex topologies can provide redundancy.• But can also create loops.Wh t i th bl ith l ?•What is the problem with loops?• Solution: spanning treehost host host host hosthostBridge Bridge9-21-06Lecture 8: Bridging/Addressing/Forwarding 17host host host host hosthostSimplified Virtual CircuitsExampleExamplePacket2255Sender2341conn 5 Æ 42341R2R1555Receiverconn 5 Æ 32341R3554conn 5 Æ 359-21-06Lecture 8: Bridging/Addressing/Forwarding 18Source Routing ExamplegpPacketR1, R2, R3, RSender21231R2R1R2, R3, RSender3413412R2R1R3, RReceiver2341R3R9-21-06Lecture 8: Bridging/Addressing/Forwarding 19Global Address ExamplepPacketR22RRSender23412341R2R1RRRÆ3R Æ 4Receiver2341R3RR Æ3R4R Æ 3R9-21-06Lecture 8: Bridging/Addressing/Forwarding 20IP Address Classes(Some are Obsolete)(Some are Obsolete)Network ID Host IDNetwork ID Host ID816Class A32024Class B10Class C110Multicast AddressesClass D1110Reserved for experimentsClass E11119-21-06Lecture 8: Bridging/Addressing/Forwarding 21ARP Cache Examplep• Show using command “arp -a”gpInterface: 128.2.222.198 on Interface 0x1000003Internet Address Physical Address Type128.2.20.218 00-b0-8e-83-df-50 dynamic 128.2.102.129 00-b0-8e-83-df-50 dynamic 128.2.102.129 00b08e83df50 dynamic 128.2.194.66 00-02-b3-8a-35-bf dynamic 128.2.198.34 00-06-5b-f3-5f-42 dynamic 128.2.203.3 00-90-27-3c-41-11 dynamic 128.2.203.61 08-00-20-a6-ba-2b dynamic y128.2.205.192 00-60-08-1e-9b-fd dynamic 128.2.206.125 00-d0-b7-c5-b3-f3 dynamic 128.2.206.139 00-a0-c9-98-2c-46 dynamic 128.2.222.180 08-00-20-a6-ba-c3 dynamic y128.2.242.182 08-00-20-a7-19-73 dynamic 128.2.254.36 00-b0-8e-83-df-50 dynamic 15-411 S'10Lecture 8: IP Addressing/Packets 22IP Address Utilization (‘97)15-411 S'10Lecture 8: IP Addressing/Packets 23http://www.caida.org/outreach/resources/learn/ipv4space/ -- brokenCIDR Implicationsp•Longest prefix match!!Longest prefix match!!201.10.0.0/21 201.10.6.0/23Provider 1 Provider 2201 10 0 0/22201 10 4 0/24201 10 5 0/24201 10 6 0/23 or Provider 2 address15-411 S'10Lecture 8: IP Addressing/Packets 24201.10.0.0/22201.10.4.0/24201.10.5.0/24201.10.6.0/23 or Provider 2 addressIP Service Model• Low-level communication model provided by Internet•Datagram•Datagram• Each packet self-contained• All information needed to get to destination•No advance setup or connection maintenanceNo advance setup or connection maintenance• Analogous to letter or telegram048121619 242831versionHLenTOSLengthversionHLenTOSLengthIdentifier Flag OffsetTTL Protocol ChecksumHeaderIPv4 PacketFormatSource AddressDestination AddressOptions (if any)15-411
View Full Document