Compare commits

...

5 Commits

Author SHA1 Message Date
Paul Warren 7e961c71b8 bird prototable from KNorrie 2022-01-13 23:11:28 +11:00
Paul Warren 750d6853f6 OSPF_HA bits 2022-01-13 23:11:10 +11:00
Paul Warren 88cc106b13 Remove old bits 2022-01-13 23:10:25 +11:00
Paul Warren 1ab2140d6b More content 2022-01-13 23:10:15 +11:00
Paul Warren 236bf7f8f0 Calm down headings, more fragments 2022-01-13 23:09:51 +11:00
4 changed files with 110 additions and 54 deletions

BIN
Diagrams/OSPF_HA.dia Normal file

Binary file not shown.

BIN
Diagrams/OSPF_HA.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@ -48,13 +48,13 @@
<p class="fragment">Maybe don't go and try building an ISP based off this talk :)</p>
</section>
<section><h2>What even is a network</h2>
<section><h2>What even is a network?</h2>
<p class="fragment fade-in-then-out">Ethernet?</p>
<p class="fragment fade-in-then-out">Token Ring?</p>
<p class="fragment fade-in-then-out">IPX?</p>
<p class="fragment fade-in-then-out">AX.25?</p>
</section>
<section><h2>What even is a network</h2>
<section><h2>What even is a network?</h2>
<p class="fragment fade-in-then-out">ipv4?</p>
<p class="fragment fade-in-then-out">ipv6?</p>
<p class="fragment fade-in-then-out">tcp?</p>
@ -63,7 +63,7 @@
<p>We are going to mostly focus on Ethernet and IPv6</p>
</section>
<section><h2>Managed network?</h2>
<section><h2>Managed networks</h2>
<p class="fragment"><b>Controls</b> connections between computers</p>
<p class="fragment"><b>Scales</b> connections between computers</p>
<p class="fragment"><img src="3tier.png" /><p>
@ -83,9 +83,10 @@
<p>or a parfait</p>
<p>which you can mostly ignore, as what we generally use doesn't conform to it. But it does provide a good framework for assisting understanding</p>
<p>Like firewalls, web-proxies/SSL MITM, But also access rights etc</p>
</aside>
</section>
<section><h2>Layers!</h2>
<section><h2>Layers</h2>
<p>This means the Physical layers do not have to match the Logical connections</p>
<p class="fragment">Networks are also a bit fractal in nature</p>
<p class="fragment">For the purposes of this talk, we can ignore a lot of complexity</p>
@ -100,7 +101,9 @@
<p class="fragment">IEEE 802.1Q</p>
<aside class="notes">
<p>beware of strange implementations, windows seems to take Router Advertisements from all vlans, regardless of tag</p>
</aside>
</section>
<section><h2>VLANs in linux</h2>
<p>Are pretty easy!</p>
<pre class="fragment"><code data-trim data-noescape>
@ -114,7 +117,7 @@
<section><h2>VLANs in linux</h2>
<p>Various different methods of making it go in different distributions</p>
<p class="fragment">Debian: in /etc/network/interfaces</p>
<pre>
<pre class="fragment">
<code>auto enp1s0.2502
iface enp1s0.2502 inet dhcp
iface enp1s0.2502 inet6 auto</code>
@ -124,7 +127,17 @@ iface enp1s0.2502 inet6 auto</code>
<aside class="notes">
<p>OpenWRT: can also use the hardware present on most hardware routers to assign vlans to specific ports</p>
</section>
<section><h2>VLANs in linux</h2>
<p>Here's what I've done</p>
<img src="Diagrams/MyVLans.png"></img>
<aside class="notes">
<p>Guest Wifi</p>
<p>Access VLAN</p>
<p>Netflix, Youtube, my webhost, desktops/work computers</p>
</aside>
</section>
<section><h2>What even is a router?</h2>
<p class="fragment">Two or more interfaces</p>
<p class="fragment">Some logic to determine where a packet goes</p>
@ -135,6 +148,7 @@ iface enp1s0.2502 inet6 auto</code>
</section>
<section><h2>Linux Routing</h2>
<p>Add to sysctl config:</p>
<pre class="fragment"><code data-trim data-noescape>
net.ipv4.ip_forward = 1
net.ipv6.conf.all.forwarding = 1
@ -145,7 +159,7 @@ iface enp1s0.2502 inet6 auto</code>
<p class="fragment">Yeah, not really :)</p>
</section>
<section><h2>Static Routes!</h2>
<section><h2>Static Routes</h2>
<p>Manually added, or scripted routes that don't change</p>
<pre><code data-trim data-noescape>
ip route add 172.17.0.0/24 via 172.16.0.254 dev wg0
@ -153,30 +167,32 @@ iface enp1s0.2502 inet6 auto</code>
</pre>
</section>
<section><h2>Static Routes!</h2>
<p>Harking back to our vlan</p>
<pre width="110%"><code>ip -6 route add 2001:db8:2501::/64 via 2001:db8:2500::1 dev enp0s1
<section><h2>Static Routes</h2>
<pre width="110%"><code width="110%">ip -6 route add 2001:db8:2501::/64 via 2001:db8:2500::1 dev enp0s1
ip -6 route add 2001:db8:2502::/64 via 2001:db8:2500::1 dev enp0s1
ip -6 route add 2001:db8:2600::/64 via 2001:db8:2600:beef:face::1 dev enp0s1</code>
ip -6 route add 2001:db8:2600:beef:/64 via 2001:db8:face::1 dev wg0</code>
</pre>
<aside class="notes">
<p>As you can imagine this quickly becomes unwieldy with expanding networks</p>
</aside>
</section>
<section><h2>Static Routes</h2>
<img src="Diagrams/MyVLansExt.png"></img>
</section>
<section><h2>Enter dynamic routes</h2>
<p>As a Router:</p>
<p>Advertise your LANs</p>
<p>Discovering routes to other LANs</p>
<p>Optional: Do some logic</p>
<p>Add them to the routing table</p>
<p class="fragment">Advertise your LANs</p>
<p class="fragment">Discovering routes to other LANs</p>
<p class="fragment">Optional: Do some logic</p>
<p class="fragment">Add them to the routing table</p>
<p class="fragment">Userspace daemons</p>
<p class="fragment">talking to the kernel networking stack</p>
</section>
<section><h2>Dynamic Routing</h2>
<p>Open Shortest Path First (OSPF)</p>
<p>The algorithm is pretty interesting</p>
<p>Uses Dijkstra's algorithm</p>
<p class="fragment">RFC2328</p>
<p class="fragment">RFC5340</p>
<p class="fragment">For: Dynamic routes inside your networks</p>
@ -185,14 +201,19 @@ ip -6 route add 2001:db8:2600::/64 via 2001:db8:2600:beef:face::1 dev enp0s1</co
<section><h2>Dynamic Routing</h2>
<p>Border Gateway Protocol (BGP)</p>
<p class="fragment">RF4271</p>
<p class="fragment">For: Dynamic routes outside your network (and inside sometimes)</p>
<p class="fragment">For: Sharing dynamic routes outside your network with other Autonomous Sytstems (AS)</p>
<notes class="aside">
<p>"AS" is used a lot in the ISP world, and your ISP will have an assigned AS Number</p>
</notes>
</section>
<section><h2>The Userspace Daemons</h2>
<p>BIRD: Berkeley Internet Routing Daemon</p>
<p>Quagga: Fork of Zebra</p>
<p>OpenBGPd/OpenOSPFd: from the OpenBSD project</p>
<p class="fragment">Significant overlap, but they are different</p>
<p class="fragment">I've not used Quagga</p>
<p class="fragment">I've not used Quagga, or the OpenBSD ones</p>
<p class="fragment">There are probably others!</p>
</section>
<section><h2>intro to bird</h2>
@ -201,31 +222,88 @@ ip -6 route add 2001:db8:2600::/64 via 2001:db8:2600:beef:face::1 dev enp0s1</co
<p class="fragment">Use version control</p>
<aside class="notes">
<p>Not quite turing complete</p>
<p> git on /etc/bird or wherever your distor stores it.</p>
<p> git on /etc/bird or wherever your distro stores it.</p>
</aside>
</section>
<section><h2>Intro to bird configuration</h2>
<p>/etc/bird.conf</p>
<pre><code data-trim data-noescape>router id 10.9.99.6;
log "/var/log/bird/bird.log" all;
debug protocols { states, routes, filters, interfaces }
protocol kernel {
import none;
export all;
}
protocol device {
# defaults...
}
</code>
</pre>
</section>
<section><h2>Intro to bird configuration</h2>
<p>/etc/bird.conf</p>
<p>Each router needs a unique ID</p>
<p>
<p class="fragment">Protocol blocks, There are lots of types</p>
<p class="fragment">They are how bird knows what to talk to and how</p>
<aside class="notes">
<p>Set BIRD's router ID. It's a world-wide unique identification of your router, usually one of router's IPv4 addresses. Default: the lowest IPv4 address of a non-loopback interface. <p>
<p>router ID. usually one of router's IPv4 addresses. Default: the lowest IPv4 address of a non-loopback interface. World (your network) unique<p>
</section>
<section><h2>Intro to bird configuration</h2>
<p>KNorries diagram here</p>
<pre><code data-trim data-noescape>protocol ospf {
area 0 {
interface "lo" {
stub;
};
interface "vlan1001" {
};
interface "vlan1034" {
stub;
};
};
}
</code>
</pre>
<notes class="aside">
<p> There are a lot more options than stub or default</p>
<p>BIRD documentation is really good</p>
</section>
<section><h2>Intro to bird configuration</h2>
<p><img src="Diagrams/bird-prototable.png"></img></p>
<notes class="aside">
<p>Import vs Export</p>
<p>Master Table</p>
<p>Logic in Pipes</p>
</section>
<section>more detail on bird</section>
<section>A Simple Network</section>
<section>Multi Host IPs (Authoritative DNS example like in the facebook thing)</section>
<section><h2>A funky thing you can do with OSPF</h2>
<p>A necessary service</p>
<p class="fragment">Contained within a network</p>
<p class="fragment">Data more efficiently obtained across local links</p>
<p class="fragment">Can still get the costly versions if local goes down</p>
</section>
<section><h2>A funky thing you can do with OSPF</h2>
<p>An IP for a host that provides that service</p>
<p class="fragment">Can use that same IP in two different places in the network</p>
<p class="fragment">Confused routing?</p>
<p class="fragment">OSPF to the rescue!</p>
</section>
<section><h2>A funky thing you can do with OSPF</h2>
<p><img src="OSPF_HA.png"></img></p>
</section>
<section>Why use a 'real' router</section>
<section><h2>¿Por qué no los dos?</h2>
@ -240,6 +318,7 @@ ip -6 route add 2001:db8:2600::/64 via 2001:db8:2600:beef:face::1 dev enp0s1</co
<p>Why did I use /64s?</p>
<p>I highly recommend going through KNorrie's network examples: <a href="https://github.com/knorrie/network-examples">https://github.com/knorrie/network-examples</a></p>
<p>OSPF Areas</p>
<p>Auth* for OSPF</p>
<p>Automatic transfers of internal aggregates to BGP (Something I've not investigated much)</p>
</section>
@ -249,32 +328,9 @@ ip -6 route add 2001:db8:2600::/64 via 2001:db8:2600:beef:face::1 dev enp0s1</co
<p>Openwrt: <a href="https://openwrt.org">https://openwrt.org/</a></p>
<p>The OpenWRT IRC channel, currently on the OFTC network</p>
<p>BenEater's <a href="https://www.youtube.com/watch?v=-wMU8vmfaYo">"Why was facebook down for five hours" </a></p>
<p>802.1Q: <a href="https://www.ieee802.org/1/pages/802.1Q-2014.html" /></p>
<p><a href="https://www.ieee802.org/1/pages/802.1Q-2014.html">802.1Q</a></p>
</section>
<section><h2>Unused Bits</h2></section>
<section><h2>What I'm assuming we're familiar with</h2>
<p>Diagram showing standard leaf node of a network with a bit cloud containg "The rest of the org"</p>
</section>
<section><h2>What we're familiar with</h2>
<p>Diagram showing added storage and server network<p>
</section>
<section><h2>How things evolve</h2>
<p>Uh Oh, we've got a new Datacentre</p>
</section>
<section><h2>How things evolve</h2>
<p>which has its own lot of storage and servers</p>
</section>
<section><h2>How things evolve</h2>
<p>And now people want to work in Tasmania!</p>
</section>
</div>
</div>