150 likes | 262 Views
Flow Identification. Assume you want to guarantee some type of quality of service (minimum bandwidth, maximum end-to-end delay) to a user Before you do that, you have to distinguish the packets of one “ user ” from another “ user ” , since they have different requirements (bandwidth, delay)
E N D
Flow Identification • Assume you want to guarantee some type of quality of service (minimum bandwidth, maximum end-to-end delay) to a user • Before you do that, you have to distinguish the packets of one “user” from another “user”, since they have different requirements (bandwidth, delay) • How to do this distinction? • We will call a flow to be the sequence of packets generated by one user in one application.
Flow Identification Continued… • How to separate packets of one user and another? • Perhaps look at addresses: • Each packet has a source and destination address • Separate packets according to (source,destination), i.e., one packet queue per pair • How to quickly do this separation? • I.e., if a packet is received, to which queue I should add it?
Flow Identification, search tree • How about a search tree, indexed by (S,D) • Searching takes multiple steps (O log N, N is the number of queues), too slow
Flow Identification – (S,D) table • We need fast access to the queues • How about a table, (big array) indexed by (S,D)? • It would require 264 entries! 264
Hash Table (key: (S,D) ) Flow Identification – hash table • We need a fast but small table • Perhaps a hash table (say, 1000 entries) • Hash(S,D) gives you the “bucket” or table entry where the queue of the packet is • How to handle collisions? • You have to revert to search trees for each bucket • Slow!
Flow Identification – flow label • We still need a fast but small table • Say, 1000 entries • Each flow can have a label that is used as an index into that table. • Note that there are more than 1000 flows in the world • But a single router may be involved in only about 1000 flows at a time • Hence, flow labels could be local to the router • These are known as “virtual circuits” • BTW, they are not used in the Internet (in general)
Virtual Circuit Switching • Also referred as connection-oriented model. • Explicit connection setup (and tear-down) phase • All packets follow same route as the setup message route. • Resources may be reserved along this path • The telephone network performs something similar for voice calls
Virtual Circuit ID’s • Each virtual circuit (VC) (i.e., flow) has a unique virtual circuit identifier (VID) in each switch of its path • It is determined locally at the switch and is chosen independently of other values along the path. • No two VC’s on the same link (port, interface) can use the same VID • Note: VID's are reused periodically, since they are bounded, VID : 0 .. v-1 for some constant v Switch 1 Switch 2 vid = 10 vid = 2 vid = 29 Host B Two circuits: one from E to F another from A to B Host A vid = 11 vid = 100 vid = 9 Host E Host F
Virtual Circuit Table • Each switch has a VC table • Table has an entry for each virtual circuit going through it • Contains (at least): • Input interface (port number, link number, or whatever you want to call it) • Input VID • Output interface • Output VID vid = 10 vid = 2 Output Port 2 vid = 11 Input Port 0 • Packets carry the VID in their header • The pair (port, VID) can be used as an index into the table • The table has v*n rows, n = # ports Input Port 1 vid = 9
Virtual Circuit Switching (steps) • Virtual Circuit (VC) set-up or signaling phase: • Source sends setup() message towards destination. • Note that forwarding tables are necessary for the setup message, just like in datagram routing !!!! • Destination replies back with ack() . • All the switches along the path between source and destination create an entry in their virtual circuit table • Data Transfer Phase: • Switches use Virtual Circuit Tables to forward data.
VC: Setup or signaling Phase Host E 0 Switch 1 Host F 3 1 Switch 2 2 Host C 2 3 1 0 Host A Switch 1 VC Table Switch 2 VC Table 0 Switch 3 Host B Host G 1 3 2 Switch 3 VC Table Host H Setup( ) message Ack() Message
VC: Data Transfer Phase Host E 0 Switch 1 Host F 3 1 Switch 2 2 Host C 2 3 1 0 Host A Switch 1 VC Table Switch 2 VC Table 0 Switch 3 Host B Host G 1 3 2 Switch 3 VC Table Host H Data( ) message
Quality of Service Summary • Easier to guaranteed throughput to each connection in VC’s than using datagrams • E.g., serve each VC on an output line using round-robin (or weighted round robin) • In datagram, there is no way to determine which “connection” a datagram belongs to • In datagram, there is no mechanism to inform the switch of the QoS desired.