* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download MAC, Scheduling, IP …
Survey
Document related concepts
IEEE 802.1aq wikipedia , lookup
Point-to-Point Protocol over Ethernet wikipedia , lookup
Airborne Networking wikipedia , lookup
Deep packet inspection wikipedia , lookup
Computer network wikipedia , lookup
Wake-on-LAN wikipedia , lookup
Internet protocol suite wikipedia , lookup
Cracking of wireless networks wikipedia , lookup
Routing in delay-tolerant networking wikipedia , lookup
Zero-configuration networking wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
Transcript
MAC, Scheduling, IP … 1 Announcements Good news! Only three PAs (5% each) Exam 2 will now be worth 20% Grouping Please form groups of 3 and send TA Richelle email (one email per group) by 1/18 Video students No groups Complete firstfeedbackform (available on class website) and send to TA Richelle Send from an email address that you will be reachable for the rest of the semester Mention whether or not you are taking the class from GT-Lorraine Schedule change Examination 1 : ON February 1st ns2 tutorial: ON February 6th and 8th Online schedule has been updated 2 Puzzle Use TH and HT as the two events with equal probability p(1-p). Ignore events TT and HH You have an unfair coin (prob(H) = p != ½) How will you generate a fair toss? 3 Recap Class goals and overview Grading and other administrative stuff Communication networks OSI Protocol Stack Introduction to TCP/IP 4 Medium Access Control When multiple stations share a common channel, the protocol that determines which station gets access to the shared channel Key characteristics based on which MAC protocols are evaluated: utilization and fairness 5 ALOHA ALOHA When a station wants to transmit, it transmits … Collisions detected at a higher layer and retransmissions done as required Simple logic Highly inefficient at large loads. Maximum utilization of 18% at a mean load of 0.5 transmissions/slot 6 Slotted ALOHA Stations can transmit only at the beginning of pre-determined slots Reduces the “vulnerable period” for collisions More efficient Maximum utilization of 36% at a mean load of 1 transmission/slot 7 Carrier Sense Multiple Access Station wishing to transmit senses channel. If channel idle, transmits. Else, backs-off and tries later Carrier sensing hardware required More efficient than both versions of ALOHA 3 flavors of CSMA 8 CSMA (contd.) 1-persistent CSMA On finding channel busy, station continues listening and transmits when channel becomes idle p-persistent CSMA On finding channel idle, station transmits with a probability of p, backs-off and tries again when channel is busy non-persistent CSMA On finding channel busy, station backs-off for a random amount of time and tries later 9 CSMA/CD 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 CSMA/CD includes a collision detection mechanism that can detect collisions even as stations are transmitting Transmitting stations terminate transmissions upon collision detection and try later 10 CSMA/CD (Contd.) When will the performance of CSMA/CD be the same as that of CSMA? IEEE 802.3 Ethernet LAN Standard 802.3u – fast ethernet 802.3ab – gigabit ethernet 802.3ae – 10G ethernet Full-duplex Ethernet 11 Other MAC Schemes Collision free protocols Bit map protocol Binary countdown protocol Limited contention protocols Adaptive tree walk protocol 12 Scheduling When a station gets to transmit, the protocol that determines which packet gets to be transmitted Fairness the primary consideration Weighted fairness … an extension Default scheduling in today’s Internet? 13 Scheduling Policies … FCFS Packets queued on a first-come-first-served basis No fairness Priority Multiple queues with different priorities Packets belonging to queue k served only when queues with higher priorities are empty 14 Scheduling (Contd.) Generalized Processor Sharing (GPS) Ideal fair queuing approach based on a fluid flow system Complex, idealistic Packetized GPS (WFQ) Packetized version of GPS (practical) Finish times in a correponding GPS system used for prioritizing packets 15 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 … 16 Scheduling (Contd.) Weighted Round Robin Simpler approximation of WFQ Assumes constant packet sizes Can cause unfair delay A B Fixed Tx Schedule: CCCBBAA C 17 Scheduling (Contd.) WRR with WFQ Spread For each flow k with weight wk generate wk elements of the form (1/wk,k), (2/wk,k), …, (wk/wk,k) Sort all such elements from all competing flows in lexicographic order Extracting the second element of each pair from the resulting sorted list gives the WRR with WFQ spread 18 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 19 Other scheduling policies… Deficit Round Robin (DRR) Handles varying size packets Frame of N bits split among the competing flows in the ratio of their weights Flows get to transmit HOL packet only when they have accumulated packet-length number of bits Class based queuing (CBQ) General scheduling and link-share scheduling Greater flexibility to control scheduling policy 20 TCP/IP Protocol Suite Physical layer Data-link layer – ARP, RARP, SLIP Network layer – IP, ICMP, IGMP, BootP Transport layer _ TCP, UDP, RTP Application layer – http, smtp, ftp 21 Internet Protocol (IP) Addressing Routing Fragmentation and Reassembly Quality of Service Multiplexing and Demultiplexing 22 Addressing Need unique identifier for every host in the Internet (analogous to postal address) IP addresses are 32 bits long Hierarchical addressing scheme Conceptually … IPaddress =(NetworkAddress,HostAddress) 23 Address Classes Class A 0 netId hostId 7 bits 24 bits Class B 1 0 netId 14 bits hostId 16 bits Class C 11 0 netId 21 bits hostId 8 bits 24 IP Address Classes (contd.) Two more classes 1110 : multicast addressing 1111 : reserved Significance of address classes? Why this conceptual form? 25 Addresses and Hosts Since netId is encoded into IP address, each host will have a unique IP address for each of its network connections Hence, IP addresses refer to network connections and not hosts Why will hosts have multiple network connections? 26 Special Addresses hostId of 0 hostId of all All 1’s netId of 0 Loopback : 1’s: : : : 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. 27 Exceptions to Addressing Subnetting Splitting hostId into subnetId and hostId Achieved using subnet masks Useful for? Supernetting (Classless Inter-domain Routing or CIDR) Combining multiple lower class address ranges into one range Achieved using 32 bit masks and max prefix routing Useful for? 28 Examples Subnetting 192.168.1.0/24 – class C network 192.168.1.64/26 and 192.168.1.128/26 – 2 subnetworks with upto 62 stations each! Supernetting 192.168.2.0/24 and 192.168.3.0/24 – 2 class C networks 192.168.2.0/23 – 1 super network with upto 126 stations!! 29 Weaknesses Mobility Switching address classes Notion of host vs. IP address 30 IP Routing Direct If source and destination hosts are connected directly Still need to perform IP address to physical address translation. Why? Indirect Table driven routing Each entry: (NetId, RouterId) Default router Host-specific routes 31 IP Routing Algorithm RouteDatagram(Datagram, RoutingTable) Extract destination IP address, D, from the datagram and compute the netID N If N matches any directly connected network address deliver datagram to destination D over that network Else if the table contains a host-specific route for D, send datagram to next-hop specified in table Else if the table contains a route for network N send datagram to next-hop specified in table Else if the table contains a default route send datagram to the default router specified in table Else declare a routing error 32 Routing Protocols Interior Gateway Protocol (IGP) Within an autonomous domain RIP (distance vector protocol), OSPF (link state protocol) Exterior Gateway Protocol (EGP) Across autonomous domains BGP (border gateway protocol) 33 IP Fragmentation The physical network layers of different networks in the Internet might have different maximum transmission units The IP layer performs fragmentation when the next network has a smaller MTU than the current network IP fragmentation MTU = 1500 MTU=500 34 IP Reassembly Fragmented packets need to be put together Where does reassembly occur? What are the trade-offs? 35 Multiplexing Web Email TCP MP3 UDP IP IP datagrams Web Email TCP MP3 UDP IP IP datagrams 36 IP Header Used for conveying information to peer IP layers Destn Source Application Transport IP DataLink Physical Router IP DataLink Router IP DataLink Physical Physical Application Transport IP DataLink Physical 37 IP Header (contd.) 4 bit 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 38 Puzzle 10 bags with coins. 9 bags have coins of equal weights (X units, X >> 1) weights. 1 bag has defective coins (heavier or lighter by 1 unit) Using a spring balance, how many times do you need to weigh in order to find the defective bag? 39 Recap MAC Protocols: ALOHA, slotted-ALOHA, CSMA, CSMA/CD Scheduling: FCFS, Priority, FQ, WFQ, WRR, CBQ Internet Protocol: Addressing, Routing, Fragmentation & Reassembly, Mux/Demux 40