Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Protocols A protocol is a set of rules and formats that govern the communication between communicating peers –set of valid messages –meaning of each.

Similar presentations


Presentation on theme: "1 Protocols A protocol is a set of rules and formats that govern the communication between communicating peers –set of valid messages –meaning of each."— Presentation transcript:

1 1 Protocols A protocol is a set of rules and formats that govern the communication between communicating peers –set of valid messages –meaning of each message A protocol is necessary for any function that requires cooperation between peers

2 2 What does a protocol tell us? Syntax of a message –what fields does it contain? –in what format? Semantics of a message –what does a message mean? –for example, not-OK message means receiver got a corrupted file Actions to take on receipt of a message –for example, on receiving not-OK message, retransmit the entire file

3 Routing How does a device know where to send a packet? –All devices need to know what IP addresses are on directly attached networks –If the destination is on a local network, send it directly there

4 Routing (cont) If the destination address isn’t local –Most non-router devices just send everything to a single local router –Routers need to know which network corresponds to each possible IP address

5 5 IP (Internet Protocol) is a Network Layer Protocol. IP’s current version is Version 4 (IPv4). It is specified in RFC 891. Orientation

6 6 IP: The waist of the hourglass IP is the waist of the hourglass of the Internet protocol architecture Multiple higher-layer protocols Multiple lower-layer protocols Only one protocol at the network layer.

7 7 IP supports the following services: one-to-one (unicast) one-to-all (broadcast) one-to-several(multicast) IP multicast also supports a many-to-many service. IP multicast requires support of other protocols (IGMP, multicast routing) IP Service unicast broadcast multicast

8 IP packets Source and destination addresses Protocol number –1 = ICMP, 6 = TCP, 17 = UDP Various options –e.g. to control fragmentation Time to live (TTL) –Prevent routing loops

9 IP Datagram VersLenTOSTotal Length IdentificationFlagsFragment Offset TTLProtocolHeader Checksum Source Internet Address Destination Internet Address Options...Padding Data... 04816192431 FieldPurpose VersIP version number LenLength of IP header (4 octet units) TOSType of Service T. LengthLength of entire datagram (octets) Ident.IP datagram ID (for frag/reassembly) FlagsDon’t/More fragments Frag OffFragment Offset FieldPurpose TTLTime To Live - Max # of hops ProtocolHigher level protocol (1=ICMP, 6=TCP, 17=UDP) ChecksumChecksum for the IP header Source IAOriginator’s Internet Address Dest. IAFinal Destination Internet Address OptionsSource route, time stamp, etc. Data...Higher level protocol data We only looked at the IP addresses, TTL and protocol #

10 IP Routing Routing Table Destination IP address IP address of a next-hop router Flags Network interface specification Application Transport Network Link Application Transport Network Link Network Link Source Destination Router

11 ARP When IP packets are sent on shared access, broadcast-based networking technologies such as Ethernet or Token Ring, the media access control (MAC) address corresponding to a forwarding IP address must be resolved. ARP uses MAC-level broadcasts to resolve a known forwarding IP address to its MAC address.

12 ICMP Internet Control Message Protocol (ICMP) provides troubleshooting facilities and error reporting for packets that are undeliverable. For example, if IP is unable to deliver a packet to the destination host, ICMP sends a Destination Unreachable message to the source host.

13 UDP Thin layer on top of IP Adds packet length + checksum –Guard against corrupted packets Also source and destination ports –Ports are used to associate a packet with a specific application at each end Still unreliable: –Duplication, loss, out-of-orderness possible

14 UDP datagram Destination PortSource Port Application data 01631 ChecksumLength FieldPurpose Source Port16-bit port number identifying originating application Destination Port16-bit port number identifying destination application LengthLength of UDP datagram (UDP header + data) ChecksumChecksum of IP pseudo header, UDP header, and data

15 Typical applications of UDP –Where packet loss etc is better handled by the application than the network stack –Where the overhead of setting up a connection isn’t wanted VOIP NFS – Network File System Most games

16 TCP Reliable, full-duplex, connection- oriented, stream delivery –Interface presented to the application doesn’t require data in individual packets –Data is guaranteed to arrive, and in the correct order without duplications Or the connection will be dropped –Imposes significant overheads

17 Applications of TCP Most things! –HTTP, FTP, … Saves the application a lot of work, so used unless there’s a good reason not to

18 TCP implementation Connections are established using a three-way handshake Data is divided up into packets by the operating system Packets are numbered, and received packets are acknowledged Connections are explicitly closed –(or may abnormally terminate)

19 TCP Packets Source + destination ports Sequence number (used to order packets) Acknowledgement number (used to verify packets are received)

20 TCP Segment Destination Port Acknowledgment Number Options...Padding Data... 041016192431 Source Port WindowLen Sequence Number ReservedFlags Urgent PointerChecksum FieldPurpose Source PortIdentifies originating application Destination PortIdentifies destination application Sequence NumberSequence number of first octet in the segment Acknowledgment #Sequence number of the next expected octet (if ACK flag set) LenLength of TCP header in 4 octet units FlagsTCP flags: SYN, FIN, RST, PSH, ACK, URG WindowNumber of octets from ACK that sender will accept ChecksumChecksum of IP pseudo-header + TCP header + data Urgent PointerPointer to end of “urgent data” OptionsSpecial TCP options such as MSS and Window Scale You just need to know port numbers, seq and ack are added

21 TCP Ports A TCP port provides a specific location for delivery of TCP segments. Port numbers below 1024 are well-known ports and are assigned by the Internet Assigned Numbers Authority (IANA).

22 Well-Known TCP Ports TCP Port NumberDescription 20FTP (Data Channel) 21FTP (Control Channel) 23Telnet 80HTTP used for the World Wide Web 139NetBIOS session service

23 TCP : Data transfer HostClient Send Packet 1 Start Timer Retransmit Packet1 Start Timer Packet should arrive ACK should be sent ACK would normally Arrive at this time Receive Packet 1 Send AXK 1 Time Expires Receive ACK 1 Cancel Timer Packet Lost Timer

24 IPv6 128 bit addresses –Make it feasible to be very wasteful with address allocations Lots of other new features –Built-in autoconfiguration, security options, … Not really in production use yet

25 25 IP Address Classes

26 26 IP Address Class Ranges

27 27 Address Class Characteristics ClassNetwork BitsHost BitsTotal NetworksTotal Addresses A82412716,777,216 B16 16,38465,536 C2482,097,152256

28 28 IP addressing: the last word... Q: How does an ISP get block of addresses? A: ICANN: Internet Corporation for Assigned Names and Numbers (guidelines in RFC 2050) –allocates addresses –manages DNS –assigns domain names, resolves disputes

29 World Wide Web the Web is the world’s largest client/server system communication occurs via message passing within browser, select URL of desired page browser requests page from server server responds with message containing –type of page (HTML, gif, pdf, zip, …) –page contents browser uses type info to correctly display page if page contains other items (images, applets, …), browser must request each separately

30 Hyper Text Transfer Protocol (HTTP) Protocol relating to web applications Current version of HTTP 1.1 has additional features –Upload information to the server –Etc. Default port number is 80

31 File Transfer Protocol (FTP) File Transfer Protocol –Used for downloading from most MP3 sites, for example Designed for faster file transfer over the Internet compared to using the HTTP protocol FTP sites can be configured alongside a web site to support FTP file transfer FTP default ports are 20 and 21

32 HTTP and FTP File transfer under FTP is faster than file transfer under HTTP Choose an FTP site if there is one for downloading files etc.

33 Simple Mail Transfer Protocol (SMTP) Governs the transmission of mail messages and attachments SMTP is used in the case of outgoing messages More powerful protocols such as POP3 and IMAP4 are needed and available to manage incoming messages

34 POP3/IMAP4 Used for incoming mail POP3 is the older protocol IMAP4 is the more advanced protocol

35 Telnet Supports terminal emulation or host sessions For example, Telnet can be used for accessing a Unix machine and emulating a terminal attached to the Unix computer

36 Domain Name System (DNS) Resolves domain names to IP addresses and vice versa DNS Server 130.182.125.66 www.refer.com

37 Routing Information Protocol (RIP) Router Network 1 Network 2 Used by Routers to route data packets on an IP Internet. Network 1

38 Simple Network Management Protocol (SNMP) Router Remote Management Console Switch Bridge Facilitates the management of SNMP compliant routers, bridges, switches etc. by enabling the collection and exchange of network management information.

39 SNMP Used by network management utilities to manage network devices For example, a manageable hub that support SNMP can be managed from a remote location using a SNMP based LAN management software


Download ppt "1 Protocols A protocol is a set of rules and formats that govern the communication between communicating peers –set of valid messages –meaning of each."

Similar presentations


Ads by Google