Presentation is loading. Please wait.

Presentation is loading. Please wait.

COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008.

Similar presentations


Presentation on theme: "COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008."— Presentation transcript:

1 COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008 Umakishore Ramachandran and William D. Leahy Jr.

2 13.1 Preliminaries Today a general purpose computer not connected to the "net" or some net is almost unthinkable. Connecting to a network requires an I/O device which will use DMA

3 13.2 Basic Terminologies Computer connected to a network is called a host The connection is made using a device called a Network Interface Card or NIC What exactly is the "network" shown in the diagram? As we shall see it may be one network or a composite of multiple networks

4 13.2 Basic Terminologies What is the Internet? Consider the postal system…

5 13.2 Basic Terminologies Now consider an email

6 13.2 Basic Terminologies Each cloud represented computers of an Internet Service Provider (ISP) The ISP clouds are not directly connected Instead they are connected by routers, which are special purpose computer for this purpose How do these routers know where to send information? A universal system of addresses called Internet Protocol (or IP) Addresses is part of the answer

7 13.2 Basic Terminologies We showed connecting using a cable or phone network. Connections may also be made through Local Area Networks (LAN's) Other hardware devices – hubs/repeaters – bridges – switches – routers

8 13.3 Networking Software Need to address issues such as – Arbitrary message size and physical limitations of network packets – Out of order delivery of packets – Packet loss in the network – Bit errors in transmission Software is logically in a protocol stack configuration

9 13.3 Networking Software A protocol is the set of rules used to describe all of the hardware and (mostly) software operations used to send messages from Processor A to Processor B A protocol describes the syntax, semantics and timing of communication between two devices Common practice is to attach headers/trailers to the actual payload forming a packet or frame.

10 13.3.1 Need for a Layered Protocol Stack Good abstraction Simpler to understand than OGP Easier to design, analyze, implement and test Design concept is suites or families What do we mean by layers? Or a layered protocol? Consider the army…

11 13.3.1 Need for a Layered Protocol Stack General Colonel Captain Sergeant Private General Colonel Captain Sergeant Private

12 13.3.2 Internet Protocol Stack Physical Link Network Transport Application Layer 1 Layer 2 Layer 3 Layer 4 Layer 5

13 13.3.2 Internet Protocol Stack Application: HTTP, SMTP, FTP, etc. Shield applications using network from network details Transport: Breaks message into packets, handles things like out of order packets, may deal with reliability Network: Responsible for routing, does best effort delivery Link: Moves the packet using a protocol such as Ethernet, Token Ring, and ATM Physical: Responsible for physically (electrically, optically, etc.) moving the bits of the packet from one node to the next.

14 13.3.2 Internet Protocol Stack Application: HTTP, SMTP, FTP, etc. Shield applications using network from network details Transport: Breaks message into packets, handles things like out of order packets, may deal with reliability Network: Responsible for routing, does best effort delivery Link: Moves the packet using a protocol such as Ethernet, Token Ring, and ATM Physical: Responsible for physically (electrically, optically, etc.) moving the bits of the packet from one node to the next.

15 13.3.2 Internet Protocol Stack Manufacturers group their protocol software together into a family and give it a nice name… Novell Corporation Banyan Systems Apple Computer Digital Equipment IBM “The Internet Biggie” Netware VINES AppleTalk DECNET SNA TCP/IP

16 13.3.2 Internet Protocol Stack Layer 5: Application-Sends application specific messages Layer 4: Transport-Sends segments Layer 3: Network-Sends packets Layer 2: Datalink-Sends frames Layer 1: Physical-Sends bits

17 13.3.2 Internet Protocol Stack

18 13.4 Transport Layer Assume – send (destination-address, message) – receive (source-address, message) Functionality of transport layer – Support arbitrary message size at the application level – Support in-order delivery of messages – Shield the application from loss of messages – Shield the application from bit errors in transmission.

19 13.4 Transport Layer

20 13.4.1 Stop and wait protocols Simple approach – Sender sends a packet and waits for a positive acknowledgement, commonly referred to as an ACK. – As soon as packet is received, recipient generates and sends an ACK for that packet. ACK should contain information for sender to discern unambiguously packet being acknowledged. Sequence number is unique signature of each packet. Thus, all that needs to be in ACK packet is sequence number of received packet. – Sender waits for a period of time called timeout. If within this period, it does not hear an ACK, it re-transmits the packet. Similarly, the destination may re-transmit the ACK, if it receives the same packet again (an indication to the receiver that his ACK was lost en route)

21 13.4.1 Stop and wait protocols

22

23 RTT = Round Trip Time

24 13.4.2 Pipelined protocols (a) (b)

25 13.4.3 Reliable Pipelined Protocol

26 Increasing sequence numbers Active window of sequence numbers Packets sent and acknowledged Packets sent but not yet acknowledged Packets that are in the active window that can be sent without waiting for any further ACKs Packets that cannot yet be sent since they are outside the active window

27 13.4.4 Dealing with transmission errors Methods are needing to determine if packets are being received correctly Examples – Checksums – Error Correcting Codes (ECC)

28 13.4.5 Transport protocols on the Internet Transport protocol FeaturesProsCons TCPConnection- oriented; self- regulating; data flow as stream; supports windowing and ACKs Reliable; messages arrive in order; well- behaved due to self- policing Complexity in connection setup and tear-down; at a disadvantage when mixed with unregulated flows; no guarantees on delay or transmission rate UDPConnection-less; unregulated; message as datagram; no ACKs or windowing Simplicity; no frills; especially suited for environments with low chance of packet loss and applications tolerant to packet loss; Unreliable; message may arrive out of order; may contribute to network congestion; no guarantees on delay or transmission rate

29 13.4.5 Transport protocols on the Internet ApplicationKey requirementTransport protocol Web browserReliable messaging; in order arrival of messages TCP Instant messagingReliable messaging; in order arrival of messages TCP Voice over IPLow latencyUsually UDP Electronic MailReliable messagingTCP Electronic file transfer Reliable messaging; in order deliveryTCP Video over InternetLow latencyUsually UDP; may be TCP File download on P2P networks Reliable messaging; in order arrival of messages TCP Network file service on LAN Reliable messaging; in order arrival of messages TCP; or reliable messaging on top of UDP Remote terminal access Reliable messaging; in order arrival of messages TCP

30 13.5 Network Layer Why a separate layer? – Multiple network connections to the host – Multiple hops between source and destination – Route is not static Transport/network layers interface – Destination address and packet size Network layer functionality (host) – Routing algorithms – Provide a service model to the transport layer – Pass it up to transport if destination reached Network layer functionality (Routers) – Routing algorithms

31 13.5.1 Routing Algorithms

32 Iteration Count New node to which least-cost route known B Cost/ route C Cost/ route D Cost/ route E Cost/ route F Cost/ route InitA2/AB1/AC4/AD5/AE  1ACAC2AB 1/AC  3/ACD4/ACE6/ACF 2ACB 2/AB  3/ACD3/ABE6/ACF 3ACBD  3/ACD  3/ABE5/ADF 4ACBDE  3ABE  4/ABEF 5ACBDEF  4/ABEF 

33 13.5.1 Routing Algorithms DestinationABCF A5(EA)3(BA)4(ECA)5(EFDCA) B7(EAB)1(EB)5(ECB)6(EFDCB C6(EAC)3(EBC)3(EC)4(EFDC) D8(EACD)4(EBEFD)5(ECD)2(EFD) F9(EABEF)2(EBEF)7(ECBEF)1(EF) DV Table for Node E

34 13.5.1 Routing on the Internet Details of the network layer in a gateway node Network of networks Scale, dynamism Autonomous Systems (AS) – Allows for evolution – Gateway node for inter-AS routing

35 13.5.1 Hierarchical Routing Algorithms BGP Border Gateway Protocol Gateway nodes use BGP Nodes within AS use LS or DV

36 13.5.2 Internet Addressing IP NetworkDevice 24 bits8 bits Telephone Number Internet Protocol Address

37 13.5.2 Internet Addressing Consider this 32 bit IP Address – (10000000 00111101 00010111 11011000) 2 Convert each 8-bit octet into a decimal number and separate each with a decimal – 128.61.23.216 In this address the first 24 bits are network while the last 8 are the device – 128.61.23.216/24

38 13.5.2 Internet Addressing How many IP networks?

39 13.5.2 Internet Addressing How many IP networks?

40 13.5.2 Internet Addressing IP NetworkDevice 24 bits8 bits IP Network Device 16 bits Device 8 bits24 bits

41 13.5.3 Network Service Model Circuit Switching

42 13.5.3 Network Service Model MessageSwitching

43 13.5.3 Network Service Model Packet Switching

44 13.5.4 Network Layer Summary Network Terminology Definition/Use Circuit switchingA network layer technology used in telephony. Reserves the network resources (link bandwidth in all the links from source to destination) for the duration of the call; no queuing or store-and-forward delays TDMTime division multiplexing, a technique for supporting multiple channels on a physical link used in telephony FDMFrequency division multiplexing, also a technique for supporting multiple channels on a physical link used in telephony Packet switchingA network layer technology used in wide area Internet. It supports best effort delivery of packets from source to destination without reserving any network resources en route. Message switchingSimilar to packet switching but at the granularity of the whole message (at the transport level) instead of packets. Switch/RouterA device that supports the network layer functionality. It may simply be a computer with a number of network interfaces and adequate memory to serve as input and output buffers. Input buffersThese are buffers associated with each input link to a switch for assembling incoming packets. Output buffersThese are buffers associated with each outgoing link from a switch if in case the link is busy. Routing tableThis is table that gives the next hop to be used by this switch for an incoming packet based on the destination address. The initial contents of the table as well as periodic updates are a result of routing algorithms in use by the network layer.

45 13.5.4 Network Layer Summary Network Terminology Definition/Use DelaysThe delays experienced by packets in a packet-switched network Store and forward This delay is due to the waiting time for the packet to be fully formed in the input buffer before the switch can act on it. QueuingThis delay accounts for the waiting time experienced by a packet on either the input or the output buffer before it is finally sent out on an outgoing link. Packet lossThis is due to the switch having to drop a packet due to either the input or the output buffer being full and is indicative of traffic congestion on specific routes of the network. Service ModelThis is the contract between the network layer and the upper layers of the protocol stack. Both the datagram and virtual circuit models used in packet- switched networks provide best effort delivery of packets. Virtual Circuit (VC) This model sets up a virtual circuit between the source and destination so that individual packets may simply use this number instead of the destination address. This also helps to simplify the routing decision a switch has to make on an incoming packet. DatagramThis model does not need any call setup or tear down. Each packet is independent of the others and the switch provides a best effort service model to deliver it to the ultimate destination using information in its routing table.

46 13.6 Link Layer and Local Area Networks Innovations in the link layer in the 70's led to making the internet a household term Link layer is responsible for acquiring physical medium for transmission, and sending packet over the physical medium to destination host. Broad Classification – Random Access: Example-Ethernet – Taking Turns: Example-Token Ring Portion of protocol that deals with gaining access to physical medium is called the Media Access and Control (MAC) layer

47 13.6.1 Ethernet Listen for Carrier Transmit Message Abort Transmission Need to Transmit Medium Idle Collision Detected Transmission Complete No collision Medium Not Idle

48 Terminologies Base band signaling Manchester encoding CSMA/CD CSMA/CA – Hidden terminal problem – RTS/CTS xBASEy Watch – Triumph of the Nerds (PBS show) Joe CindyBala

49 13.6.1 Manchester Encoding 0 1 1 0 0 1 0 1 1

50 13.6.1 Ethernet Hidden Terminal Problem

51 13.6.2 Token Ring

52 Comparison Link Layer Protocol FeaturesProsCons EthernetMember of random access protocol family; opportunistic broadcast using CSMA/CD; exponential backoff on collision Simple to manage; works well in light load Too many collisions under high load Token ring Member of taking turns protocol family; Token needed to transmit Fair access to all competing stations; works well under heavy load Unnecessary latency for token acquisition under light load

53 13.6.3 Other link layer protocols FDDI: Fiber Distributed Data Interface – Fiber optics based – High bandwidth backbone used to connect LAN's ATM: Asynchronous Transfer Mode – Guarantees quality of service using link reservation and admission control to avoid congestion – Connection oriented and can have transport layer implemented on top of it – Used in MAN's and WAN's PPP: Point to Point – Used by dial-up connections – Widespead

54 13.6.3 Other link layer protocols Ethernet is really not just one protocol. As obsolescence approaches a new version is introduced and typically comes out on top FDDI was upstaged by Gigabit Ethernet ATM is likely to be upstaged by 10-Gigabit Ethernet

55 13.7 Relationship between the three layers Both TCP and IP include error checking – They don't have to be used together Most layers are in software but the link layer is often implemented in hardware

56 13.8 Data structures for packet transmission /* Packet Header Data Structure */ struct header_t { int destination_address; /* destination address */ int source_address; /* source address */ int num_packets; /* total number of */ /* packets in message */ int sequence_number; /* sequence number of */ /* this packet */ int packet_size; /* size of data */ /* contained in the */ /* packet */ int checksum; /* for integrity check of */ /* this packet */ };

57 13.8 Data structures for packet transmission /* Packet Data Structure */ struct packet_t { struct header_t header; /* packet header */ char *data; /* pointer to the memory */ /* buffer containing the data */ /* of size packet_size */ };

58 13.9 Message transmission time P1 Protocol stack Network P2 Protocol stack S R TwTw msg pkt1pkt2pktn … TfTf

59 13.9 Message transmission time Sender Overhead Time on the wire Time of Flight Receiver Overhead

60 13.10 Protocol Layering Layering is a structuring tool for combating complexity of protocol stack Allows partitioning total responsibility for message transmission and reception among various layers. Modularity allows integration of a new module at a particular layer with minimal changes to the other layers. It might appear that a potential downside to layering might be a performance penalty, as the message has to traverse several layers. Judicious definition of interfaces between layers avoids such inefficiencies.

61 13.10.1 OSI Model Presentation layer subsumes user directed input/output functionalities that are common across different applications. Session layer maintains process-to-process communication details and provides a higher-level abstraction between an application and the transport layer (e.g. Unix socket). Application Presentation Transport Network Data Link Physical Session 7 6 5 4 3 2 1

62 13.10.2 Practical issues with layering Application Presentation Transport Network Data Link Physical Session 7 6 5 4 3 2 1 Physical Ethernet Card IP TCP Telnet, FTP, etc. 1 2 3 4 5

63 13.11 Networking Hardware Hub/Repeater

64 13.11 Networking Hardware More Hubs

65 13.11 Networking Hardware Bridge HUB BRIDGE 1 2 3 4 Collision domain

66 13.11 Networking Hardware Switch

67 13.11 Networking Hardware VLAN Switch 1 2 3 4 5 6 7 8

68 13.11 Networking Hardware NIC MAC address Message Header Payload

69 13.11 Networking Hardware Router IP address of the destination Message MAC address of router Payload for the router Payload for destination node

70 13.11 Networking Hardware Name of Component Definition/Function HostA computer on the network; this is interchangeably referred to as node and station in computer networking parlance NICNetwork Interface Card; interfaces a computer to the LAN; corresponds to layer 2 (data link) of the OSI model PortEnd-point on a repeater/hub/switch for connecting a computer; corresponds to layer 1 (physical) of the OSI model Collision domain Term used to signify the set of computers that can interfere with one another destructively during message transmission RepeaterBoosts the signal strength on an incoming port and faithfully reproduces the bit stream on an outgoing port; used in LANs and WANs; corresponds to layer 1 (physical) of the OSI model

71 13.11 Networking Hardware Name of Component Definition/Function HubConnects computers together to form a single collision domain, serving as a multi-port repeater; corresponds to layer 1 (physical) of the OSI model BridgeConnects independent collision domains, isolating them from one another; typically 2-4 ports; uses MAC addresses to direct the message on an incoming port to an outgoing port; corresponds to layer 1 (physical) of the OSI model SwitchSimilar functionality to a bridge but supports several ports (typically 4- 32); provides expanded capabilities for dynamically configuring and grouping computers connected to the switch fabric into VLANs; corresponds to layer 1 (physical) of the OSI model RouterEssentially a switch but has expanded capabilities to route a message from the LAN to the Internet; corresponds to layer 3 (network) of the OSI model VLANVirtual LAN; capabilities in modern switches allow grouping computers that are physically distributed and connected to different switches to form a LAN; VLANs make higher level network services such as broadcast and multicast in Internet subnets feasible independent of the physical location of the computers; corresponds to layer 1 (physical) of the OSI model

72 13.12 Network Programming P1 P2 Socket

73 13.12.1 Unix Sockets Socket: create an endpoint of communication Bind: bind a socket to a name or an address Listen: listen for incoming connections on the socket Accept: accept an incoming connection request on a socket Connect: send a connection request to a name (or address) associated with a remote socket Recv: receive incoming data on a socket from a remote peer Send: send data to a remote peer via a socket

74 13.13 Network Services and Higher Level Protocols P1 P2 foo (args) return RPC Host 1 Host 2

75 13.13 Network Services and Higher Level Protocols User fopen NFS client RPC layer at clientRPC layer at server NFS server Unix file system Network

76 13.15 Historical Perspective From Telephony to Computer Networking Evolution of the Internet PC and the arrival of LAN Evolution of LAN

77 13.15.1 From Telephony to Computer Networking 1875 Telephone invented…analog system 1960 Telephone infrastructure goes digital

78 13.15.1 From Telephony to Computer Networking 1940's Mainframe computers developed 1960's Transition – Batch-oriented card-input/output – CRT I/O and timesharing

79 13.15.1 From Telephony to Computer Networking

80 EXTRA!!!!! 1960 AT&T INTRODUCES DATAPHONE First Commercial Modem!

81 13.15.1 From Telephony to Computer Networking 1968/9 Carterphone decision allowed devices which were beneficial and not harmful to the network to be connected to the Public Switched Telephone Network (PSTN). Paved the way for computers to communicate using the telephone switching infrastructure.

82 13.15.2 Evolution of the Internet 1965 DoD DARPA plans first computer network 1969 ARPANET connects 4 computers using packet switched network – Stanford Research Institute, UCLA, UC Santa Barbara, and the University of Utah – Networking luminary Leonard Kleinrock, is credited with successfully sending the first network “message” from UCLA to Stanford.

83 13.15.2 Evolution of the Internet “Router” in the network was called Interface Message Processor (IMP), built by a company called BBN (which stands for Bolt, Beranak, and Newman Inc.). – IMP system architecture required a careful balance of the hardware and software that would allow it to be used as a store-and-forward packet switch among these computers. – IMP's used modems and leased telephone lines to connect to one another. 1971 The ARPANET grows to 23 hosts connecting universities and government research centers around the country.

84 13.15.2 Evolution of the Internet 1973 Robert Metcalfe and David Boggs invent the Ethernet networking system at the Xerox Palo Alto Research Center.

85 13.15.2 Evolution of the Internet 1973 The ARPANET goes international

86 13.15.2 Evolution of the Internet 1975 Internet operations transferred to the Defense Communications Agency 1978 Hayes Microcomputer Products releases the first mass-market modem, transmitting at 300 bps (0.3K). 1980 John Shoch at Xerox creates the first “worm” program, with the capacity to travel through networks. 1981 Ungermann-Bass ships the first commercial Ethernet network interface card.

87 13.15.2 Evolution of the Internet 1981 ARPANET has 213 hosts. A new host is added approximately once every 20 days. 1982 The term 'Internet' is used for the first time. 1983 TCP/IP becomes the universal language of the Internet. Developed by Vinton Cerf and Robert Kahn 1984 CISCO founded Early 80's Unix and IBM OS included TCP/IP

88 13.15.2 Evolution of the Internet Late 90's Internet becomes household term – Needed PC – Needed "Killer app" i.e. WWW & browsers

89 13.15.3 PC and the arrival of LAN 1971 Intel introduces the first microprocessor - the Intel 4004. 1971 The Kenbak-1, the first microcomputer, is introduced in Scientific American, selling a total of 40 units in 2 years. Used 130 IC's with a 256 byte memory and 8-bit words, processed 1000 instructions per second, and cost $750.

90 13.15.3 PC and the arrival of LAN 1972 Intel launches the 8-bit 8008 - the first microprocessor which could handle both upper and lowercase characters. 1972 Xerox develops the Xerox Alto - the first computer to use a Graphic User Interface. The Alto consists of four major parts: the graphics display, the keyboard, the graphics mouse, and the disk storage/processor box. Each Alto is housed in a beautifully formed, textured beige metal cabinet that hints at its $32,000 price tag (1979US money). With the exception of the disk storage/processor box, everything is designed to sit on a desk or tabletop

91 13.15.3 PC and the arrival of LAN 1973 Robert Metcalfe and David Boggs invent the Ethernet networking system at the Xerox Palo Alto Research Center.

92 13.15.3 PC and the arrival of LAN 1974 Intel introduces the 8080 microprocessor – 5 times faster than the 8008. – And the heart of the future Altair 8800. 1975 MITS markets the Altair 8800 - the first mass-market microcomputer, launching the Personal Computer Revolution. 1975 Bill Gates and Paul Allen form the Microsoft company to create software for the new Altair 8800.

93 13.15.3 PC and the arrival of LAN 1976 Apple Computer is formed by Steve Jobs, Steve Wozniak, and Ron Wayne, and launches the Apple Computer. 1977 Tandy Radio Shack ships its first personal computer - the TRS-80. It sells over 10,000 units, tripling expectations. 1977 Apple Computer launches the Apple II, which sets new standards for sophisticated personal computer systems.

94 13.15.3 PC and the arrival of LAN 1978 The C programming language is completed at AT&T Bell Laboratories, offering a new level of programming. 1978 Apple and Tandy ship PCs with 5.25" floppy disks, replacing cassette tape as the standard storage medium for PCs. 1978 Hayes Microcomputer Products releases the first mass-market modem, transmitting at 300 bps (0.3K).

95 13.15.3 PC and the arrival of LAN 1978 Intel ships the Intel 8086 microprocessor, with 29,000 transistors, and running at 4.77 megahertz. 1979 Personal Software creates VisiCalc for the Apple II, the first electronic spreadsheet program, selling over 100,000 copies. 1979 Intel develops the 8088 microprocessor, which would later become the heart of the IBM PC.

96 13.15.3 PC and the arrival of LAN 1979 Motorola develops the Motorola 68000 microprocessor, offering a new level of processing power. 1979 Robert Metcalf founded 3COM 1980 Seagate Technology introduces the first microcomputer hard disk, capable of holding 5 megabytes of data. 1980 Philips introduces the first optical laser disk, with many times the storage capacity of floppy or hard disks.

97 13.15.3 PC and the arrival of LAN 1980 Xerox creates Smalltalk - the first object- oriented programming language. 1981 Ungermann-Bass ships the first commercial Ethernet network interface card. 1981 Xerox introduces the Xerox Star 8010, the first commercial Graphic User Interface computer, for $16,000-$17,000.

98 13.15.3 PC and the arrival of LAN 1981 Microsoft supplies IBM with PC-DOS (which it would also sell as MS-DOS), the OS that would power the IBM PC. 1981 IBM brings to market the IBM PC, immediately establishing a new standard for the world of personal computers.

99 13.15.4 Evolution of LAN Thicknet – Coaxial cable/Vampire taps – 10base5 (10 Mbits/sec, baseband, 500 meters) – 1979-1985

100 13.15.4 Evolution of LAN Thinnet – Coaxial cable/BNC connectors – 10base2 (10 Mbits/sec, baseband, 200 meters) – 1985-1993

101 13.15.4 Evolution of LAN Fast Ethernet – Move "ethernet" into the box – 100baseT (T for twisted pair) – RJ45 Connectors


Download ppt "COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008."

Similar presentations


Ads by Google