65efa4f865b3b5c22837bb0593e5c04c.ppt
- Количество слайдов: 87
ECE 6610: Wireless Networks Raghupathy Sivakumar http: //www. ece. gatech. edu/research/GNAN http: //www. ece. gatech. edu/~siva/ECE 6610
Guest Lectures o Professor Sivakumar traveling for a lecture at the WISARD (Wireless Systems: Advanced Research and Development) 2009 conference o Guest lectures on January 6 th and 8 th
e-Handouts (online) o Class information o Schedule o 0 th assignment (does not need to be turned in)
Goals o Fundamental concepts in wireless network protocols and algorithms o Impact of wireless networks on the different layers of the network protocol stack o Theoretical and practical exposure to problems and solutions in wireless network protocols
Requirements o Knowledge of the OSI protocol stack* o Knowledge of the TCP/IP protocol suite and associated protocols* o Experience in programming for assignments & project * See 0 th assignment
Administrative Information o Raghupathy Sivakumar n Room 5164, Centergy n Email : siva@gatech. edu n Office hours: By appointment o Class website n http: //www. ece. gatech. edu/~siva/ECE 6610/ o TA n TBD
Policies o Slides: Lecture slides available on website by 12 noon on the day of class n Lecture slides are NOT comprehensive – students are expected to attend classes to “fill in” information o Classes: Miss classes at your own risk. Professor and TAs will not be responsible for any information you might not have because of a missed class. o Cheating: Zero tolerance policy toward cheating. You will receive an F for the entire class if you are found cheating in any exam or assignment. o Disturbance: No talking in class and disturbing other students when lecture is being delivered. Please turn OFF your cellphones before sitting down for lectures. You will be asked to leave the classroom if you violate this policy.
Textbook o No textbook o Primary material: n Class discussions + slides o Suggested reading n Supplementary reading to be suggested during lectures
Grading o Exams n 2 midterms (2 x 15% = 30%) n 1 final (1 x 35% = 35%) o Assignments n 3 programming assignments (3 x 6% = 18%) o Project n 1 programming mini-project (1 x 12% = 12%) o Other n Class participation (1 x 5% = 5%) n Active participation required n Need to turn in a participation report at the end of the semester (make notes of interactions in class)
Programming Assignments o 3 programming assignments o Students to complete assignments in groups of 5* o 18% of your final grade o All assignments will be based on the ns 2 network simulator * Subject to change
Project o o o 1 mini-project 18% of your final grade Based on the ns 2 network simulator* Project will be defined for you Deliverables: Preliminary report, demonstration and results, final report/presentation * A few test-bed project options available
Groups: Regular Students o Form groups of five o Try to choose students with complimentary skills o Send groups to TA (one email per group w/ subject: ECE 6610 Groups) by end of day Thursday, 1/15
Distance Learning Students o Will work on theory assignments as opposed to programming assignments o Deadlines one week after those for regular students
Schedule All deadlines for distance learning students will be one week after the regular deadlines
References, Reading Material, and Lecture Notes o Most references – research papers in the concerned area. Available online. o Follow lecture slides and class discussions closely
OSI Model
Communication Networks o Broadcast networks n Each station can hear every other station in the network (fully connected network) o Switched networks n Stations interconnected through a (non-fully) connected mesh n Packet switched vs. Circuit switched What kind of a network is the Internet?
Communication Protocols o Rules used in communication o Monolithic vs. Layered o Protocol data units – used to exchange information between peer layers of protocol stack o Examples of communication protocols?
OSI o Open Systems Interconnection: ISO (International Standards Organization)’s standard for communication protocols o Also referred to as the OSI reference model or simply the OSI model o 7 layer protocol stack
OSI Protocol Stack o o o o Physical Data link Network Transport Session Presentation Application
OSI (contd. ) o Physical: mechanical/electrical rules for transferring bits o Data link: n flow control n error detection n error recovery
OSI (contd. ) o Network n Routing n Congestion control n Quality of service o Transport n n n End-to-end communication of data Reliability Sequencing Flow control Congestion control
OSI (contd. ) o Session n Application specific functionality n Still, generic to multiple applications (e. g. security) o Presentation n Data formatting o Application
TCP/IP Protocol Suite o Differences between OSI and TCP/IP? o 5 layers: n n n Physical Data link/MAC (ARP, SLIP) Network (IP, ICMP, IGMP) Transport (TCP, UDP) Application (http, ftp, telnet, smtp)
Medium Access Control
Overview o Medium Access Control n ALOHA, slotted-ALOHA, CSMA/CD o Scheduling n n n FCFS, Priority scheduling Fair queuing, Weighted fair queuing Round robin, Weighted round robin Deficit round robin Class based queuing
Medium Access Control o When multiple stations share a common channel, the protocol that determines which station gets access to the shared channel o Key characteristics based on which MAC protocols are evaluated: utilization and fairness
ALOHA o ALOHA n When a station wants to transmit, it transmits … n Collisions detected at a higher layer and retransmissions done as required n Simple logic n Highly inefficient at large loads. Maximum utilization of 18% at a mean load of 0. 5 transmissions/slot
Slotted ALOHA o Stations can transmit only at the beginning of pre-determined slots o Reduces the “vulnerable period” for collisions o More efficient o Maximum utilization of 36% at a mean load of 1 transmission/slot
Carrier Sense Multiple Access o Station wishing to transmit senses channel. If channel idle, transmits. Else, backs-off and tries later o Carrier sensing hardware required o More efficient than both versions of ALOHA o 3 flavors of CSMA
CSMA (contd. ) o 1 -persistent CSMA n On finding channel busy, station continues listening and transmits when channel becomes idle o p-persistent CSMA n On finding channel idle, station transmits with a probability of p, backs-off and tries again when channel is busy o non-persistent CSMA n On finding channel busy, station backs-off for a random amount of time and tries later
CSMA/CD o In CSMA, when there is a collision of two transmissions, it is detected only after the entire frames have been transmitted … irrespective of when the collision occurs o CSMA/CD includes a collision detection mechanism that can detect collisions even as stations are transmitting o Transmitting stations terminate transmissions upon collision detection and try later
CSMA/CD (Contd. ) o When will the performance of CSMA/CD be the same as that of CSMA? o IEEE 802. 3 Ethernet LAN Standard n 802. 3 u – fast ethernet n 802. 3 ab – gigabit ethernet n 802. 3 ae – 10 G ethernet o Full-duplex Ethernet 33
Other MAC Schemes o Collision free protocols n Bit map protocol n Binary countdown protocol o Limited contention protocols n Adaptive tree walk protocol
Recap o o Class goals and overview Grading and other administrative stuff Communication networks OSI Protocol Stack
Scheduling 36
Scheduling o When a station gets to transmit, the protocol that determines which packet gets to be transmitted o Fairness the primary consideration o Weighted fairness … an extension o Default scheduling in today’s Internet? 37
Scheduling Policies … o FCFS n Packets queued on a first-come-first-served basis n No fairness o Priority n Multiple queues with different priorities n Packets belonging to queue k served only when queues with higher priorities are empty 38
Scheduling (Contd. ) o Generalized Processor Sharing (GPS) n Ideal fair queuing approach based on a fluid flow system n Complex, idealistic o Packetized GPS (WFQ) n Packetized version of GPS (practical) n Finish times in a correponding GPS system used for prioritizing packets 39
Scheduling - WFQ 3 flows A, B, C Weights: A(1), B(2), C(3) Assume same packet sizes 8 6 5 2 7 4 3 1 • Complex overhead due to computation of finishing times • Simpler approach? Tx Schedule: C B C C B A C B … 40
Scheduling (Contd. ) o Weighted Round Robin n Simpler approximation of WFQ n Assumes constant packet sizes n Can cause unfair delay A B Fixed Tx Schedule: CCCBBAA C 41
Scheduling (Contd. ) o WRR with WFQ Spread n For each flow k with weight wk generate wk elements of the form (1/wk, k), (2/wk, k), …, (wk/wk, k) n Sort all such elements from all competing flows in lexicographic order n Extracting the second element of each pair from the resulting sorted list gives the WRR with WFQ spread 42
WRR with WFQ Spread A (1) (1, A) B (2) (1/2, B), (1, B) C (3) (1/3, C), (2/3, C), (1, C) Lexicographically Sorted: (1/3, C), (1/2, B), (2/3, C), (1, A), (1, B), (1, C) Schedule: C B C A B C 43
Other scheduling policies… o Deficit Round Robin (DRR) n Handles varying size packets n Frame of N bits split among the competing flows in the ratio of their weights n Flows get to transmit HOL packet only when they have accumulated packet-length number of bits o Class based queuing (CBQ) n General scheduling and link-share scheduling n Greater flexibility to control scheduling policy 44
Internet Protocol (IP) 45
TCP/IP Protocol Suite o o o Physical layer Data-link layer – ARP, RARP, SLIP Network layer – IP, ICMP, IGMP, Boot. P Transport layer _ TCP, UDP, RTP Application layer – http, smtp, ftp 46
Internet Protocol (IP) o o o Addressing Routing Fragmentation and Reassembly Quality of Service Multiplexing and Demultiplexing 47
Addressing o Need unique identifier for every host in the Internet (analogous to postal address) o IP addresses are 32 bits long o Hierarchical addressing scheme o Conceptually … n IPaddress =(Network. Address, Host. Address) 48
Address Classes Class A 0 net. Id host. Id 7 bits 24 bits Class B 1 0 Class C 11 0 net. Id 14 bits host. Id 16 bits net. Id 21 bits host. Id 8 bits 49
IP Address Classes (contd. ) o Two more classes n 1110 : multicast addressing n 1111 : reserved o Significance of address classes? o Why this conceptual form? 50
Addresses and Hosts o Since net. Id is encoded into IP address, each host will have a unique IP address for each of its network connections o Hence, IP addresses refer to network connections and not hosts o Why will hosts have multiple network connections? 51
Special Addresses o o o host. Id of 0 : host. Id of all 1’s: All 1’s : net. Id of 0 : Loopback : network address directed broadcast limited broadcast this network 127. 0. 0. 0 Dotted decimal notation: IP addresses are written as four decimal integers separated by decimal points, where each integer gives the value of one octet of the IP address. 52
Exceptions to Addressing (norm today) o Subnetting n Splitting host. Id into subnet. Id and host. Id n Achieved using subnet masks n Useful for? o Supernetting (Classless Inter-domain Routing or CIDR) n Combining multiple lower class address ranges into one range n Achieved using 32 bit masks and max prefix routing n Useful for? 53
Examples o Subnetting n 192. 168. 1. 0/24 – class C network n 192. 168. 1. 64/26 and 192. 168. 1. 128/26 – 2 subnetworks with upto 62 stations each! o Supernetting n 192. 168. 2. 0/24 and 192. 168. 3. 0/24 – 2 class C networks n 192. 168. 2. 0/23 – 1 super network with upto 126 stations!! 54
Weaknesses o Mobility o Switching address classes o Notion of host vs. IP address 55
IP Routing o Direct n If source and destination hosts are connected directly n Still need to perform IP address to physical address translation. Why? o Indirect n Table driven routing n Each entry: (Net. Id, Router. Id) o Default router o Host-specific routes 56
IP Routing Algorithm o Route. Datagram(Datagram, Routing. Table) o Extract destination IP address, D, from the datagram and compute the net. ID N n If N matches any directly connected network address deliver datagram to destination D over that network n Else if the table contains a host-specific route for D, send datagram to next-hop specified in table n Else if the table contains a route for network N send datagram to next-hop specified in table n Else if the table contains a default route send datagram to the default router specified in table n Else declare a routing error 57
Routing Protocols o Interior Gateway Protocol (IGP) n Within an autonomous domain n RIP (distance vector protocol), OSPF (link state protocol) o Exterior Gateway Protocol (EGP) n Across autonomous domains n BGP (border gateway protocol) 58
IP Fragmentation o The physical network layers of different networks in the Internet might have different maximum transmission units o The IP layer performs fragmentation when the next network has a smaller MTU than the current network IP fragmentation MTU = 1500 MTU=500 59
IP Reassembly o Fragmented packets need to be put together o Where does reassembly occur? o What are the trade-offs? 60
Multiplexing Web Email TCP MP 3 UDP IP IP datagrams 61
IP Header o Used for conveying information to peer IP layers Destn Source Application Transport IP Data. Link Physical Router IP Data. Link Physical Application Transport IP Data. Link Physical 62
IP Header (contd. ) 4 bit hdr version length 8 bit TOS 16 bit identification 8 bit TTL 16 bit total length 3 bit flags 8 bit protocol 13 bit fragment offset 16 bit header checksum 32 bit source IP address 32 bit destination IP address Options (if any) (maximum 40 bytes) data 63
Recap o MAC Protocols: ALOHA, slotted-ALOHA, CSMA/CD o Scheduling: FCFS, Priority, FQ, WRR, CBQ o Internet Protocol: Addressing, Routing, Fragmentation & Reassembly, Mux/Demux 64
Transmission Control Protocol (TCP) 66
Transmission Control Protocol (TCP) o End-to-end transport protocol o Responsible for reliability, congestion control, flow control, and sequenced delivery o Applications that use TCP: http (web), telnet, ftp (file transfer), smtp (email), chat o Applications that don’t: multimedia (typically) – use UDP instead 67
Ports, End-points, & Connections http ftp smtptelnet TCP UDP IP Layer Protocol ID A 1 A 2 A 3 Transport Port IP address o Thus, an end-point is represented by (IP address, Port) o Ports can be re-used between transport protocols o A connection is (SRC IP address, SRC port, DST IP address, DST port) o Same end-point can be used in multiple connections 68
TCP o Connection Establishment o Connection Maintenance n n Reliability Congestion control Flow control Sequencing o Connection Termination 69
Active and Passive Open o How do applications initiate a connection? o One end (server) registers with the TCP layer instructing it to “accept” connections at a certain port o The other end (client) initiates a “connect” request which is “accept”-ed by the server 70
Connection Establishment & Termination Active open SYN Send connection request SYN+ACK DATA o 3 -way handshake used for connection Accept connection request Send acceptance establishment o Randomly chosen Start connection sequence number is conveyed to the other end o Similar FIN, FIN+ACK exchange used for connection termination Server does passive open 71
Reliability (Loss Recovery) data o Sequence Numbers o TCP uses cumulative Acknowledgments (ACKs) ack n 1 2 3 3 4 4 5 1 2 3 3 4 n n Next expected in-sequence packet sequence number Pros and cons? Piggybacking q. Timeout calculation Rttavg = k*Rttavg + (1 -k)*Rttsample q. RTO = Rttavg + 4*Rttdeviation q 72
Fundamental Mechanism data ack retx data ack o Simple stop and go protocol o Timeout based reliability (loss recovery) • Multiple unacknowledged packets! Sliding Window Protocol: 1 2 3 4 5 6 7 8 9 10 11 12 …. 73
Congestion Control o Slow Start n Start with W=1 n For every ACK, W=W+1 o Congestion Avoidance (linear increase) n For every ACK, Alternative: Fall to W/2 and start n W = W+1/W congestion avoidance directly o Congestion Control (multiplicative decrease) n ssthresh = W/2 n W=1 74
Why LIMD? (fairness) • W=1 • W=W/2 • • • 100 10 1 Problem? – inefficient diff = 90 1 diff = 0 • • • 100 50 51 52. . 73 37. 5. . 61. 75 30. 85. . 10 5 6 7 diff = 90 diff = 45 28 14 diff = 45 diff = 23. 5 38. 25 19. 65 diff = 23. 5 diff = 11. 2 75
Flow Control o Prevent sender from overwhelming the receiver o Receiver in every ACK advertises the available buffer space at its end o Window calculation n MIN(congestion control window, flow control window) 76
Sequencing 1 2 3 3 4 o Byte sequence numbers 1 given to app o TCP receiver buffers out 2 given to app of order segments and Loss 4 buffered (not given to app)reassembles them later o Starting sequence 3 & 4 given to app 4 discarded number randomly chosen during connection establishment n Why? 77
TCP Segment Format 16 bit SRC Port 16 bit DST Port 32 bit sequence number 32 bit ACK number HL resvd flags 16 bit window size 16 bit TCP checksum 16 bit urgent pointer Options (if any) Flags: URG, ACK, PSH, RST, SYN, FIN Data 78
TCP Flavors o TCP-Tahoe n W=1 adaptation on congestion o TCP-Reno n W=W/2 adaptation on fast retransmit, W=1 on timeout o TCP-new. Reno n TCP-Reno + intelligent fast recovery o TCP-Vegas, TCP-SACK 79
TCP Tahoe o Slow-start o Congestion control upon time-out or DUP-ACKs o When the sender receives 3 duplicate ACKs for the same sequence number, sender infers a loss o Congestion window reduced to 1 and slow-start performed again o Simple o Congestion control too aggressive 80
TCP Reno o Tahoe + Fast re-transmit o Packet loss detected both through timeouts, and through DUP-ACKs o Sender reduces window by half, the ssthresh is set to half of current window, and congestion avoidance is performed (window increases only by 1 every round-trip time) o Fast recovery ensures that pipe does not become empty o Window cut-down to 1 (and subsequent slowstart) performed only on time-out 81
TCP New-Reno o TCP-Reno with more intelligence during fast recovery o In TCP-Reno, the first partial ACK will bring the sender out of the fast recovery phase o Results in timeouts when there are multiple losses o In TCP New-Reno, partial ACK is taken as an indication of another lost packet (which is immediately retransmitted). o Sender comes out of fast recovery only after all outstanding packets (at the time of first loss) are ACKed 82
TCP SACK o TCP (Tahoe, Reno, and New-Reno) uses cumulative acknowledgements o When there are multiple losses, TCP Reno and New-Reno can retransmit only one lost packet per round-trip time o What about TCP-Tahoe? o SACK enables receiver to give more information to sender about received packets allowing sender to recover from multiple-packet losses faster 83
TCP SACK (Example) o Assume packets 5 -25 are transmitted o Let packets 5, 12, and 18 be lost o Receiver sends back a CACK=5, and SACK=(6 -11, 13 -17, 19 -25) o Sender knows that packets 5, 12, and 18 are lost and retransmits them immediately 84
Other TCP flavors o TCP Vegas n Uses round-trip time as an early-congestionfeedback mechanism n Reduces losses o TCP FACK n Intelligently uses TCP SACK information to optimize the fast recovery mechanism further 85
User Datagram Protocol (UDP) o Simpler cousin of TCP o No reliability, sequencing, congestion control, flow control, or connection management! o Serves solely as a labeling mechanism for demultiplexing at the receiver end o Use predominantly by protocols that do no require the strict service guarantees offered by TCP (e. g. real-time multimedia protocols) o Additional intelligence built at the application layer if needed 86
UDP Header Src Port Length Dst Port Checksum Length: length of header + data (min = 8) 87
Recap o o o o TCP Connection management Reliability Flow control Congestion control TCP flavors UDP 88


