1 / 67

TDC561 Network Programming

TDC561 Network Programming. Review Network Terminology: Internet-work Architecture; Network Protocols for the Internet. Camelia Zlatea, PhD Email: czlatea@cs.depaul.edu. Communication Network. Set of services and features (from End system view or Application programmer view)

hobbsc
Télécharger la présentation

TDC561 Network Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. TDC561 Network Programming Review Network Terminology: Internet-work Architecture; Network Protocols for the Internet Camelia Zlatea, PhD Email: czlatea@cs.depaul.edu

  2. Communication Network • Set of services and features (from End system view or Application programmer view) • Ex.: guaranteed message delivery between origination and termination points • Type of service differentiates the type of networks • Ex.: voice/PSTN vs. data networks • Network Services distinguished by a set of properties (mainly from Network Designer view): • Latency, bandwidth, number of end-points, service interface, reliability resource utilization and fair allocation. • Network Services easy-to-manage and to operate (from Network Provider view) • Easy provisioning of network devices • Rapid isolation and correlation of faults, alarms

  3. Network Performance • Bandwidth (Throughput) • # of bits transmitted over the network in a certain interval of time • Ex.: 10 mil bits per sec (Mbps) • Latency (Delay) • How long it takes a message to travel from one end to other of a network • Ex. One-way delay (latency) Round-Trip Delay Latency=Propagation+Transmit+Queue Propagation=Distance/SpeedOfLight Transmit=Size/Bandwidth

  4. Type of Networks • Distance • LAN (Local Area Networks) • Ethernet, Token Ring, FDDI • WAN (Wide Area Networks) • X.25, ATM, Frame Relay • Information Type • Data Networks, telephony network (PSTN) • Application Type • General purpose (Internet) vs. special purpose (banking network) • Security level • Private: enterprise networks • Public: PSTN, Internet • Ownership of Protocols • Proprietary: SNA, IPX • Open: IP • Protocol • IP, IPX, AppleTalk, SNA

  5. The Internet • Global scale, general purpose, heterogeneous technologies, public, computer network • Internet Protocol (IP) • Open system: IETF (Internet Task Force) as standard body • Intranet: enterprise IP network • IETF – the protocol engineering and development arm of the Internet. Subdivided into many groups, which specify RFCs (Request For Comments) • A Typical Internet Standardization Process: • Internet Drafts • RFC • Proposed Standard • Draft Standard (requires 2 working implementations) • Internet Standard (declared by Internet Architecture Board IAB, which is responsible for defining the overall architecture of the Internet, providing guidance and broad directions

  6. Connectivity • Links – physical medium connecting directly two or more computers • Nodes – computers connected by links • Nodes attached at least two links run software that forwards data received on one link out on another • Switched Network – forwarding nodes systematically organized • Circuit-switched network • Common for telephony network • Strategy: (1) establishes a dedicated circuit across a sequence of links; (2) source node sends a stream of bits across this circuit to a destination node. • Packet-switched network • Network nodes send discrete blocks of data to each other (packets/messages) • Store-and-forward strategy: each node (1) receives a packet, (2) stores packet in its internal memory buffer, and (3) forward packet to the next node.

  7. Connectivity • Circuit-switched network • Common for telephony network • Strategy: (1) establishes a dedicated circuit across a sequence of links; (2) source node sends a stream of bits across this circuit to a destination node; (3) Circuit Termination • “Busy signal” if capacity for a circuit not available • Examples:PSTN – Telephone networks, ISDN (Integrated Service Digital Network) Incoming links Node Outgoing links

  8. Circuit-switched network • Timing Host1 Node2 Node3 Host4 Processing Delay (1) (2) DATA (3) • Circuit establishment • Data Transmission • Circuit Termination

  9. Connectivity • Packet Switching • Network nodes send discrete blocks of data to each other (packets/messages) • Store-and-forward strategy: each node (1) receives a packet, (2) stores packet in its internal memory buffer, and (3) forward packet to the next node. • Packet/Message Structure • Header, Data, Trailer • Each packet is passed through the network from node to node along some path (Routing) • At each node the entire packet is received, stored briefly, and then forwarded to the next node (Store-and-Forward) • No capacity is allocated for the packets

  10. Packet-switching network • Timing Host1 Node2 Node3 Host4 Processing Delay Pk1 Pk2 Pk3 Pk1 Pk2 Pk3 Pk1 Pk2 Pk3

  11. Connectivity • Virtual-Circuit Packet Switching • Hybrid of circuit switching and packet switching • All data is transmitted as packets • All packets from one stream are sent along a pre-established path (virtual circuit VC) • Guarantees in-sequence delivery of packets • Packets from different virtual circuits can be interleaved • Strategy • VC establishment • Data Transfer • VC Disconnect

  12. Virtual Circuit Packet-switching network • Timing Host1 Node2 Node3 Host4 Processing Delay (1) (2) (3) Pk1 Pk2 Pk3 Pk1 Pk2 Pk3 Pk1 Pk2 Pk3

  13. Protocol Architecture • Protocol: agreement between communication entities on how to interpret meta-data or headers • Different layers put in different layers NA=Network Access Application protocol App App TCP protocol TCP TCP IP protocol IP IP IP IP NA NA NA NA NA NA Data Links Host Router Router Host

  14. Layering • Organization of a network system into a successive logically distinct entities, such that the service provided by one entity is determined based on the service provided by the previous (lower level) entity • Advantages: • Abstraction ( an intermediate layer that provides an unique abstraction for applications regarding various network technologies • Lower layers can be changed without affecting the upper layers • Modularity – protocol easy to manage and maintain • Reuse – upper layers can reuse the functionality provided by lower layers • Disadvantages • Information hiding can cause inefficient implementations

  15. ISO OSI Reference Model • ISO – International Standard Organization • OSI – Open System Interconnection • Goal: A general OPEN standard Physical Medium

  16. OSI Model Concepts • Service – what a layer does • Interface – how to access the service • Protocol – how is the service implemented • Set of rules and formats that govern the communication between two peers

  17. Physical Layer • Service - move info between two systems connected by physical link • Interface – how to send bits • Protocol – coding scheme used to represent a bit, voltage levels, duration of a bit • Examples: cable coax, fiber optic links; transmitters receivers

  18. Data Link Layer • Service • Send data frames between peers • Framing, i.e. attach frame separators • Arbitrate access to common media, ensure reliability of transmission, provide flow control • Interface – send a data unit (packet) to a node connected to the same physical media • Protocol – layer addresses, MAC (Medium Access Control) • Examples: CSMA/CD

  19. Network Layer • Service • Deliver a packet to a specified destination • Perform segmentation/reassemble • Packet scheduling • Buffer management • Interface – send a packet to a specified destination • Protocol – define global unique addresses; construct routing tables • Example: Routing • Bearer/Data Plane: uses forwarding table to forward packets • Control Plane: construct and maintain Forwarding Tables (distance vectors, link state protocols)

  20. Transport Layer • Service • Error-free and flow-controlled end-to-end connection • Interface – send a packet to specify destination • Protocol – implement reliability and flow control • Example: TCP and UDP

  21. Session Layer • Service • Full-Duplex • Access management (ex. token control) • Synchronization (ex. Check points fro long transfers) • Interface – depends on service • Protocol – token management, checkpoints, for long transfers, roll-back functions Presentation Layer • Service • Data conversions • Interface – depends on service • Protocol – define data formats, and rules to convert from one format to another

  22. Application Layer • Service : End-User type of Service • Interface – depends on application • Protocol – depends on application • Examples: FTP, Telnet, HTTP, H323

  23. Internet Reference Model • OSI vs. TCP/IP Architecture Internet Host-to-Network Physical Medium

  24. IP is a Network Layer Protocol Application Application Presentation Presentation Session Session Router Transport Transport Network Network DataLink 1 DataLink 1 DataLink 2 DataLink 2 Physical 1 Physical 2 Physical 1 Physical 2 Network Medium 1 Medium 2

  25. Encapsulation Example Ethernet Header IP Header An Ethernet segment transmitting HTTP data. TCP Header HTTP Header …. HTTP Data ….

  26. IP “Hour Glass” Networking Applications Remote Access Voice HOST email Multimedia file transfer Web VPN TCP IP Router Frame ATM Ethernet SONET DWDM FDDI Link X.25 Networking Technologies

  27. IP - “Simple, Stupid, Flexible” • In the Internet, intelligence is in Hosts • IP is connectionless, best effort. • Routing protocols today provide only connectivity and supports only one type of service : best effort datagram

  28. Typical Members of the IP Protocol Family FTP HTTP DNS SNMP NFS UDP TCP IP Telnet

  29. Routing Protocols, part of the IP Protocol Family BGP RIP TCP UDP OSPF IP Routing protocols exchange network reachability information between routers.

  30. Packet Delivery Model • Connectionless (datagram-based) • Best-effort delivery (unreliable service) • packets are lost • packets are delivered out of order • duplicate copies of a packet are delivered • packets can be delayed for a long time

  31. IP Routing Basics • Routing is the process for deciding where to send each packet. • There are a number of routing algorithms that provide rules for how routers: • Communicate with each other about router and link status. • Maintain lists of reachable networks. • Select between alternate paths.

  32. IP Datagram • IP Datagram format • Version (4): currently 4 • Hlen (4): number of 32-bit words in header • TOS (8): type of service (used for QoS) • Length (16): number of bytes in this datagram • Ident (16): used by fragmentation • Flags/Offset (16): used by fragmentation • TTL (8): number of hops this datagram has traveled • Protocol (8): demux key (TCP=6, UDP=17) • Checksum (16): of the header only • DestAddr & SrcAddr (32)

  33. IP Datagram 0 4 8 16 19 31 TOS Length V ersion HLen Ident Flags Fragment Offset TTL Protocol Checksum SourceAddr DestinationAddr Pad Options (variable) (variable) Data 1981, RFC 791

  34. IP Header Format 4 bits Version 4 bits Hdr Len 8 bits Type of Service 16 bits Total Length 16 bits Identification 3 bits Flags 13 bits Fragment Offset 8 bits Time to Live 8 bits Protocol 16 bits Header Checksum 32 bits Source IP Address 32 bits Destination IP Address Variable Size (Normally Empty) Options 1981, RFC 791

  35. Example IP Packets TCP Packet UDP Packet IP Header IP Header TCP Header UDP Header UDP Payload TCP Payload

  36. Fragmentation and Reassembly • Each network has some MTU (Maximum Transfer Unit) • Strategy • fragment when necessary (MTU < Datagram) • try to avoid fragmentation at source host • refragmentation is possible • fragments are self-contained datagrams • delay reassembly until destination host • do not recover from lost fragments

  37. IP Fragmentation • A main function of IP is to fragment and reassemble packets on the fly • each network in a heterogeneous collection of networks has a Maximum Transmission Unit (MTU) • maximum size of IP packet (datagram) that can be carried on network • Packets must be fragmented if entering a network with a smaller MTU • packets remain fragmented until the reach destination host • packet headers remain mostly unchanged • packets are then reassembled

  38. Ethernet Frame Format • Link Layer Address Formats (802 headers - 8 bytes long) • Addresses • Unique, 48-bit unicast address assigned to each adaptor • Example: 8:0:2b:e4:b1:2 • Broadcast: all 1s • Multicast: first bit is 1

  39. TCP/IP Protocol Stack Message Message HOST B Application HOST B Application Transport TCP, UDP Transport TCP, UDP Message H Message H Internet/Network Internet/Network H H Message H H Message Network Access Network Access H H H Message Message H H H Physical Link

  40. Client-Server Communication WAN ISP OSPF ISP ISP BGP OSPF OSPF External Router External Router Ethernet Switch Ethernet Hub WWW Server Client PC

  41. Network Entities • Client PC • Ethernet Hub • Fan-out a single 10Mbs connection to several end points (ex. PC, IP phone) • Ethernet Switch (Layer2 switch) • Bridges the data across multiple 10Mbs connections • External Router • Connects a LAN to the Internet (ISP network, for example, with frame relay link over fiber cable); router protected by Firewall(s) • Clouds • ISPs networks running OSPF (Open Shortest Path First) and interconnected by BGP (Border Gateway Protocol)

  42. Network 1 (Ethernet) H7 R3 H8 H2 H1 H3 Network 4 (point-to-point) Network 2 (Ethernet) R1 R2 H4 Network 3 (Ethernet) H6 H5 Internet-work

  43. H1 H8 TCP TCP R1 R2 R3 IP IP IP IP IP ETH PPP ETH ETH ETH ETH PPP ETH Internet-work

  44. Internet-work H1 R1 R2 R3 H8 ETH IP (1400) ETH IP (1400) PPP IP (512) ETH IP (512) PPP IP (512) ETH IP (512) PPP IP (376) ETH IP (376)

  45. IP Node Routing Protocols UDP TCP yes yes no Local Address? Routing Table Errors? Output Operations Queue Queue incoming datagram outgoing datagram

  46. Addressing • Addresses need to be globally unique, so they are also hierarchical • Another reason for hierarchy: routeaggregation • reduces size of routing tables • geographical distribution constraints

  47. Addressing in the Internet • Addressing tied to reachability • Every host interface has its own IP address • Router interfaces usually have their own IP addresses • Current version of IP is version 4 (IPv4 addresses) • 4 bytes long • two part hierarchy • network number and host number • different types of boundary indicator • class, subnet mask, prefix • Goal of boundaries is address aggregation

  48. Address classes • Historical first choice • fixed network-host partition, with 8 bits of network number • Generalization • Class A addresses have 8 bits of network number • Class B addresses have 16 bits of network number • Class C addresses have 24 bits of network number • Distinguished by leading bits of address • leading 0 => class A (first byte < 128) • leading 10 => class B (first byte in the range 128-191) • leading 110 => class C (first byte in the range 192-223) • leading 1110 => class D (multicast) • leading 1111 => Class E (reserved)

  49. Address evolution • Class based scheme was too inflexible • Two problems • Too many routes • Too few addresses • Four extensions • Subnetting (flexible boundaries within network) • CIDR (flexible grouping of networks) • Dynamic host configuration (reuse of addresses) • A bigger address (IPv6) • One issue • Network address translation

More Related