15-441 Roundup7-layer or 4-layer dip?OSI FunctionsThe TCP/IP ModelLayering and stacksThe lower layers - conceptsLimits to Speed and DistanceWhy Do We Need Encoding?EncodingsDatalink FunctionsCSMA/CD AlgorithmCollision Detection: ImplicationsInternetworking OptionsInternetworkingIPRouting ProtocolsBGPAS relationshipsMulticastTunnels, NATs, etcCont’d.DNSTransport & TCPTransport DemuxARQSizing WindowsCongestion ControlTCPTCP 2PacingSACK & EnhancementsTCP PerformanceQueueingSharingQoSWirelessWireless MAC issuesAd Hoc NetworksHTTPWeb CachingP2PSecuritySecurity 2Network SecurityFirewalls!15-441 Roundup7-layer or 4-layer dip?•Layering: Reuse, interoperability•OSI 7-layer modelApplicationApplicationPresentationPresentationSessionSessionTransportTransportNetworkNetworkData linkData linkPhysicalPhysical1234567NetworkNetworkData linkData linkPhysicalPhysicalApplicationApplicationPresentationPresentationSessionSessionTransportTransportNetworkNetworkData linkData linkPhysicalPhysicalOSI Functions•(1) Physical: transmission of a bit stream.•(2) Data link: flow control, framing, error detection.•(3) Network: switching and routing.•(4) Transport: reliable end to end delivery.•(5) Session: managing logical connections.•(6) Presentation: data transformations.•(7) Application: specific uses, e.g. mail, file transfer, telnet, network management.Multiplexing takes place in multiple layersThe TCP/IP ModelApplication(pluslibraries)Application(pluslibraries)TCP/UDPIP/ICMPTCP/UDPIP/ICMPData linkData linkPhysicalPhysicalApplicationApplicationPresentationPresentationSessionSessionTransportTransportNetworkNetworkData linkData linkPhysicalPhysicalLayering and stacks•Some layers - particularly in the OSI model - not so well defined•Layer “violations” often useful for performance reasons.–Buffer management–Reduce redundant information between headersThe lower layers - conceptsAnalog Signal“Digital” SignalBit Stream0 0 1 0 1 1 1 0 0 0 1Packets0100010101011100101010101011101110000001111010101110101010101101011010111001Header/BodyHeader/BodyHeader/BodyReceiverSenderPacketTransmissionLimits to Speed and Distance•Noise: “random” energy is added to the signal.•Attenuation: some of the energy in the signal leaks away.•Dispersion: attenuation and propagation speed are frequency dependent.–Changes the shape of the signalEffects limit the data rate that a channel can sustain.»But affects different technologies in different waysEffects become worse with distance.»Tradeoff between data rate and distanceWhy Do We Need Encoding?•Meet certain electrical constraints.–Receiver needs enough “transitions” to keep track of the transmit clock–Avoid receiver saturation•Create control symbols, besides regular data symbols.–E.g. start or end of frame, escape, ...•Error detection or error corrections.–Some codes are illegal so receiver can detect certain classes of errors–Minor errors can be corrected by having multiple adjacent signals mapped to the same data symbol•Encoding can be very complex, e.g. wireless.Encodings•NRZ - “Non-Return to Zero”–Simple: 0 = low, 1 = high–Long runs of 0s and 1s lose synch•NRZI - transition on 1–Long runs of 0s lose sync•Manchester - low/high = 0, high/low = 1–Uses 2x as many transitions•4B/5B, etc -–Encode multiple 0s and 1s. Efficient. Used in Ethernet.•SONET - many observations of flag pattern.Datalink Functions•Framing: encapsulating a network layer datagram into a bit stream.–Add header, mark and detect frame boundaries, …•Media access: controlling which frame should be sent over the link next.–Easy for point-to-point links; half versus full duplex–Harder for multi-access links: who gets to send?•Error control: error detection and correction to deal with bit errors.–May also include other reliability support, e.g. retransmission•Flow control: avoid that the sender outruns the receiver.CSMA/CD Algorithm•Carrier Sense Multiple Access / with Collision Detection•Sense for carrier.•If carrier present, wait until carrier ends.•Send packet and sense for collision.•If no collision detected, done transmitting•Otherwise, abort immediately, perform “exponential back off” and send packet again.–Start to send at a random time picked from an interval–Length of the interval increases with every retransmissionCollision Detection: Implications•All nodes must be able to detect the collision.–Any node can be sender•=> Must either have short wires, long packets, or both. •Can calculate length/distance based on transmission rate and propagation speed.–Messy: propagation speed is media-dependent, low-level protocol details, ..–Minimum packet size is 64 bytes•Cable length ~256 bit times–Example: maximum coax cable length is 2.5 kmA B C3333776655776655776655776655776655776655776655776655Internetworking Options4433221144332211114433221144332211221111443322114433221133repeater Switching/bridging(e.g. 802 MAC)routerphysicaldata linknetwork44332211443322112222gateway. . .222211111111Internetworking•Repeaters: Physical link. One big collision / transmission domain.•Bridges: Datalink. Can separate broadcast domains and selectively forward traffic. Transparent - preserve MAC addresses.•Routers: Separate addressing domains. Forward through diff. MAC addresses.IP•CIDR - Classless Inter-Domain Routing•192.4.16/24 == 255.255.255.0–== 24 bits of network, 8 bits of host–Covers 192.4.16.0 - 192.4.16.255•192.4.16./23 == 25.255.254.0–Covers 192.4.16.0 - 192.4.17.255•Enables more efficient use of address space through aggregation.•Routing by longest-prefix match–/29 is “longer” (more 1s) than /24.Routing Protocols•Intra-domain:–RIP: Routing Information Protocol•Distance-Vector.–Send information about table to neighbors (per-dest cost)–Count to infinity problem.»Split horizon - Don’t advertise routes back to next-hop»Poison reverse: Advertise infinite metric to next-hop»Neither of these solves all loop problems!–OSPF: Open Shortest Path First•Link-state.–Flood neighbor info to entire network–Each node generates own routing table•Fast convergence, but lots of traffic for large nets•Inter-domain:–BGP: Border Gateway Protocol•Path-Vector. Send full AS path along with announcement.–Solves loop problems with DV.BGP•Internet divided into Autonomous Systems. Each has unique #.•Each AS
View Full Document