Forráskód Böngészése

More network theory

Håvard O. Nordstrand 5 éve
szülő
commit
27e34d3cb0
5 módosított fájl, 103 hozzáadás és 20 törlés
  1. 1 0
      index.md
  2. 18 2
      it/network/architecture.md
  3. 58 0
      it/network/ipv4.md
  4. 22 17
      it/network/ipv6.md
  5. 4 1
      it/network/switching.md

+ 1 - 0
index.md

@@ -72,6 +72,7 @@ Random collection of config notes and miscellaneous theory. Technically not a wi
 ### Network
 
 - [Network Architecture](it/network/architecture/)
+- [IPv4](it/network/ipv4/)
 - [IPv6](it/network/ipv6/)
 - [Switching](it/network/switching/)
 - [Wireless Basics](it/network/wireless-basics/)

+ 18 - 2
it/network/architecture.md

@@ -16,6 +16,7 @@ breadcrumbs:
 
 - Appripriate for large networks spanning multiple regions (e.g. multiple buildings).
 - Scales well.
+- Focuses on north-south traffic.
 - Consists of three layers.
 - Access layer:
     - L2 switches.
@@ -48,11 +49,26 @@ breadcrumbs:
 
 ### Spine Leaf
 
-**TODO**
+- Two or three layers: Leaf layer, spine layer and an optional super-spine layer.
+- Leaf switches connect to every spine switch and not to any other leaf switches.
+- Spine routers (or switches) are not connected to any other spine routers.
+- Hosts connect only to leaf switches.
+- All spine-leaf links are routed.
+- Every pair of leaf switches are always two hops away from each other.
+- Routers to external areas, firewalls and load balancers are added connected leaf switches called border leaves.
+- Large spine-leaf networks may be broken into multiple networks where the spine rouers are connected to routers in the super-spine layer.
+- Focuses on east-west traffic.
+- Well suited for data centers.
+- Well suited for ECMP.
+- Well suited for VXLAN for allowing hosts to move easily between leaf switches.
+
+## Terms
+
+- Equal-cost multi-path routing (ECMP): Routing strategy for forwarding over multiple best paths to the same destination.
+- Oversubscription: Less uplink capacity than downlink capacity.
 
 ## Notes
 
 - VXLAN or Q-in-Q may be used to span VLANs over different areas.
-- Oversubscription: Less uplink capacity than downlink capacity.
 
 {% include footer.md %}

+ 58 - 0
it/network/ipv4.md

@@ -0,0 +1,58 @@
+---
+title: IPv6 Theory
+breadcrumbs:
+- title: IT
+- title: Network
+---
+{% include header.md %}
+
+## Special Prefixes
+
+|Prefix|Description|
+|-|-|
+| `0.0.0.0/8` | Current network |
+| `10.0.0.0/8` | Private network |
+| `100.64.0.0/10` | Shared address space for CGN |
+| `127.0.0.0/8` | Localhost |
+| `169.254.0.0/16` | Link-local autoconfiguration |
+| `172.16.0.0/12` | Private network |
+| `192.0.0.0/24` | IETF Protocol Assignments |
+| `192.0.2.0/24` | Documentation (TEST-NET-1) |
+| `192.18.0.0/15` | Inter-network benchmarking |
+| `192.51.100.0/24` | Documentation (TEST-NET-2) |
+| `192.88.99.0/24` | 6to4 anycast (deprecated) |
+| `192.168.0.0/16` | Private network |
+| `203.0.113.0/24` | Documentation (TEST-NET-3) |
+| `224.0.0.0/4` | Multicast (formerly Class D) |
+| `240.0.0.0/4` | Reserved (formerly class E) |
+| `255.255.255.255/32` | Limited broadcast |
+
+## Addressing
+
+### Classful Routing
+
+Originally the IPv4 address space was split into five classes with fixed, implicit subnet masks, as seen below:
+
+| Class | Leading bits | First address | Network bits | Purpose |
+| - | - | - |
+| A | `0` | `0.0.0.0` | `8` | Unicast |
+| B | `10`| `128.0.0.0` | `16` | Unicast |
+| C | `110` | `192.0.0.0` | `24` | Unicast |
+| D | `1110` | `224.0.0.0` | N/A | Multicast |
+| E | `1111` | `240.0.0.0` | N/A | Reserved |
+
+### VLSM and CIDR
+
+**Variable-length subnet masking (VLSM)** allows splitting networks into multiple smaller networks (subnetting). It is the opposite of fixed-length subnet masking.
+
+**Classless inter-domain routing (CIDR)** allows combining multiple smaller networks (with a common prefix) into a larger network (supernetting). It is the opposite of classful routing.
+
+The terms are frequently interchanged and used to refer to the same thing.
+
+### Special Addresses
+
+- The first address in a network is reserved for identifying the network and cannot be used by any hosts.
+- The last address in the network is reserved for directed broadcasts targeted at all hosts within the certain network.
+  It it routable and frequently blocked.
+
+{% include footer.md %}

+ 22 - 17
it/network/ipv6.md

@@ -6,6 +6,28 @@ breadcrumbs:
 ---
 {% include header.md %}
 
+## Special Prefixes
+
+| Prefix | Description |
+| - | - |
+| `::/0` | Default route |
+| `::/128` | Unspecified |
+| `::1/128` | Localhost |
+| `::/96` | IPv4-compatible IPv6 address (deprecated) |
+| `::ffff:0:0/96` | IPv4-mapped IPv6 address |
+| `::ffff:0:0:0/96` | IPv4-translated IPv6 address |
+| `64:ff9b::/96` | IPv4-IPv6 translation |
+| `100::/64` | Discard |
+| `2000::/3` | Global unicast address (GUA) |
+| `2001::/32` | Teredo |
+| `2001:20::/28` | ORCHIDv2 |
+| `2001:db8::/32` | Documentation (non-routable) |
+| `2002::/16` | 6to4 (deprecated) |
+| `fc00::/7` | Unique local address (ULA) |
+| `fd00::/8` | Locally administered ULA |
+| `fe80::/10` | Link-scoped unicast (non-routable) |
+| `ff00::/8` | Multicast |
+
 ## Advantages over IPv4
 
 - Designed based on experience with the strengths and limitations of IPv4 and other protocols.
@@ -93,23 +115,6 @@ breadcrumbs:
     - Invalid: Expired valid.
     - Optimistic: Like tenative but for Optimistic DAD. Can be used.
 
-## Address Ranges
-
-|Prefix|Description|
-|-|-|
-|`::/32`|IPv4-compatible IPv6 address (deprecated)|
-|`::ffff/32`|IPv4-mapped IPv6 address|
-|`100::/64`|Discard-only|
-|`64:ff9b::/96`|IPv4-IPv6 translation|
-|`2000::/3`|Global unicast address (GUA)|
-|`2001::/32`|Teredo|
-|`2001:db8::/32`|Documentation (non-routable)|
-|`2002::/16`|6to4|
-|`fc00::/7`|Unique local address (ULA)|
-|`fd00::/8`|Locally administered ULA|
-|`fe80::/10`|Link-scoped unicast|
-|`ff00::/8`|Multicast|
-
 ## Packet and Transit
 
 - Streamlined header.

+ 4 - 1
it/network/switching.md

@@ -34,8 +34,11 @@ breadcrumbs:
 - VXLAN network identifiers (VNIs) (24-bit) identify bridge domains.
 - VXLAN tunnel endpoints (VTEPs) encapsulate/decapsulate the traffic.
 - VTEPs may be either on hosts or on switches/routers as gateways.
+- Address learning:
+    - Data plane learning: Flood and learn.
+    - Data plane learning: Uses BGP to route wrt. MAC addresses.
 - BUM handling using multicast:
-    - Requires multicast-enabled infrastructure.
+    - Requires multicast routing-enabled infrastructure.
     - VNI are mapped to multicast groups (N:1).
     - VTEPs joins the groups for its VNIs using IGMP.
     - BUM traffic is only sent to the relevant groups.