diff --git a/src/lib/content/cidr.ts b/src/lib/content/cidr.ts
new file mode 100644
index 0000000..06f588b
--- /dev/null
+++ b/src/lib/content/cidr.ts
@@ -0,0 +1,76 @@
+export const cidrContent = {
+ title: "CIDR Notation Explained",
+ description: "Complete guide to CIDR notation - what it is, why it replaced IP classes, and how to read network prefixes.",
+
+ sections: {
+ whatIs: {
+ title: "What is CIDR?",
+ content: `CIDR (Classless Inter-Domain Routing) is a method for describing IP networks using a slash followed by a number. The number after the slash tells you how many bits are used for the network portion of the address.
+
+For example, in 192.168.1.0/24, the "/24" means the first 24 bits identify the network, and the remaining 8 bits identify individual hosts within that network.`
+ },
+
+ whyReplaced: {
+ title: "Why CIDR Replaced IP Classes",
+ content: `The old class system (Class A, B, C) was too rigid and wasteful. It only allowed networks of fixed sizes:
+
+- Class A: 16 million addresses (way too big for most needs)
+- Class B: 65,536 addresses (often too big)
+- Class C: 256 addresses (often too small)
+
+CIDR lets you create networks of any size by choosing exactly how many network bits you need.`
+ },
+
+ howToRead: {
+ title: "How to Read CIDR Notation",
+ content: `The number after the slash is the "prefix length" - it counts the network bits from left to right:
+
+- /8 = 8 network bits (24 host bits)
+- /16 = 16 network bits (16 host bits)
+- /24 = 24 network bits (8 host bits)
+- /30 = 30 network bits (2 host bits)`
+ }
+ },
+
+ examples: [
+ {
+ cidr: "192.168.0.0/24",
+ description: "Home network - 254 usable addresses",
+ hosts: "254 hosts"
+ },
+ {
+ cidr: "10.0.0.0/8",
+ description: "Large private network - 16 million addresses",
+ hosts: "16,777,214 hosts"
+ },
+ {
+ cidr: "172.16.0.0/12",
+ description: "Medium private network - 1 million addresses",
+ hosts: "1,048,574 hosts"
+ },
+ {
+ cidr: "2001:db8::/32",
+ description: "IPv6 network - massive address space",
+ hosts: "2^96 addresses"
+ }
+ ],
+
+ prefixTable: [
+ { prefix: "/8", mask: "255.0.0.0", hosts: "16,777,214", typical: "ISP allocation" },
+ { prefix: "/16", mask: "255.255.0.0", hosts: "65,534", typical: "Large enterprise" },
+ { prefix: "/20", mask: "255.255.240.0", hosts: "4,094", typical: "Medium business" },
+ { prefix: "/24", mask: "255.255.255.0", hosts: "254", typical: "Small office/home" },
+ { prefix: "/25", mask: "255.255.255.128", hosts: "126", typical: "Small subnet" },
+ { prefix: "/26", mask: "255.255.255.192", hosts: "62", typical: "Point-to-point" },
+ { prefix: "/30", mask: "255.255.255.252", hosts: "2", typical: "Router links" },
+ { prefix: "/32", mask: "255.255.255.255", hosts: "1", typical: "Single host" }
+ ],
+
+ keyPoints: [
+ "Smaller prefix numbers = bigger networks (more hosts)",
+ "Larger prefix numbers = smaller networks (fewer hosts)",
+ "/24 is the most common size for small networks",
+ "IPv6 commonly uses /64 for end-user networks",
+ "CIDR allows efficient use of IP address space"
+ ]
+};
\ No newline at end of file
diff --git a/src/lib/content/common-ports.ts b/src/lib/content/common-ports.ts
new file mode 100644
index 0000000..e62a721
--- /dev/null
+++ b/src/lib/content/common-ports.ts
@@ -0,0 +1,88 @@
+export const commonPortsContent = {
+ title: "Common TCP/UDP Ports",
+ description: "Quick reference for the most frequently used TCP and UDP port numbers.",
+
+ wellKnown: [
+ { port: 20, protocol: "TCP", service: "FTP Data", description: "File Transfer Protocol data channel" },
+ { port: 21, protocol: "TCP", service: "FTP Control", description: "File Transfer Protocol control channel" },
+ { port: 22, protocol: "TCP", service: "SSH", description: "Secure Shell remote login" },
+ { port: 23, protocol: "TCP", service: "Telnet", description: "Telnet remote login (insecure)" },
+ { port: 25, protocol: "TCP", service: "SMTP", description: "Simple Mail Transfer Protocol" },
+ { port: 53, protocol: "TCP/UDP", service: "DNS", description: "Domain Name System" },
+ { port: 67, protocol: "UDP", service: "DHCP Server", description: "Dynamic Host Configuration Protocol server" },
+ { port: 68, protocol: "UDP", service: "DHCP Client", description: "Dynamic Host Configuration Protocol client" },
+ { port: 69, protocol: "UDP", service: "TFTP", description: "Trivial File Transfer Protocol" },
+ { port: 80, protocol: "TCP", service: "HTTP", description: "Hypertext Transfer Protocol" },
+ { port: 110, protocol: "TCP", service: "POP3", description: "Post Office Protocol v3" },
+ { port: 123, protocol: "UDP", service: "NTP", description: "Network Time Protocol" },
+ { port: 143, protocol: "TCP", service: "IMAP", description: "Internet Message Access Protocol" },
+ { port: 161, protocol: "UDP", service: "SNMP Agent", description: "Simple Network Management Protocol" },
+ { port: 162, protocol: "UDP", service: "SNMP Manager", description: "SNMP trap messages" },
+ { port: 443, protocol: "TCP", service: "HTTPS", description: "HTTP over TLS/SSL" },
+ { port: 993, protocol: "TCP", service: "IMAPS", description: "IMAP over TLS/SSL" },
+ { port: 995, protocol: "TCP", service: "POP3S", description: "POP3 over TLS/SSL" }
+ ],
+
+ registered: [
+ { port: 179, protocol: "TCP", service: "BGP", description: "Border Gateway Protocol" },
+ { port: 389, protocol: "TCP", service: "LDAP", description: "Lightweight Directory Access Protocol" },
+ { port: 636, protocol: "TCP", service: "LDAPS", description: "LDAP over TLS/SSL" },
+ { port: 989, protocol: "TCP", service: "FTPS Data", description: "FTP over TLS/SSL data" },
+ { port: 990, protocol: "TCP", service: "FTPS Control", description: "FTP over TLS/SSL control" },
+ { port: 1433, protocol: "TCP", service: "MS SQL Server", description: "Microsoft SQL Server" },
+ { port: 1521, protocol: "TCP", service: "Oracle DB", description: "Oracle Database" },
+ { port: 1723, protocol: "TCP", service: "PPTP", description: "Point-to-Point Tunneling Protocol" },
+ { port: 3306, protocol: "TCP", service: "MySQL", description: "MySQL Database" },
+ { port: 3389, protocol: "TCP", service: "RDP", description: "Remote Desktop Protocol" },
+ { port: 5432, protocol: "TCP", service: "PostgreSQL", description: "PostgreSQL Database" },
+ { port: 5900, protocol: "TCP", service: "VNC", description: "Virtual Network Computing" }
+ ],
+
+ dynamic: [
+ { port: 8080, protocol: "TCP", service: "HTTP Alt", description: "Alternative HTTP port" },
+ { port: 8443, protocol: "TCP", service: "HTTPS Alt", description: "Alternative HTTPS port" },
+ { port: 9090, protocol: "TCP", service: "Web Admin", description: "Common web admin interface" }
+ ],
+
+ categories: {
+ web: [
+ { ports: "80, 8080", service: "HTTP", secure: false },
+ { ports: "443, 8443", service: "HTTPS", secure: true }
+ ],
+ email: [
+ { ports: "25", service: "SMTP", secure: false },
+ { ports: "587", service: "SMTP (submission)", secure: true },
+ { ports: "110", service: "POP3", secure: false },
+ { ports: "995", service: "POP3S", secure: true },
+ { ports: "143", service: "IMAP", secure: false },
+ { ports: "993", service: "IMAPS", secure: true }
+ ],
+ remote: [
+ { ports: "22", service: "SSH", secure: true },
+ { ports: "23", service: "Telnet", secure: false },
+ { ports: "3389", service: "RDP", secure: false },
+ { ports: "5900+", service: "VNC", secure: false }
+ ],
+ database: [
+ { ports: "1433", service: "SQL Server", secure: false },
+ { ports: "1521", service: "Oracle", secure: false },
+ { ports: "3306", service: "MySQL", secure: false },
+ { ports: "5432", service: "PostgreSQL", secure: false }
+ ]
+ },
+
+ ranges: [
+ { range: "0-1023", name: "Well-Known Ports", description: "System/privileged services, require root" },
+ { range: "1024-49151", name: "Registered Ports", description: "Registered with IANA for specific services" },
+ { range: "49152-65535", name: "Dynamic/Private", description: "Ephemeral ports for client connections" }
+ ],
+
+ tips: [
+ "Ports below 1024 typically require administrator privileges",
+ "HTTPS is HTTP + TLS/SSL encryption (port 443)",
+ "SSH (22) is the secure replacement for Telnet (23)",
+ "Email uses multiple ports: 25 (SMTP), 110 (POP3), 143 (IMAP)",
+ "Add 'S' suffix for secure versions: HTTPS, FTPS, IMAPS, POP3S",
+ "Database ports are often targeted by attackers - secure them well"
+ ]
+};
\ No newline at end of file
diff --git a/src/lib/content/ipv6-address-types.ts b/src/lib/content/ipv6-address-types.ts
new file mode 100644
index 0000000..6c86b9d
--- /dev/null
+++ b/src/lib/content/ipv6-address-types.ts
@@ -0,0 +1,156 @@
+export const ipv6AddressTypesContent = {
+ title: "IPv6 Address Types & Key Prefixes",
+ description: "Complete guide to IPv6 address types including unicast, multicast, anycast, and special-use prefixes.",
+
+ sections: {
+ overview: {
+ title: "IPv6 Address Categories",
+ content: `IPv6 addresses are organized into three main categories:
+
+- **Unicast**: One-to-one communication (most common)
+- **Multicast**: One-to-many communication
+- **Anycast**: One-to-nearest communication
+
+Unlike IPv4, IPv6 has no broadcast addresses. Multicast handles broadcast-like functions.`
+ }
+ },
+
+ unicastTypes: [
+ {
+ type: "Global Unicast",
+ prefix: "2000::/3",
+ range: "2000:: to 3fff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
+ description: "Internet-routable addresses, like IPv4 public addresses",
+ usage: "Public websites, servers, internet-facing devices",
+ example: "2001:db8:85a3::8a2e:370:7334"
+ },
+ {
+ type: "Unique Local (ULA)",
+ prefix: "fc00::/7",
+ range: "fc00:: to fdff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
+ description: "Private addresses for local networks, like IPv4 RFC 1918",
+ usage: "Internal networks, VPNs, private communication",
+ example: "fd12:3456:789a::1"
+ },
+ {
+ type: "Link-Local",
+ prefix: "fe80::/10",
+ range: "fe80:: to febf:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
+ description: "Auto-configured on every interface, not routed beyond local link",
+ usage: "Neighbor discovery, router advertisements, local communication",
+ example: "fe80::1%eth0"
+ }
+ ],
+
+ specialAddresses: [
+ {
+ address: "::1/128",
+ name: "Loopback",
+ description: "IPv6 equivalent of 127.0.0.1",
+ usage: "Testing, local services"
+ },
+ {
+ address: "::/128",
+ name: "Unspecified",
+ description: "IPv6 equivalent of 0.0.0.0",
+ usage: "Default route, uninitialized addresses"
+ },
+ {
+ address: "::/0",
+ name: "Default Route",
+ description: "Matches all addresses",
+ usage: "Default gateway route"
+ },
+ {
+ address: "::ffff:0:0/96",
+ name: "IPv4-Mapped",
+ description: "IPv4 addresses mapped into IPv6 space",
+ usage: "Dual-stack applications, IPv4 compatibility"
+ }
+ ],
+
+ multicastTypes: [
+ {
+ prefix: "ff00::/8",
+ scope: "All",
+ description: "All multicast addresses start with ff",
+ examples: []
+ },
+ {
+ prefix: "ff01::/16",
+ scope: "Interface-Local",
+ description: "Multicast within single interface",
+ examples: ["ff01::1 - All nodes (interface-local)"]
+ },
+ {
+ prefix: "ff02::/16",
+ scope: "Link-Local",
+ description: "Multicast within local network segment",
+ examples: [
+ "ff02::1 - All nodes (link-local)",
+ "ff02::2 - All routers (link-local)",
+ "ff02::5 - OSPFv3 routers",
+ "ff02::6 - OSPFv3 designated routers"
+ ]
+ },
+ {
+ prefix: "ff05::/16",
+ scope: "Site-Local",
+ description: "Multicast within entire site/organization",
+ examples: ["ff05::2 - All routers (site-local)"]
+ },
+ {
+ prefix: "ff0e::/16",
+ scope: "Global",
+ description: "Internet-wide multicast",
+ examples: ["ff0e::1 - All nodes (global)"]
+ }
+ ],
+
+ anycast: {
+ title: "Anycast Addresses",
+ description: `Anycast addresses look identical to unicast addresses but are assigned to multiple devices. Traffic goes to the "nearest" device with that address.
+
+There's no special prefix for anycast - they use the same ranges as unicast addresses.`,
+
+ commonUses: [
+ "DNS root servers (multiple servers, same IP)",
+ "Content delivery networks (CDNs)",
+ "Load balancing across geographic locations",
+ "Subnet router anycast (all routers on a subnet)"
+ ],
+
+ example: "2001:db8::1 could be anycast if assigned to multiple servers"
+ },
+
+ reservedRanges: [
+ { prefix: "0000::/8", purpose: "Reserved (includes ::1 and IPv4-mapped)" },
+ { prefix: "0100::/8", purpose: "Reserved" },
+ { prefix: "0200::/7", purpose: "Reserved" },
+ { prefix: "0400::/6", purpose: "Reserved" },
+ { prefix: "0800::/5", purpose: "Reserved" },
+ { prefix: "1000::/4", purpose: "Reserved" },
+ { prefix: "4000::/3", purpose: "Reserved" },
+ { prefix: "6000::/3", purpose: "Reserved" },
+ { prefix: "8000::/3", purpose: "Reserved" },
+ { prefix: "a000::/3", purpose: "Reserved" },
+ { prefix: "c000::/3", purpose: "Reserved" },
+ { prefix: "e000::/4", purpose: "Reserved" },
+ { prefix: "f000::/5", purpose: "Reserved" },
+ { prefix: "f800::/6", purpose: "Reserved" },
+ { prefix: "fc00::/7", purpose: "Unique Local Addresses" },
+ { prefix: "fe00::/9", purpose: "Reserved" },
+ { prefix: "fe80::/10", purpose: "Link-Local Addresses" },
+ { prefix: "fec0::/10", purpose: "Reserved (deprecated site-local)" },
+ { prefix: "ff00::/8", purpose: "Multicast" }
+ ],
+
+ quickTips: [
+ "Most public IPv6 addresses start with 2 or 3",
+ "If you see fe80::, it's link-local (not routed)",
+ "If you see fd or fc, it's unique local (private)",
+ "If you see ff, it's multicast",
+ "::1 is IPv6 loopback (like 127.0.0.1)",
+ ":: means all zeros (like 0.0.0.0)"
+ ]
+};
\ No newline at end of file
diff --git a/src/lib/content/special-use-ipv4.ts b/src/lib/content/special-use-ipv4.ts
new file mode 100644
index 0000000..d0fa144
--- /dev/null
+++ b/src/lib/content/special-use-ipv4.ts
@@ -0,0 +1,135 @@
+export const specialIPv4Content = {
+ title: "Special-Use IPv4 Blocks (RFC 6890)",
+ description: "Complete reference of reserved IPv4 address blocks and their specific purposes.",
+
+ ranges: [
+ {
+ network: "0.0.0.0/8",
+ purpose: "This host on this network",
+ rfc: "RFC 1122",
+ routable: false,
+ description: "Used for default routes and unspecified addresses"
+ },
+ {
+ network: "10.0.0.0/8",
+ purpose: "Private-Use Networks",
+ rfc: "RFC 1918",
+ routable: false,
+ description: "Private addresses for internal networks (Class A)"
+ },
+ {
+ network: "100.64.0.0/10",
+ purpose: "Shared Address Space (CGNAT)",
+ rfc: "RFC 6598",
+ routable: false,
+ description: "Carrier-Grade NAT, ISP shared addressing"
+ },
+ {
+ network: "127.0.0.0/8",
+ purpose: "Loopback",
+ rfc: "RFC 1122",
+ routable: false,
+ description: "localhost addresses, typically 127.0.0.1"
+ },
+ {
+ network: "169.254.0.0/16",
+ purpose: "Link Local (APIPA)",
+ rfc: "RFC 3927",
+ routable: false,
+ description: "Auto-assigned when DHCP fails"
+ },
+ {
+ network: "172.16.0.0/12",
+ purpose: "Private-Use Networks",
+ rfc: "RFC 1918",
+ routable: false,
+ description: "Private addresses for internal networks (Class B)"
+ },
+ {
+ network: "192.0.0.0/24",
+ purpose: "IETF Protocol Assignments",
+ rfc: "RFC 6890",
+ routable: true,
+ description: "Special protocol use, some addresses globally routable"
+ },
+ {
+ network: "192.0.2.0/24",
+ purpose: "TEST-NET-1",
+ rfc: "RFC 5737",
+ routable: false,
+ description: "Documentation and example code"
+ },
+ {
+ network: "192.88.99.0/24",
+ purpose: "6to4 Relay Anycast",
+ rfc: "RFC 3068",
+ routable: true,
+ description: "IPv6 to IPv4 relay (deprecated)"
+ },
+ {
+ network: "192.168.0.0/16",
+ purpose: "Private-Use Networks",
+ rfc: "RFC 1918",
+ routable: false,
+ description: "Private addresses for internal networks (Class C)"
+ },
+ {
+ network: "198.18.0.0/15",
+ purpose: "Network Interconnect Device Benchmark Testing",
+ rfc: "RFC 2544",
+ routable: false,
+ description: "Performance testing between network devices"
+ },
+ {
+ network: "198.51.100.0/24",
+ purpose: "TEST-NET-2",
+ rfc: "RFC 5737",
+ routable: false,
+ description: "Documentation and example code"
+ },
+ {
+ network: "203.0.113.0/24",
+ purpose: "TEST-NET-3",
+ rfc: "RFC 5737",
+ routable: false,
+ description: "Documentation and example code"
+ },
+ {
+ network: "224.0.0.0/4",
+ purpose: "Multicast",
+ rfc: "RFC 1112",
+ routable: true,
+ description: "IPv4 multicast addresses"
+ },
+ {
+ network: "240.0.0.0/4",
+ purpose: "Reserved for Future Use",
+ rfc: "RFC 1112",
+ routable: false,
+ description: "Reserved block, not usable"
+ },
+ {
+ network: "255.255.255.255/32",
+ purpose: "Limited Broadcast",
+ rfc: "RFC 919",
+ routable: false,
+ description: "Broadcast to all hosts on local network"
+ }
+ ],
+
+ categories: {
+ private: ["10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"],
+ testing: ["192.0.2.0/24", "198.51.100.0/24", "203.0.113.0/24"],
+ special: ["127.0.0.0/8", "169.254.0.0/16", "224.0.0.0/4"],
+ cgnat: ["100.64.0.0/10"]
+ },
+
+ quickTips: [
+ "Private addresses (10.x, 172.16-31.x, 192.168.x) never appear on the public internet",
+ "100.64.x.x means your ISP is using Carrier-Grade NAT",
+ "169.254.x.x means DHCP failed and the device auto-configured",
+ "TEST-NET addresses are safe to use in documentation",
+ "224.x.x.x and above are multicast or reserved",
+ "Never use 240.x.x.x - it's reserved and may not work"
+ ]
+};
\ No newline at end of file
diff --git a/src/lib/content/supernetting.ts b/src/lib/content/supernetting.ts
new file mode 100644
index 0000000..a607e4b
--- /dev/null
+++ b/src/lib/content/supernetting.ts
@@ -0,0 +1,111 @@
+export const supernetContent = {
+ title: "Route Summarization / Supernetting",
+ description: "Learn how to aggregate multiple networks into a single route for more efficient routing tables.",
+
+ sections: {
+ whatIs: {
+ title: "What is Supernetting?",
+ content: `Supernetting (also called route aggregation or summarization) combines multiple smaller networks into one larger network announcement. Instead of advertising many routes, you advertise just one route that covers them all.
+
+This reduces routing table size and makes networks more manageable.`
+ },
+
+ howWorks: {
+ title: "How Route Summarization Works",
+ content: `When you have multiple contiguous networks, you can often summarize them into a single route by using a shorter prefix length.
+
+The key is finding the common bits shared by all the networks you want to summarize.`
+ },
+
+ requirements: {
+ title: "Requirements for Summarization",
+ content: `Two main requirements must be met:
+
+1. **Contiguous Address Space**: The networks must be adjacent to each other
+2. **Power of Two**: You need exactly 2, 4, 8, 16, etc. networks to summarize cleanly
+
+If you have 3 or 5 networks, you cannot create a perfect summary without including unused space.`
+ }
+ },
+
+ examples: [
+ {
+ title: "Basic Example: Two /24s",
+ networks: ["192.168.0.0/24", "192.168.1.0/24"],
+ summary: "192.168.0.0/23",
+ explanation: "Two adjacent /24 networks combine into one /23",
+ addresses: "512 total addresses (2 × 256)"
+ },
+ {
+ title: "Four /24s",
+ networks: ["10.1.0.0/24", "10.1.1.0/24", "10.1.2.0/24", "10.1.3.0/24"],
+ summary: "10.1.0.0/22",
+ explanation: "Four adjacent /24 networks combine into one /22",
+ addresses: "1,024 total addresses (4 × 256)"
+ },
+ {
+ title: "Eight /27s",
+ networks: ["172.16.0.0/27", "172.16.0.32/27", "172.16.0.64/27", "172.16.0.96/27", "172.16.0.128/27", "172.16.0.160/27", "172.16.0.192/27", "172.16.0.224/27"],
+ summary: "172.16.0.0/24",
+ explanation: "Eight adjacent /27 networks combine into one /24",
+ addresses: "256 total addresses (8 × 32)"
+ }
+ ],
+
+ stepByStep: {
+ title: "Step-by-Step Process",
+ steps: [
+ "List all networks you want to summarize",
+ "Convert network addresses to binary",
+ "Find the common bits from left to right",
+ "Count the common bits to get your new prefix length",
+ "Verify the summary covers all your networks",
+ "Check if any unwanted networks are included"
+ ]
+ },
+
+ binaryExample: {
+ title: "Binary Example",
+ scenario: "Summarizing 192.168.0.0/24 and 192.168.1.0/24",
+ binary: [
+ { network: "192.168.0.0", binary: "11000000.10101000.00000000.00000000" },
+ { network: "192.168.1.0", binary: "11000000.10101000.00000001.00000000" }
+ ],
+ analysis: "First 23 bits are identical, so summary is 192.168.0.0/23"
+ },
+
+ benefits: [
+ "Smaller routing tables mean faster lookups",
+ "Reduced memory usage on routers",
+ "Less routing protocol overhead",
+ "Simpler network management",
+ "Better network stability (fewer route changes)"
+ ],
+
+ pitfalls: [
+ {
+ title: "Including Unwanted Networks",
+ problem: "Summary might include networks you don't own or want to advertise",
+ example: "Summarizing 192.168.0.0/24 and 192.168.2.0/24 as 192.168.0.0/22 also includes 192.168.1.0/24 and 192.168.3.0/24"
+ },
+ {
+ title: "Non-Contiguous Networks",
+ problem: "Trying to summarize networks that aren't adjacent",
+ example: "Cannot cleanly summarize 10.1.0.0/24 and 10.1.5.0/24 without including unwanted space"
+ },
+ {
+ title: "Wrong Powers of Two",
+ problem: "Having 3, 5, 6, 7 networks instead of 2, 4, 8, 16",
+ example: "Three /24s cannot be perfectly summarized without wasting addresses"
+ }
+ ],
+
+ quickReference: [
+ { networks: "2 × /24", summary: "/23", saves: "1 route" },
+ { networks: "4 × /24", summary: "/22", saves: "3 routes" },
+ { networks: "8 × /24", summary: "/21", saves: "7 routes" },
+ { networks: "16 × /24", summary: "/20", saves: "15 routes" },
+ { networks: "2 × /23", summary: "/22", saves: "1 route" },
+ { networks: "4 × /23", summary: "/21", saves: "3 routes" }
+ ]
+};
\ No newline at end of file
diff --git a/src/lib/content/vlsm.ts b/src/lib/content/vlsm.ts
new file mode 100644
index 0000000..b88bc64
--- /dev/null
+++ b/src/lib/content/vlsm.ts
@@ -0,0 +1,94 @@
+export const vlsmContent = {
+ title: "VLSM in Plain English",
+ description: "Variable Length Subnet Masking explained - when to use it, how it works, and common pitfalls to avoid.",
+
+ sections: {
+ whatIs: {
+ title: "What is VLSM?",
+ content: `VLSM (Variable Length Subnet Masking) lets you divide a network into subnets of different sizes. Instead of making all subnets the same size, you can create exactly the right size for each need.
+
+Think of it like cutting a pizza: instead of cutting it into equal slices, you cut bigger pieces for hungry people and smaller pieces for those who want less.`
+ },
+
+ whenWhy: {
+ title: "When and Why to Use VLSM",
+ content: `Use VLSM when different parts of your network need different numbers of hosts:
+
+- Server farm needs 50 addresses
+- Office network needs 200 addresses
+- Point-to-point links need only 2 addresses
+
+Without VLSM, you would waste many addresses by making all subnets big enough for your largest need.`
+ },
+
+ howItWorks: {
+ title: "How VLSM Works",
+ content: `VLSM works by subdividing networks step by step:
+
+1. Start with your main network
+2. Identify your largest subnet needs first
+3. Create subnets for the largest needs
+4. Subdivide remaining space for smaller needs
+5. Keep point-to-point links for last (they only need /30)`
+ }
+ },
+
+ example: {
+ title: "Worked Example",
+ scenario: "You have 192.168.1.0/24 and need:",
+ requirements: [
+ { name: "Sales Department", hosts: 100, needsPrefix: "/25" },
+ { name: "IT Department", hosts: 50, needsPrefix: "/26" },
+ { name: "Guest WiFi", hosts: 30, needsPrefix: "/27" },
+ { name: "Router Links", hosts: 2, needsPrefix: "/30" }
+ ],
+ solution: [
+ { subnet: "192.168.1.0/25", hosts: "126 hosts", use: "Sales Department" },
+ { subnet: "192.168.1.128/26", hosts: "62 hosts", use: "IT Department" },
+ { subnet: "192.168.1.192/27", hosts: "30 hosts", use: "Guest WiFi" },
+ { subnet: "192.168.1.224/30", hosts: "2 hosts", use: "Router Link 1" },
+ { subnet: "192.168.1.228/30", hosts: "2 hosts", use: "Router Link 2" },
+ { subnet: "192.168.1.232/30", hosts: "2 hosts", use: "Router Link 3" }
+ ]
+ },
+
+ pitfalls: [
+ {
+ title: "Address Fragmentation",
+ problem: "Creating subnets in the wrong order leaves unusable gaps",
+ solution: "Always allocate largest subnets first, then work down to smaller ones"
+ },
+ {
+ title: "Poor Planning",
+ problem: "Not leaving room for growth",
+ solution: "Plan for 25-50% growth in each subnet"
+ },
+ {
+ title: "Alignment Issues",
+ problem: "Subnet boundaries don't align properly",
+ solution: "Use online calculators or tools to verify your subnetting"
+ },
+ {
+ title: "Routing Complexity",
+ problem: "Too many small subnets create routing table bloat",
+ solution: "Use route summarization where possible"
+ }
+ ],
+
+ bestPractices: [
+ "Document your subnetting plan before implementing",
+ "Leave room for growth in each subnet",
+ "Use consistent naming conventions",
+ "Start with largest subnets and work down",
+ "Reserve some address space for future expansion",
+ "Test your design in a lab before production"
+ ],
+
+ tips: [
+ "A /25 gives you 126 hosts, /26 gives 62, /27 gives 30, /28 gives 14",
+ "Point-to-point links between routers only need /30 (2 hosts)",
+ "Loopback interfaces only need /32 (1 host)",
+ "Always verify your subnets don't overlap",
+ "Use VLSM calculators to check your work"
+ ]
+};
\ No newline at end of file
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index cff4508..589bcbd 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -2,6 +2,7 @@
import '../styles/base.scss';
import '../styles/variables.scss';
import '../styles/components.scss';
+ import '../styles/ref-pages.scss';
import favicon from '$lib/assets/favicon.svg';
diff --git a/src/routes/reference/+page.svelte b/src/routes/reference/+page.svelte
new file mode 100644
index 0000000..3ce1936
--- /dev/null
+++ b/src/routes/reference/+page.svelte
@@ -0,0 +1,132 @@
+
+
+
Quick guides and cheat sheets for networking concepts, IP addressing, and common protocols
+Each reference page provides:
+We're continuously adding more networking references. Coming soon:
+{cidrContent.description}
+{cidrContent.sections.whatIs.content}
+ +192.168.1.0/24, the network is 192.168.1.0 and there are 254 usable host addresses (192.168.1.1 through 192.168.1.254).
+ {cidrContent.sections.whyReplaced.content}
+{cidrContent.sections.howToRead.content}
+| Prefix | +Subnet Mask | +Usable Hosts | +Typical Use | +
|---|---|---|---|
{row.prefix} |
+ {row.mask} |
+ {row.hosts} | +{row.typical} | +
{ipv6AddressTypesContent.description}
+{ipv6AddressTypesContent.sections.overview.content}
+{type.prefix}{type.range}{type.example}| Address | +Name | +Description | +Usage | +
|---|---|---|---|
{addr.address} |
+ {addr.name} | +{addr.description} | +{addr.usage} | +
All multicast addresses start with ff. The second byte indicates scope:
{scope.prefix}{ipv6AddressTypesContent.anycast.description}
+ +| Prefix | +Purpose | +
|---|---|
{range.prefix} |
+ {range.purpose} | +
{commonPortsContent.description}
+| Range | +Name | +Description | +
|---|---|---|
{range.range} |
+ {range.name} | +{range.description} | +
| Port | +Protocol | +Service | +Description | +
|---|---|---|---|
{port.port} |
+ {port.protocol} | +{port.service} | +{port.description} | +
| Port | +Protocol | +Service | +Description | +
|---|---|---|---|
{port.port} |
+ {port.protocol} | +{port.service} | +{port.description} | +
{specialIPv4Content.description}
+| Network | +Purpose | +RFC | +Routable | +Description | +
|---|---|---|---|---|
{range.network} |
+ {range.purpose} | +{range.rfc} | ++ {#if range.routable} + Yes + {:else} + No + {/if} + | +{range.description} | +
{supernetContent.description}
+{supernetContent.sections.whatIs.content}
+ +{supernetContent.sections.requirements.content}
+{supernetContent.binaryExample.scenario}
+ +| Network | +Binary Representation | +
|---|---|
{row.network} |
+ {row.binary} |
+
Problem: {pitfall.problem}
+Example: {pitfall.example}
+| Input Networks | +Summary Prefix | +Routes Saved | +
|---|---|---|
| {row.networks} | +{row.summary} |
+ {row.saves} | +
{vlsmContent.description}
+{vlsmContent.sections.whatIs.content}
+{vlsmContent.sections.whenWhy.content}
+ +{vlsmContent.sections.howItWorks.content}
+{vlsmContent.example.scenario}
+ +{subnet.subnet} - {subnet.use} ({subnet.hosts})Problem: {pitfall.problem}
+Solution: {pitfall.solution}
+