1 / 16

Week 3: Protocols

Week 3: Protocols. Protocols. Protocols Protocol Design. Packet Length Conveyance Acknowledgement Methodology Error Checking / Correcting Compression Encryption Packet Control. Protocols Packet Structure. Layout Header = Protocol Manifest Payload = BLOB (binary large object)

latif
Download Presentation

Week 3: Protocols

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. Week 3: Protocols Protocols

  2. ProtocolsProtocol Design • Packet Length Conveyance • Acknowledgement Methodology • Error Checking / Correcting • Compression • Encryption • Packet Control

  3. ProtocolsPacket Structure • Layout • Header = Protocol Manifest • Payload = BLOB (binary large object) Optional: • Footer = Stop Bit, Magic # (uncommon in app layer) • Serialization • In Game = Struct, Class, … • On Network = Byte array (bits in link layer)

  4. ProtocolsSerialization Gottcha’s • Pointers • Large Arrays • Variable size Arrays • ADT’s • Integer Alignment • Endianess(HtoN, NtoH) • Processor dependant intrinsic type size (int, long) • Unsupported types (unsigned -> signed long) • Strings • Unicode vs. ASCII • NULL terminated, Pascal, or ADT

  5. ProtocolsRequest for Comments • RFC web site • http://www.rfc-editor.org/ • Protocol Specifications • Definitive Resource • Public Criticism • Future Protocols

  6. Week 3: Protocols Protocol Stack

  7. Protocol StackOpen System Interconnect

  8. Protocol StackPhysical Layer • Bandwidth • Width of data pipe • Measured in bps = bits per second • Latency • Travel time from point A to B • Measured in Milliseconds • The Medium • Fiber, FireWire, IrD , CDMA & other cell Table 1: Max Bandwidth Specifications

  9. Protocol StackSI units • 1 kbit = 1,000 bits Decimal • 1 kiB = 1,024 bits Binary • 1 kB = ??? Bin or Dec

  10. Protocol StackData Link Layer • Serializes data to/from physical layer • Network Interface Card • Ethernet • MAC Address

  11. Protocol StackNetwork Layer • Packet Routing • Hops • Routers, Hubs, Switches • Internet Protocol (IP) • Contains Source & Destination IP Address • IPv4 • Widespread Infrastructure • IPv6 • Larger IP address

  12. Protocol StackNetwork Layer: IP Address • Unicast • Static • DHCP • Multicast • Requires multicast capable router • Broadcast • Local • Directed • Loop Back • Send to self • AddrAny • 0 = address before receiving an address

  13. Protocol StackNetwork Layer: DNS • Domain Name Service • Converts text name to IP address • Must contact one or more DNS servers to resolve • Local cache resolution possible • Game Tips • Store local game cache to use when DNS out of order. • DNS resolution often slow, use cache for same day resolution.

  14. Protocol StackTransport Layer • Manage data deliver between endpoints • Error recovery • Data flow • TCP and UDP used with IP • Contains Source and Destination Port • Port + IP = Net Address • Port Range = 0-64k • Well known Ports 0-1k

  15. Protocol StackTransport Layer: TCP • Guaranteed Correct In Order Delivery • Acknowledgement system • Ack, Nack, Resend • Checksum • Out of Band • Connection Required • Packet Window • Packet Coalescence • Keep Alive • Streamed Data • User must serialize data • Header • http://www.networksorcery.com/enp/protocol/tcp.htm

  16. Protocol StackTransport Layer: UDP • Non Guaranteed Delivery • No Acknowledgement system • May arrive out of order • Checksum • Not Connected • Source not verified • Hop Count Limit = TTL (time to live) • Required for Broadcasting • Datagram • Sent in packets exactly as user sends them • Header • http://www.networksorcery.com/enp/protocol/udp.htm

More Related