240 likes | 258 Views
CSE331: Introduction to Networks and Security. Lecture 13 Fall 2002. Announcements. Reminder: Project 1 due on Monday, Oct. 7 th In-class midterm Wednesday, Oct. 9 th Monday’s Class Further Topics in Networking Review / Question & Answer. Recap. Application Level Protocols SMTP HTTP
E N D
CSE331:Introduction to Networksand Security Lecture 13 Fall 2002
Announcements • Reminder: • Project 1 due on Monday, Oct. 7th • In-class midterm Wednesday, Oct. 9th • Monday’s Class • Further Topics in Networking • Review / Question & Answer CSE331 Fall 2002
Recap • Application Level Protocols • SMTP • HTTP • SNMP • Congestion control • Resource Management • Quality of Service Today CSE331 Fall 2002
Sharing Resources • How do we effectively & fairly share resources on the net? • Bandwidth of the links • Buffers space in routers in switches • Many competing users • What does “fairly” mean? CSE331 Fall 2002
Contention and Congestion • Packets contend at a router for use of a link • Multiple packets are enqueued at the router • Congestion is when packets are dropped because the queue is full • Wasted resources • Can lead to timeouts/retransmission • Problem is resource allocation CSE331 Fall 2002
Congestion In Packet-switched Networks Sources Router Destination CSE331 Fall 2002
Network Resource Allocation • Challenges • Distributed resources are hard to coordinate • Only way to coordinate is through the network itself! • Not isolated to single level of the protocol hierarchy • Not always possible to “route around” congestion • Bottleneck not always visible from the source • Resource allocation • Attempt to meet competing demands of applications • Not always possible! CSE331 Fall 2002
Flows • A flow is a sequence of packets sent along the same route between a source and dest. • Connectionless Flows • No per-flow state at the routers • Example: Pure datagram model • Connection Oriented Flows • Necessary per-flow state at the routers • Explicitly created/removed by signalling • Example: Virtual Circuit Switching • Potentially does not scale • Soft-state Flows • Some (not strictly necessary) per-flow state • Example: Routing information in Learning Bridges CSE331 Fall 2002
Multiple flows Source 1 Dest. 1 Router Router Source 2 Dest. 2 Router Source 3 CSE331 Fall 2002
Router- vs. Host-Centric • Router-centric • Each router selects packets to forward & packets to drop • Routers inform hosts about network conditions • Host-centric • Hosts observe network behavior by watching ACKs, Timeouts, ICMP messages, etc. • Adjust behavior accordingly • Not mutually exclusive approaches CSE331 Fall 2002
Reservation vs. Feedback • Reservation • End hosts ask network for certain amount of capacity • If request can’t be satisfied, router rejects the flow • Examples: measure MTU or link capacities • Router-centric approach • Feedback • End hosts send data without reserving capacity • Adjust behavior based on feedback • Explicit feedback: TCP flow control • Implicit feedback: Packet losses CSE331 Fall 2002
Throughput, Delay and Load • Network load is a measure of total link utilization • Ideally we would • Maximize throughput • Minimize delay • Increasing #packets in network lengthens queues, which increases delay. • Power = Throughput/Delay CSE331 Fall 2002
Power vs. Load • Ratio of Throughput/Delay as a function of network load • Difficult to control load in fine-grained ways • Need stable mechanism: avoid thrashing Throughput/Delay Optimal Load Load CSE331 Fall 2002
Fair Resource Allocation • What does “Fair” mean? • Equal share of resources for all flows? • Proportional to how much you pay for service? • Should we take route length into account? Router Router Router Router CSE331 Fall 2002
FIFO Queuing • First-in First-out • Scheduling discipline: determines order • Tail Drop • If queue is full, most recent packet to arrive is dropped • Drop policy: which packets are dropped • Most widely used in Internet routers • Pushes congestion control & resource allocation to end hosts (TCP) • Does not discriminate between flows • Trusts end hosts to “share” – but no one is forced to use TCP, for example. CSE331 Fall 2002
Priority Queuing • Simple variant on FIFO • Use the IP Type of Service header field as a priority • Send all higher priority packets in the queue before sending lower priority packets • Problems • Starvation of low-priority flows • Who sets priorities? (Not end user!) CSE331 Fall 2002
Fair Queing Flow 1 • Strategy • Maintain a separate queue for each flow being handled by the router • Individual queues are treated FIFO with tail-drop • Queues are handled round-robin RoundRobin Flow 2 Flow 3 CSE331 Fall 2002
Fair Queuing Continued • Designed to be used with end-to-end congestion control • Doesn’t restrict transmission rates of end hosts • Badly-behaved end hosts only hurt themselves • Details • Different packet sizes complicates “fairness” • Link is never idle (as long as there is data to send) • If N flows are transmitting, each gets maximum of 1/N bandwidth CSE331 Fall 2002
Congestion Avoidance Mechanisms • Try to prevent congestion before it occurs • Unlike TCP, which reacts to existing congestion • Strategy 1: Routers watch their queues • Routers set a bit in outgoing packets if avg. queue length > 1 • Receiver copies bit into its ACK • Sender increases/decreases send window based on # of packets that report congestion • Called the DECbit algorithm CSE331 Fall 2002
Congestion Avoidance Continued • Strategy 2: Random Early Detection • Router monitors queue length • If length > dropLevel then drop packet with certain probability • Source times out on dropped packets • TCP causes send window to decrease • Much tuning of parameters to optimize performance CSE331 Fall 2002
Quality of Service Issues • Sometimes best effort is not enough • Application requirements • Real time: data must arrive within certain time constraints to be useful • Telephony, video conferencing • Jitter (variation in arrival times of packets) is bad • Audio/visual data need low jitter • Packet loss:can it be tolerated or not? • Mpeg can interpolate missing frames • Remote robot surgeon cannot tolerate packet loss CSE331 Fall 2002
Playback Buffer Example Packet Arrival Packet Generation buffer Sequence # delay Playback Time CSE331 Fall 2002
Integrated Services (RSVP) • Proposed in 1995-1997 • Service Classes • Guaranteed arrival service • For delay intolerant applications • Guarantee a maximum delay • Controlled Load • For loss tolerant, adaptive applications • Emulate lightly loaded network CSE331 Fall 2002
Implementation Mechanisms • Flowspecs • Describe the kind of service needed • “I need maximum delay of 100ms” • “I need to use controlled load service” • Admission Control • Network decides whether it can provide the desired service • Resource Reservation • Mechanism to exchange info about requests • Packet Scheduling • Manage queuing and scheduling. CSE331 Fall 2002