* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download single physical link
SIP extensions for the IP Multimedia Subsystem wikipedia , lookup
Piggybacking (Internet access) wikipedia , lookup
IEEE 802.1aq wikipedia , lookup
Distributed firewall wikipedia , lookup
Asynchronous Transfer Mode wikipedia , lookup
Network tap wikipedia , lookup
Computer network wikipedia , lookup
Wake-on-LAN wikipedia , lookup
Deep packet inspection wikipedia , lookup
List of wireless community networks by region wikipedia , lookup
Internet protocol suite wikipedia , lookup
Zero-configuration networking wikipedia , lookup
Airborne Networking wikipedia , lookup
Serial digital interface wikipedia , lookup
Cracking of wireless networks wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
Real-Time Messaging Protocol wikipedia , lookup
Introduction 1.1 Applications 1.2 Requirements 1.3 Network Architecture 1.4 Implementing Network Software 1.5 Performance 1 1.1 Applications Most people know the Internet through its applications World Wide Web, email, chat rooms, etc The Web presents an intuitively simple interface. Users view pages full of textual and graphical objects, click on objects that they want to learn about, and a corresponding new page appears. Each selectable object is bound to an identifier for the next page to be viewed. 2 URL The identifier is called Uniform Resource Locator (URL) http://www.cs.princeton.edu/~llp/index.html http indicates that the HyperText Transfer Protocol should be used to download the page www.cs.princeton.edu is the name of the machine serving the page /~llp/index.html uniquely identifies the page at this site 3 By clicking on just one such URL, as many as 17 messages may be exchanged over the Internet 6 messages to translate the server name into its Internet address 3 messages to set up a TCP connection between your browser and this server 4 messages for your browser to send the HTTP “get” request and the server to respond with the requested page 4 message to tear down the TCP connection 4 Another widespread application of the Internet is the delivery of “streaming” audio and video While an entire video file could first be fetched from a remote machine and then played on the local machine Stream video implies that the sender and the receiver are respectively the source and the sink for the video stream 5 Difference classes of video applications Video-on-demand Reads a preexisting movie from disk and transmits it over the network Videoconferencing More challenging case It has very tight timing constraints (just as using a telephone). Too much delay makes the system unusable. Video is flowing in both directions (interactive video) 6 VideoConferencing 7 VideoConferencing 8 1.2 Requirements Building blocks Switched networks Addressing and routing Multiplexing Inter-process communication 9 The expectations of a network from different perspective: An application programmer: a guarantee that each message the application sends will be delivered without error within a certain amount of time A network designer: cost-effective design A network provider: a system that is easy to administer and manage 10 Building Blocks A network must provide connectivity among a set of computers Nodes: PC, special-purpose hardware… hosts switches Links: coax cable, optical fiber… point-to-point multiple access (a) (b) 11 Indirect connectivity Terms node a computer or a more specialized piece of hardware network switch a small hardware device that joins multiple computers together within one local area network (LAN) technically, network switches operate at layer two (data link layer) of the OSI model 12 link physical medium point-to-point two nodes share a single physical link multiple-access more than two nodes share a single physical link 13 Switched Networks A network can be defined recursively as... two or more nodes connected by a link, or Switched network two or more networks connected by two or more nodes Interconnection of networks 14 Strategies Circuit switching original telephone network carry bit streams 15 Packet switching store-and-forward messages each node first receives a complete packet over some link stores the packet in its internal memory forwards the complete packet to the next node multiplex multiple flows of data over a single physical link example: Internet 16 Addressing and Routing Address a set of hosts directly or indirectly connected to each other does not mean that host-to-host connectivity is provided successful. byte-string that identifies a node usually unique (IP address, MAC address) 17 Addressing and Routing Switches, Router and Gateways Used if the sending and receiving nodes are not directly connected Routing process of how to forward messages to the destination node based on its address 18 Types of address unicast: node-specific broadcast: all nodes on the network multicast: some subset of nodes on the network 19 IP address (Internet Protocol address) a unique address that certain electronic devices use in order to identify and communicate with each other on a computer network utilizing the Internet Protocol standard (IP)—in simpler terms, a computer address any participating network device—including routers, computers, servers, printers, Internet fax machines, and some telephones—can have their own unique address example: 140.119.164.54 20 MAC address (Media Access Control address) a MAC address or EHA (Ethernet Hardware Address) or hardware address or adapter address is a quasi-unique identifier attached to most network adapters (NICs) a number that acts like a name for a particular network adapter, so, e.g., the network cards (or built-in network adapters) in two different computers will have different names, or MAC addresses 8:0:2b:e4:b1:2 8:0:20:xx:xx:xx (AMD) 21 Multiplexing How do several hosts share the same link when they all want to use it at the same time Multiplexing: a system resource is shared among multiple users: ex, CPU 22 three flows of data (L1 to R1 and so on) multiplexed onto a single physical link by switch 1 demultiplexed back into separate flows by switch 2 L1 R1 L2 R2 Sw itch 1 L3 Sw itch 2 R3 Multiplexing multiple logical flows over a single physical link 23 Synchronous Time-Division Multiplexing (STDM) divide time into equal-sized quanta, and in a roundrobin fashion, give each flow a chance to send its data over the physical link 24 Frequency-Division Multiplexing (FDM) transmit each flow over the physical link at a different frequency e.g. signals for different TV stations are transmitted at a different frequency on a physical cable TV link 25 Drawbacks if one of the flows (host pairs) does not have any data to send, its share of the physical link (ie, time quantum or frequency) remains idle both STDM and FDM are limited to situations in which the maximum number of flows is fixed and known ahead of time. 26 Statistical Multiplexing Time-division & interleaved the physical link is shared over time (time-division) first data from one flow is transmitted over the physical link, then data from another flow is transmitted, and so on (interleaved) 27 On-demand data is transmitted from each flow on demand rather than during a predetermined time slot if only one flow has data to send, it gets to transmit that data without waiting for its quantum to come around and thus without having to watch the quanta assigned to the other flows go by unused this avoidance of idle time gives packet switching its efficiency 28 Schedule link on a per-packet basis once a flow begins sending data, we need some way to limit the transmission, so that the other flows can have a turn an upper bound on the size of the block of data (packet) is defined that each flow is permitted to transmit at a given time the source may need to fragment the message into several packets, with the receiver reassembling the packets back into the original message 29 each flow sends a sequence of packets over the physical link, with a decision made on a packet-bypacket basis as to which flow’s packet to send next if only one flow has data to send, then it can send a sequence of packets back-to-back should more than one of the flows have data to send, then their packets are interleaved on the link 30 Scheduling methods FIFO (First-In-First-Out) a fair scheduling method RR (Round-Robin) transmit the packets from each of the different flows that are currently sending data ensure that certain flows receive a particular share of the link bandwidth or that they never have their packets delayed in the switch for more than a certain length of time 31 QoS (Quality of Service) a network that attempts to allocate bandwidth to particular flows according service priorities a topic in Ch. 6 32 ■■■ Congested in the following figure, the switch has to multiplex three incoming packet streams onto one outgoing link it is possible that the switch will receive packets faster than the shared link can accommodate in this case, the switch is forced to buffer these packets in its memory should a switch receive packets faster than it can send them for an extended period of time, then the switch will eventually run out of buffer space, and some packets will have to be dropped 33 when a switch is operating in this state, it is said to be congested ■■■ A switch multiplexing packets from multiple sources onto one shared link 34 Inter-Process Communication Turn host-to-host connectivity into process-toprocess communication Fill gap between what applications expect and what the underlying technology provides Host Host Application Channel Host Application Host Host Processes communicating over an abstract channel 35 Host Host Application Channel Host Application Figure Host Host cloud: abstractly represent connectivity among a set of computers channel: connect one process to another view the network as providing logical channels over which application-level processes can communicate with each other, each channel provides the set of services required by that application 36 Challenge what functionality the channels should provide to application programs does the application require a guarantee that messages sent over the channel are delivered is it necessary that messages arrive at the recipient process in the same order does the network need to ensure that no third parties are able to eavesdrop on the channel a network provides a variety of different types of channels, with each application selecting the type that best meets its needs 37 Types of Communication Channels Request/reply channel applications file transfer digital library delivery guarantee every message sent by one side is received by the other side and that only one copy of each message is delivered 38 privacy and integrity might protect the privacy and integrity of the data that flows over it unauthorized parties cannot read or modify the data being exchanged between the client and server processes 39 Message stream channel applications video-on-demand videoconferencing delivery might not need to guarantee that all messages are delivered, since a video application can operate adequately even if some video frames are not received 40 sequence need to ensure the messages are delivered arrive in the same order in which they were sent, to avoid displaying frames out of sequence privacy and integrity might want to ensure the privacy aid integrity of the video data might need to support multicast, so that multiple parties can participate in the teleconference or view the video 41 Reliability Reliable message delivery is one of the most important functions that a network can provide The computer networks do not exist in a perfect world Machines cash, fibers cut, packets lost, …etc a major requirement of a network is to recover from certain kinds of failures so that application programs don’t have to deal with them, or even be aware of them there are three general classes of failure that network designers have to worry about 42 Bit-level errors as a packet is transmitted over a physical link, a “1” is turned into a “0” or vice versa bit errors single bit is corrupted burst errors consecutive bits are corrupted causes (outside forces of electrical interference) lightning strikes, power surges, and microwave ovens, etc. interfere with the transmission of data 43 bit error rate one out of every 106 to 107 bits on a typical copperbased cable one out of every 1012 to 1014 bits on a typical optical fiber there are techniques that detect these bit errors with high probability sometimes it is possible to correct for such errors sometimes it is necessary to discard the entire packet (when damage is too bad) 44 Packet-level errors the failure is at the packet level, rather than the bit level a complete packet is lost by the network the packet contains an uncorrectable bit error and therefore has to be discarded 45 causes one of the nodes that has to handle the packet, e.g., a switch that is forwarding it from one link to another, is so overloaded that it has no place to store the packet, and therefore is forced to drop it (congestion) the software running on one of the nodes that handles the packet makes a mistake (ie., incorrectly forward a packet) main difficulty distinguish between a packet lost and late arriving 46 Node and Link level failures a physical link is cut or the computer it is connected to crashes causes software crashes, power failure, misconfiguration of a network device sometimes route around a failed node or link is possible difficulty distinguish between a failed computer and one that is merely slow 47 Others messages are delayed messages are deliver out-of-order third parties eavesdrop 48 1.3 Network Architecture a computer network must provide general, cost effective, and robust connectivity among a large number of computers network designers have developed general blueprints—network architectures—that guide the design and implementation of networks 49 Layering When a system gets complex, the system designer introduces another level of abstraction Abstraction defines a unifying model that can capture some important aspect of the system encapsulate this model in an object that provides an interface that can be manipulated by other components of the system hide the details of how the object is implemented from the users of the object 50 we will use abstractions to hide complexity of the network from application writers Abstractions naturally lead to layering start with the services offered by the underlying hardware add a sequence of layers, each providing a higher (more abstract) level of service the services provided at the high layers are implemented in terms of the services provided by the low layers 51 imagine a simple network as having two layers of abstraction Host-to-host connectivity abstracting away the fact that there may be an arbitrarily complex network topology between any two hosts process-to-process channels builds on the available host-to-host communication service abstracting away the fact that the network Application programs Process-to-process channels occasionally loses messages Host-to-host connectivity Hardware 52 Example of a layer network system layering provides two nice features it decompose the problem of building a network into more manageable components can implement several layers and each of which solves one part of the problem it provides more modular design when we want to add some new service need only to modify the functionality at one layer reusing the functions provided at all the other layers 53 Many times there are multiple abstractions provided at any given level of the system Each provides a different service to the higher layers but builds on the same low-lever abstractions One provides a request/reply service and one supports a message stream service at the same process-to-process channel Application programs Request/reply Message stream channel channel Host-to-host connectivity Hardware Layered system with alternative abstractions available at a given layer 54 Protocols Protocol the abstract objects that make up the layers of a network system used to provide a communication service that higher-level objects (e.g. application processes, higher-level protocols) use to exchange messages e.g. request/reply protocol, message stream protocol building blocks of a network architecture 55 Host 1 Host 2 Service interface High-level object Protocol Peer-to-peer interface High-level object Protocol Each protocol object defines two different interfaces service interface defines a service interface to the other objects on the same computer that want to use its communication services defines the operations that local objects can perform on this protocol 56 Host 1 High-level object Host 2 Service interface High-level object Protocol Protocol examples Peer-to-peer interface a request/reply protocol would support operations by which an application can send and receive messages an implementation of the HTTP protocol could support an operation to fetch a page of hypertext from a remote server an application such as a web browser would invoke such an operation whenever the browser needs to obtain a new page 57 peer-to-peer interface defines a peer interface to its counterpart (peer) on another machine defines the form and meaning of messages exchanged between protocol peers Host 1 High-level object Protocol Host 2 Service interface Peer-to-peer interface High-level object Protocol 58 examples, in the case of HTTP, the protocol specification defines in detail how a "GET" command is formatted what arguments can be used with the command how a web server should respond when it receives such a command 59 summary: a protocol defines a communication service that it exports locally (the service interface) a set of rules governing the messages that the protocol exchanges with its peer(s) to implement this service (the peer interface) Host 1 High-level object Protocol Host 2 Service interface Peer-to-peer interface High-level object Protocol 60 Host 2 Host 1 High-level object Protocol Service interface Peer-to-peer interface Service and peer interfaces High-level object Protocol 61 Protocol Machinery Peer-to-peer is direct only at hardware level Most peer-to-peer communication is indirect each protocol communicates with its peer by passing messages to some lower-level protocol, which in turn delivers the message to its peer Protocol graph there are potentially multiple protocols at any given level, each providing a different communication service protocol graph represents the suite of protocols that make up a network system 62 nodes:protocols Example of a protocol graph edges: “depends on” relations Host 1 File application Digital library application Video application Host 2 File application Digital library application Video application Application programs Process-to-process channels Host-to-host connectivity 63 Hardware process-to-process channels RRP: Request Reply Protocol MSP: Message Stream Protocol host-to-host protocol (provides a host to host connectivity service) HHP: Host-to-Host Protocol Application programs Process-to-process channels Host-to-host connectivity Hardware 64 hardware level peers directly communicate with each other over a link the applications are said to employ the services of the protocol stack RRP/HHP or MSP/HHP Application programs Process-to-process channels Host-to-host connectivity Hardware 65 Encapsulation (header/body) Host Host Application Application program program Application Application program program Data Data RRP RRP RRP Data RRP HHP Data HHP HHP RRP Data High-level messages are encapsulated inside of low-level messages 66 Operation flow host1 application sends a message to its peer by passing the message to protocol RRP (uninterpreted) RRP communicates control info to its peer, instructing it how to handle the message when it is received attaches a “header” to the message 67 header a small data structure - from a few bytes to a few dozen bytes usually attached to the front of a message body (or payload) the rest of the message data application data is “encapsulated” in the new message created by protocol RRP 68 encapsulation high-level messages are encapsulated inside of lowlevel messages the process of encapsulation is repeated at each level of the protocol graph inspection & process nodes in the network (e.g., switches and routers) may inspect the HHP header at the front of the message 69 It is sometimes the case that the low-level protocol applies some simple transformation to the data it is given, such as to compress or encrypt it 70 Multiplexing and Demultiplexing A fundamental idea of packet switching is to multiplex multiple flows of data over a single physical link The same idea applies up and down the protocol graph The header that RRP attaches to its messages contains an identifier that records the application to which the message belongs We call this identifier RRP’s demultiplexing key, or demux key L1 R1 R2 L2 Sw itch 1 Sw itch 2 71 L3 R3 Source host at the source host, RRP includes the appropriate demux key in its header Destination host when the message is delivered to RRP on the destination host, it strips its header examines the demux key demultiplexes the message to the correct application 72