Introduction CPSC 363 Computer Networks Ellen Walker Hiram College Includes figures from Computer Networking by Kurose Ross Addison Wesley 2002 What is the Internet INTERconnected NETworks Hardware Hosts end systems Routers Communication Links Cables Wires Wireless Organization Standards RFC s Protocols Cool internet appliances IP picture frame http www ceiva com Web enabled toaster weather forecaster World s smallest web server http www ccs cs umass edu shri iPic html Message Transmission across the Internet Source host creates the message to send Message is transmitted via the local network to the local router gateway Message travels from router to router until the destination s gateway is reached Message is transmitted across the destination s LAN to the destination host Destination host receives and acts upon the message What is Provided Communication services for distributed applications Remote file transfer and login WWW Peer to Peer e g Gnutella Kazaa Multimedia applications IM chat New applications all the time Types of services Connection oriented reliable TCP Connectionless unreliable UDP No guarantee of how quickly the message is delivered TCP vs UDP An analogy TCP is like a conversation Each party makes sure the other party received and understood each message If you don t understand I repeat UDP is like shouting from a rooftop I keep yelling transmitting info with no idea of whether you can hear and understand me What is a Protocol Set of conventions surrounding a conversation e g Dial phone hear ring Hear ring pick up phone Hello Hello may I speak to Just a minute New person Hello Hello conversation here Goodbye Goodbye hang up phone Hang up phone Conversation is aborted if appropriate response is missing Examples of Computer Network Protocols Application protocols HTTP Hypertext transfer protocol FTP File transfer protocol SMTP Simple mail transfer protocol Router and Network protocols TCP Transmission Control Protocol IP Internet Protocol Human and Computer Protocols with Handshaking End Systems Servers Provide a service to others on the network Web server Email server Database Management System Clients Request services from others Web browser Email or DB client program Both Peer to Peer P2P hosts act as both client and server Network Core How is information passed through the network Goal fast accurate avoid idleness Terms from telephony information theory Circuit Switching vs Packet Switching Multiplexing Frequency vs time Bandwidth Latency Throughput Circuit Switching End end resources reserved for call link bandwidth switch capacity dedicated resources no sharing circuit like guaranteed performance call setup required Once setup transmission time depends only on message length and distance not number of switches Sharing Links Frequency Division Multiplexing FDM Each message travels in a unique Frequency Band like an FM radio station Time Division Multiplexing TDM Time is divided into Frames and Frames are divided into Slots Each message gets one slot Freq Time Disadvantages of Circuit Switching Time to set up the circuit Once the circuit is connected bandwidth is reserved even if no message is being sent Telephone silence Reading the message before responding but it worked pretty well for telephones for years Mostly because people aren t silent much Packet Switching Divide messages into fixed size packets Each packet uses full bandwidth Each packet travels its own path message is reassembled and reordered at the end Switches now called routers collect and pass packets along paths toward their final destination Store and Forward Transmission Router has several links When a packet is received Router waits until the entire packet has been received before doing anything store and forward delay Packet is stored in the output buffer until the outgoing link is available queuing delay If the buffer is full the packet is dropped packet loss Packet is sent on the outgoing link to the next router How Long Does it Take Assume we want to send a packet of L 1000 bits from one host to another across the network The packet must pass through Q 4 links to get there Each link can transmit R 10 000 bps bits per second From one router to the next will take 1000 bits 10 000 bits second 0 1 seconds After 0 1 seconds the full packet is available to send out Assuming no delays we can do this 4 times in 0 4 seconds which is the total time to send the message Unit Math If you forget the formulas for computing times and distances remember you can always do the unit math for example Bits Bits Second Bits Seconds Bits Bits Seconds Bits Seconds Bits Bits Seconds Bits Bits Seconds Scientific Notation Math Another useful math trick for these types of calculations is exponent math Start by converting to Scientific Notation Scientific notation represents a number as a value between 1 and 10 or 1 and 10 multiplied by 10 to an appropriate power Powers greater than 0 are 10 100 1000 Powers less than 0 are 0 1 0 01 0 001 Examples 20 000 2 0 104 2 0e4 in Java notation 0 1 1 10 1 1 0e 1 in java notation Exponent Math To multiply multiply the coefficient and add the exponent 2 0e4 1 6e2 2 0 1 6 e 4 2 3 2e6 Check 20 000 160 3 200 000 To divide divide the coefficient and subtract the exponent 4e3 2e4 4 2 e 3 4 2e 1 Check 4 000 20 000 0 2 If your coefficient is too large or small adjust the exponent 1 2e3 4e4 1 2 4 e 3 4 0 3e 1 3e 2 Since the coefficient got larger the exponent must get smaller Another Example Link bandwidth is 2400 bits second Message is 120 000 bits long Message must pass through 3 links With no queueing delays or propagation delays how long will the message take Message Switching vs Packet Switching Message switching 1 packet per message Store and forward delay is per message Packet switching many packets per message Packets will always be of a fixed size Store and forward delay is per packet Packet 1 can go from router A to router B while packet 2 is going from host to router A This pipelining adds parallelism to the network Packet Switching Example Link bandwidth is 2400 bits second Message is 120 000 bits long divided into 4 packets of 30 000 bits each Message must pass through 3 links With no queuing delays or propagation delays how long will the message take Packet Switching Transmission Delay Formula Message length L bits Packet size P bits Number of links N links Transmission rate R bits second Delay P R N L P 1 P R is the time to pass 1 packet N L P 1 is the number of links
View Full Document
Unlocking...