Скачать презентацию Networking and the Internet 7 l Last Time Скачать презентацию Networking and the Internet 7 l Last Time

dacca5ecd52c0a3d014427b562e99e9e.ppt

  • Количество слайдов: 42

Networking and the Internet (7) l Last Time: » Checkpoint – review of the Networking and the Internet (7) l Last Time: » Checkpoint – review of the module so far » Data integrity in a networked environment » Workshop for assignment due Thursday May 6 th l l Week 7 Focus » Message/Queuing model for distributing function » Data Transfer – inside and outside the computer » Local- and Wide-Area Networking » Data Transmission on a network » Assignment workshop Useful book: White, Curt M (2006) Data Communications & Computer Networks, A Business User’s Approach, Thomson BS 2911 Week 7 1

Distributed Systems l Goal is to put user-interface close to user; data-interface close to Distributed Systems l Goal is to put user-interface close to user; data-interface close to shared data » Improves data integrity – only one system touches data » Reduces network traffic – graphics don’t have to flow » Exploits low cost of workstation processing l Can be synchronous » Remote procedure call – client and server work in step » Function shipping – all data returned to client » Transaction routing – typical of form processing on www l or asynchronous; main examples are: » Most interactions on web – never sure if they’ve worked until the application itself confirms » MQ Series messaging and queuing – guaranteed delivery BS 2911 Week 7 2

Distributed Programming Models l Function Shipping, as in CICS or Network File System » Distributed Programming Models l Function Shipping, as in CICS or Network File System » Application issues data request to environment » Environment generates messages to another system to request action on the data l Transaction Routing, used by CICS » Client system invokes a transaction that’s not local » CICS routes the request to another system (usually server) where associated program is run in its entirety Remote Procedure Call » » or vice versa l Logic on workstation invokes procedure on the server Procedure runs, and returns control (and results) to caller Environment handles RPC messages Permits complex structures of networked logic BS 2911 Week 7 3

Insurance Example Agent’s PC Quote Make proposal Confirmation Premium tables » » » » Insurance Example Agent’s PC Quote Make proposal Confirmation Premium tables » » » » Insurance Company Process HQ Offer Central DB Customer asks agent for a quotation Agent takes details on local PC Quotes using premium tables downloaded from HQ Offers a deal to the customer Customer accepts it Agent sends data to HQ as firm proposal HQ updates database and accepts proposal (or not) BS 2911 Week 7 4

An Asynchronous Model Agent’s PC Proposal queue Quote Queue proposal Agent’s print server l An Asynchronous Model Agent’s PC Proposal queue Quote Queue proposal Agent’s print server l Insurance Company Process HQ proposal Queue printout Alternative approach to distributed systems is Queuing » Infrastructure guarantees message delivery » But not how quickly it’ll arrive l Agent can get on with other work as soon as message has been sent » Application needs to consider risk that message will not produce desired effect on arrival BS 2911 Week 7 5

Advantages of MQ Approach l Simple: » Allows easy connection of heterogeneous systems » Advantages of MQ Approach l Simple: » Allows easy connection of heterogeneous systems » Asynchronous operation is built into the model l Coping with failure is inherent » You never know when the message will arrive, so you have to design around non-instant delivery » Network failure is simply an extended case of this l Depends on integrity of infrastructure » Since many customers and systems use same vehicle, problems will get ironed out quickly l BUT: » Transmission is often very fast » Designers may wrongly depend on this BS 2911 Week 7 6

Data Transfer Inside the Computer How the controller chipsets drive peripherals BS 9 Week Data Transfer Inside the Computer How the controller chipsets drive peripherals BS 9 Week 7

Data Transfer Inside the Computer l l Every device needs an interface to exchange Data Transfer Inside the Computer l l Every device needs an interface to exchange data with the computer Generally, these interfaces share a bus to communicate with the CPU or with memory Front side bus CPU Register Memory DMA I/O bus I/O Interface cable Device BS 2911 Week 7 Register I/O Interface Device 8

I/O and the CPU l I/O through the CPU » In very early days I/O and the CPU l I/O through the CPU » In very early days of computing, programmed with CPU looping while waiting for data transfer » Later programmed via interrupts, grabbing CPU only when a chunk of data arrives » Inefficient, because every transfer stops other processing » Better to transfer data autonomously l Only use the CPU to initiate I/O » Then have separate processor to move data into memory » Basis of PC’s DMA (direct memory access), IBM channels and ICL’s Autonomous transfer units » Only impacts CPU throughput when there’s a clash for memory access (“cycle stealing”) BS 2911 Week 7 9

Parallel and Serial Connectors l Parallel devices (like printers and most IDE disks) have Parallel and Serial Connectors l Parallel devices (like printers and most IDE disks) have one wire per bit, plus control wires » Keep cables short enough to avoid spread of bits in time » Usually bi-directional (to provide acknowledgement data) l Serial devices (like networks) send bits one after another » Examples: – RS 232 -C interface – “COM 1” etc on PCs (with UART chip) – USB (Universal Serial Bus) on i. Macs and PCs from W 98 – IEEE 1394 (Firewire® Apple Computers, Sony i-link), USB 2 » Need to keep both ends in step to keep bytes separate – Asynchronously, as in most modems – start/send-a-bit/stop – or synchronously – synchronize clocks in both ends, then send a whole block (SNA’s SDLC does this) » Surprisingly, serial is usually faster than parallel BS 2911 Week 7 10

Significance in Networking l The idea of autonomous transfer can be applied widely » Significance in Networking l The idea of autonomous transfer can be applied widely » Network card moves data from memory to LAN cable » Router on LAN cable sorts out data to leave LAN » ASDL modem takes Router output and sends over line… l Much of this work involves buffering: » Accepting a packet of data and writing it into local storage » Then sending it on, perhaps using a different technology » Effectively all data is being stored and forwarded, though we only use this term when entire message is stored » Have you noticed Free. View is delayed wrt analogue TV? l Data in buffer is independent of how it arrived » So we can change transmission formats, for example: PC bus to LAN to ADSL to ATM to LAN to mainframe bus BS 2911 Week 7 11

Links to Real Life l There’s very little technology unique to data networks, so Links to Real Life l There’s very little technology unique to data networks, so think about the products you use » How does a Discman handle shocks? – Technical aspects: Buffering, error detection, retransmission » What are quality issues with a mobile phone? – Multiplexing, signal/noise ratio, compression » Why does AM radio sound so grotty? – Noise, attenuation, bandwidth » How does Free. View put multiple programmes on a channel; why is movement sometimes jerky? – Multiplexing, “lossy” compression, buffering l We’ll cover all these technologies and see how they apply to data transmission BS 2911 Week 7 12

Packet-Switched Networks Including The Internet BS 9 Week 13 Packet-Switched Networks Including The Internet BS 9 Week 13

Early Computer Networks l Initially had two distinct purposes: » to connect terminals to Early Computer Networks l Initially had two distinct purposes: » to connect terminals to mainframe computers » to link computers together l And two ranges: » Local – low errors, wiring under enterprise control » Wide-area – wiring regulated by PTTs (was error-prone) l And two topologies: Telephone companies » Point-to point » Concentrated (multiple devices sharing a connection) l Network architectures developed to share connections, based on packet-switching concept: » Systems Network Architecture led through 70 s and 80 s » Internet Architecture now taking over (even in IBM shops) BS 2911 Week 7 14

Networking Requirements l Two fundamental forms of communication: » Session-based, where you set up Networking Requirements l Two fundamental forms of communication: » Session-based, where you set up a call, exchange data, then hang up – like a telephone call » Message-based, where you create a message, put an address on it, and send it – like a postcard l Sessions are often used synchronously, with a conversation between their endpoints » Example is terminal emulator to host » but they can support bursty flows, including messages l Message flows can be mixed together, as in the mail » If the packaging/unpacking is fast enough, you can get the impression of synchronous conversation » This is the basis of packet-switched networking BS 2911 Week 7 15

A general network l Flows from A-E could go: » A-C-E or A-H-G-E or A general network l Flows from A-E could go: » A-C-E or A-H-G-E or A-B-D-F-H-G-E l l If we break flows into packets, and address them to ultimate destination, we can mix flows on the links Sender and receiver don’t care about route taken… … or about how each link works In this case, a packet would get there faster via H » Fast wide-area connection to H » Local connection to G » Would even be faster to E l l Each node functions as a router Need to avoid routing round in circles BS 2911 Week 7 Node A Slow Node B Node C Fast Node D Node E wireless Fast Node F Node G LAN Node H 16

Some problems of this model l Every packet has to be routed onwards by Some problems of this model l Every packet has to be routed onwards by the node(s) » Creates overhead on each intermediate node » Would not be acceptable to have (say) server to printer traffic passing through a user’s PC l l Packets may arrive out of sequence Hard to provide end-to-end integrity But we can’t afford links direct to every PC l Solved by specialized networking hardware » Mainframe network controllers » Routers and bridges » Buses, switches and hubs BS 2911 Week 7 17

Wide-area Data Transmission l l In the 70 s, phone lines were slow and Wide-area Data Transmission l l In the 70 s, phone lines were slow and unreliable They could only handle sounds in pitch range of voice, so data had to be modulated into tones and demodulated at the other end – by a box called a modem » Phone companies monopolized the supply of modems » Voice lines had 4 KHz bandwidth, handled 2400 tone-changes a second – 2400 baud » Modem technology improved; used several tones at once, thus getting more bits into each tone-change: 4 tones lets you run 9600 bits/second (but it’s still a 2400 baud line) » In 1980, even leased lines were flat out at 9600 bps, now a 53 Kbps dial up modem costs under £ 30 l Phone network is now digital, apart from “local loop” BS 2911 Week 7 18

Wide Area Networks l l Traditionally slower and more error-prone than LANs Links run Wide Area Networks l l Traditionally slower and more error-prone than LANs Links run over telephone company circuits » Leased lines usually digital these days – Kilostream (64 Kbps) and Megastream (2 Mbps) aka E 1 – US mainly T 1 (1. 55 Mbps) » Unless you pay for ISDN*, Dial-up is still largely analogue (modems needed to send bits over analogue circuits) » Can use local copper with ADSL for fast Internet access l l IP networks usually link Routers rather than computers Multi-protocol networks are also available: » Vendor provides line termination that looks like direct links to multiple nodes. For example, frame relay » Or you create a virtual circuit on the Internet 20 BS 2911 Week 7 * Don’t

Campus Networking l No need to modulate data on phone-lines if you can run Campus Networking l No need to modulate data on phone-lines if you can run a wire from point-to-point over your own land » » l l l If you send bits down a wire, they start off as square waves Losses “knock the corners off” and your signal gets weaker Happens less if you screen the signal using coaxial cable. . . or use twisted pair and clean up signal every so often Terminals used to be wired to controllers using coax Local Area Networks dominant since 80 s Concept of LAN is that devices share the medium » add destination addresses to data packets they send » ignore incoming packets unless addressed to them l Main implementations are Ethernet and Token Ring BS 2911 Week 7 21

Local Area Networks l l Network card in PC creates addressed packets Sends down Local Area Networks l l Network card in PC creates addressed packets Sends down wire as soon as it can » In Token ring LAN, this is when it gets the token » In Ethernet, it’s when nobody else is sending l l Listens for incoming packets addressed to the PC In principle, LANs are buses – the wire is shared among all users, who effectively broadcast on it In practice, most physical LANs (apart from Ethernet on coax) are stars, with direct links from hub to PC Switching hubs only send PCs the data that’s addressed to them – effectively they’re smart nodes BS 2911 Week 7 22

Ethernet l Logically a bus: » each device throws data on the bus when Ethernet l Logically a bus: » each device throws data on the bus when it’s quiet, . . » …and hopes that nobody else does so at the same time l Each device listens, in case there’s been a collision » if so, both back off for a random time, then try again » the busier the bus, the greater risk of collision l One collision increases risk of another » Retransmission raises traffic on the LAN » LAN may be busy when station finishes its delay » Other station may finish delay during this wait, in which case they’ll collide again l Limits effective speed to below half of nominal speed BS 2911 Week 7 23

Ethernet Hardware l Ethernet originally ran 10 Mbps over coax, but. . . » Ethernet Hardware l Ethernet originally ran 10 Mbps over coax, but. . . » Single break in the bus can cut off many users » Coax is fairly expensive to buy and install (and is bulky) l Hub allows radial wire to individual stations » Can clean signal, so uses cheap and flexible twisted-pair with cheap RS 45 connector » Smart hub can filter out information not meant for station, and even work full-duplex down the cable » Most hubs run at 100 Mbps, newer ones at 1 Gbps » Popular cable is CAT 5 e – inexpensive and good to 1 Gbps » Can also use fibre-optics over longer range BS 2911 Week 7 24

Token Ring – largely superseded l Avoids collisions by sending tokens round the LAN Token Ring – largely superseded l Avoids collisions by sending tokens round the LAN to each station in turn » Wait until token arrives, then add data to it » Any packets not for you, just forward to the next station l l Can approach nominal speed (4 or 16 Mbps) Risk that one rogue station can bring down whole ring is solved by building logical ring over star wiring » MAU* sends stream of tokens down two wires of the cable, station returns them down two others » MAU “shorts out” any station that doesn’t respond l Hardware typically over twice Ethernet price » Didn’t sell well enough to be extended beyond 16 Mbps » Obsolescent in face of 100 Mbps and Gigabit Ethernet BS 2911 Week 7 * Multiple Access Unit – like a hub 25

Application view of network l Target is to deliver data without having to be Application view of network l Target is to deliver data without having to be aware of the network, for example: » Send data-stream to paint characters on 32*80 screen » Deliver WWW page to browser that requested it » Transmit file to remote system l This requires abstraction to hide intermediate steps » » » » Envelop data to say where it is to go Break large package into transmittable chunks if needed Route each chunk down the appropriate link Correct any transmission errors that arise Perform onward routing to destination Reassemble chunks at destination (in sequence) Open envelope and pass to target application BS 2911 Week 7 26

Seven Layer Model l Simplify programming by encapsulating lower levels Examples Application File transfer Seven Layer Model l Simplify programming by encapsulating lower levels Examples Application File transfer Application Presentation show screen image Presentation Session manage sign-on Session Transport manage connections Transport Network route over several links Network Data Link V. 34 , HDLC Data Link Physical LAN, digital-, analogue-circuit Physical (Colours show TCP/IP layers) BS 2911 Week 7 27

SNA Networking l l l l Largely confined to the IBM mainframe and mid-range SNA Networking l l l l Largely confined to the IBM mainframe and mid-range market (a huge market, but moving to TCP/IP) Has concept of “Networks” – usually one or a small number per enterprise Each networks contain “subareas” that can be separately managed Each subarea contains a number of individually-addressed Physical and Logical Units Wide-area circuits usually run SDLC protocol (Synchronous data-link control – layer 2) Local connections via LAN or direct wiring Now being superseded by TCP/IP, even in IBM shops BS 2911 Week 7 28

Data Transmission Concepts and Technologies BS 9 Week 29 Data Transmission Concepts and Technologies BS 9 Week 29

Data Transmission l Features of a waveform » » » l Frequency – usually Data Transmission l Features of a waveform » » » l Frequency – usually measured in Hertz (Hz – 1/time) Amplitude – measured in volts, bars, etc Phase – usually measured in degrees Wavelength – speed divided by frequency Timbre can be represented by sine wave + overtones Square wave is made up of F + 3 F + 5 F +7 F … Information Capacity » Information content is number of bits needed to discriminate among possible symbols (128 symbols => 7 bits) » Capacity of channel is in symbols or bits per second » Bandwidth (Hz) is half of capacity in bits/sec (on good line) » But if line is noisy, capacity drops relative to bandwidth BS 2911 Week 7 30

Modulation l Base-band transmission is sending digital data “as is” » effectively sending square Modulation l Base-band transmission is sending digital data “as is” » effectively sending square waves down the wire » Signal degrades with distance and bit-rate (remember all those odd harmonics? ) l l l So we need to modulate over longer distances Modulation involves using the signal to do something to a “carrier” signal (see pictures on Coope p. 224) Amplitude modulation changes carrier’s amplitude » Problem is that noise and attenuation look like signal; Think of the low quality of AM radio broadcasts l Frequency modulation changes carrier’s frequency » Less susceptible to interference and noise l Phase modulation shifts the phase to indicate bits BS 2911 Week 7 31

Baud versus Bits per Second l l l Baud refers to signalling rate – Baud versus Bits per Second l l l Baud refers to signalling rate – the number of transitions per second If each transition carries 2 bits, a 2400 baud line has a capacity of 4800 bps Various ways to carry multiple bits per transition: » Multiple voltage levels; you need 4 levels to transmit 2 bits » By more than one modulation technique – Modulate different carrier frequencies – Use phase + frequency modulation » or by combining these three techniques BS 2911 Week 7 32

Multiplexing l l Early technique for sharing lines Frequency-division multiplexing works on analogue lines Multiplexing l l Early technique for sharing lines Frequency-division multiplexing works on analogue lines » e. g. 48 k. Hz “group” was split into 12 voice-grade circuits by shifting each circuit to a higher frequency » This was the main reason for limiting bandwidth of voice lines to below 4 k. Hz (the local copper can carry far more) » Now obsolete in telephone network (lines are digital) l Time-division multiplexing sends a chunk of one circuit, then a chunk of the next, and so on » If circuit whose time has come has nothing to send, the time-slice is unused » Works well for digital and analogue transmission » Intelligent multiplexing exploits the “silences” BS 2911 Week 7 33

Transmission media l Wires » Cheap and robust, capacity limited by distance » Suffer Transmission media l Wires » Cheap and robust, capacity limited by distance » Suffer from losses and stray radiation (noise getting in, secrets getting out) » Hard to intercept without getting caught (it’s usually illegal) l Microwave » Fairly expensive, but high capacity over long distance » Very easy to intercept – not always illegal & hard to detect » Some sensitivity to weather l Optical fibres » Fairly cheap, vast capacity » Very difficult to intercept without detection » Termination equipment cheap and still falling in price BS 2911 Week 7 34

Other media l Satellite – microwave repeated at geo-stationary satellite » Good capacity » Other media l Satellite – microwave repeated at geo-stationary satellite » Good capacity » Portable (the obvious answer at a new oil well) » Very long transmission time (0. 25 second) so you have to buffer between acknowledgements » Easy to intercept without detection (must encrypt) » A finite resource (there aren’t that many slots in the sky) l Infra-red and radio » IR is similar technology to TV remote control – used to swap data with cell-phone, or for printing from a laptop » Radio can provide a wireless LAN by broadcasting within a location, using IEEE 802. 11 standards: – IEEE 802. 11 b (Wi-Fi) at 11 Mbps; 802. 11 g at 54 Mbps – IEEE 802. 11 n draft now implemented – 270 Mbps » IR and Bluetooth operate mainly for local point-to-point BS 2911 Week 7 35

Cellular Radio l l The technology used by mobile phones Depends on computer-controlled network Cellular Radio l l The technology used by mobile phones Depends on computer-controlled network of transmitters, each with a cell (as in a honey-comb) » Phone “handshakes” to get allocated to a cell » Therefore network’s computer knows where you are (using Data Protection Act & RIPA; so does Government!) l GSM phones use intelligent Time Division Multiplexing » » l Call set-up provides you with frequent time-slots Tiny periods of transmission are digitised and compressed Each packet of data is transmitted in your time slot For data, maximum rate supported is 9600 bps New generation mobile phones are “always connected” » This concept successful in Japan for several years BS 2911 Week 7 36

Always Connected Technologies l Most commercial data networks are always active (think of LANs Always Connected Technologies l Most commercial data networks are always active (think of LANs and Internet connections in Winchester) » But telephone calls are set up when you dial » True for analogue and ISDN* digital services l At home and on the road, we mostly use dial-up – Why? » The copper to the exchange is dedicated to us » Our mobiles have to handshake regularly with the cell l Digital Subscriber Lines (ADSL and SDSL) always on » Permanent connection to the Internet » e-mail arrives immediately; you can offer a web server » Gives you some security concerns – get a firewall router l New generation mobile phones (3 G) stay online BS 2911 Week 7 * Don’t touch with a bargepole 37

“The Internet” l l l Grew out of ARPAnet, connecting Do. D and universities “The Internet” l l l Grew out of ARPAnet, connecting Do. D and universities Now extended to most large organizations Publicly accessible through Internet Service Providers Consists of a backbone, to which ISPs connect Companies and organizations lease connections to ISP Services offered include: » WWW » e-mail » FTP l Worldwide Web of pages with Hypertext links Files routed between mail servers File Transfer Protocol Main protocol stack is called TCP/IP » Transmission Control Protocol » Internet Protocol BS 2911 Week 7 We’ll cover protocols next time 38

The Layers and your browser l l When you request a URL, your browser The Layers and your browser l l When you request a URL, your browser application needs to communicate with appropriate server Browser builds request, including destination address, passes it to socket (interface to networking) Socket effectively manages session to Internet gateway, builds TCP/IP header, sends request to network card Networking card handles bottom layers: » Data link including error correction » Physical layer (twisted-pair, coaxial cable. . ) l l l Router passes packets to Internet gateway Gateway strips header addressing it, determines next link on route to destination, calls Data link layer and so on. . . BS 2911 Week 7 Application Presentation (No Session) Transport Network Data Link Physical 39

Networking Summary l l All modern networking is Packet-switched Application sends messages to network Networking Summary l l All modern networking is Packet-switched Application sends messages to network software » Messages wrapped in headers indicating destination » Each message becomes one or more packets » Packets passed to software layer or link as needed (may require adding more wrapping to the data) l Significant LAN technology is Ethernet » Throw data on the bus, detect collisions, retransmit » Usually 100 Mbps (formerly 10 Mbps, 1 Gbps now common) » LANs based on hubs, switches or routers l Wide-area connections usually via the Internet, accessed on leased lines, ADSL or dial-up BS 2911 Week 7 40

HTML and Assignment Due Thursday 6 May 2010 Develop on disk, hand in on HTML and Assignment Due Thursday 6 May 2010 Develop on disk, hand in on USB stick I’ll give you later BS 9 Week 41

Assignment Workshop l Chance to check understanding of: » » » » l Document Assignment Workshop l Chance to check understanding of: » » » » l Document structure … Basic HTML