class: center, middle, inverse # Network Design Principles --- class: center, middle, inverse # Network Design Principles ## Carrier grade ### IP Address Management --- background-image: url(cat2.jpg) --- ## Content * Dynamic Routing Protocols * BGP * OSPF * Logical Network Design * Switched * Statically Routed * Dynamically Routed --- .left-column[ ## Dynamic Routing ] .right-column[ * Why? ] --- .left-column[ ## Dynamic Routing ] .right-column[ * Handle failover * Discover remote networks * Choose the best path to the destination * Lower configuration costs * Lower failure points? ] --- .left-column[ ## Dynamic Routing ] .right-column[  * IGP = Interior Gateway Protocol * EGP = Exterior Gateway Protocol ] --- .left-column[ ## Dynamic Routing ### BGP ] .right-column[ * Border Gateway Protocol * Distance Vector Routing Protocol * EGP * Aggregates all vectors to the most simple one * Pushes updates based on events * Only talks to direct peers * Prevents routing loops by checking the AS-Path * Announces the configured routing table ] --- .left-column[ ## Dynamic Routing ### BGP ] .right-column[ Distance Vector Routing  Element | Vector ------- | ---------------------------- AS24940 | AS3320 AS24940 | AS3320 -> AS20773 -> AS13335 AS24940 | AS3320 -> AS20773 -> AS1299 AS24940 | AS1299 AS24940 | AS1299 -> AS13335 ] --- .left-column[ ## Dynamic Routing ### BGP ] .right-column[  .footnote[© http://bgp.he.net/AS24941#_asinfo] ] --- .left-column[ ## Dynamic Routing ### BGP ] .right-column[  .footnote[© http://bgp.he.net/AS24940#_asinfo] ] --- .left-column[ ## Dynamic Routing ### BGP ] .right-column[ Route Selection * Ignores Link-State * Ignores Hop Count * Honors AS-Path * Honors propritary values ] --- .left-column[ ## Dynamic Routing ### BGP ### OSPF ] .right-column[ * Open Shortest Path First * Link-state routing protocol * IGP * Interval based ] --- .left-column[ ## Dynamic Routing ### BGP ### OSPF ] .right-column[ Link-state routing * Every router in an AS talks to every other * Uses SPF to create a tree * Periodically sends a flood * Causes a huge amount of traffic ] --- .left-column[ ##Logical Network Design ### Switched ] .right-column[  ] --- .left-column[ ##Logical Network Design ### Switched ] .right-column[  ] --- .left-column[ ##Logical Network Design ### Switched ] .right-column[  ] --- .left-column[ ##Logical Network Design ### Switched ] .right-column[  ] --- .left-column[ ##Logical Network Design ### Switched ] .right-column[ * Many SPOF, unable to mesh * would create loops * CAM table size is limited * Content Addressable Memory = MAC table * All switches hold up all MAC addresses in the same Layer2/VLAN * limit is around ~512-4096 addresses per device * Juniper EX2200-48T: 16.000 entries, 864€ * Juniper EX3200-48T (EOL): 32.000 entries, 1975€ * TP-Link T3700G-28TQ: 32.000 entries, 1698€ * Netgear GS724Tv4: 16.000 entries, 150€ ] --- .left-column[ ##Logical Network Design ### Switched ### Statically Routed ] .right-column[  * One Subnet for each switch ] --- .left-column[ ##Logical Network Design ### Switched ### Statically Routed ] .right-column[ * Static routes configured on all switches * Works fine on Layer 2 until there are VLANs across routers * CAM tables will again be too big * Requires manual configuration for routes * Redundant ring ] --- .left-column[ ##Logical Network Design ### Switched ### Statically Routed ### Dynamically Routed ] .right-column[ * Less stuff to configure by hand * Better failover for new links * TOR switch for hypervisors is still a bottleneck * We could use OSPF or RIP ] --- background-image: url(dog.jpg) --- .left-column[ ##Logical Network Design ### Switched ### Statically Routed ### Dynamically Routed ] .right-column[  ] --- .left-column[ ##Logical Network Design ### Switched ### Statically Routed ### Dynamically Routed ] .right-column[  ] --- .left-column[ ##Logical Network Design ### Switched ### Statically Routed ### Dynamically Routed ] .right-column[  * 16 Racks * 16 Switches * 8 Routers * 16*40 = 640 Servers * 640 * 100 = 64.000 Virtual Machines ] --- .left-column[ ##Logical Network Design ### Switched ### Statically Routed ### Dynamically Routed ] .right-column[ * Impossible to have 64.000 Virtual Machines + Hypervisors in the same Layer 2 * Would require switches with 64,000 MAC entries * Juniper EX92008, 8RU, ~45.000€, per rack * Dynamic routing protocols route prefixes to a next hop * Normally used to route nets to a router * You can route to any IP address? ] --- .left-column[ ##Logical Network Design ### Switched ### Statically Routed ### Dynamically Routed ] .right-column[  ] --- .left-column[ ##Logical Network Design ### Switched ### Statically Routed ### Dynamically Routed ] .right-column[ BGP as IGP * Bad: Every router would talk to every other router (fully meshed) * Fine for small networks, doesn't work in this size * Each hypervisor will act as a router * Bad: Needs something to get the routing table * "Announces the configured routing table" - Slide 7 * Nice: Simple Table of: Sourcenet -> Next Hop ] --- .left-column[ ##Logical Network Design ### Switched ### Statically Routed ### Dynamically Routed ] .right-column[ BGP route reflector  * Everybody sends updates to a central router * Router pushes updates to all routers that need this information ] --- .left-column[ ## Conclusion ] .right-column[ * Dynamic routing is fun * OSPF is fine for announcing hypervisor networks * BGP is perfect for cloud * Don't trust vendors for CAM table size .footnote[© Tim 'bastelfreak' Meusel] ]