920 likes | 930 Views
ICS 153 Computer Networks Introduction. Carlos Oliveira Computer Science Department University of California, Irvine. Course Goals. What is a Network?. Carrier of information between 2 or more entities Interconnection may be any medium capable of communicating information: copper wire
E N D
ICS 153Computer NetworksIntroduction Carlos Oliveira Computer Science Department University of California, Irvine
What is a Network? • Carrier of information between 2 or more entities • Interconnection may be any medium capable of communicating information: • copper wire • lasers • microwave • satellite link • Example: Ethernet
Why Networks? • Availability of Resources • Resources become available regardless of the user’s physical location • Load Sharing • Jobs processed on least crowded machine • High Reliability • Alternative source of supply (multiple copies) • Human-to-Human Communication • e.g., Telephone, IP telephony
What is Internet Technology? • What is an internet? • Network of networks • What is the Internet? • A global internet based on the IP protocol • To what does “Internet technology” refer? • Architecture, protocols and services
Sample Internet Applications • Electronic mail • Remote terminal • File transfer • Newsgroups • File sharing • Resource distribution • World Wide Web • Video conferencing • Games
Impact of the Net on People • Access to remote information • HW assignments from my server • Person to person and group communication • email, collaborative tools • Interactive entertainment • Corporate video, news clips
Impact of the Net on Society • The good • Access to information, e-commerce • The bad • drudge report, gossip, too much information, jenny cam • The ugly • Fraud, pornography • But, it is just a mirror of society
Internet Players • Users, people who use the applications • Everyone (mom and pop, kids) • get something done (hopefully useful) • Designers • You: protocol design and implementation • performance, cost and scale • Service Providers • Administrators and ISPs • Management, revenue, deployment
Course Goals • Understand the basic principles of computer networks • Understand the Internet and its protocols • Understand the key design principles used to build networks andthe Internet
Overview of the Principles of Computer Networks 1. Physical communication 2. Error control 3. Flow control 4. Data switching 5. Routing 6. Congestion Control 7. Shared Medium Access 8. Protocols
Some Definitions • Network: Collection of interconnected machines • Host: Machine running user application • Subnet: Subset of the network, responsible for carrying messages between hosts • Channel: Logical line of communication • Topology: Network configuration • IMP: Intermediate Processing Node (Router) • Protocol: Rules of communication
1. How Do Computers Communicate? • With 1’s and 0’s • Computers only deal with 1’s and 0’s • So do networks • How do we transmit 1’s and 0’s in a network?
2. Error Detection/Correction Physical channels are not perfect Can we detect, possibly correct errors?
2.1 Error Detection Example: Parity bit MessageParity Bit 0 0 1 1 1 (odd) 1 0 0 0 0 (odd) 0 1 0 1 0 (even) 1 0 0 0 1 (even)
2.2 Error Correcting Codes Detect and correct errors Example: Hamming Code Capable of detecting and correcting a single bit error
A B 3. Flow Control If A sends at a faster rate than B can receive, bits will be lost We need flow control!
A B 3.1 Stop-and-Wait A sends data B sends ACK A sends more data
A B 3.2 Windowed Flow Control A sends packets 1, 2, 3 B sends ACK for 1, 2 A sends packets 4, 5 B sends ACK for 3, 4, 5
4. Switching Schemes (1) Circuit Switching (2) Message Switching (Store-and-Forward) (3) Packet Switching (Store-and-Forward)
4.1 Circuit Switching • Provides service by setting up the total path of connected lines from the origin to the destination • Example: Telephone network
Circuit Switching (cont’d) 1. Control message sets up a path from origin to destination 2. Return signal informs source that data transmission may proceed 3. Data transmission begins 4. Entire path remains allocated to the transmission (whether used or not) 5. When transmission is complete, source releases the circuit
Circuit Switching (cont’d) Call request signal Propagation Delay Transmission Delay Time Call accept signal Data Transmission Time Data A B C D IMPs
4.2 Message Switching • Each message is addressed to a destination • When the entire message is received at an IMP, the next step in its journey is selected; if this selected channel is busy, the message waits in a queue until the channel becomes free • Thus, the message “hops” from node to node through a network while allocating only one channel at a time • Analogy: Postal service
Msg Msg Msg Message Switching (cont’d) Header Transmission Delay Time Queueing Delay A B C D IMPs
4.3 Packet Switching • Messages are split into smaller pieces called packets • These packets are numbered and addressed and sent through the network one at a time • Pipelining
Pkt 1 Pkt 2 Pkt 1 Pkt 3 Pkt 2 Pkt 1 Pkt 3 Pkt 2 Pkt 3 Packet Switching (cont’d) Header Transmission Delay Time A B C D IMPs
4.4 Comparisons (1) Header Overhead Circuit < Message < Packet (2) Transmission Delay Short Bursty Messages: Packet < Message < Circuit Long Continuous Messages: Circuit < Message < Packet
5. Routing A slightly more complex network: If A sends packets to E, B has to make a routing decision ? packet A B D E ? C
5.1 Fixed Routing Schemes A B D E • For every source/destination pair, a fixed path is given • Example: A to B to D to E • Easy to implement, but (1) What if link BD fails? (2) What if link BD is congested? C
5.2 Dynamic Routing Schemes A B D E • Hosts and IMPs periodically exchange information and find the best paths for all source/destination pairs • Can adjust to link failure or congestion, but (1) information exchange creates extra traffic (2) it takes time for information exchange to happen, so information could be outdated (3) packet looping can happen C
6. Congestion Control What if too many packets flow through a network? Congestion Analogy: Two merging freeways
6.1 Packet discarding • In case of congestion, discard some packets • Require receiving host to send ACK when it receives a packet; this way the transmitter will know when a packet is lost and it can retransmit the packet • Reactive
6.2 Choke Packets • When the network becomes congested, a host or IMP sends a “choke packet” telling a transmitter to slow down • Reactive
6.3 Isarithmic Flow Control • Only allow one packet into the network for every packet that leaves the network • In freeway terms: Only let a car in at the onramp if another car gets off the freeway somewhere else • Preventive
6.4 Resource Reservation • Before sending packets, the transmitter tells the network how many packets it wants to send • The network checks to see if it can handle those packets and if so, reserves resources for those packets. It not, the packets have to wait. • Preventive
7. Medium Access Many users typically share a single link or a single medium How do you give them all access?
7.1 Possible Media • Broadcast or shared channels • Point-to-point links
7.2 Multiple Access Protocols If more than one host sends at the same time, there is a collision Need algorithm to share the channel: Multiple access protocol
7.2.1 Fixed Assignment Schemes Example: Time Division Multiple Access (TDMA) Channel capacity is assigned even to users who have nothing to send time host 1 2 3 4 1 2
Token 7.2.2 Demand Assignment Assign channel capacity only to those who have packets to send Example: Token Passing Scheme Hosts may send packets when they grab the token
7.2.3 Random Access Send when you have a packet to send. If collision, retransmit Example: Ethernet 1 2 3 4 Listen before transmission if busy, wait if idle, transmit Listen during transmission if collision, abort and retransmit
7.2.4 Comparison Random Access Demand Assignment Fixed Assignment Transmission Delay light heavy Network Traffic
8. Protocol Hierarchy • Use layers to hide complexity • Each layer implements a service • Layer N uses service provided by layer N-1 • layer N-1 provides a service to layer N • Protocols • Each layer communicates with its peer by a set of rules • Interface • A layers interface specifies the operations
Protocol Hierarchy (cont’d) Host A Host B Layer 7 Protocol Layer 7 Layer 7 Layer 6 Protocol Layer 6 Layer 6 Layer 5 Protocol Layer 5 Layer 5 Layer 4 Protocol Layer 4 Layer 4 Layer 3 Protocol Layer 3 Layer 3 Layer 2 Protocol Layer 2 Layer 2 Layer 1 Protocol Layer 1 Layer 1 Physical Medium
Protocol Layering by Analogy Japanese Computer Scientist in Japan French Computer Scientist in France Japanese/English Translator French/English Translator
Protocol Layering by Analogy Japanese Computer Scientist in Japan French Computer Scientist in France “Konnichiwa” “Bonjour” Japanese/English Translator French/English Translator “Hello” “Hello” 01011 01011
Protocol Layering by Analogy Japanese Computer Scientist in Japan French Computer Scientist in France Layer 3 “Konnichiwa” “Bonjour” Japanese/English Translator French/English Translator Layer 2 “Hello” “Hello” Layer 1 01011 01011