Dataset Viewer
Auto-converted to Parquet Duplicate
question
stringclasses
1 value
answer
stringlengths
585
1.52k
source
stringclasses
1 value
No question: Moodle
1 external routing bgp picture from : anderson, s., salamatian, l., bischof, z. s., dainotti, a. and barford, p., 2022, october. igdb : connecting the physical and logical layers of the internet. in proceedings of the 22nd acm internet measurement conference ( pp. 433 - 448 ). contents a. bgp at a high level 1. inter - domain routing 2. policy routing b. bgp in detail 1. how it works 2. aggregation 3. interaction bgp β€” igp β€” packet forwarding 4. other attributes 5. bells and whistles 6. security of bgp c. illustrations and statistics recall : routing algorithms differ in at least 3 aspects nature of β€œ best ” path β€” i. e. what is optimization objective of an algorithm? β€’ to use shortest path β€’ to use equal - cost multi - path β€’ to respect policies β€’ arbitrary scope of network β€” i. e. what is the underlying network? is topology info available? β€’ single domain β€” > intra - domain routing ( main alg. is ospf ) β€’ multiple domains β€” > inter - domain routing ( main alg. is bgp ) a domain is a network under the same administrative entity ( e. g. a campus network, an enterprise network, or an isp, etc. ) state location β€” i. e. where is the output ( i. e. the routing
EPFL COM 407 Moodle
No question: Moodle
information ) finally stored? β€’ inside a local forwarding table β€’ directly into the packet headers domains β€” terminology ard = autonomous routing domain = routing domain under a single administrative entity as = autonomous system = ard with a number ( β€œ as number ” ), used in bgp routes β€’ as number is 32 bits, written in 2 - field dotted decimal notation : e. g. 23. 3456, and leading zeros may be omitted : e. g. 0. 559 means 559 β€’ private as numbers are : 0. 64512 – 0. 65535 β€’ real examples : as1942 - cicg - grenoble, as2200 - renater as559 - switch teleinformatics services ards can be : transit ( see b and d ), stub ( see a ) or multi - homed ( see c ). only non - stub domains need as numbers e. g. epfl : ard w / o number ; all external traffic served by switch multihomed ard c c2 c1 c4 c3 eigrp b2 b1 b4 b3 a2 a1 a4 a3 stub ard a transit ard b bgp - 4 bgp - 4 rip, ripng transit ard d bgp - 4 bgp - 4 d2 d3 d1 d4 d6 ospf area 0 area 2 area 1 d5 part a : bgp at high level 1.
EPFL COM 407 Moodle
No question: Moodle
inter - domain routing context the internet is too large + heterogeneous ( i. e. it is split into various domains ) to be run by one routing protocol. we use hierarchical routing instead : - within domains, we use an igp ( = internal gateway protocol ), e. g. rip, ospf ( standard ), igrp ( cisco ) with ospf : large domains are further split into areas - between domains, we use bgp ( = border gateway protocol ) what is the goal of bgp? β€’ compute paths from a border router in one domain to any network prefix in the world β€’ handle both ipv4 and ipv6 addresses in a single process how does it achieve it? via path - vector routing and policies path vector routing ( high - level example ) goal : to compute best as - level routes / paths. how? ases advertize to their neighbor ases their best routes to destinations, by prepending its as number to the routes they export. each as uses its own criteria for deciding which path is the best. a b c e n1, n2 a : n1, n2 a : n1, n2 c a : n1, n2 c : n3 b a : n1, n2 b : n5 d d c a : n1, n2 d c : n3 d : n4 dest as path n1 d c a n2 d c a n
EPFL COM 407 Moodle
No question: Moodle
##3 d c n4 d n5 b best paths in e n5 n3 n4 e selects one of the 2 available routes according to some criterion bgp advertisement policies … … implement domains ’ business agreements ( e. g. customer - provider relationships, shared - cost peering ) via : import ( what to accept ) and export rules ( what to advertize to whom ), and a decision process ( what is the best route to each destination ) policies ( high - level example ) suppose : β€’ all isps are shared - cost peers ; c is customer of isp. β€’ isp3 - isp2 is a transatlantic link, cost - shared between isp2 & isp3, but it is expensive ; β€’ isp3 - isp1 is a local, inexpensive link ; β€’ problem : it is advantageous for isp3 to send traffic to n2 via isp1 ; but … isp1 may not agree to carry traffic from c3 to c2. how can isp1 apply such a policy : - β€œ transit service ” to c1 and - β€œ non - transit ” service to isp2 & isp3? a common policy rule is : β€œ routes learnt from peers or providers are not advertized to peers or providers. ” applying this to our example : β€’ isp1 advertizes the route : { isp2 c2 : n2 } to c1 β€’ but not to isp3 because doing so would allow is
EPFL COM 407 Moodle
No question: Moodle
##p3 to find a route to c2 that transits via isp1 isp 1 isp 3 isp 2 c1 c2 c3 n2 isp2 c2 : n2 provider customer shared cost isp1 - isp2 and isp1 - isp3 are peers ; isp2 - isp3 are not peers nor customers / providers. all apply the rule β€œ routes coming from peers or providers are not propagated to peers or providers ”. what is a valid path from c2 to c3? a. c2 - isp2 - isp1 - isp3 - c3 b. none c. i don ’ t know isp 1 isp 3 isp 2 c1 c2 c3 n2 go to web. speakup. info or download speakup app join room 46045 solution answer b isp1 learns the route isp1 - isp2 - c2 - n2 but refuses to announce it to isp3 ( who is a peer ) this network is partitioned! solution : internet backbone providers ( eg. at & t, opentransit, orange etc, called tier - 1 ) : must all exchange traffic with each other and all isps need to be connected to a tier - 1 isp 1 isp 3 isp 2 c1 c2 c3 n2 part b. 1. how does bgp work? β€’ bgp routers talk to each other over tcp connections β€’ each b
EPFL COM 407 Moodle
No question: Moodle
##gp router [ bgp - 4, rfc 4271 ] : - receives and stores candidate routes from its bgp neighbor peers, after applying import policy rules - applies the decision process to select at most one route per destination prefix and keeps all other accepted routes as backup - exports the selected routes to bgp neighbors, after applying export policy rules and possibly aggregation β€’ routes are advertized via update messages that contain only modifications : new paths or withdrawals β€’ other bgp messages are : open ( = sync after boot - up ), notification ( = reset ), keepalive ( = notify bgp peers that router is running ) 2 types of bgp ( e - bgp and i - bgp ) a router that runs bgp is called a bgp speaker β€’ at the border between 2 ards, there are 2 speakers, one in each ard β€’ inside an ard, there are usually several bgp speakers bgp speakers speak : β€’ externally ( e - bgp ) to advertize routes to neighbor domains [ as in a previous slide ] β€’ internally ( i - bgp ) to exchange what they have learnt from e - bgp in i - bgp, bgp peers β€’ communicate via a mesh network, a. k. a. β€œ bgp mesh ” β€’ advertize routes as in e - bgp but within the domain ; so they do not : - repeat the routes learnt from i - bgp β€” > to
EPFL COM 407 Moodle
No question: Moodle
avoid redundant traffic - prepend own as number over i - bgp - modify the β€œ next - hop ” attribute of a route [ see also later ] β€’ know about all inter - domain link subnets via igp d1 d2 d4 d5 d3 a b g h c d e f x : n1 x : n1 e - bgp e - bgp i - bgp r bgp sessions over tcp connections physical links say what is always true a. 1 b. 2 c. 1 and 2 d. none e. i don ’ t know 1. two bgp peers must be connected by a tcp connection. 2. two bgp peers must be β€œ on link ” ( on the same subnet ) go to web. speakup. info or download speakup app join room 46045 solution answer a bgp peers communicate ( typically ) with tcp. external peers are typically β€œ on link ”. internal peers need not be β€œ on link ”. which bgp updates may be sent? a. 1 b. 2 c. 3 d. 1 and 2 e. 1 and 3 f. 2 and 3 g. all h. none i. i don ’ t know 1. 2. 3. : : : : : : d1 d2 d4 d5 d3 a b g h c d e f x : n1 x : n1 e -
EPFL COM 407 Moodle
No question: Moodle
bgp e - bgp i - bgp r bgp sessions over tcp connections physical links go to web. speakup. info or download speakup app join room 46045 solution answer d. the route was learnt by from, i. e. via internal bgp ( i - bgp ). therefore it should not be re - advertized over i - bgp. there is no need since all other routers inside the domain have learnt this route from d. only routes 1 and 2 should be repeated. : – : 1. 2. 3. : : : : : : d1 d2 d4 d5 d3 a b g h c d e f x : n1 x : n1 e - bgp e - bgp i - bgp r bgp sessions over tcp connections physical links operation of a bgp router = routing table routes obtained locally ( redistributed from igp ) β€’ each bgp router [ bgp - 4, rfc 4271 ] : - receives and stores candidate routes from its bgp neighbor peers, after applying import policy rules - applies the decision process to select at most one route per dest prefix and keeps all other accepted routes as backup - exports the selected routes to bgp neighbors, after applying export policy rules and possibly aggregation routes, ribs, routing table a route has several
EPFL COM 407 Moodle
No question: Moodle
attributes : β€’ destination ( subnet ) prefix β€’ path to the destination ( as - path or an authenticated bgpsec _ path ) β€’ next - hop ( modified by e - bgp, left unchanged by i - bgp ) β€’ origin : route learnt from igp, bgp, static β€’ other attributes : local - pref, atomic - aggregate ( = route cannot be dis - aggregated ), med, etc. [ see later ] routes + their attributes are stored in the routing information bases ( ribs ) : adj - rib - in, loc - rib, adj - rib - out. like any ip host or router, a bgp router also has a routing table = ip forwarding table used for packet forwarding, in real time = routing table routes obtained locally ( redistributed ) = routing table routes obtained locally ( redistributed ) the decision process the decision process chooses at most one route to each different destination prefix as best e. g. : only one route to 2. 2 / 16 can be chosen, but there can be different routes to 2. 2. 2 / 24 and 2. 2 / 16 how? β€’ a route can be selected only if its next - hop is reachable β€’ for each dest prefix, all acceptable routes are compared w. r. t. their attributes using a sequence of criteria ( until only one route remains ) ; a common sequence is : 0. highest
EPFL COM 407 Moodle
No question: Moodle
weight ( cisco proprietary ) 1. highest local - pref 2. shortest as - path 3. lowest med, if taken seriously by this network 4. e - bgp > i - bgp ( = if route is learnt from e - bgp, it has priority ) 5. shortest path to next - hop, according to igp 6. lowest bgp identifier ( router - id of the bgp peer from whom route is received ) ( the cisco and frr implementation of bgp, used in lab 6, have additional cases, not shown here ) the result of the decision process is stored in forwarding table and in adj - rib - out ( one route per destination for each bgp peer ). the router sends updates when adj - rib - out changes ( addition or deletion ) after applying export rules. fundamental example β€’ 4 bgp routers communicate directly ( solid lines ) or indirectly ( dash lines ) via e - bgp or i - bgp, β€’ 2 ases, x and y, each one running its own igp, too. β€’ assume r3 and r4 are configured to advertise both prefixes of y. remarks : - we show next only a subset of the route attributes ( such as : destination, path, next - hop ) - the exact internal topology of y is not shown focus on r1 and show its bgp information : step 1 β€’ [ import filters : ] r1
EPFL COM 407 Moodle
No question: Moodle
accepts the updates and stores them in adj - rib - in β€’ [ decision process : ] r1 designates these routes as best routes β€’ [ export filters : ] r1 puts updates into adj - rib - out, which will cause them to be sent to other bgp neighbors / peers from r3 10. 1 / 16 as = y next - hop = 1. 1. 1. 2 best from r3 10. 2 / 16 as = y next - hop = 1. 1. 1. 2 best to r2 10. 1 / 16 as = y next - hop = 1. 1. 1. 2 to r2 10. 2 / 16 as = y next - hop = 1. 1. 1. 2 10. 1 / 16 as = y 10. 2 / 16 as = y r3 β€” > r1 step 2 a. the first one only b. the second one only c. both d. none e. i don ’ t know from r3 10. 1 / 16 as = y next - hop = 1. 1. 1. 2 best from r2 10. 1 / 16 as = y next - hop = 2. 2. 2. 1 from r3 10. 2 / 16 as = y next - hop = 1. 1. 1. 2 best from r2 10. 2 / 16 as = y next - hop = 2. 2. 2. 1 10. 1 / 16 as = y next - hop
EPFL COM 407 Moodle
No question: Moodle
= 2. 2. 2. 1 10. 2 / 16 as = y next - hop = 2. 2. 2. 1 which of the two new routes ( in red ) are promoted by the decision process to β€œ best routes ” assuming weight, local _ pref and med are empty? r2 β€” > r1 step 2 answer d r1 applies again its decision process. now it has several possible routes to each prefix. the first applicable rule in the decision process ( slide β€œ the decision process ” ) says that if a route is learnt from e - bgp it has precedence over a route learnt from i - bgp ( e - bgp > i - bgp ). since all routes in adj - rib - in from r2 are learnt from i - bgp, and all routes in adj - rib - in from r3 are learnt from e - bgp, the winners are the latter, so there is no change. since there is no change in loc - rib there is no change in adj - rib - out and therefore no message is sent by r1. from r3 10. 1 / 16 as = y next - hop = 1. 1. 1. 2 best from r2 10. 1 / 16 as = y next - hop = 2. 2. 2. 1 from r3 10. 2 / 16 as = y next - hop = 1. 1. 1. 2 best from r2 10. 2 /
EPFL COM 407 Moodle
No question: Moodle
16 as = y next - hop = 2. 2. 2. 1 10. 1 / 16 as = y next - hop = 2. 2. 2. 1 10. 2 / 16 as = y next - hop = 2. 2. 2. 1 r2 β€” > r1 another fundamental example β€’ 3 bgp routers in as x. β€’ an igp ( e. g. ospf ) also runs on r1, r21 and r22. β€’ assume : - all link costs are equal to 1. - r3 and r4 advertise only their directly attached prefixes, as shown in the figure. note : the 3 bgp in as x routers must have tcp connections with each other ( same in as y, but not shown on figure ). focus on r1 and show its bgp information : step 1 β€’ r1 accepts the updates and stores it in adj - rib - in β€’ r1 designates this route as best route β€’ r1 puts route into adj - rib - out, which will cause them to be sent to bgp neighbors r21 and r22 from r3 10. 1 / 16 as = y next - hop = 1. 1. 1. 2 best to r21 10. 1 / 16 as = y next - hop = 1. 1. 1. 2 to r22 10. 1 / 16 as = y next - hop = 1. 1. 1. 2 10.
EPFL COM 407 Moodle
No question: Moodle
1 / 16 as = y r3 β€” > r1 step 2 β€’ r1 accepts the updates and stores it in adj - rib - in β€’ r1 designates this route as best route β€’ r1 does not put route into adj - rib - out to r21 because i - bgp is not repeated over i - bgp r1 does not put route into adj - rib - out to r3 this would create an as - path loop from r3 10. 1 / 16 as = y next - hop = 1. 1. 1. 2 best from r22 10. 2 / 16 as = y next - hop = 2. 2. 2. 1 best to r21 10. 1 / 16 as = y next - hop = 1. 1. 1. 2 to r22 10. 1 / 16 as = y next - hop = 1. 1. 1. 2 10. 2 / 16 as = y next - hop = 2. 2. 2. 1 r22 β€” > r1 step 3 a. yes b. no, the route is worse c. no, it will keep both routes d. i don ’ t know from r3 10. 1 / 16 as = y next - hop = 1. 1. 1. 2 best from r22 10. 2 / 16 as = y next - hop = 2. 2. 2. 1 best from r21 10. 2 / 16 as = y next - hop = 3
EPFL COM 407 Moodle
No question: Moodle
. 3. 3. 1 10. 2 / 16 as = y next - hop = 3. 3. 3. 1 will the decision process promote the new route to β€œ best route ” assuming that weight, local _ pref, med are empty? r21 β€” > r1 solution answer a the decision process now has to choose between two routes with same destination prefix 10. 2 / 16. both were learnt from i - bgp, so we apply criterion 5 in slide β€œ the decision process ”. the distance, computed by the igp, to 2. 2. 2. 1 is β‰₯3 and the distance to 3. 3. 3. 1 is 2. thus the route that has next - hop = 3. 3. 3. 1 is preferred by the decision process, i. e. the new route is designated as β€œ best ”. the new route is not put into adj - rib - out for the same reasons as at step 2. from r3 10. 1 / 16 as = y next - hop = 1. 1. 1. 2 best from r22 10. 2 / 16 as = y next - hop = 2. 2. 2. 1 best from r21 10. 2 / 16 as = y next - hop = 3. 3. 3. 1 best isp1 r11 r12 isp2 r21 r22 customer 2 customer 1 isp1 and isp2 are shared cost peers. which path will be used by
EPFL COM 407 Moodle
No question: Moodle
packets customer 1 customer 2? β†’ a. r12 - r11 - r21 b. r12 - r22 - r21 c. it depends on the configuration of bgp at isp1 and isp2 d. both in parallel e. i don ’ t know go to web. speakup. info or download speakup app join room 46045 solution answer c : it depends on the configuration. if configuration is as in β€œ fundamental example ”, customer 1 customer 2 uses r12 - r22 - r21 ( Β« hot potato routing Β» ), but if the configuration is as in β€œ another fundamental example ”, the other route is used ( β€œ cold potato routing ” ) if both isps do hot potato routing, customer 2 customer 1 uses r21 - r11 - r12 : routing in the global internet may be asymmetric! β†’ β†’ isp1 r11 r12 isp2 r21 r22 customer 2 customer 1 how are routes originated ( = sourced )? several methods for sourcing a route : static configuration : = manually tell this bgp router which prefixes to originate ( β€œ network ” command in frr ) redistribute connected : = tell this bgp router to originate all directly attached prefixes ( all routers in network may run i - bgp, no need for igp in this case ) redistribute from igp : = tell this bgp router to originate all prefixes
EPFL COM 407 Moodle
No question: Moodle
learnt by igp, e. g. : redistribute ospf into bgp β€’ if igp = ospf, in principle, only internal prefixes should be redistributed β€’ such bgp routes have attribute origin = igp. β€’ when originated, the bgp next - hop of such a route is its igp next - hop. 2. aggregation ( of routes ) routes usually overlap β€’ expected to be very frequent with ipv6 ( recall the way we delegate prefixes ), less with ipv4 so, prefix aggregation can reduce the number of routes β€’ in ip forwarding tables β€’ in bgp advertizements otherwise several hundreds of thousands of entries or advertizements ( e. g. consider transit isps without a default route ) can as3 aggregate these routes into a single one? a. yes and the aggregated prefix is 2001 : baba : bebe / 47 b. yes and the aggregated prefix is 2001 : baba : bebf / 48 c. yes but the aggregated prefix is none of the above d. no e. i don ’ t know as1 as2 as3 as4 2001 : baba : bebe / 48 2001 : baba : bebf / 48 2001 : baba : bebe / 48, as - path = 1 2001 : baba : bebf / 48, as - path = 2 go to web. speakup. info or download speakup app join room 46045 answer a
EPFL COM 407 Moodle
No question: Moodle
. the two prefixes are contiguous and can be aggregated as 2001 : baba : bebe / 47 actual advertizements : as3 sends to as4 the update 2001 : baba : bebe / 47 as - path = 3 { 1 2 } as4 sends the update 2001 : baba : bebe / 47 as - path = 4 3 { 1 2 } solution 2001 : baba : bebe / 48 2001 : baba : bebf / 48 2001 : baba : bebe / 47 { } means aggregation which routes may the decision process in as4 designate as best? a. the top route b. the bottom route c. both d. i don ’ t know as1 as2 as3 as4 2001 : baba : bebe / 48 2001 : baba : bebf / 48 2001 : baba : bebe / 48, as - path = 1 2001 : baba : bebf / 48, as - path = 2 2001 : baba : bebf / 48, as - path = 2 2001 : baba : bebe / 47, as - path = 3 { 1 2 } go to web. speakup. info or download speakup app join room 46045 solution answer c. the decision process in as4 may select both routes because they are to different destinations. overlapping routes are considered different. as1 as2 as3 as4 2001 : baba : bebe / 48 2001 : baba : bebf / 48 2001 : baba : bebe / 48, as -
EPFL COM 407 Moodle
No question: Moodle
path = 1 2001 : baba : bebf / 48, as - path = 2 2001 : baba : bebf / 48, as - path = 2 2001 : baba : bebe / 47, as - path = 3 { 1 2 } assume the decision process in as4 designates both routes as best. which path does a packet from as4 to 2001 : baba : bebf / 48 follow? a. as4 - as3 - as2 b. as4 - as2 c. i don ’ t known as1 as2 as3 as4 2001 : baba : bebe / 48 2001 : baba : bebf / 48 2001 : baba : bebe / 48, as - path = 1 2001 : baba : bebf / 48, as - path = 2 2001 : baba : bebf / 48, as - path = 2 2001 : baba : bebe / 47, as - path = 3 { 1 2 } go to web. speakup. info or download speakup app join room 46045 solution answer b. recall : a bgp router is still and ip forwarding device. so, it uses longest prefix match packet goes as4 - as2. another example : a packet to 2001 : baba : bebe / 48 will go as4 - as3 - as1. β‡’ as1 as2 as3 as4 2001 : baba : bebe / 48 2001 : baba : bebf / 48 2001 : baba : bebe / 48,
EPFL COM 407 Moodle
No question: Moodle
as - path = 1 2001 : baba : bebf / 48, as - path = 2 2001 : baba : bebf / 48, as - path = 2 2001 : baba : bebe / 47, as - path = 3 { 1 2 } assume the link as2 - as4 breaks … β€’ at as4 : keepalive mechanism detects that the border router at as2 is unreachable β€’ related adj - rib - in, adj - rib - loc routes are declared invalid β€’ decision process recomputes best route to 2001 : baba : bebf / 48 β€” > there is none β€’ the forwarding table entry 2001 : baba : bebf / 48 is removed β€’ but … a packet to 2001 : baba : bebf / 48 matches the route 2001 : baba : bebe / 47 and can go via as3 as1 as2 as3 as4 2001 : baba : bebe / 48 2001 : baba : bebf / 48 2001 : baba : bebe / 48, as - path = 1 2001 : baba : bebf / 48, as - path = 2 2001 : baba : bebf / 48, as - path = 2 2001 : baba : bebe / 47, as - path = 3 { 1 2 } 3. how routes learnt by bgp are written into forwarding tables? there are two possible ways : 1. redistribution of bgp into igp : routes learnt by bgp are passed to igp
EPFL COM 407 Moodle
No question: Moodle
( e. g. : ospf ) β€’ typically only routes learnt by e - bgp are redistributed ( unless bgp redistribute - internal is used ) β€’ igp propagates the routes to all routers in domain β€’ works with ospf, might not work with other igps ( table too large for igp ) example ( re - distribution ) assume all routers run bgp apart from r1 : β€’ r5 advertises 18. 1 / 16 to r6 via e - bgp, β€’ r6 advertises it to r2 via i - bgp, β€’ r2 advertises route to r4 via e - bgp. β€’ r6 redistributes 18. 1 / 16 ( learnt from e - bgp ) into igp - for the igp, it is as if 18. 1 / 16 were directly connected to r6. the igp cost, if required, is usually set to a value higher than all igp distances. - igp propagates 18. 1 / 16 internally ( in ospf : there is a separate lsa for this β€” type 5 ). - r1, r2, r6 update forwarding tables. r1, r2 now have a route to 18. 1 / 6. - packet to 18. 1 / 16 from as y finds forwarding table entries in r2, r1 and r6 as x as
EPFL COM 407 Moodle
No question: Moodle
y as z e - bgp e - bgp r4 r1 r2 r5 r6 18. 1 / 16 i - bgp igp ( ospf ) igp ( ospf ) 2. 2. 2. 2 how routes learnt by bgp are written into forwarding tables? there are two possible ways : 1. redistribution of bgp into igp : routes learnt by bgp are passed to igp ( e. g. : ospf ) β€’ typically only routes learnt by e - bgp are redistributed ( unless bgp redistribute - internal is used ) β€’ igp propagates the routes to all routers in domain β€’ works with ospf, might not work with other igps ( table too large for igp ) 2. injection : routes learnt by bgp are directly written / copied into forwarding table of this bgp router β€’ why used? igp avoids dealing with a large number of routing entries ( consider potential convergence issues in distance - vector algorithms, such as rip ). β€’ routing information is not propagated to other intra - domain routers ; so, injection helps only the particular bgp router. β€’ typically used in cisco routers and frr ( in the lab ). assume bgp routers r6 and r2 inject / copy the route to 18. 1 / 16 into their forwarding table. what is the next - hop for a route to
EPFL COM 407 Moodle
No question: Moodle
18. 1 / 16? a. at r6 : 2. 2. 2. 2, at r2 : 2. 2. 2. 2 b. at r6 : 2. 2. 2. 2, at r2 : the ip address of r1 - east c. at r6 : 2. 2. 2. 2, at r2 : the ip address of r6 - south d. none of the above e. i don ’ t know as x as y as z e - bgp e - bgp r4 r1 r2 r5 r6 18. 1 / 16 i - bgp igp ( ospf ) igp ( ospf ) 2. 2. 2. 2 example ( injection ) solution answer a. when a bgp router injects a route into the forwarding table, it copies the bgp next - hop into the forwarding table ’ s next - hop. ideally, the correct answer should be b but is in fact a. normally, the next - hop in a forwarding table is on - link ( inside the same subnet ) and is the interface of the next router on the path, i. e. r1 - east. however, in this case, this requires that r2 learns the path to 18. 1 / 16, by the igp. since 18. 1 / 16 is not redistributed into the igp, there is a problem. the
EPFL COM 407 Moodle
No question: Moodle
problem is usually solved via recursive table lookup. ( see next slides ) recursive table lookup why? a bgp router injects a route into its forwarding table = it copies the bgp next - hop into the forwarding table ’ s next - hop. so, the forwarding table may indicate next - hops which are not β€œ on - link ” ( i. e. within the subnets of this router ). how? to resolve the non - on - link next - hop into an on - link next - hop neighbor, a second lookup is done into the forwarding table in fact, the second lookup may be done in advance β€” not in real time β€” by pre - processing the routing table. β€’ r5 advertises 18. 1 / 16, next - hop = 2. 2. 2. 2 to r6 via e - bgp. β€’ r6 injects 18. 1 / 16, next - hop = 2. 2. 2. 2 into its forwarding table ( does not re - distribute into ospf ). β€’ r2 learns route from r6 via i - bgp. β€’ r2 injects 18. 1 / 16, next - hop = 2. 2. 2. 2 into its local forwarding table. β€’ ip packet to 18. 1. 1. 1 is received by r2, recursive table lookup is used : - the forwarding
EPFL COM 407 Moodle
No question: Moodle
table at r1 is looked up first, next - hop 2. 2. 2. 2 is found ; - a second lookup for 2. 2. 2. 2 is done ( or has been done in advance ) ; - packet is sent to r1 ( interface 2. 2. 1. 1 ) over eth0. example ( injection, cont'd ) to next hop interface 18. 1 / 16 2. 2. 2. 2 n / a 2. 2. 2. 2 2. 2. 1. 1 eth0 forwarding table at r2 as x as y as z e - bgp e - bgp r4 r1 r2 r5 r6 18. 1 / 16 i - bgp igp igp ( ospf ) 2. 2. 2. 2 2. 2. 2. 2 2. 2. 2. 2 2. 2. 2. 2 2. 2. 1. 1 injection ( no redistribution into igp ) : what happens to this ip packet at r1? a. it is forwarded to r6 because r1 does recursive table lookup b. it is forwarded to r6 because r1 runs an igp c. it cannot be forwarded to r6 d. i don ’ t know 51 solution answer c the igp announces only internal routes since we use only injection and we do not re - distribute bgp into igp. r1 does not run
EPFL COM 407 Moodle
No question: Moodle
bgp. thus r1 does not have any route to 18. 1 / 16 in its forwarding table. the packet cannot be forwarded by r1 ( β€œ destination prefix not found ” ). 52 in practice, simple injection implies that all routers need to run bgp the β€œ injection - only ” bgp setup : β€’ all routers run bgp ( in addition to igp ) even if not being border routers ( e. g. see r1 ) β€’ recursive table lookup is done at all routers β€’ potential problem : size of i - bgp mesh β€” > use reflectors ( see later ) β€’ igp is still needed to discover paths to next - hops ; but handles only internal prefixes – very few as x as y as z e - bgp e - bgp r4 r1 r2 r5 r6 18. 1 / 16 i - bgp igp igp ( ospf ) 2. 2. 2. 2 2. 2. 2. 2 2. 2. 2. 2 2. 2. 2. 2 2. 2. 1. 1 53 alternative : bgp with source / segment routing alternative to redistribution or running i - bgp in all routers : use source routing / segment routing in as x : β€’ routing table at r2 contains next - hop flag β€œ insert next - hop as source routing header ” β€’ r1 forwards packet using source routing info, needs only small routing table
EPFL COM 407 Moodle
No question: Moodle
( internal prefixes of as x ). β€’ scion ( alternative to bgp ) uses a similar mechanism. as x as y as z e - bgp e - bgp r4 r1 r2 r5 r6 18. 1 / 16 i - bgp igp igp 2. 2. 2. 2 2. 2. 20. 1 to next - hop flags 18. 1 / 16 2. 2. 2. 2 insert next - hop as source routing header at r2 alternative : bgp with mpls alternative to redistribution or running i - bgp in all routers : associate mpls labels to exit points mpls labels are similar to vlan tags and are used by mpls - capable routers to forward the packet, without looking at the ip header. example : β€’ r1, r2 and r6 support ip and mpls β€’ r2 creates a β€œ label switched path ” to 2. 2. 2. 2, with label 23 β€’ at r2 : packets to 18. 1 / 6 are associated with this label β€’ r1 runs only igp and mpls β€” no bgp – > only very small routing tables as x as y as z e - bgp e - bgp r4 r1 r2 r5 r6 18. 1 / 16 i - bgp mpls igp mpls 2. 2. 2. 2 2. 2. 20. 1 to next - hop layer - 2 addr 18
EPFL COM 407 Moodle
No question: Moodle
. 1 / 16 2. 2. 2. 2 mpls label 23 at r2 injection conflicts in frr and cisco, bgp always injects routes into forwarding table, even if these routes are redistributed into igp. this may cause injection conflicts : β€’ a route may be injected into the forwarding table by both igp ( e. g. ospf ) and bgp. to solve the conflicts, every route in the forwarding table has an attribute called administrative distance, which depends on which process wrote the route : e - bgp = 20, ospf = 110, rip = 120, i - bgp = 200 administrative distance is compared before the usual distance. β€’ only the route with the smallest administrative distance is selected to forward ip packets. β€’ the decision process selects a bgp route, only if there is no route to same destination prefix with smaller administrative distance in the forwarding table. admin distance is local and is not used by routing protocols. example assume r2 and r6 redistribute e - bgp into ospf, but also inject routes directly. β€’ at : r2 injects 18. 1 / 16 from bgp into its forwarding table in r2 ’ s forwarding table we see : 18. 1 / 6, admin dist = 200, next - hop = 2. 2. 2. 2 r2 does not redistribute 18. 1 / 16
EPFL COM 407 Moodle
No question: Moodle
into ospf because it was learnt with i - bgp and only e - bgp is redistributed, as we assumed. β€’ at : r6 injects 18. 1 / 16 from bgp into its forwarding table ; in r6 ’ s forwarding table we see : 18. 1 / 6, admin dist = 20, next - hop = 2. 2. 2. 2 then r6 redistributes 18. 1 / 16 from bgp into ospf with ospf cost = 20 ( an arbitrary value chosen as cisco ’ s default ). β€’ at : via ospf r2 learns the route and injects it into its forwarding table. in r2 ’ s forwarding table we see an injection conflict : 18. 1 / 6, admin dist = 110, cost = 22, next - hop = r1 - east 18. 1 / 6, admin dist = 200, next - hop 2. 2. 2. 2 β€’ the admin distance solves the conflict : r2 uses only the first route. > > 4. other route attributes local - pref β€’ used inside an as to express preference. β€’ assigned by bgp router when receiving route over e - bgp. β€’ propagated without change over i - bgp ; not used ( ignored ) over e - bgp. example r6 associates pref = 100, r2
EPFL COM 407 Moodle
No question: Moodle
pref = 10 r1 chooses the largest preference as x e - bgp r1 r2 r6 i - bgp i - bgp e - bgp e - bgp pref = 10 pref = 100 local - pref example : link as2 - as4 is expensive as 4 sets local - pref to : β€’ 100 to all routes received from as 3 β€’ 50 to all routes received from as 2 r1 receives the route as2 as1 10. 1 / 16 over e - bgp ; sets local - pref to 50 r2 receives the route as3 as1 10. 1 / 16 over e - bgp ; sets local - pref to 100 as 1 as 3 as 2 as 4 as 5 r1 r2 r3 as1 : 10. 1 / 16 10. 1 / 16 as1 : 10. 1 / 16 what does r3 announce to as5? a. 10. 1 / 16 as - path = as4 as2 as1 b. 10. 1 / 16 as - path = as4 as3 as1 c. any of the two, depending on policy for as5 d. both e. none f. i don ’ t know as 1 as 3 as 2 as 4 as 5 r1 r2 r3 as1 : 10. 1 / 16 10. 1 / 16 as1 : 10. 1 / 16 solution answer b r1, r2 and r3 all select the route via
EPFL COM 407 Moodle
No question: Moodle
as3 as best route to 10. 1 / 16 because of the local - pref attribute r3 advertises only its best route to as5, i. e. 10. 1 / 16 as - path = as4 as3 as1 r1 injects in forwarding table the next - hop corresponding to the r2 - as3 link and therefore the packet to 10. 1. 1. 1 goes via as3 answer c is not possible because bgp allows only best route to be propagated answer e is possible if the policy in as4 forbids propagating this route weight this is a route attribute given by cisco or similar router it remains local to this router never propagated to other routers, even in the same as therefore there is no weight attribute in route announcements multi - exit - disc ( med ) one as connected to another over several links ( multi - homing ) e. g. : multinational company y connected to worldwide isp x as y advertises its prefixes with different meds ( lowest med = preferable ) if as x accepts to use meds put by as y : traffic goes on preferred link as y as x r4 r2 r1 10. 1 / 16 med = 10 10. 2 / 16 med = 50 10. 1 / 16 med = 50 10. 2 / 16 med = 10 10. 1 / 16 10. 2 / 16 e - bgp e - bgp r
EPFL COM 407 Moodle
No question: Moodle
##3 1. 1. 1. 1 2. 2. 2. 2 63 r1 has 2 routes to 10. 2 / 16 : one via r3, learnt from r3 by e - bgp ( med = 50 ), one via r4, learnt from r2 by i - bgp ( med = 10 ). the decision process at r1 prefers … a. the route via r2 b. the route via r3 c. both d. i don ’ t know 64 solution answer a r1 prefers the route via r2 because the decision process tests med before e - bgp > i - bgp similarly, r2 has 2 routes to 10. 1 / 16, r2 prefers the route via r1 traffic from asx to 10. 1 / 16 flows via r1, traffic from asx to 10. 2 / 16 flows via r2 as y as x r4 r2 r1 10. 1 / 16 med = 10 10. 2 / 16 med = 50 10. 1 / 16 med = 50 10. 2 / 16 med = 10 10. 1 / 16 10. 2 / 16 e - bgp e - bgp packet to 10. 1. 2. 3 packet to 10. 2. 3. 4 r3 1. 1. 1. 1 2. 2. 2. 2 65 router r3 crashes … r1 clears routes to asy learnt from r3 ( keep - alive mechanism ) and selects as
EPFL COM 407 Moodle
No question: Moodle
best route to 10. 1 / 16 the route learnt from r2 r2 is informed of the route suppression by i - bgp r2 has now only 1 route to 10. 1 / 16 and 1 route to 10. 2 / 16 ; traffic to 10. 1 / 16 now goes to r2 med allows as y to be dual homed and use closest link – other links are used as backup packet to 10. 1. 2. 3 67 convergence of bgp it is hoped that bgp converges and in practice it does, however there may be configurations with no equilibrium ( oscillations ) or with multiple equilibria : example : a prefers b over d and sets local - pref = 100 to updates received from b β€’ if a2 receives ( 1 ) dest = 2001 : 1 : 1 : : / 48, as - path = d from d1 before a receives any route to 2001 : 1 : 1 : : / 48 from b then b2 receives dest = 2001 : 1 : 1 : : / 48, as - path = a d, selects it as best route ( prefers it over dest = 2001 : 1 : 1 : : / 48, as - path = cd received from c, same as - path length, smaller identifier ) and sends nothing to a. a2 ’ s best route is dest = 2001 : 1 : 1 : : / 48, as - path = d, next - hop = d1
EPFL COM 407 Moodle
No question: Moodle
##s β€’ if a2 receives ( 2 ) dest = 2001 : 1 : 1 : : / 48, as - path = bcd from b2 before receiving a route to 2001 : 1 : 1 : : / 48 from d, a2 stores it and will prefer it over any route to 2001 : 1 : 1 : : / 48 received later from d. a2 ’ s best route is dest = 2001 : 1 : 1 : : / 48, as - path = bcd, next - hop = b2s two equilibria are possible here, depending on message timings / order. griffin, t. g. and wilfong, g., 1999. an analysis of bgp convergence properties. acm sigcomm computer communication review, 29 ( 4 ), pp. 277 - 288 dest = 2001 : 1 : 1 : : / 48, as - path = d ( 1 ) ( 2 ) dest = 2001 : 1 : 1 : : / 48, as - path = bcd 66 5. bgp : other bells and whistles 68 what happens when a bgb router loses its best route to some destination? a. it will send an update in the next periodic keepalive message b. it sends a withdraw update to the bgp peers to whom it had sent this route, as soon as possible c. it does not inform its bgp peers, they will recompute best routes and will find out d.
EPFL COM 407 Moodle
No question: Moodle
i don ’ t know solution 69 answer b bgp sends modifications to neighbors, including additions and withdrawals of best routes. 70 route flap damping ( or dampening ) why? route flap : a route is successively withdrawn, updated, withdrawn, updated etc. caused e. g. by unstable bgp routers ( crash, reboot, crash, reboot... ) or by non convergence ( oscillations ). the flap propagates to the as and to other ases. causes cpu congestion on bgp routers. how? withdrawn routes are kept in adj - rin - in, with a penalty counter and a suppress state. withdraw penalty incremented ; updated advertisement if penalty > suppress _ limit, then suppress = true penalty is updated e. g. every < 5 sec, with exponential decay ; when penalty < reuse _ limit, then suppress = false and route is re - announced routes that have suppress = = true are ignored by the decision process β‡’ β‡’ 71 route flap damping w : reception of withdraw, u : reception of updated advertisement β€’ in two flaps occur and propagate β€’ at the route has suppress = true β€’ in the route is ignored β€’ at the route has suppress = false and is used again [ 0, ] [, ] reuse _ limit suppress _ limit penalty time wuwu w u w u 72 private as number β€’ client uses bgp with med to control flows
EPFL COM 407 Moodle
No question: Moodle
of traffic ( e. g provider should use r1 - r3 for all traffic to 10. 1 / 16 β€’ stub domains ( e. g., epfl ) can use a private as number - - not usable in the global internet, used only between client and provider ( e. g., switch ) β€’ provider translates this number to his own when exporting routes to the outside world. β€’ client does not need a public as number. as y as x r4 r2 r1 10. 1 / 16 med = 10 10. 2 / 16 med = 50 10. 1 / 16 med = 50 10. 2 / 16 med = 10 10. 1 / 16 10. 2 / 16 e - bgp e - bgp r3 client provider 73 avoiding i - bgp mesh : confederations as decomposed into sub - as with private as number similar to ospf areas i - bgp inside sub - as ( full interconnection ) e - bgp between sub - as as z e - bgp e - bgp e - bgp as p1 as p2 as p3 i - bgp i - bgp i - bgp e - bgp e - bgp 74 avoiding i - bgp mesh : route reflectors cluster of routers one i - bgp session between each client and a route reflector ( rr ) route reflector acts like a proxy : re - advertises a route learnt via i -
EPFL COM 407 Moodle
No question: Moodle
bgp this architecture results in fewer ibgp internal peerings ( no mesh, but hierarchy ), and avoids loops cluster _ id attribute associated with the advertisement as z e - bgp e - bgp i - bgp i - bgp i - bgp i - bgp i - bgp e - bgp rr rr rr i - bgp cluster 1 cluster 2 cluster 3 75 an interconnection point 76 avoiding e - bgp mesh : route server problem : at an interconnection point, there might be a large e - bgp mesh instead of n ( n - 1 ) / 2 peer - to - peer e - bgp connections, we use n connections to route server ( similarly to reflectors for i - bgp ) to avoid loops advertiser attribute indicates which router in the as generated the route many route servers publish their advertisements e - bgp 77 6. security aspects malicious or simply buggy bgp updates may cause damage to global internet example 1 ( subprefix hijack ) : assume isp3 ( malicious ) announces to isp1 a route to 128. 178 / 16 and a route to 128. 179 / 16 ( both are epfl prefixes ) what will happen to traffic from c1 to epfl ( i. e. c2 in the figure )? a. all such traffic will go to isp3 b. some fraction will go to isp3 c. all such traffic will go to c2,
EPFL COM 407 Moodle
No question: Moodle
as usual d. i don ’ t know isp 1 isp 3 isp 2 c1 c2 c3 128. 178 / 15 128. 178 / 16 as - path = isp3 128. 179 / 16 as - path = isp3 78 solution answer a or b β€’ if aggregation is not done by isp1, the routes to 128. 178 / 16 and 128. 178 / 15 are different. by longest prefix match, all traffic to 128. 178 / 16 ( and to 128. 179 / 16 ) will follow the bogus route to isp3, who may simply discard all packets – this is called subprefix hijack and will cause epfl to be unreachable from isp1 and its customers. β€’ if aggregation is performed by isp1, there are now 2 competing routes and either can be chosen, depending on the specific policy rules inside isp1 ( hot potato routing or not ) leading to partial loss of traffic 79 bgp security forged as paths, destination prefix, next - hop etc cause traffic to go to malicious isp - > used to deny service / spy / forge bgp security measures : β€’ routing registries : pti ( iana / icann, internet number authority ) manages address allocations / delegated to 5 regional internet registries, rirs ( for europe : ripe ) ; ripe maintains a public routing registry, database of address blocks + some policy information. cooperation of routing registries =
EPFL COM 407 Moodle
No question: Moodle
the internet routing registry ( irr ). ases can read routing registries and use them to verify the routes received from bgp peers not cryptographic, best effort. 80 origin validation : roa owner of an address block creates a ( cryptographically signed ) route origin authorization ( roa ) that contains as number and ip address block ; this validates origination - prevents bogus origination. more secure than irr. uses the rpki ( resource public key infrastructure ) rooted at iana / icann and deployed in rirs. example : switch receives block 2001 : 620 : : / 32 from ripe ( european authority ), obtains a certificate from ripe, and uses it to create and publish roa for this block. any as can verify the roa using the certificates of icann and ripe. try it : whois - h whois. bgpmon. net 128. 178. 0. 0 / 15 ( epfl ’ s ipv4 block ) whois - h whois. bgpmon. net 2001 : 620 : : / 32 ( switch ’ s ipv6 block ) 81 beyond roa : validation of path with bgpsec bgpsec authenticates the entire as - paths contained in a bgp update between e - bgp peers as - path attribute replaced by bgpsec _ path attribute that contains the as path + signatures of every segment of the path performed by every intermediate as deployment in progress.
EPFL COM 407 Moodle
No question: Moodle
scion ( https : / / scion - architecture. net, ethz, adrian perrig ) is an alternative to bgp ( and to ip ) that uses source routing and systematic encryption. 82 c. illustrations : the switch network www. switch. ch 83 roa signed and valid number of announced prefixes seen by hurricane electric : bgp. he. net / report / prefixes, sampled on 2022 oct 24 81 number of ass seen by hurricane electric : bgp. he. net / report / prefixes, sampled on 2022 oct 24 82 64 conclusion bgp integrates different ass interface bgp - igp is complex and has many subtleties security of bgp is an active area of research and development beyond bgp : scion ( https : / / scion - architecture. net, ethz, adrian perrig ) is an alternative to bgp ( and to ip ) that uses source routing and systematic encryption. aims to provide more security and flexibility in choice of routes. 1 congestion control in the internet part 1 : theory 2 contents 1. what is the problem ; congestion collapse 2. efficiency versus fairness 3. definitions of fairness 4. additive increase multiplicative decrease ( aimd ) 5. slow start no book ; check the pdf uploaded on moodle : β€œ rate adaptation, congestion control and fairness : a tutorial ” 1. congestion collapse jacobson, van. " congestion avoidance and control. " acm sigcom
EPFL COM 407 Moodle
No question: Moodle
##m computer communication review. vol. 18. no. 4. acm, 1988. example 1 : congestion due to greedy sources assume : two flows and. sources are greedy ( i. e. send as much as they want ) ; loss may happen loss is proportional to submitted traffic and links can be fully utilized s1 β†’d1 s2 β†’d2 s1 c1 = 100 kb / s s2 c2 = 1000 kb / s d1 d2 c3 = 110 kb / s c4 = 100 kb / s c5 = 10 kb / s losses what is the max throughput attained by flow? s1 β†’d1 a. 10 kb / s b. 50 kb / s. c. 100 kb / s. d. i don ’ t know solution answer a : ratio of traffic that survives at 1 : ratio of traffic that survives at 2 : 100 % ratio of traffic that survives at 3 : both flows attain 10 kb / s even if the sources have different access links and send at different rates! 110 / ( 100 + 1000 ) = 10 % 10 / 100 = 10 % s1 s2 d1 d2 x41 = 10 x52 = 10 c1 = 100 kb / s c2 = 1000 kb / s c3 = 110 kb / s c4 = 100 kb / s c5 = 10 kb / s take - home message 1 : greedy sources may be inefficient a better allocation is : s1 : 100 kb / s
EPFL COM 407 Moodle
No question: Moodle
s2 : 10 kb / s the problem was that s2 sent too much ( but it did not know ) s1 s2 d1 d2 x4, 1 = 10 x5, 2 = 10 c1 = 100 kb / s c2 = 1000 kb / s c3 = 110 kb / s c4 = 100 kb / s c5 = 10 kb / s example 2 : congestion collapse assume : each source sends traffic 2 hops away at rate e. g., source, at node, sends traffic to a destination at node all links have the same capacity loss is proportional to submitted traffic and links can be fully utilized let : β€’ = the survived rate of at the first link β€’ = the survived rate of at the second link = throughput much is ( i. e. the rate at which destination receive traffic )? how much throughput each source can attain? Ξ» i i i + 2 c Ξ» β€² Ξ» Ξ» β€² β€² Ξ» Ξ» β€² β€² i + 2 link ( i - 1 ) link i link ( i + 1 ) node i node i + 1 source i Ξ» β€² Ξ» β€² β€² Ξ» solution : attained throughput Ξ» β€² β€² observe that at each node, the submitted traffic to link equals : β€’ if there is no loss ; so β€’ if there is loss : traffic survival ratio at each node = due to loss proportionality : we solve ( 1 ) for, plug the solution into ( 2 ) and obtain a closed - form expression
EPFL COM 407 Moodle
No question: Moodle
for i i Ξ» + Ξ» β€² Ξ» < c 2 Ξ» β€² β€² = Ξ» Ξ» > c 2 + β€² β€² = + β€² ( 1 ) " = + β€² β€² ( 2 ) β€² " link ( i - 1 ) link i link ( i + 1 ) node i node i + 1 source i Ξ» β€² Ξ» Ξ» β€² β€² Ξ» Ξ» Ξ» β€² we obtain, for : > 2 " = 2 ( βˆ’1 + 1 + ) for large offered traffic load, the limit of throughput is 0 c / 2 = 10 Ξ» Ξ» β€² β€² so, as Ξ» β€” > + ∞, throughput β€” > 0 congestion collapse take - home message 2 : congestion collapse β€’ as the offered load increases, throughput decreases, may even go to 0 β€’ sources must limit their sending rates and adapt to network conditions ; otherwise inefficiency or congestion collapse may occur c / 2 = 10 Ξ» Ξ» β€² β€² congestion collapse 2. efficiency vs fairness a network should be organized so as to avoid inefficiency, but being maximally efficient may cause other problems example : what is the maximum total throughput in this network? total collapse 2 m surfers lose internet c = 10 mb / s c = 10 mb / s 9 flows 1 flow 1 flow a. 5 mb / s b. 10 mb / s c. 20
EPFL COM 407 Moodle
No question: Moodle
mb / s d. none of the above e. i don ’ t know go to web. speakup. info or download speakup app join room 46045 solution answer c total throughput maximize subject to over the max can be obtained by linear programming, or directly here by inspection : β€’ because, and β€’ is achieved with and therefore the max is 20 mb / s = + + = + + + ≀10, + ≀10 β‰₯0, β‰₯0 β‰₯0 20 + ≀10 9x2 ≀10 βˆ’x0 x0 β‰₯0 = 20 = 10 x2 = 10 / 9 c = 10 mb / s c = 10 mb / s 9 flows 1 flow 1 flow solution and we can also prove that this is the only maximizing allocation : find all subject to by ( 1 ) and ( 3 ) : compare to ( 2 ) : thus ( and ) β‰₯0 β‰₯0 β‰₯0 + ≀10 ( 1 ) + ≀10 ( 2 ) + + = 20 ( 3 ) β‰₯10 = 10 = 0 = 10, = 10 / 9 c = 10 mb / s c = 10 mb / s 9 flows 1 flow 1 flow so, the max is achieved only if β€” > rather unfair x0 = 0 pareto efficiency β€’ a feasible allocation of rates is
EPFL COM 407 Moodle
No question: Moodle
called pareto - efficient ( or pareto - optimal ), iff increasing the rate of a flow must be at the expense of decreasing the rate of some other flow i. e. is pareto - efficient iff : for any other feasible every flow has a bottleneck link = for every flow there exists a link, used by, which is saturated, i. e. its constraint is satisfied with equality β€’ conversely : an allocation is not pareto - efficient iff it can be improved unilaterally, i. e. there exists a feasible allocation, such that for some and for all β†’ β€², : β€² > : β€² < β†’ β€² β€² > β€² example is the allocation pareto - efficient? β€’ link 1 is bottleneck for flows 0 and 1 β€’ link 2 is bottleneck for flow 0 and all flows of type 2 flow has a bottleneck and cannot be increased unilaterally : the allocation is pareto - efficient. note : the throughput - maximizing allocation is always pareto - efficient. { x0 = 0, x1 = 10, x2 = 10 9 } = 0 = 10 for each x2 = 10 9 which allocations are pareto - efficient? a. b. c. d. a and b e. a and c f. b and c g. all h.
EPFL COM 407 Moodle
No question: Moodle
none i. i don ’ t know = 1, = 0. 5, = 8, = 1 = 1, = 1, = 8, = 1 = 1, = 1, = 2, = 7 2 gb / s 9 gb / s flow 1 flow 0 flow 2 10 gb / s flow 3 go to web. speakup. info or download speakup app join room 46045 solution answer f ( b and c ) allocation a : flow 1 does not have a bottleneck. its rate can be increased unilaterally. for example, we can increase to while leaving the other rates unchanged and still obtain a feasible allocation. allocation a is not pareto - efficient = 1, = 0. 5, = 8, = 1 β€² = 0. 6 2 gb / s 9 gb / s 10 gb / s = 1 = 0. 5 = 8 = 1 = 1 = 1 = 8 solution allocation b : link 1 is bottleneck for flows 0 and 1 link 2 is bottleneck for flows 0 and 2 link 3 is bottleneck for flows 0, 2 and 3 every flow has a bottleneck. none can be increased unilaterally. allocation b is pareto - efficient. = 1, = 1, = 8, = 1 2 gb / s 9 gb / s 10 gb / s = 1
EPFL COM 407 Moodle
No question: Moodle
= 1 = 8 = 1 = 1 = 1 = 8 solution allocation c : link 1 is bottleneck for sources 0 and 1 link 3 is bottleneck for sources 0, 2 and 3 every flow has a bottleneck. none can be increased unilaterally. allocation c is pareto - efficient. observation : link 2 is not saturated in this pareto - efficient allocation. = 1, = 1, = 2, = 7 2 gb / s 9 gb / s 10 gb / s = 1 = 1 = 2 = 7 = 1 = 1 = 2 recap β€’ maximizing total throughput is pareto efficient, but may be unfair - e. g. in figure : max efficiency means pareto efficiency, but also means β€œ shutting down flow 0 ” so : there pareto efficient allocations that are fair? is a good definition of fairness? 3. definition 1 : egalitarianism ( or neutrality ) : ” allocate as much as possible but same to all. ” a. b. c. d. all of them e. none of the above f. i don ’ t know = = = 0. 5 / = = = 1 / = = = 10 9 / in this example, what is a fair / egalitarian allocation? go to web. speakup. info
EPFL COM 407 Moodle
No question: Moodle
or download speakup app join room 46045 solution maximize subject to with the solution is mb / s answer b = = = 2 10 = 1 egalitarianism is not always pareto - efficient β€’ egalitarianism gives mb / s to all but, we could give more to without hurting anyone, allocation is not pareto - efficient β€’ a better allocation would be : { }, which is - pareto - efficient ( = every resource has a bottleneck ) - but also β€œ fair ” ( = it gives to every one at least as much as egalitarianism ) - in fact, this is a max - min fair allocation [ see next slide ] = 1 = 1, = 9, = 1 max - min fairness a feasible allocation is max - min fair iff for any other feasible allocation and i. e. for every flow increasing its rate must force the rate of some other, not richer flow to decrease β†’ β€², ( : β€² > : β€² < ), j note : the max - min fairness implies pareto - efficiency ( converse is not true ) which allocations are max - min fair? a. a b. b c. a and b d. none e. i don ’ t know a mb / s mb / s mb / s x0 = 0 x1 = 10 x2 = 10 9 b mb
EPFL COM 407 Moodle
No question: Moodle
/ s mb / s mb / s x0 = 1 x1 = 9 x2 = 1 go to web. speakup. info or download speakup app join room 46045 solution allocation a increase ( e. g. and decrease ( and ( ; this does not contradict fairness because and are larger than so, there exists one increase that does not contradict fairness a is not max - min fair allocation b if i increase i must decrease contradicts fairness if i increase i must decrease contradicts fairness if i increase i must decrease contradicts fairness any increase contradicts fairness b is max - min fair ←1 ) ←9 ) ←1 ) β‡’ β‡’ β‡’ a mb / s mb / s mb / s x0 = 0 x1 = 10 x2 = 10 9 b mb / s mb / s mb / s x0 = 1 x1 = 9 x2 = 1 max - min fairness : properties and computation given a set of constraints, i. e. a set of feasible allocations : a. if it exists, the max - min fair allocation is unique b. there does exist a max - min fair allocation, if the set of feasible allocations is convex ( which is the case in networks, as we have linear constraints ) c. the max - min fair allocation is pareto - efficient ( converse is not true ) for a convex set of feasible rates ( as
EPFL COM 407 Moodle
No question: Moodle
in our case ), the unique max min fair allocation is obtained by the water - filling algorithm : 1. mark all flows as non frozen 2. do 3. increase the rate of all non frozen flows to the largest possible common value 4. mark flows that use a saturated link as frozen 5. until all flows are frozen water - filling : example step 1 : β€’ maximize such that and all constraints are satisfied ; we find, hence ; β€’ link 2 is saturated, is used by flows 0 and 2 mark flows 0 and 2 as frozen step 2 : β€’ maximize such that, with and all constraints are satisfied ; we find, hence and β€’ link 1 is saturated, is used by sources 0 and 1 mark flow 1 as frozen ; all flows are frozen, stop. the max - min fair allocation is and = = = = 1 = = = 1 β‡’ = = 1, = 1 = 9 = = 1 = 9 β‡’ = = 1 = 9 what is the max - min fair allocation? a. b. c. d. e. none of the above f. i don ’ t know = 2 = 3, = 3 = 0 = 4, = 4 = 0 = 5, = 5 = 0 c c c c go to web. speakup. info
EPFL COM 407 Moodle
No question: Moodle
or download speakup app join room 46045 solution answer a the max - min fair allocation via water - filling gives the same rate to all flows but this seems β€œ not fair enough ” in terms of resource usage! actually, one could claim that should be penalized and get 5x less, because it uses 5x more resources ( answer d ). this is what led to the definition of proportional fairness … 2 x0 c c c c definition of proportional fairness a feasible allocation is proportionally fair iff and for any other feasible, it holds : i. e. : an allocation is proportionally fair, if for any other allocation, the total rate of change or relative change is non - positive, i. e. β€œ the other rates are relatively worse in total ” conversely : an allocation is not proportionally fair iff there exists s. t. :. two important points : - sum of all rates of changes matters, not only one - relative changes matter, not absolute > 0 β†’ β€² i x β€² βˆ’xi xi ≀0 i Ξ΄xi xi > 0 β†’ β€² i x β€² βˆ’xi xi > 0 which allocations are proportionally fair? a. a b. b c. a and b d. none e. i don ’ t know go to web. speakup. info or download speakup app join room 46045 solution answer d let for and. if is small enough (
EPFL COM 407 Moodle
No question: Moodle
i. e. ), the new allocation is feasible ( = within constraints ). the total rate of change is. so, we could change the allocation and obtain a positive total rate of change. a is not proportionally fair + = 1 … 4 0 < 2 2 + 4 2 > 0 let and ;. if is small enough ( i. e. ), the new allocation is feasible. the total rate of change is. so, we could change the allocation and obtain a positive total rate of change. b is not proportionally fair + + 0 < 9 1 + 9 + 9 1 = > 0 so, min - max fairness does not imply proportional fairness solution proportional fairness : properties and computation a. a proportionally fair allocation is pareto - efficient b. given a convex set of constraints for the rates ( as in our case ), the proportionally fair allocation exists and is unique c. it is obtained by maximizing over all feasible allocations intuitive explanation via gradient :. so, deviating from the maximum means going towards a non - positive gradient = > the total rate of change is non - positive = > the maximizing allocation is proportionally fair! ( ) ( ) = let us compute the proportionally fair allocation we have to solve the optimization problem : we can use convex optimization
EPFL COM 407 Moodle
No question: Moodle
techniques to solve this, but here we can also do a direct solution … = + + + + subject to + + + + c c c c we have to solve the optimization problem : observe : at the maximum point, we must have equality in all constraints otherwise we can increase and increase u ( i. e. find a better maximum ). therefore, for any choice of, we must have. = + + + + subject to + + + + ( i = 0 ) = = = = = c c c c let us compute the proportionally fair allocation so, we rewrite the optimization problem as : this is a 1d problem, can be solved by computing the derivative we find there is a maximum for i. e. the proportionally fair allocation is = + 4log ( ) subject to 0 < < = 1 4 = 4 = 5 = 5, = = = = 5 c c c c let us compute the proportionally fair allocation which one is the proportionally fair allocation? ( in mb / s ) ( only one answer ) a. b. c. d.
EPFL COM 407 Moodle
No question: Moodle
e. i don ’ t know = 1, = 9, = 1 = 0. 909, = 9, = 1. 010 = 1. 009, = 8. 991, = 0. 999 = 0. 909, = 9. 091, = 1. 010 go to web. speakup. info or download speakup app join room 46045 solution answer d. why? β€’ we saw earlier that a is not proportionally fair β€’ b is not pareto - efficient ( you can increase only ) β€” therefore is also not proportionally fair β€’ c goes in the wrong direction ( gives more to 0 than to 2 ) and is probably not proportionally fair β€’ d is probably the correct answer x1 solution we can compute the proportionally fair allocation with the same trick as before ; and obtain with that maximizes mb / s this is allocation d = = 10 = 10 9 + log ( 10 ) + 9log10 9 = 10 11 utility fairness one can interpret proportional fairness as the allocation that maximizes a global utility with. if we take some other utility function, we have what is called a utility fairness. it can be shown that max - min fairness is the limit of utility fairness when the utility function converges to a step function. but max - min fairness cannot be expressed exactly as a utility fairness ( only at the limit
EPFL COM 407 Moodle
No question: Moodle
). ( ) ( ) = : proportional fairness ( ) = : large max min fairness ( ) = 1 βˆ’1 β‡’ β‰ˆ rate utility recap sources should adapt their rate to the state of the network in order to avoid inefficiencies and congestion collapse. this is called β€œ congestion control ”. such control mechanism should target a form of fairness that is pareto - efficient e. g. max - min fairness or proportional fairness. 4. towards a practical implementation of congestion control how can congestion control be implemented? explicit / rate - based : tell every host how fast it can send mpls networks ( smart grid ) cellular networks hop by hop = backpressure : stop / go signals sent upstream gigabit lan switches fair queuing per flow : one queue per flow / per user, served round robin cellular networks, industrial networks, in - vehicle networks end - to - end : hosts β€œ taste the water ” and increase or decrease their sending rate using a host congestion control algorithm the solution in the internet additive increase multiplicative decrease ( aimd ) β€’ first congestion control algorithm deployed in the internet and before that, in decnet ( the β€œ decbit ” ) β€’ still widely deployed today august 1987 raj jain raj jain, k. k. ramakrishnan, and dah - ming chiu. congestion avoidance in computer networks with a connectionless network layer. technical report dec - tr - 506,
EPFL COM 407 Moodle
No question: Moodle
digital equipment corporation, august 1987. a simple network model network sends a one - bit feedback : if β€” > positive feedback if β€” > negative feedback sources reduce rate if, increase otherwise : what form of increase / decrease laws should one pick? ( ) = 0 ( ) ( ) = 1 ( ) > ( + 1 ) ( ) = 1 capacity rate ( ) feedback ( ) linear laws we consider linear laws if then if then we want to decrease when, so and and at least one inequality must be strict we want to increase when, so and and at least one inequality must be strict ( ) = 1 xi ( t + 1 ) = u1 β‹…xi ( t ) + v1 ( ) = 0 xi ( t + 1 ) = u0 β‹…xi ( t ) + v0 ( ) = 1 ≀1 ≀0 ( ) = 0 β‰₯1 β‰₯0 multiplicative decrease factor additive decrease term multiplicative increase factor additive increase term example ( multiplicative decrease ) ( mb / s ) ( additive increase ) = 0. 5, = 0 = 1, = 1 so fairness seems to be achieved using this idea, but after some time and oscillations! analysis of linear control schemes we want to achieve efficiency and fairness we could target either max - min fair
EPFL COM 407 Moodle
No question: Moodle
or proportionally fair allocations here ( in the example with 1 link ) they are the same we will now analyze the impact of each of the four coefficients and.,, zoom on 2 sources using a single link = + ( ) = 0 ( ) = 0 ( ) = 1 target rate of source 1 rate of source 2 zoom on 2 sources ; say what is true a. 1 = additive increase, 2 = multiplicative increase b. 1 = multiplicative increase 2 = additive increase, c. none of the above d. i don ’ t know = 1 2 go to web. speakup. info or download speakup app join room 46045 solution 1 = additive increase, 2 = multiplicative increase answer a = + (, ) 1 2 1. additive decrease worsens fairness ( goes away from ) and should be avoided decrease should be mutiplicative 2. additive increase is the only move that increases fairness and should be therefore be included increase should be additive = β‡’ β‡’ + (, ) additive increase multiplicative increase additive decrease multiplicative decrease more generally … among the linear controls, only additive increase – multiplicative decrease ( aimd ) tends to bring the allocation towards fairness and efficiency. this is what was implemented in the internet after the first congestion collapses.
EPFL COM 407 Moodle
No question: Moodle
in a more complex network setting, what type of fairness does aimd achieve? a. max - min b. proportional c. none of the above d. i don ’ t know fairness of aimd answer c aimd with : additive increase, multiplicative decrease, and one update per time unit implements utility fairness, with utility of flow given by, where = rate. the fairness of aimd is between max - min and proportional fairness, closer to proportional fairness. [ see β€œ rate adaptation, congestion control and fairness : a tutorial ” ] + Γ— ( 1 ) ( ) = log + xi rescaled utility functions ; aimd is for 1mss per rtt = 100 ms maxmin approx. is = 0. 5 = ( ) = 1 maxmin β‰ˆ proportional fairness aimd 5. slow start β€’ aimd convergence can be accelerated when initial conditions are very different β€’ slow start is an additional method, added to aimd β€’ used at beginning of connection and when losses are detected by timeout source 1 source 3 slow start β€’ for a short period of time increase the rate multiplicatively ( by, e. g. ) until a target rate is reached or negative feedback is received β€’ if negative feedback is received, apply multiplicative decrease ( by, e. g. ) to target rate and restart. β€’ exit slow start when target rate is reached = 2 = 0
EPFL COM 407 Moodle
No question: Moodle
. 25 target rate time rate of this source source 1 with slow start time rate ( all 3 sources ) source 3 source 3 actual rate target rate end of slow start end of slow start 3 sources u1 = 0. 5, v1 = 0, u0 = 0, v0 = 0. 01 ( unit : mb / s ) 3rd source starts with rate v0 source 1 source 1 with slow start without slow start time time rate ( all 3 sources ) source 3 source 3 conclusion congestion control is necessary to avoid inefficiencies and collapses a congestion control scheme aims at allocating rates according to some form of fairness in the internet, we use end - to - end congestion control with aimd slow start and other refinements – see part 2 : congestion control β€” implementation β‰ˆ congestion control in the internet part 2 : implementation contents 6. tcp reno 7. tcp cubic 8. ecn and aqm, dc - tcp 9. new directions 6. congestion control in the internet was initially only in tcp why? easy to add end - to - end congestion control to tcp, as tcp already maintains an end - to - end connection how? in addition to what we discussed about tcp β€’ a tcp source adjusts its β€œ rate ” to the network - congestion status by : - adjusting the sliding window - using techniques like : additive increase / multiplicative decrease ( aimd ), and slow start - leveraging implicit or explicit feedback
EPFL COM 407 Moodle
No question: Moodle
from network ( according to the decbit principle ) this avoids congestion collapses and ensures some sort of fairness many congestion control algorithms popular ones are : tcp reno ( the most mature and well explored, widely used until recently ) tcp cubic ( widespread today in linux servers ) data center tcp ( microsoft and linux servers in data centers ) tcp - bbr ( google, whatsapp, etc ) new ack tcp reno uses aimd, slow start, implicit feedback fast retransmit ( e. g. 3 dupl. acks ) fast retransmit ( e. g. 3 dupl. acks ) rate β‰₯ threshold new ack new ack new ack β€’ negative feedback = loss detected - multiplicative decrease β€’ positive feedback = new ( non - duplicate ) ack received - multiplicative or additive increase depending on the phase β€’ 3 phases or states : - slow start = ( approx. ) the same as theoretical slow start with multiplicative increase factor per rtt - congestion avoidance = additive increase with term mss per rtt - fast recovery [ see next ] β€’ transitions between states : - initial state is slow start - slow start congestion avoidance via a threshold - any state slow start if loss is detected via timeout - any state fast recovery if loss is detected via fast retransmit w0 β‰ˆ2 v0 β‰ˆ + 1 β†’ β†’ β†’ timeout timeout timeout what exactly tcp reno does to adjust
EPFL COM 407 Moodle
No question: Moodle
its sending rate? β€’ tcp reno adjusts the sliding window size β€’ based on the approximation : w = min ( cwnd, offeredwindow ) offeredwindow = window advertized by other end in tcp ’ s window field cwnd = controlled by tcp congestion control rate β‰ˆ w rtt slow start by adjusting cwnd … … multiplicative increase : ( slow start ) β€’ for the initial slow start, the target window ssthresh ( for the target rate ) is set to 64kb β€’ at each new ( non - duplicate ) ack received during slow start : cwnd = cwnd + mss ( in bytes ) - if counted in packets, this would be : cwnd = cwnd + 1 ( in packets ) - i. e. a multiplicative increase with factor per rtt, approximately β€’ if cwnd β‰₯ ssthresh, then go to congestion avoidance w0 = 2 3 2 5 cwnd = 1 seg 4 6 7 8 this leads to an exponential increase of cwnd additive increase : ( congestion avoidance ) - for every new ( non - duplicate ) ack received : cwnd = cwnd + mss mss / cwnd - if counted in packets, this would be : cwnd + = 1 / cwnd, slightly less than additive increase ( < 1 mss / rtt ) - other implementations also exist : - e. g. wait until cwnd bytes are ack ’ ed and then
EPFL COM 407 Moodle
No question: Moodle
increment cwnd by 1 mss multiplicative decrease : ( after detecting loss β€” negative feedback ) - ssthresh = 0. 5 cwnd - cwnd = 1mss ( if timeout ) or something else ( if fast retransmit ) [ see fast recovery ] Γ— Γ— cwnd = 1 mss 2. 5 2. 9 2 3. 83 aimd by adjusting cwnd … example of congestion - window evolution without fast recovery recall : β€’ there is a slow start phase initially and after every packet loss detected by timeout β€’ target window of slow start is called ssthresh ( Β« slow start threshold Β» ) loss loss window size additive increase = β€œ congestion avoidance ” multiplicative decrease = reduction of target window by 1 2 slow start cwnd initial ssthresh loss loss fast recovery why? β€’ loss detected by fast retransmit is not severe β€” we just want to apply multiplicative decrease with β€’ but halving the cwnd is not a good approach ; - formula β€œ ” is not true when there is a single isolated packet loss ; - sliding window operation may even stop sending, if the first packet of a batch is lost what? β€’ target window is halved : ssthresh = 0. 5 cwnd β€’ but congestion window is allowed to increase beyond the target window until the loss is repaired β€” it is increased by the value of duplicate acks artificial increase to keep sending segments u1 = 0. 5 rate β‰ˆ
EPFL COM 407 Moodle
No question: Moodle
w rtt Γ— when loss is detected by 3 duplicate acks at any phase : ssthresh = 0. 5 Γ— current - cwnd ssthresh = max ( ssthresh, 2 Γ— mss ) cwnd = ssthresh + 3 Γ— mss cwnd = min ( cwnd, 64k ) goto fast recovery when in fast recovery, for each duplicate ack received : cwnd = cwnd + mss ( exp. increase ) cwnd = min ( cwnd, 64k ) if loss is repaired cwnd = ssthresh goto congestion avoidance else ( timeout ) goto slow start algorithm : fast recovery example ssthresh = cwnd = 800 seq = 201 : 300 seq = 301 : 350 seq = 351 : 400 seq = 401 : 500 ssthresh = cwnd = 813 seq = 501 : 600 seq = 601 : 700 seq = 701 : 800 ssthresh = 407, cwnd = 707 seq = 201 : 300 seq = 801 : 900 ssthresh = 407, cwnd = 807 ssthresh = 407, cwnd = 907 seq = 901 : 1000 ssthresh = 407, cwnd = 1007 ssthresh = 407, cwnd = 407 ack = 201, win = 1 ’ 000 ack = 201, win = 1 ’ 000 ack = 201, win = 1 ’ 000
EPFL COM 407 Moodle
No question: Moodle
ack = 201, win = 1 ’ 000 ack = 201, win = 1 ’ 000 ack = 901, win = 1 ’ 000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ack = 201, win = 1 ’ 000 ack = 201, win = 1 ’ 000 tcpmaxdupacks = 3 during congestion avoidance : cwnd ←cwnd + mss2 cwnd mss = 100 at time 1, the sender is in β€œ congestion avoidance ” mode. the congestion window increases with every received non - duplicate ack ( as at time 6 ). the target window ( ssthresh ) is equal to the congestion window. the second packet is lost. at time 12, its loss is detected by fast retransmit, i. e. reception of 3 duplicate acks. the sender goes into β€œ fast recovery ” mode. the target window is set to half the value of the congestion window ; the congestion window is set to the target window plus 3 packets ( one for each duplicate ack received ). at time 13 the source retransmits the lost packet. at time 14 it transmits a fresh packet. this is possible because the window is large enough. the window size, which is the minimum of the congestion window and the advertised window, is equal to 707. since the last acked byte is 201, it is possible to send up to
EPFL COM 407 Moodle
No question: Moodle
907. at times 15, 16 and 18, the congestion window is increased by 1 mss, i. e. 100 bytes, by application of the fast recovery algorithm. at time 15, this allows to send one fresh packet, which occurs at time 17. at time 19 the lost packet is acked, the source exits the fast recovery mode and enters congestion avoidance. the congestion window is set to the target window. how many new segments of size 100 bytes can the source send at time 20? a. 1 b. 2 c. 3 d. 4 e. f. 0 g. i don ’ t know β‰₯ 5 ssthresh = cwnd = 800 seq = 201 : 300 seq = 301 : 350 seq = 351 : 400 seq = 401 : 500 ssthresh = cwnd = 813 seq = 501 : 600 seq = 601 : 700 seq = 701 : 800 ssthresh = 407, cwnd = 707 seq = 201 : 300 seq = 801 : 900 ssthresh = 407, cwnd = 807 ssthresh = 407, cwnd = 907 seq = 901 : 1000 ssthresh = 407, cwnd = 1007 ssthresh = 407, cwnd = 407 ack = 201, win = 1 ’ 000 ack = 201, win = 1 ’ 000 ack = 201, win = 1 ’ 000 ack = 201, win =
EPFL COM 407 Moodle
No question: Moodle
1 ’ 000 ack = 201, win = 1 ’ 000 ack = 901, win = 1 ’ 000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ack = 201, win = 1 ’ 000 ack = 201, win = 1 ’ 000 go to web. speakup. info or download speakup app join room 46045 solution answer c the congestion window is 407, the advertised window is 1000, and the last ack received is 901. the source can send bytes 901 to 1308, the segment 901 : 1001 was already sent, i. e. the source can send 3 new segments of 100 bytes each. tcp reno β€” recap figure from our textbook : " computer networking : a top - down approach " by j. kurose and k. ross assume a tcp flow uses wifi with high loss ratio. assume some packets are still lost in spite of wifi retransmissions. when a packet is lost on the wifi link … a. the tcp source knows it is a loss due to channel errors and not congestion, therefore does not reduce the window b. the tcp source thinks it is a congestion loss and reduces its window c. it depends if the mac layer uses retransmissions d. i don ’ t know go to web. speakup. info or download speakup app join room 46045 solution answer b : the tc
EPFL COM 407 Moodle
No question: Moodle
##p source does not know the cause of a loss. side - effect : a flow that experiences accidental losses on its wireless access link may never manage to get its fair share on another bottleneck link down its path, because it will be constantly reducing its sending rate β€œ thinking that it experiences congestion ”. solutions : explicit congestion notification from the network [ see later ] dynamic ( more sophisticated ) coding at the physical layer to avoid errors on the wireless link fairness of tcp reno for long lived flows, the rates obtained with tcp reno are as if they were distributed according to utility fairness, with utility of flow given by with = rate ( in msss ) =, = rtt ( see β€œ rate adaptation, congestion control and fairness : a tutorial " ) for flows that have same rtt, the fairness of tcp is between max - min and proportional fairness, closer to proportional fairness : ui ( xi ) = 2 Ο„i arctan xiΟ„i 2 xi w / Ο„i Ο„i rescaled utility functions ; rtt = 100 ms maxmin approx. is ( ) = 1 maxmin β‰ˆ proportional fairness aimd reno tcp reno and rtt tcp reno tends to distribute rate so as to maximize utility of source given by the utility depends on the roundtrip time ; ui ( xi ) = 2 Ο„i arctan xiΟ„i 2 Ο„i the utility is a decreasing function of rtt what does this imply? { and send to
EPFL COM 407 Moodle
No question: Moodle
destination using one tcp connection each, rtts are 60ms and 140ms. bottleneck is link Β« router - destination Β». who gets more? a. gets a higher throughput b. gets a higher throughput c. both get the same d. i don ’ t know router destination 10 mb / s, 20 ms 1 mb / s 10 ms 10 mb / s, 60 ms s1 s2 go to web. speakup. info or download speakup app join room 46045 solution for long lived flows, the rates obtained with tcp are as if they were distributed according to utility fairness, with utility of flow given by has a smaller rtt than the utility is less when rtt is large ; therefore, tcp tries less hard to give a high rate to sources with large rtt. so, gets less. answer a. ( ) = 2 arctan √2 the rtt bias of tcp reno with tcp reno, two competing flows with different rtts are not treated equally - flow with large rtt obtains less - a ( practical ) explanation : additive increase is one packet per rtt ( instead of one packet per constant time interval ) ; so a flow with a smaller rtt can β€œ open ” the window faster. a flow that uses many hops obtains less rate because of two combined factors : 1. if this flow goes over many congested links, it
EPFL COM 407 Moodle
No question: Moodle
uses more resources. the mechanic of tcp reno that is close to proportional fairness leads to this source having less rate, which is desirable in view of the theory of fairness. 2. if this flow has simply a larger rtt, then things are different. the mechanics of additive increase leads to this source having less rate, which is an undesired bias in the design of tcp reno. tcp reno loss - throughput formula consider a large tcp flow size ( many bytes to transmit ). assume we observe that, in average, a fraction q of packets is lost ( or marked with ecn ). the throughput should be close to. formula assumes : transmission time is negligible compared to rtt, losses are rare and occur periodically, time spent in slow start and fast recovery is negligible. [ see β€œ rate adaptation, congestion control and fairness : a tutorial ” ] = 1. 22 guess the ratio between the throughputs ΞΈ1 and ΞΈ2 of s1 and s2 ( assume : same mss, same loss prob, and negligible transmission / processing delays for both flows ) a. b. c. d. e. none of the above f. i don ’ t know = 3 7 = = 7 3 = 10 3 router destination 10 mb / s, 20 ms 1 mb / s 10 ms 10 mb / s, 60 ms s1 s2
EPFL COM 407 Moodle
No question: Moodle
= 1. 22 go to web. speakup. info or download speakup app join room 46045 solution if processing time is negligible and router drops packets in the same proportion for all flows, then throughput is proportional to 1 / rtt, thus i. e. answer c. 1 = 1 = 7 3 time ack numbers s1 s2 tcp reno β€” shortcomings β€’ rtt bias – not nice for users far away from the source β€’ periodic losses must occur, not nice for applications ( e. g video streaming ). β€’ tcp controls the window, not the rate. large bursts typically occur when packets are released by host following e. g. a window increase – not nice for queues in the internet, makes non smooth behavior. β€’ self inflicted delay : if network buffers ( in routers and switches ) are large, tcp first fills buffers before adapting the rate. the rtt is increased unnecessarily. buffers are constantly full, which reduces their usefulness ( bufferbloat syndrome ) and increases delay for all users. interactive, short flows experience large latency when buffers are large and full. congestion control in udp applications udp applications that can adapt their rate have to implement congestion control. one method is to use the congestion control module of tcp : e. g. quic, which is over udp, uses cubic ’ s congestion
EPFL COM 407 Moodle
No question: Moodle
control ( in its original version ) or reno ’ s congestion control ( in the standard version ). another method ( e. g. for videoconferencing application ) is to control the rate by computing the rate that tcp reno would obtain. e. g. : tfrc ( tcp - friendly rate control ) protocol application adapts the sending rate ( by modifying the coding rate for audio and video ) feedback is received in form of count of lost packets, used by source to estimate drop probability source sets rate to ( tcp reno ’ s loss throughput formula ) = 1. 22 7. tcp cubic : improving performance in long fat networks ( lfns ) β€’ in an lfn, additive increase can be too slow ( slide from presentation : " congestion control on high - speed networks ”, injong rhee, lisong xu, slide 7 ) the figure assumes : congestion avoidance implementing a strict additive increase of 1 mss per rtt, losses are detected by fast retransmit, but the β€œ fast recovery ” phase is not used, mss = 1250b, rtt = 100 msec. packet loss time ( rtt ) congestion avoidance packet loss packet loss cwnd slow start packet loss 100, 000 10gbps 50, 000 5gbps 1. 4 hours 1. 4 hours 1. 4 hours tcp slow increase cwnd = cwnd + 1 fast decrease cwnd = cwnd
EPFL COM 407 Moodle
No question: Moodle
* 0. 5 tcp cubic modifies reno why? increase tcp rate faster on lfns how? cubic keeps the same slow start, fast recovery phases as reno, but : β€’ during congestion avoidance, the increase is not additive but cubic β€’ multiplicative decrease with factor 0. 7 ( instead of 0. 5 ) say congestion avoidance is entered at time and let value of cwnd, when loss is detected. let with such that. then the window increases like until a loss occurs again. units are : data = 1mss ; time = 1s Γ— Γ— = 0 = ( ) = + 0. 4 ( ) 3 ( 0 ) = 0. 7 ( ) additive increase ( reno ) with rtt = 0. 1 s β‰ˆ cubic ( ) t additive increase ( reno ) with rtt = 0. 01 s β‰ˆ cubic how does this compare to reno? cubic increases window in concave way until reaches, then increases in a convex way is independent from rtt, but - it opens faster than reno when rtt is large ( long networks ), - but may be slower when rtt is small ( non - lfns ) ( ) additive increase ( reno ) with rtt = 1 s β‰ˆ cubic w ( t ) t cubic ’ s window increase cubic is always at least as fast as a hypothetical reno ( i. e. aimd ) with additive increase
EPFL COM 407 Moodle
No question: Moodle
term mss per rtt ( instead of 1 ) and multiplicative decrease. formally :, where and is computed s. t. this hypothetical reno has the same loss - throughput formula as standard reno : cubic ’ s throughput β‰₯ reno ’ s throughput with equality when rtt or bandwidth - delay product is small ( i. e. when in non - lfns ) = 0. 7 wcubic ( t ) = max { w ( t ), waimd ( t ) } ( ) = ( 0 ) + = 3 1 1 + = 0. 529 cubic ’ s loss throughput formula given the same assumptions as for tcp reno : in mss per second. so : β€’ cubic ’ s formula is same as reno for small rtts and small bw - delay products β€’ but a tcp cubic connection gets more throughput than tcp reno when bit - rate and rtt are large other details : computation of uses a more complex mechanism called β€œ fast convergence ” - see latest ietf cubic rfc / internet draft or http : / / elixir. free - electrons. com / linux / latest / source / net / ipv4 / tcp _ cubic. c ( 1. 054.. 75, 1. 22 ) q mb / s reno rtt = 12. 5 ms rtt = 800 ms cubic @ rtt
EPFL COM 407 Moodle
No question: Moodle
= 100 ms 8. tackling the bufferbloat syndrome with ecn and aqm using loss as congestion feedback has a major drawback = self - inflicted delay : increased latencies and buffers are not well utilized due to bufferbloat syndrome. from : n. cardwell, y. cheng, c. s. gunn, s. h. yeganeh, and v. jacobson, β€œ bbr : congestion - based congestion control, ” acm queue, vol. 14, no. 5, pp. 50 : 20 – 50 : 53, oct. 2016. round - trip time window size = amount of in - flight data delivery rate a b rttmin bottleneck link capacity optimal operating point loss based congestion control operating point from [ hock et al, 2017 ] mario hock, roland bless, martina zitterbart, β€œ experimental evaluation of bbr congestion control ”, icnp 2017 : the previous figure illustrates that if the amount of inflight data ( i. e. the window size ) is just large enough to fill the available bottleneck link capacity, the bottleneck link is fully utilized and the queuing delay is zero or close to zero. this is the optimal operating point ( a ), because the bottleneck link is already fully utilized at this point. if the amount of inflight data is increased any further, the bottleneck buffer gets filled with the excess data. the delivery rate, however, does not increase anymore. the
EPFL COM 407 Moodle
No question: Moodle
data is not delivered any faster since the bottleneck does not serve packets any faster and the throughput stays the same for the sender : the amount of inflight data is larger, but the round - trip time increases by the corresponding amount. excess data in the buffer is useless for throughput gain and a queuing delay is caused that rises with an increasing amount of inflight data. loss - based congestion controls shift the point of operation to ( b ) which implies an unnecessary high end - to - end delay, leading to β€œ bufferbloat ” in case the buffer sizes are large. ecn - explicit congestion notification … … aims at avoiding bufferbloat what? network signals congestion without dropping packets ( similarly to decbit ) how? β€’ ip router experiencing congestion marks packet instead of dropping β€’ tcp destination echoes back the mark to the source β€’ tcp source interprets an echoed marked packet as if there was a loss detected by fast retransmit after 6 : source applies multiplicative decrease to cwnd, as if there was a loss detected by fast retransmit example steps in the previous slide : 1. s sends a packet using tcp 2. packet is received at congested router buffer ; router marks the congestion experienced ( ce ) bit in ip header 3. receiver sees ce in received packet and set the ecn echo ( ece ) flag in the tcp header of packets sent in the reverse direction 4. packets with ece are forward
EPFL COM 407 Moodle
No question: Moodle
##ed towards the source 5. packets with ece are forwarded towards the source 6. packets with ece are received by source. 7. source applies multiplicative decrease of the congestion window. source sets the congestion window reduced ( cwr ) flag in tcp header. the receiver continues to set the ece flag until it receives a packet with cwr set. multiplicative decrease is applied only once per window of data ( typically, multiple packets are received with ece set inside one window of data ). assume tcp with ecn is used and there is no packet loss. put correct labels … a. 1 = ca, 2 = ss b. 1 = ss, 2 = md c. 1 = ca, 2 = md d. i don ’ t know ca : congestion avoidance ss : slow start = multiplicative increase md : multiplicative decrease ece received ece received window size 1 1 2 go to web. speakup. info or download speakup app join room 46045 solution answer c ece received ece received window size congestion avoidance multiplicative decrease = reduction of target window by 1 2 recall : slow start ’ s multiplicative increase results in an exponential growth of the cwnd. so, no slow start phase is shown in this figure. ecn flags in ip and tcp headers 2 bits in ip header, 4 possible codewords : 00 = non ecn capable ( non ect ) 01 or 10 =
EPFL COM 407 Moodle
No question: Moodle
ecn capable ect ( 0 ) and ect ( 1 ) historically used at random ; today used to differentiate congestion control ( tcp cubic vs dctcp ) 11 = used by routers to signal that congestion is experienced ( ce ) if congested, router marks ect ( 0 ) or ect ( 1 ) packets ; but discards non ect packets 2 bits in tcp header but as separate flags : β€’ ece ( echo ) is set by r to inform s about congestion. β€’ cwr ( congestion window reduced ) set by s to inform r that ece was received and r. β€’ when receiving ece, s reduces window only once per rtt and sets the cwr flag in tcp headers. r sets ece flag in all tcp headers until cwr is received or if a new ce packet is received. ecn requires active queue management why? decide when to mark a packet with ecn, and more generally, avoid buffer bloat syndrome how? e. g. with a red ( random early detection ) queue : β€’ queue estimates its average queue length avg ← Ξ± Γ— measured + ( 1 - Ξ± ) Γ— avg β€’ incoming packet is marked with probability given by red curve ( see figure ) a uniformization procedure is also applied to prevent bursts of marking events see the difference from passive queue management = drop a packet only when queue is full = β€œ tail drop ” avg ( queue length ) th - min
EPFL COM 407 Moodle
No question: Moodle
th - max max - p 1 q ( marking prob ) but … active queue management does not require ecn aqm can also be applied even if ecn is not supported e. g. with red, a packet is dropped with probability computed by the red curve - packet may be discarded even if there is some space available! expected benefits in this case : - mitigate bufferbloat – reduce latency - avoid irregular drop patterns, as the drop probability affects all flows in the same way in the context of packet dropping ( instead of ecn ), red can be replaced by the more recent variant called codel ( rfc 8289 ). in a network where all flows use tcp with ecn and all routers support ecn, we expect that … a. there is no packet loss b. there is significantly less packet loss due to congestion in both switches and routers c. there is significantly less packet loss due to congestion in routers d. none of the above e. i don ’ t know go to web. speakup. info or download speakup app join room 46045 solution answer c we expect that routers ( almost ) do not drop packets due to congestion if all tcp sources use ecn however there might be congestion losses in switches ( especially the ones in large networks or internet exchange points β€” ixps ), and there might be non - congestion losses ( transmission errors ) data centers and congestion control what is a data center? a
EPFL COM 407 Moodle
No question: Moodle
room with lots of racks of pcs and switches where many distributed apps are running : e. g. youtube, cff. ch, switchdrive, etc what is special about data centers? β€’ most traffic is tcp β€’ very small latencies ( 10 - 100 s ) β€’ lots of bandwidth β€’ various traffic patterns coexist : - internal traffic ( distributed computing ) and - external traffic ( user requests and their responses ) - many short flows with low latency requirements ( user queries, mapreduce communication ) - some jumbo flows with huge volume ( backup, synchronizations ) may use an entire link given what you have learnt so far, what would you choose for tcp flows inside a data center? a. tcp reno, no ecn no red b. tcp reno and ecn c. tcp cubic, no ecn no red d. tcp cubic and ecn e. i don ’ t know go to web. speakup. info or download speakup app join room 46045 solution answer d ( also b could work ) β€’ cubic has better performance than reno when bandwidth - delay product is large, which may occur in data centers. also cubic performs at least as good as reno in any case. β€’ without ecn there will be bufferbloat, which means high latency for short flows standard operation of ecn ( e. g. with reno or cubic ) still has drawbacks for jumbo flows in data center settings
EPFL COM 407 Moodle
No question: Moodle
: multiplicative decrease by 50 % or 30 % is still abrupt throughput inefficiency β‡’ data center tcp why? improve performance for jumbo flows when ecn is used how? avoid brutal multiplicative decrease of 50 % ( of reno ) or 30 % ( of cubic ) instead, tcp source estimates prob of congestion from ecn echoes β€’ ecn echo is modified so that : the proportion of ce marked acks the probability of congestion β€’ multiplicative decrease is p β‰ˆ p Γ— = ( 1 2 ) in a data center : two large tcp flows compete for a bottleneck link ; one uses dctcp, the other uses cubic / ecn. both have same rtt. a. both get roughly the same throughput b. dctcp gets much more throughput c. cubic gets much more throughput d. i don ’ t know go to web. speakup. info or download speakup app join room 46045 solution answer b. if latency is very small, cubic with ecn has same throughput performance as reno with ecn, i. e. same as aimd with multiplicative decrease = and window increase of 1 packet per rtt during congestion avoidance. dctcp is similar, in particular has same window increase, but with multiplicative decrease = so the multiplicative decrease is always less. dctcp decreases less and increases the same, therefore it is more aggressive. in other
EPFL COM 407 Moodle
No question: Moodle
words, dctcp competes unfairly with other tcps ; this is why it cannot be deployed outside data centers ( or other controlled environments ). inside data centers, care must be given to separate the dctcp flows ( i. e. the internal flows ) from other flows. this can be done with class - based queuing [ see next ]. Γ— 0. 5 Γ— ( 1 2 ) 9. beyond loss / ecn based congestion control tcp - bbr per class queuing evolution of buffer drain time in the internet buffer drain time = buffer capacity / link rate to keep buffer drain time constant, the product ( memory speed memory size ) should scale faster than link rate, which is technologically not feasible. β€’ access network ( 1 gb / s ) : buffer drain time is 10s of seconds = buffer is β€œ large ” w. r. t. rate bufferbloat unless ecn is used but β€’ in internet core links ( 100 gb / s, 1 tb / s ) : buffer drain time decreases, is now fraction of ms, much less than rtt = buffer is β€œ small ” impossible to react correctly within round trip time feedback control may be inadequate Γ— β‡’ β‡’ β‡’ tcp - bbr bottleneck bandwidth and rtt tcp - bbr published by google in 2016 [ caldwell et al 2016 ] what? avoid per packet feedback, target maximum throughput with minimal delay how? bbr - tcp source : 1. estimates the bottleneck
EPFL COM 407 Moodle
No question: Moodle
bandwidth and the min rtt separately 2. controls directly the rate ( not the window ) using pacing ( = implementing a packet spacer ) that tries to keep amount of inflight data close to bottleneck bandwidth minrtt ( optimal operating point ) Γ— n. cardwell, y. cheng, c. s. gunn, s. h. yeganeh, and v. jacobson, β€œ bbr : congestion - based congestion control, ” acm queue, vol. 14, no. 5, pp. 50 : 20 – 50 : 53, oct. 2016 bbrv1 operation β€” simplified β€’ source views network as a single link ( the bottleneck link ) β€’ estimates min rtt by taking the min over the last 10 sec = rtprop β€’ estimates bottleneck rate ( bandwidth ) ; = max of delivery rate over last 10 rtts ; delivery rate = amount of acked data per β€’ sends data at rate where is the pacing gain ; i. e., c ( t ) is 1. 25 during one rtprop, then 0. 75 during one rtprop, then 1 during 6 rtprops ( β€œ probe bandwidth ” followed by β€œ drain excess ” followed by steady state ) β€’ if no new rtprop value for 10 seconds, the source enters probe rtt state : sends only 4 packets to drain any possible queue and get a real estimation of the rtprop β€’ for safety, max data in flight is limited to and by the
EPFL COM 407 Moodle
No question: Moodle
offered window β€’ there is also a startup phase ( similar to cubic and reno ) with exponential increase of rate β€’ no reaction to losses or ecn ( ) ( ) = 1. 25 ; 0. 75, ; 1 ; 1 ; 1 ; 1 ; 1 ; 1 2 Γ— figure from : ware, r., mukerjee, m. k., seshan, s. and sherry, j., 2019, october. modeling bbr's interactions with loss - based congestion control. in proceedings of the internet measurement conference ( pp. 137 - 143 ). … bbrv1 in more detail 1 ) overview : the main objective of bbr is to ensure that the bottleneck remains saturated but not congested, resulting in maximum throughput with minimal delay. therefore, bbr estimates bandwidth as maximum observed delivery rate btlbw and propagation delay rtprop as minimum observed rtt over certain intervals. both values cannot be measured simultaneously, as probing for more bandwidth increases the delay through the creation of a queue at the bottleneck and vice - versa. consequently, they are measured separately. to control the amount of data sent, bbr uses pacing gain. this parameter, most of the time set to one, is multiplied with btlbw to represent the actual sending rate. 2 ) phases : the bbr algorithm has four different phases : startup, drain, probe bandwidth, and probe rtt. the first phase adapts
EPFL COM 407 Moodle
No question: Moodle
the exponential startup behavior from cubic by doubling the sending rate with each round - trip. once the measured bandwidth does not increase further, bbr assumes to have reached the bottleneck bandwidth. since this observation is delayed by one rtt, a queue was already created at the bottleneck. bbr tries to drain it by temporarily reducing the pacing gain. afterwards, bbr enters the probe bandwidth phase in which it probes for more available bandwidth. this is performed in eight cycles, each lasting rtprop : first, pacing gain is set to 1. 25, probing for more bandwidth, followed by 0. 75 to drain created queues. for the remaining six cycles bbr sets the pacing gain to 1. bbr continuously samples the bandwidth and uses the maximum as btlbw estimator, whereby values are valid for the timespan of ten rtprop. after not measuring a new rtprop value for ten seconds, bbr stops probing for bandwidth and enters the probe rtt phase. during this phase the bandwidth is reduced to four packets to drain any possible queue and get a real estimation of the rtt. this phase is kept for 200 ms plus one rtt. if a new minimum value is measured, rtprop is updated and valid for ten seconds. performance of bbrv1 google and other data center companies report improvement on throughput ( green curve ), the latency measurement here is irrelevant and should be ignored http : / / blog. cerowrt
EPFL COM 407 Moodle
No question: Moodle
. org / post / bbrs _ basic _ beauty / performance of bbrv1 but … bbrv1 takes no feedback from network – no reaction to loss or ecn β€’ [ hock et al, 2017 ] find that bbrv1 ’ s estimated bottleneck bandwidth ignores how many flows are competing fairness issues with : - bbr flows of different rtts and - bbr versus other tcps β€’ [ ware et al, 2019 ] find that in - flight cap, designed as a safety mechanism, is determinant google proposed bbrv2 and bbrv3 to address these and other shortcomings … β†’ hock, m., bless, r. and zitterbart, m., 2017, october. experimental evaluation of bbr congestion control. in 2017 ieee 25th international conference on network protocols ( icnp ) ( pp. 1 - 10 ). ieee. ware, r., mukerjee, m. k., seshan, s. and sherry, j., 2019, october. modeling bbr's interactions with loss - based congestion control. in proceedings of the internet measurement conference ( pp. 137 - 143 ). per - class queuing routers classify packets ( using an access list ) each class is guaranteed a dedicated queue and a weight β€” > hence a rate classes may exceed the guaranteed rate by borrowing from other classes if spare capacity exists it is implemented in routers with dedicated queues for every class and
EPFL COM 407 Moodle
No question: Moodle
a scheduler such as weighted round robin ( wrr ) or deficit round robin ( drr ). wrr and drr have one queue per class. at every round, queues are visited in sequence. wrr serves packets of class in one round. drr serves bits of class in one round. used in enterprise or industrial networks to support non - congestion - controlled flows ( e. g. real - time flows ) ; provider networks to separate customers / isolate suspicious flows ( network virtualization ). example of class - based queuing class 1 for pmus ( power measurement units ) is guaranteed a rate of 2. 5 mb / s ; it can exceed this rate by borrowing capacity available from the total 10 mb / s if class 2 does not need it. class 2 for pcs is guaranteed a rate of 7. 5 mb / s ; it can exceed this rate by borrowing capacity available from the total 10 mb / s if class 1 does not need it. suppose pmus behave properly as expected. which rates will pc1 and pc2 achieve, if their rtts are equal? a. 5 mb / s each b. 4 mb / s each c. pc1 : 5 mb / s, pc2 : 3 mb / s d. i don ’ t know go to web. speakup. info or download speakup app join room 46045 pc1 and pc2 see this network. since pmu1 and pmu2 stream at 1
EPFL COM 407 Moodle
No question: Moodle
mb / s and class 2 may borrow the remaining capacity, the available capacities for class 2 are : 9 mb / s, 8 mb / s and 8 mb / s. 10 mb / s 10 mb / s 10 mb / s pc1 pc2 s1 class 2 low prio 9 mb / s available 7. 5 mb / s guaranteed 8 mb / s available 7. 5 mb / s guaranteed 8 mb / s available 7. 5 mb / s guaranteed solution solution tcp allocates rates and so as to maximize where is the utility function of tcp ; the function is the same for pc1 and pc2 because rtts are the same. the constraints are,, mb / s. thus tcp solves a utility optimization problem : maximize subject to by symmetry, you can also check max - min fair allocation ) and proportionally fair allocation ). answer b. ( ) + ( ) ≀9 mb / s x1 ≀8 + ≀8 ( ) + ( ) + ≀8 mb / s = = 4 mb / s ( = = 4 mb / s ( = = 4 mb / s 10 mb / s 10 mb / s 10 mb / s pc1 pc2 s1 class 2 low prio 9 mb / s available 7. 5 mb / s guaranteed 8 mb / s available 7. 5 mb / s guaranteed 8 mb /
EPFL COM 407 Moodle
No question: Moodle
s available 7. 5 mb / s guaranteed the future of congestion control in the past, most tcp versions have relied on loss or ecn as negative signal. some versions also relied on delay only ( tcp vegas ) or use delay as well as loss ( pcc ). congestion control today wants to also achieve β€œ per - flow fairness ”. but each flow may use a different congestion control algorithm. is fairness achieved? is every flow " tcp friendly ”? is the β€œ flow ” the right abstraction / fairness - actor? what are the alternatives? traffic isolation ( e. g. with per - class traffic shapers or per - class queuing ) is a possible future alternative ; packet dropping / ecn marking becomes a function of the traffic aggregate / class a packet belongs to. but does this comply with network neutrality regulations ( = isps provide no competitive advantage to specific apps / services, either through pricing or qos )? how could network neutrality be maintained? brown, l., ananthanarayanan, g., katz - bassett, e., krishnamurthy, a., ratnasamy, s., schapira, m. and shenker, s., 2020, november. on the future of congestion control for the public internet. in proceedings of the 19th acm workshop on hot topics in networks ( pp. 30 - 37 ). conclusion congestion control is in tcp or in quic ( a form of congestion - controlled
EPFL COM 407 Moodle
No question: Moodle
udp ). traditional tcp uses : β€’ the window to control the amount of traffic : additive increase or cubic ( as long as no loss ) ; multiplicative decrease ( following a loss ). β€’ loss as congestion signal. too much buffer is as bad as too little buffer β€” bufferbloat provokes large latency for interactive flows. β€’ ecn can avoid this – it replaces loss by an explicit congestion signal ; but it is partly deployed in the internet ; although it is part of data center tcp. β€’ tcp - bbr aims at avoiding this by pacing traffic : it estimates the available bottleneck bandwidth and the min rtt and it tries to keep amount of inflight data close to bottleneck bandwidth minrtt per - class - based queuing can separate flows in enterprise networks or classes of flows in provider networks. Γ— the tcp / ip network layer ipv4 and ipv6 2024 recap application transport network mac physical across - lans interconnection point - to - point transmission of bits communication end - host connectivity within - lan interconnection β€’ interconnects multiple local area networks ( lans ) β€’ uses packet switching β€’ delivers packets from a source to a destination via a series of routers β€’ forwards packets from router to router based on ip addresses β€’ offers no reliable - delivery guarantees ( best - effort approach ) - packets are briefly stored in routers ’ buffers - packets of the same source - destination flow
EPFL COM 407 Moodle
No question: Moodle
may follow different routes / paths - so, packets may be dropped, delayed or reordered recap : most important protocol = ip ( internet protocol ) recall ip : subnets and subnet masks β€’ subnet < β€” a lan, i. e. a set of devices : β€’ connected at the data - link layer β€’ sharing the same ip - address prefix, e. g. : 128. 178. 71. x β€’ the prefix is specified using a subnet mask ( = sequence of bits, where 1s indicate fixed positions of the prefix ) - e. g. for an epfl ipv4 lan, the subnet mask is 1111 1111 1111 1111 1111 1111 0000 0000 - the size ( in bits ) of the prefix is not always the same, e. g. : ethz ipv4 lans = 26 bits epfl ipv6 lans = 64 bits β€’ various notations for the subnet mask : - dotted, decimal : e. g., address = 128. 178. 71. 34, mask = 255. 255. 255. 0 - β€œ / ” ( slash ) : e. g. 128. 178. 71. 34 / 24 or 2001 : 620 : 618 : 1a6 : 0a00 : 20ff : fe78 : 30f9 / 64 contents - internet protocol ( ip ) 1. the 2 main rules of ip unicast 2. ipv4 addresses
EPFL COM 407 Moodle
No question: Moodle
3. ipv6 addresses 4. nats 5. host configuration 6. hop limit and ttl 7. arp ( connection with mac layer ) textbook chapter 5 : the network layer recall : goal of ip = interconnect all systems in the world using ip addresses network interface must have an ip address rule # 1 in detail : 1. assign addresses based on a structure : β€’ every network interface has an ip address with prefix + suffix : e. g. 128. 178. 71. 202 β€’ interfaces inside same subnet have same prefix β€” > same subnet mask 2. forward packets according to longest prefix match : β€’ every packet contains the destination ip address in its header β€’ every system ( i. e. host = end - system or router = intermediate system ) - has a forwarding table ( = routing table ) and - forwards each packet based on the closest table entry that matches the destination ip address ip rule # 1 = forward packets according to destination ip prefixes alice a. h1 bob b. d. h2 2 1 2 2 1 1 1 3 bart b. c. h2 0 0 to : b. c. h2 letters in addresses denote prefixes ; e. g. : a = 2001 : 0620 : 0008 : : / 48 b. c = 2001 : 0620 : 0618 : 01a5 : : / 64 b. d = 2001 : 0620 : 0618 : 01a6 : : / 64
EPFL COM 407 Moodle
No question: Moodle
to : b. d. h2 longest prefix match ( = closest matching table entry ) benefit : addresses can be aggregated, tables can be compressed to … outgoing interface b. * 2 a. * 0 to … outgoing interface a. * 1 b. d. * 2 b. * 3 r2 ’ s forwarding table to … outgoing interface a. * 1 b. d. * 1 b. c. * 0 to … outgoing interface b. * 2 a. * 1 r4 ’ s forwarding table r1 ’ s forwarding table r3 ’ s forwarding table r1 r2 r3 r4 ip rule # 2 = routers can only interconnect different lans / subnets β€’ traffic b e and w p does not go through router β€’ traffic w e goes through router ip rule # 2 implies : - between lans / subnets, we use routers - inside each subnet, we do not β€” > we use data - link - layer forwarding devices ( such as switches, wifi base stations, etc. ) ↔ ↔ ↔ gateway router wifi subnet with a common prefix switch ethernet subnet with a different prefix from wifi subnet, with the same or different mask p e w b wifi base station we observe a packet from w to p at 1. which ip destination address do we see? a. the ip address of p b. the ip address of an ethernet interface of the
EPFL COM 407 Moodle
No question: Moodle
ethernet concentrator c. there is no destination ip address in the packet since communication is inside the subnet and does not go through a router 1 go to web. speakup. info or download speakup app join room 46045 solution answer a the ip address is always present in the ip header if we use tcp / ip, even if communication is inside the same lan. 2. global / public unicast ipv4 address β€’ uniquely identifies a network interface in the internet β€’ 32 bits, usually written in dotted decimal notation binary : 32 bits example 1 : b1000 0000 1011 1111 1001 0111 0000 0001 example 2 : b1000 0001 1100 0000 1100 1000 0000 0010 dotted decimal : 4 integers ( one integer = 8 bits / binary digits ) example 1 : 128. 191. 151. 1 example 2 : 129. 192. 200. 2 hexadecimal : 8 hex digits ( one hex digit = 4 bits / binary digits ) example 1 : x80 bf 97 01 example 2 : x81 c0 c8 02 binary, decimal and hexadecimal given an integer ( the basis ) any integer can be represented as a string in an alphabet of symbols, starting from 0. basis alphabet example decimal x binary ii hexadecimal xvi binary < β€” > hex is easy : one hex digit ( = nibble ) is 4 binary digits = = = binary /
EPFL COM 407 Moodle
No question: Moodle
hex < β€” > decimal is best done by a calculator = 128 + 64 + 8 = 200 special cases to remember = = = = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } 200 { 0, 1 } 1100 1000 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,,,,,, } 1100 1100 15dec 1111 255dec the mask 255. 255. 254. 0 means that the subnet is made of the first … a. 16 bits b. 18 bits c. 22 bits d. 23 bits e. 24 bits go to web. speakup. info or download speakup app join room 46045 solution answer d 254 = 0b 1111 1110 i. e. 255. 255. 254. 0 = 0b 1111 1111 1111 1111 1111 1110 0000 0000 23 bits equal to 1 which address is a valid choice for h? a. only 2. 4. 8. 2 b. only 2. 4. 9. 1 c. both a and b d. none router ethernet switch host h mask 255. 255. 254. 0 2. 4. 8. 1 mask 255. 255. 254. 0 2. 4. 7. 1?.?.?.?
EPFL COM 407 Moodle
No question: Moodle
solution answer c router ’ s north interface and h are in the same subnet so h must have a subnet prefix of 23 bits. we have : - router north ’ s subnet prefix : 2. 4. 8 / 23 = 0000 0010 0000 0100 0000 100 - so a is correct because : 2. 4. 8. 2 = 0000 0010 0000 0100 0000 1000 0000 0010 - b is also correct because : 2. 4. 9. 1 = 0000 0010 0000 0100 0000 1001 0000 0001 and : 2. 4. 9 / 23 = 0000 0010 0000 0100 0000 100 i. e. : the two prefixes are the same : 2. 4. 9 / 23 = 2. 4. 8 / 23! reserved address blocks 0. 0. 0. 0 absence of address 127 / 8 loopback addresses ( this host, e. g. 127. 0. 0. 1 ) 10. 0. 0. 0 / 8, 172. 16. 0. 0 / 12, 192. 168. 0. 0 / 16 private addresses ( e. g. at home ) : used by anyone, but not in the public internet ( internet routers drop packets destined to them ) 100. 64 / 10 private addresses used only by internet service providers ( isps ) β€” carrier grade nat addresses 192. 88. 99 / 24 ipv6 -
EPFL COM 407 Moodle
No question: Moodle
to - ipv4 relay routers 169. 254. 0. 0 / 16 link local addresses ( can be used only by systems in same lan ) 224 / 4 multicast 240 / 4 reserved β€œ for experimental / future use ” until recently 255. 255. 255. 255 / 32 link local ( lan ) broadcast ipv4 packet format header 20 bytes ( + options, if any ) payload higher layer protocol [ 1 = icmp *, 6 = tcp, 17 = udp ] protocol overhead useful bits ( higher - layer data ) ( icmp is used to carry error messages at the network layer ) forwarding table and longest prefix match : example from epfl β€’ destination subnets in aggregated form β€’ next hops identified by both β€œ ip ” and β€œ name ” β€’ 0 / 0 ( empty string ) = default route β€’ longest prefix match means : if packet β€” > 128. 178. * if packet β€” > 128. 178. 29 * forward to ed2 - el else forward to ed2 - in else forward to sw - la - 01 destination next - hop / interface 128. 178. 29 / 24 128. 178. 100. 2 / south 128. 178 / 16 128. 178. 100. 3 / south 0 / 0 128. 178. 47. 3 / north 3. ipv6 why a new version? ipv4 address space is too small ( 32 bits unique addresses ) what does ipv6 do? redefines packet format
EPFL COM 407 Moodle
No question: Moodle
with larger addresses of : 128 bits ( unique addresses ) otherwise, it offers essentially the same services as ipv4 but ipv6 is incompatible with ipv4 ; routers and hosts must handle separately a can talk to w, b can talk to w, a and b cannot communicate at the network layer β†’β‰ˆ4 β‹…109 β‰ˆ3 β‹…1038 application tcp ipv6 ipv4 web browser w ipv6 ipv4 http tcp ipv6 http tcp ipv4 mac mac dual stack local router b a ipv6 addresses and compression rules β€’ we write them in hextets, prefer lower case letters, and separate them by β€œ : ” ( colon ) 1 hextet = 1 piece = 16 bits = [ 0 - 4 ] hex digits ; one ipv6 address uncompressed = 8 hextets β€’ leading zeroes inside a hextet can be omitted β€’ : : replaces any number of 0s in more than one hextet ; can be used at most once in address uncompressed form compressed form 2002 : 0000 : 0000 : 0000 : 0000 : ffff : 80b2 : 0c26 2002 : : ffff : 80b2 : c26 2001 : 0620 : 0618 : 01a6 : 0000 : 20ff : fe78 : 30f9 2001 : 620 : 618 : 1a6 : 0 : 20ff : fe78 : 30
EPFL COM 407 Moodle
No question: Moodle
##f9 a few ipv6 global unicast addresses the block 2000 / 3 ( i. e. 2xxx and 3xxx ) is for global / public unicast addresses 2001 : 620 : : / 32 switch 2001 : 620 : 618 : : / 48 epfl 2001 : 620 : 8 : : / 48 ethz 2a02 : 1200 : : / 27 swisscom 2001 : 678 : : / 29 provider independent address 2001 : : / 32 teredo ( tunnels ipv6 in ipv4 ) 2002 : : / 16 6to4 ( tunnels ipv6 in ipv4 ) networks served by a provider use blocks that are subsets of the provider ’ s address block, ( e. g. check epfl, ethz and switch ) reserved address blocks : : / 128 absence of address : : 1 / 128 loopback address ( this host ) fc00 : : / 7 ( i. e. fcxx : and fdxx : ) for example : fd24 : ec43 : 12ca : 1a6 : a00 : 20ff : fe78 : 30f9 unique local addresses = private networks ( e. g. in epfl ) : not to be used in the public internet fe80 : : / 10 link local addresses ( used only by systems in same lan ) ff00 : : / 8 multicast ff02 : : 1 : ff00 : 0 / 104 solicited node
EPFL COM 407 Moodle
No question: Moodle
multicast ( see ndp later ) ff02 : : 1 / 128 link local broadcast ff02 : : 2 / 128 multicast to all link - local routers ( in same lan ) epfl private ipv6 public and private prefixes are structured an epfl public address : 2001 : 620 : 618 : 1a6 : a00 : 20ff : fe78 : 30f9 an epfl private address : fd24 : ec43 : 12ca : 1a6 : a00 : 20ff : fe78 : 30f9 epfl private prefix this is a private address ipv6 packet format higher layer protocol [ 58 = ipv6 - icmp, 6 = tcp, 17 = udp ] * * we will see the functions of the fields other than the addresses in a following lecture header 40 bytes ( + options, if any ) payload address field 16 bytes destination next - hop - ip % interface 2001 : 620 : 618 : 1a4 / 64 fe80 : : 4 % 2 2001 : 620 : 618 / 48 fe80 : : 1 % 2 : : / 0 fe80 : : 1 % 1 ipv6 forwarding table : same example from epfl at ed0 - swi interface number ip address of next hop sw - la - 01 lrcsuns 128. 178. 156. 24 08 : 00 : 20 : 71 : 0d : d4 lrcpc3 128. 178. 156.
EPFL COM 407 Moodle
No question: Moodle
7 00 : 00 : c0 : b8 : c2 : 8d in - inr 128. 178. 156. 1 2001 : 620 : 618 : 1ad : : 1 00 : 00 : 0c : 02 : 78 : 36 128. 178. 79. 1 2001 : 620 : 618 : 1ab : : 1 00 : 00 : 0c : 17 : 32 : 96 ed2 - in 182. 1 2001 : 620 : 618 : 1ac : : 1 in - inj 128. 178. 182. 3 2001 : 620 : 618 : 1ac : : 5 182. 5 2001 : 620 : 618 : 1ac : : 3 lrc di ed0 - swi ed0 - ext stisun1 128. 178. 15. 7 2001 : 620 : 618 : 1a6 : 1 : 80b2 : f66 : 1 2001 : 620 : 618 : 1ad : 0a00 : 20ff : fe78 : 30f9 08 : 00 : 20 : 78 : 30 : f9 lrcmac4 ed2 - el 128. 178. 29. 1 2001 : 620 : 618 : 1a4 : : 1 % 1 % 2 128. 178. 47. 3 2001 : 620 : 618 : 10a : : 1 fe80 : : 1 128. 178. 100. 3 2001 : 620 : 618 : 10b : : 1 fe80 : : 1 128. 178
EPFL COM 407 Moodle
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
8