1 / 52

Chapter 3 – Protocols & the TCP/IP Suite

Chapter 3 – Protocols & the TCP/IP Suite. Protocols & the TCP/IP Suite The Need for a Protocol Architecture. Communication between a set of networked systems can involve a very complex set of procedures Example tasks for file transfer: Communication link setup

dena
Download Presentation

Chapter 3 – Protocols & the TCP/IP Suite

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. Chapter 3 – Protocols & the TCP/IP Suite Class 1

  2. Protocols & the TCP/IP SuiteThe Need for a Protocol Architecture • Communication between a set of networked systems can involve a very complex set of procedures • Example tasks for file transfer: • Communication link setup • Ensure the receiver is ready to accept data • Make sure the file management application at the receiver is prepared to receive and store the file • Do file translation if necessary • Confirm delivery & check for errors • Networking protocols use the concept of modularity well known in the software development arena Class 1: Introduction to LANs & WANs

  3. Protocols & the TCP/IP SuiteThe Need for a Protocol Architecture • In Networking protocol architectures, the modules are arranged in a vertical stack • Each layer performs a distinct & essential set of tasks; more ‘primitive’ tasks are usually found in lower layers (‘closer’ to the transmission medium) • Layers should be defined so changes in one layer do not necessitate changes in the other layers • It takes at least two systems to communicate across a network and each of these systems need the same layers • The peer layers on each system communicate with each other; the set of rules governing it is known as a protocol • Syntax • Semantics • Timing Class 1: Introduction to LANs & WANs

  4. Protocols & the TCP/IP SuiteThe TCP/IP Protocol Architecture • The TCP/IP protocol suite is a large collection of public standards approved by the IAB (IETF) and used as the foundation for the Internet and similar private networks • Communication across a network using TCP/IP protocols involves two general steps: • Getting the data across the network to the destination systems • Getting the data within the destination system to the right application • Because of layering & the general steps above, the TCP/IP protocol suite was designed with five layers (lowest to highest): • Physical Layer: the physical interface between the network and the attached system; covers the nature of the data signals, characteristics of the transmission medium, the data rate, etc. Class 1: Introduction to LANs & WANs

  5. Protocols & the TCP/IP SuiteThe TCP/IP Layers • Network Access Layer: specifies how data is exchanged between the attached system and the network; will include addressing, framing, and other features such as prioritization • Details of this layer depends on the physical layer; separating this layer from higher layer functions allows higher layers to be used over a wide range of network technologies • Concerned with delivering data across a single network only • Internet Layer: specifies how data can be routed across multiple networks • All devices across an internet must share a common internetworking layer to relay the data • Routers are the devices responsible for relaying data in an internet • A global address space is an essential feature of this layer Class 1: Introduction to LANs & WANs

  6. Protocols & the TCP/IP SuiteThe TCP/IP Layers • Transport Layer: specifies a set of end-to-end services usually common to a number of applications communicating across an internet (error-free, sequenced data delivery, etc.) • Currently there are two transport layer specifications in the TCP/IP suite: the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP) • TCP provides a reliable connection-oriented transport service • UDP provides a low overhead transport service with no payload error checking, flow control, or sequencing • Application Layer: specifies the functionality of the application itself (file transfer, remote terminal access, etc.) Class 1: Introduction to LANs & WANs

  7. Protocols & the TCP/IP SuiteThe Operation of TCP & IP • For successful communication across an internet, each system must have at least one globally unique address • Also, each host process needs a locally unique address • An example TCP/IP based data transfer [Figure 3.1] Class 1: Introduction to LANs & WANs

  8. Protocols & the TCP/IP SuiteThe Operation of TCP & IP • The key to operation of the protocol stack is encapsulation Class 1: Introduction to LANs & WANs

  9. Protocols & the TCP/IP SuiteExamples of TCP/IP Applications • Electronic Mail relies on the Simple Mail Transfer Protocol (SMTP) – this covers the addressing and delivery of messages; other standards cover e-mail message format • File Transfer functionality relies on the File Transfer Protocol (FTP), which provides an authenticated means for accessing and transferring files to and from a remote system • Remote Terminal Access functionality relies on the TELNET protocol; it emulates a variety a hardwired terminals over a network connection • Other important TCP/IP Applications include the World Wide Web (HTTP or the Hypertext Transfer Protocol), Network News (NNTP or the Network News Transfer Protocol), and Directory Services (LDAP or the Lightweight Directory Access Protocol) Class 1: Introduction to LANs & WANs

  10. NV Monitoring of UDP Ports for Applications (NetView to monitor the different UDP ports for applications) • TFTP Trivial File Transfer Protocol, a simple form of ftp, with most of the security and advanced commands stripped off, used for diskless workstations, router configuration data, and any device that boots up, and requires information it cannot store permanently. As such it presents a rather large security hole, just imagine if someone were to connect to your tftp server and grab the boot file for your main Cisco router. Class 1: Introduction to LANs & WANs

  11. Class 1: Introduction to LANs & WANs

  12. Protocols & the TCP/IP SuiteThe OSI Protocol Architecture • The ISO (an international standards body) has also developed a network protocol reference standard called the OSI model • While useful to know and important in the context of some international networks, the OSI model has not flourished for two primary reasons: • The TCP/IP have matured and equipment using these protocols were widely adopted before the OSI model was finished • The OSI model and standards developed using it tend to be very complex, making them harder to implement and operate Class 1: Introduction to LANs & WANs

  13. Protocols & the TCP/IP SuiteThe OSI Protocol Architecture • The OSI model consists of seven layers (from bottom up): • Physical: concerned with the transmission and signaling across the physical media (same as TCP/IP model) • Data Link: provides reliable transfer on a physical link by formatting data in frames; providing timing, error, & flow control • Network: provides a universal switching/routing layer to insulate upper layers from differing data link & physical layers • Transport: provides reliable, transparent end-to-end delivery of data; may also provide end-to-end error recovery & flow control • Session: establishes, manages, and terminates connections between communicating applications • Presentation: specifies how data should be represented between communicating applications • Application: provides user access to networked resources through a specific functional program Class 1: Introduction to LANs & WANs

  14. Class 1: Introduction to LANs & WANs

  15. Class 1: Introduction to LANs & WANs

  16. Protocols & the TCP/IP SuiteInternetworking • It is very common for an organization to have different varieties of LANs as well as geographically dispersed networks • A quick review of Internetworking Terms • Communication Network • Internet (internet) • Intranet • End System • Intermediate System • Bridge • Router Class 1: Introduction to LANs & WANs

  17. Protocols & the TCP/IP SuiteRouters • Routers are key pieces of equipment that allow internetworking across dissimilar networks • Essential functions for a router: • Provide links between physically distinct (and heterogeneous) networks • Decide when and where to forward packets to attached networks • Provide these functions in such a way that no modifications are required to the attached networks • Networking issues routers must deal with: • Layer 2 Addressing Schemes • Maximum Packet sizes • Interfaces • Reliability Class 1: Introduction to LANs & WANs

  18. Protocols & the TCP/IP SuiteAn Internetworking Example [Figure 3.5] Class 1: Introduction to LANs & WANs

  19. Class 1: Introduction to LANs & WANs

  20. Class 1: Introduction to LANs & WANs

  21. Class 1: Introduction to LANs & WANs

  22. Overall Path for Outgoing Packets Class 1: Introduction to LANs & WANs

  23. Overall Path for Incoming Packets Class 1: Introduction to LANs & WANs

  24. Protocols & the TCP/IP SuiteAppendix: IP, TCP, and UDP • IP version 4 (IPv4) • The current version of the network layer protocol used in the Internet • IPv4 header fields: • Version (4 bit) currently 4 • Internet Header length (4 bits) 0101x 32 bits • Type of service (8 bits): priority infor. to routers • Total length (16 bits) IP packet in byte • Indentification (16 bits) unique identifier • Flags (3 bits): (1) “more bit” for fragments, (2) “don’t fragment”, (3) not used. • Fragment offset (13 bits) offset in original packet of this packet. • Time to live (8 bits) life time in Internet • Protocol (8 bits): indicates next higher level protocol to receive packet • Header checksum (16 bits) error detection done by routers • Source address and Destination (32 bits) specifies network and end system. • Option: security, record routing, and time-stamping. • Padding: ensure header is multiple of 32 bit. Class 1: Introduction to LANs & WANs

  25. Protocols & the TCP/IP SuiteAppendix: IP version 6 (IPv6) • Next generation version promises a number of improvements: • HUGE address space, with support for a many addressing schemes • Different header structure and options to speed processing • Built-in Quality of Service and security functionality • IPv6 Header fields: Class 1: Introduction to LANs & WANs

  26. Protocols & the TCP/IP SuiteAppendix: the Transmission Control Protocol (TCP) • Provides a sophisticated connection-oriented transport service to networked applications on an IP network • TCP provides reliable and sequenced streaming delivery of application-layer data • TCP Header fields: Class 1: Introduction to LANs & WANs

  27. Protocols & the TCP/IP SuiteAppendix: the User Datagram Protocol (UDP) • Provides a basic low-overhead connectionless transport service to networked applications on an IP network • UDP provides unreliable delivery of application-layer data in which delivery or duplication of data is not guaranteed • UDP is good for applications that provide their own enhanced delivery services as well as multicast and streaming applications • UDP Header fields: Class 1: Introduction to LANs & WANs

  28. Class 1: Introduction to LANs & WANs

  29. Class 1: Introduction to LANs & WANs

  30. Memory-Memory Copies • Protocol processing overhead: • Copy message from one layer to the next using e.g., memcpy() • Often involves context switching: copying between user and kernel space • Example: delay due to memory-memory copy • Assume Data rate of 600Mbps=73MBps • Assume 16MHz memory bus that is 16 bits wide 32MBps • For a 1 MB message, one copy takes 1/32 sec  max data rate 32MBps • Two copies take 1/32 sec + 1/32 sec = 1/16 sec  max data rate 16MBps • Example: effective BW • Itanium 4 bus allows 1 GB/s bandwidth • Each copy between layers takes a read and a write • A message of 1 KB takes 2 msec  effective BW = 500 MB/s • Two copies of 1 KB takes 4 msec  effective BW = 250 MB/s • Four copies of 1 KB takes 8 msec  effective BW = 125 MB/s Class 1: Introduction to LANs & WANs

  31. Berkeley Sockets • A real implementation of transport layer primitives • Implemented in BSD Unix • Part of TCP implementation in TCP/IP stack • Socket primitives for TCP • SOCKET: Creates new communication end point • BIND: Attaches a local address to a socket • LISTEN: Announce willingness to accept connections • non-blocking call • ACCEPT: Blocks the caller until a connection attempt arrives • Blocking call • Server creates a new socket when connection request TPDU arrives and forks another process to handle subsequent requests • CONNECT: Establishes a connection • SEND: Send data over the connection • RECEIVE: Receive data from the connection • CLOSE: Release connection Class 1: Introduction to LANs & WANs

  32. BSD Sockets Example: Receiver Side /* Simple socket program: receiver side */ #include <iostream.h> #include <stdlib.h> #include <stdio.h> #include <stream.h> #include <ctype.h> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #include <sys/time.h> void main ( int argc, char *argv[] ) { int sk ; // socket descriptor sockaddr_in remote ; // socket address for remote sockaddr_in local ; // socket address for us char buf[80] ; // buffer from remote int rlen = sizeof(remote);// length of remote address int len = sizeof(local); // length of local address int mesglen ; // actual length of message Class 1: Introduction to LANs & WANs

  33. // create the socket sk = socket(AF_INET,SOCK_DGRAM,0) ; // set up the socket local.sin_family = AF_INET ; // internet family local.sin_addr.s_addr = INADDR_ANY ; // wild card machine address local.sin_port = 0; // let system choose the port // bind the name (address) to a port bind(sk,(struct sockaddr *)&local,sizeof(local)) ; // get the port name and print it out getsockname(sk,(struct sockaddr *)&local,&len) ; cout << "socket has port " << local.sin_port << "\n" ; mesglen = recvfrom(sk,buf,80,0,(struct sockaddr *)&remote,&rlen); cout << buf << " len: " << mesglen << endl; /* close the socket */ close(sk); } Class 1: Introduction to LANs & WANs

  34. BSD Sockets Example: Sender Side /* A simple sockets program ... sender side */ #include <iostream.h> #include <stdio.h> #include <stream.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #include <fcntl.h> #include <errno.h> #include <sys/ipc.h> #include <sys/time.h> void main ( int argc, char *argv[] ) { int sk ; // socket descriptor sockaddr_in remote ; // socket address // for remote side hostent *hp ; // address of remote // host int mesglen ; // actual length of // the message char buf[80]; Class 1: Introduction to LANs & WANs

  35. BSD Sockets Example: Sender Side // create the socket sk = socket(AF_INET,SOCK_DGRAM,0) ; // designate the addressing family remote.sin_family = AF_INET ; // get the address of the remote host and store hp = gethostbyname(argv[1]) ; memcpy(&remote.sin_addr,hp->h_addr,hp->h_length) ; // get the port used on the remote side and store remote.sin_port = atoi(argv[2]) ; cout << "Enter the info to transmit: "; cin.getline( buf, 80); mesglen = strlen(buf)+ 1; cout << buf << " len: " << mesglen << endl; sendto(sk,buf,mesglen,0,(struct sockaddr *)&remote, sizeof(remote)) ; close(sk); } Class 1: Introduction to LANs & WANs

  36. BSD Sockets Example • Compile and execute the two programs • Save these programs on a Unix machine as recv.cc and send.cc • Compile and link them: • E.g., on a Solaris workstation use: gcc –o recv recv.cc –lsocket –lnsl and gcc –o send send.cc –lsocket –lnsl • You’ll get two executables: recv and send • Execute them on two different workstations: • E.g., recv on one workstation and send on another using rlogin to that workstation • Try the connection-oriented case now • Use SOCK_STREAM instead of SOCK_DGRAM in socket() call • Use listen() and accept() calls • Also try spawning a new receiver after accept() to handle multiple clients Class 1: Introduction to LANs & WANs

  37. Network supports process-to-process channels; e.g., • Latency = Propagation + Transmit + • Queue • Propagation = Distance / SpeedOfLight • 3.0 x 108 meters/second in a vacuum • 2.3 x 108 meters/second in a cable • 2.0 x 108 meters/second in a fiber • Transmit = Size / Bandwidth • Request/Reply: for file access and digital libraries • • Message Stream: for video applications • – video: sequence of frames • – resolution:1/4 TV-size image = 352 x 240 pixels; • – 24-bit color: frame=(352 x 240 x 24)/8 = • 247.5KB; • – frame rate: 30 fps = 7500KBps = 60Mbps • – video on-demand versus video-conferencing Class 1: Introduction to LANs & WANs

  38. DNS • Hierarchical. • Dot used as a separator. • Right-most component is the top-most domain. • Top-level domains: .edu, .gov, .mil, .com, .arpa, .org, .net, plus the country domains (.uk, .de, .no, .il, etc...), and the.us hierarchy. • New TLDs include .info, .biz, .name, … • FQDN: frobozzica.merit.edu vs. relative name frobozzica (relative to a default domain, in this case merit.edu). • The reverse mapping from IP addresses to host names is performed under the auspices of the IN-ADDR.ARPA pseudo-domain. • 100.61.108.198.IN-ADDR.ARPA Class 1: Introduction to LANs & WANs

  39. DNS - Resolver DNS - Resolver • The DNS resolver (client library) generates queries for domain name information sent to a name server. • Completely separate from the name server function. • Configured via /etc/resolv.conf domain merit.edu search org.merit.edu, itss.umich.edu nameserver 127.0.0.1 nameserver 198.108.1.42 DNS - Server • Answers DNS queries sent by resolvers. • Listens at UDP and TCP port 53 • UDP used for routine queries • TCP used for zone transfers • A zone is part of the name space (merit.edu) delegated to a single server. • A domain is also part of the name space, but it may cover several zones (e.g., umich.edu covers engin.umich.edu, eecs.umich.edu). Class 1: Introduction to LANs & WANs

  40. DNS - Server • Configurations • Caching-only: relies on other name servers for authoritative answers • Primary: Contains the writeable authoritative copy for the zones that it is primary for • Secondary: Contains a mirror copy of the data from a primary name server. No updates take place here; used to provide redundancy Class 1: Introduction to LANs & WANs

  41. DNS - Operation local DNS sends query to DNS @ merit.edu, www.merit.edu? what is the IP address of www.merit.edu? DNS @ merit.edu returns IP address of www.merit.edu 198.108.1.48 to local DNS local DNS sends query to root DNS server root DNS server returns IP address of DNS server at merit.edu local DNS returns answer to resolver, www.merit.edu is 198.108.1.48 Class 1: Introduction to LANs & WANs

  42. 10BseT DUART Flash Card PHY PHY PHY L2 R5000 L2 L2 EE Prom L3 L3 L3 Main Memory Switching Fabric L3 L3 L2 L2 PHY PHY Distributed Switching and Routing Architecture Line Card Control Module Line Card Line Card Slot 3 Slot 2 Slot 4 Slot 1 L3 L3 L2 L2 PHY PHY Line Card Line Card Line Card Line Card Slot 7 Slot 6 Slot 8 Slot 5 Class 1: Introduction to LANs & WANs

  43. Encaps & Queuing QoS Encaps Crossbar L3/L4 Database Demux Priority Accounting Filters Distributed Input/Output Processing Input Processing L2 Database Output Processing Bridge or Route Priority Accounting Filters Arbiter Class 1: Introduction to LANs & WANs

  44. L3/L4 Database Priority Accounting Filters Flow & Table Management CPUModule First Packet Access Control Bridging VLANs QoS Policy RMON/ RMON2 Routing Input Processing Subsequent Packets L2 Database Bridge or Route Output Processing Priority Accounting Filters Encaps & Queuing Encaps QoS Crossbar Demux Arbiter Flow classification and distribution is better than 25,000 flows per second Class 1: Introduction to LANs & WANs

  45. Crossbar • 2.0 Gbps per channel (SSR8000/8600) • 4 priority queues per input and output channel • Packet switching • Overspeed • Overflow at output buffers • Avoid Head Of Line - look 4 deep per queue • Multicast packets replicated in hardware Class 1: Introduction to LANs & WANs

  46. Switch Fabric Multicast Support OutputModule InputModule OutputModule QoS ensures priority OutputModule • Standards based Multicast support • IGMP v2 (seamless integration with workstations/servers) • DVMRP v3 • PIM-DM, PIM-SM • ACLs screen out hosts which attempt to join certain multicast groups Expanding Ring TTL Support Efficient packet replication via switch fabric Class 1: Introduction to LANs & WANs

  47. Control Priority High Priority Medium Priority Low Priority QoS - Packet Classification(Four Classes of Service) Switch Fabric ASIC based Layer-3/4Packet Classifier Buffer Queues Line Speed Gigabit Input Streams Layer-3: Layer-4 flows mapped to CoS Layer-2: 802.1p priority mapped to CoS Class 1: Introduction to LANs & WANs

  48. Switch Fabric Buffer Queues Buffer Queues ASIC based Packet Encapsulating Engine Weighted Fair Queuing (ex. 25% per queue) Line Speed 100 Mbps Streams Strict Priority Queuing Control Priority High Priority Medium Priority Low Priority QoS - Multiple Prioritization Schemes Dual MAC Layer-3: TOS/DiffServ Packet Marking Layer-2: 802.1p Packet Marking Class 1: Introduction to LANs & WANs

  49. ASIC Layer-3/4Packet Classifier H H Control Priority Excess Bandwidth reprioritized to a lower priority High Priority Medium Priority Low Priority Per Flow Committed Access Rate (CAR)(Rate Limiting) Excess bandwidth discarded Buffer Queues Switch Fabric H HTTP Flow H H H H H H H H H H H F F F F F F FTP Flow e e eMail Flow Buffer Queues H HTTP Flow H H H H H H H H H H F F F FTP Flow F F F e eMail Flow e CAR can be performed on - per port - per flow(s) - per application(s) - per host(s)in kilobits per second Class 1: Introduction to LANs & WANs

  50. Maximizes throughput under congestive conditions Provides fair bandwidth reduction between host connections thru implicit notification (dropped packets) Works for TCP only, use CAR for UDP Intelligently differentiates between transient bursts and excessive offered load Avoids TCP slow start oscillations Reduces overall nodal latency Drop All Maximum Threshold Drop Probability Avg. QueueDepth Queue Depth Minimum Threshold Time Random Early Detection (RED) Weighted RED (WRED) is RED policies per Queue Class 1: Introduction to LANs & WANs

More Related