Starts referense section

This commit is contained in:
Alicia Sykes committed 2025-09-01 23:08:42 +01:00
1 parent 91c5ababbe
commit 90b9f124a2
15 files changed
+1855

No files matched your search

+76
View File
@@ -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"
]
};
+88
View File
@@ -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"
]
};
+156
View File
@@ -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)"
]
};
+135
View File
@@ -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"
]
};
+111
View File
@@ -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" }
]
};
+94
View File
@@ -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"
]
};
+1
View File
@@ -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';
+132
View File
@@ -0,0 +1,132 @@
<script lang="ts">
import { site } from '$lib/constants/site';
import Icon from '$lib/components/Icon.svelte';
const referencePages = [
{
title: "CIDR Notation Explained",
path: "/reference/cidr",
description: "What CIDR is, why it replaced IP classes, and how to read network prefixes",
icon: "hash"
},
{
title: "VLSM in Plain English",
path: "/reference/vlsm",
description: "Variable Length Subnet Masking - when to use it and common pitfalls",
icon: "scissors"
},
{
title: "Route Summarization / Supernetting",
path: "/reference/supernetting",
description: "Combine multiple networks into single routes for efficient routing",
icon: "layers"
},
{
title: "IPv6 Address Types & Key Prefixes",
path: "/reference/ipv6-address-types",
description: "Global unicast, ULA, link-local, multicast, and special IPv6 addresses",
icon: "globe"
},
{
title: "Special-Use IPv4 Blocks (RFC 6890)",
path: "/reference/special-use-ipv4",
description: "Reserved IPv4 ranges including private networks, CGNAT, and test blocks",
icon: "shield"
},
{
title: "Common TCP/UDP Ports",
path: "/reference/ports",
description: "Quick reference for frequently used port numbers and services",
icon: "server"
}
];
</script>
<svelte:head>
<title>Networking Reference Guide | {site.title}</title>
<meta name="description" content="Complete networking reference guide covering CIDR, VLSM, IPv6, special-use addresses, common ports, and more." />
<meta name="keywords" content="{site.keywords}, networking reference, CIDR guide, IPv6 reference, port numbers, network documentation" />
<meta property="og:title" content="Networking Reference Guide" />
<meta property="og:description" content="Comprehensive networking reference covering IP addressing, routing, and common protocols." />
<meta property="og:url" content="{site.url}/reference" />
</svelte:head>
<div class="page-container">
<div class="ref-page">
<div class="ref-header">
<h1>Networking Reference Guide</h1>
<p class="subtitle">Quick guides and cheat sheets for networking concepts, IP addressing, and common protocols</p>
</div>
<div class="ref-section">
<h2>Available References</h2>
<div class="ref-grid two-col">
{#each referencePages as page}
<a href={page.path} class="grid-item reference-link">
<div class="item-title">
<Icon name={page.icon} size="sm" />
{page.title}
</div>
<div class="item-description">{page.description}</div>
</a>
{/each}
</div>
</div>
<div class="ref-section">
<h2>How to Use These References</h2>
<p>Each reference page provides:</p>
<ul>
<li><strong>Plain English explanations</strong> - No confusing jargon</li>
<li><strong>Practical examples</strong> - Real-world scenarios you'll encounter</li>
<li><strong>Quick reference tables</strong> - Easy to scan and find what you need</li>
<li><strong>Common pitfalls</strong> - Mistakes to avoid</li>
<li><strong>Best practices</strong> - How to do things right</li>
</ul>
<div class="ref-highlight">
<div class="highlight-title">
<Icon name="lightbulb" size="sm" />
Tip
</div>
<div class="highlight-content">
These references pair perfectly with the calculators and tools on this site. Use them to understand the concepts, then use the tools to do the calculations.
</div>
</div>
</div>
<div class="ref-section">
<h2>More References Coming Soon</h2>
<p>We're continuously adding more networking references. Coming soon:</p>
<ul>
<li>IPv6 Prefix Lengths Guide</li>
<li>Multicast Addressing Basics</li>
<li>NAT Types Explained</li>
<li>Wildcard Masks for ACLs</li>
<li>Common MTU/MSS Values</li>
<li>And more...</li>
</ul>
</div>
</div>
</div>
<style>
.reference-link {
text-decoration: none;
color: inherit;
transition: var(--transition-fast);
cursor: pointer;
}
.reference-link:hover {
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.reference-link .item-title {
display: flex;
align-items: center;
gap: var(--spacing-xs);
color: var(--color-primary);
}
</style>
+107
View File
@@ -0,0 +1,107 @@
<script lang="ts">
import { cidrContent } from '$lib/content/cidr.js';
import { site } from '$lib/constants/site';
import Icon from '$lib/components/Icon.svelte';
</script>
<svelte:head>
<title>{cidrContent.title} | {site.title}</title>
<meta name="description" content="{cidrContent.description}" />
<meta name="keywords" content="{site.keywords}, CIDR, classless routing, IP networks, subnet mask, prefix length" />
<meta property="og:title" content="{cidrContent.title}" />
<meta property="og:description" content="{cidrContent.description}" />
<meta property="og:url" content="{site.url}/reference/cidr" />
</svelte:head>
<div class="page-container">
<div class="ref-page">
<div class="ref-header">
<h1>{cidrContent.title}</h1>
<p class="subtitle">{cidrContent.description}</p>
</div>
<div class="ref-section">
<h2>{cidrContent.sections.whatIs.title}</h2>
<p>{cidrContent.sections.whatIs.content}</p>
<div class="ref-highlight">
<div class="highlight-title">
<Icon name="info" size="sm" />
Quick Example
</div>
<div class="highlight-content">
In <code>192.168.1.0/24</code>, the network is 192.168.1.0 and there are 254 usable host addresses (192.168.1.1 through 192.168.1.254).
</div>
</div>
</div>
<div class="ref-section">
<h2>{cidrContent.sections.whyReplaced.title}</h2>
<p>{cidrContent.sections.whyReplaced.content}</p>
</div>
<div class="ref-section">
<h2>{cidrContent.sections.howToRead.title}</h2>
<p>{cidrContent.sections.howToRead.content}</p>
</div>
<div class="ref-section">
<h2>Common Examples</h2>
<div class="ref-examples">
<div class="examples-title">Network Examples</div>
{#each cidrContent.examples as example}
<div class="example-item">
<span class="example-input">{example.cidr}</span>
<span class="example-arrow">→</span>
<span class="example-output">{example.hosts}</span>
<div class="example-description">{example.description}</div>
</div>
{/each}
</div>
</div>
<div class="ref-section">
<h2>Prefix Length Reference Table</h2>
<table class="ref-table">
<thead>
<tr>
<th>Prefix</th>
<th>Subnet Mask</th>
<th>Usable Hosts</th>
<th>Typical Use</th>
</tr>
</thead>
<tbody>
{#each cidrContent.prefixTable as row}
<tr>
<td><code>{row.prefix}</code></td>
<td><code>{row.mask}</code></td>
<td>{row.hosts}</td>
<td>{row.typical}</td>
</tr>
{/each}
</tbody>
</table>
</div>
<div class="ref-section">
<h2>Key Points to Remember</h2>
<ul>
{#each cidrContent.keyPoints as point}
<li>{point}</li>
{/each}
</ul>
<div class="ref-warning">
<div class="warning-title">
<Icon name="alert-triangle" size="sm" />
Remember
</div>
<div class="warning-content">
The first and last addresses in any network are reserved (network address and broadcast address), so the usable host count is always 2 less than the total addresses.
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,144 @@
<script lang="ts">
import { ipv6AddressTypesContent } from '$lib/content/ipv6-address-types.js';
import { site } from '$lib/constants/site';
import Icon from '$lib/components/Icon.svelte';
</script>
<svelte:head>
<title>{ipv6AddressTypesContent.title} | {site.title}</title>
<meta name="description" content="{ipv6AddressTypesContent.description}" />
<meta name="keywords" content="{site.keywords}, IPv6, address types, unicast, multicast, anycast, global unicast, link local" />
<meta property="og:title" content="{ipv6AddressTypesContent.title}" />
<meta property="og:description" content="{ipv6AddressTypesContent.description}" />
<meta property="og:url" content="{site.url}/reference/ipv6-address-types" />
</svelte:head>
<div class="page-container">
<div class="ref-page">
<div class="ref-header">
<h1>{ipv6AddressTypesContent.title}</h1>
<p class="subtitle">{ipv6AddressTypesContent.description}</p>
</div>
<div class="ref-section">
<h2>{ipv6AddressTypesContent.sections.overview.title}</h2>
<p>{ipv6AddressTypesContent.sections.overview.content}</p>
</div>
<div class="ref-section">
<h2>Unicast Address Types</h2>
{#each ipv6AddressTypesContent.unicastTypes as type}
<div class="ref-examples">
<div class="examples-title">{type.type}</div>
<div class="example-item">
<div><strong>Prefix:</strong> <code>{type.prefix}</code></div>
<div><strong>Range:</strong> <code>{type.range}</code></div>
<div><strong>Description:</strong> {type.description}</div>
<div><strong>Usage:</strong> {type.usage}</div>
<div><strong>Example:</strong> <code>{type.example}</code></div>
</div>
</div>
{/each}
</div>
<div class="ref-section">
<h2>Special Addresses</h2>
<table class="ref-table">
<thead>
<tr>
<th>Address</th>
<th>Name</th>
<th>Description</th>
<th>Usage</th>
</tr>
</thead>
<tbody>
{#each ipv6AddressTypesContent.specialAddresses as addr}
<tr>
<td><code>{addr.address}</code></td>
<td>{addr.name}</td>
<td>{addr.description}</td>
<td>{addr.usage}</td>
</tr>
{/each}
</tbody>
</table>
</div>
<div class="ref-section">
<h2>Multicast Address Scopes</h2>
<p>All multicast addresses start with <code>ff</code>. The second byte indicates scope:</p>
{#each ipv6AddressTypesContent.multicastTypes as scope}
<div class="ref-examples">
<div class="examples-title">{scope.scope} Scope</div>
<div class="example-item">
<div><strong>Prefix:</strong> <code>{scope.prefix}</code></div>
<div><strong>Description:</strong> {scope.description}</div>
{#if scope.examples.length > 0}
<div><strong>Common Addresses:</strong></div>
{#each scope.examples as example}
<div class="example-input">{example}</div>
{/each}
{/if}
</div>
</div>
{/each}
</div>
<div class="ref-section">
<h2>{ipv6AddressTypesContent.anycast.title}</h2>
<p>{ipv6AddressTypesContent.anycast.description}</p>
<div class="ref-highlight">
<div class="highlight-title">
<Icon name="share" size="sm" />
Example
</div>
<div class="highlight-content">
{ipv6AddressTypesContent.anycast.example}
</div>
</div>
<h3>Common Anycast Uses</h3>
<ul>
{#each ipv6AddressTypesContent.anycast.commonUses as use}
<li>{use}</li>
{/each}
</ul>
</div>
<div class="ref-section">
<h2>Reserved Address Ranges</h2>
<table class="ref-table">
<thead>
<tr>
<th>Prefix</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
{#each ipv6AddressTypesContent.reservedRanges as range}
<tr>
<td><code>{range.prefix}</code></td>
<td>{range.purpose}</td>
</tr>
{/each}
</tbody>
</table>
</div>
<div class="ref-section">
<h2>Quick Recognition Tips</h2>
<div class="ref-examples">
<div class="examples-title">Remember These Patterns</div>
{#each ipv6AddressTypesContent.quickTips as tip}
<div class="example-item">
<div class="example-description">{tip}</div>
</div>
{/each}
</div>
</div>
</div>
</div>
+162
View File
@@ -0,0 +1,162 @@
<script lang="ts">
import { commonPortsContent } from '$lib/content/common-ports.js';
import { site } from '$lib/constants/site';
import Icon from '$lib/components/Icon.svelte';
</script>
<svelte:head>
<title>{commonPortsContent.title} | {site.title}</title>
<meta name="description" content="{commonPortsContent.description}" />
<meta name="keywords" content="{site.keywords}, TCP ports, UDP ports, common ports, well-known ports, port numbers" />
<meta property="og:title" content="{commonPortsContent.title}" />
<meta property="og:description" content="{commonPortsContent.description}" />
<meta property="og:url" content="{site.url}/reference/ports" />
</svelte:head>
<div class="page-container">
<div class="ref-page">
<div class="ref-header">
<h1>{commonPortsContent.title}</h1>
<p class="subtitle">{commonPortsContent.description}</p>
</div>
<div class="ref-section">
<h2>Port Ranges</h2>
<table class="ref-table">
<thead>
<tr>
<th>Range</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{#each commonPortsContent.ranges as range}
<tr>
<td><code>{range.range}</code></td>
<td>{range.name}</td>
<td>{range.description}</td>
</tr>
{/each}
</tbody>
</table>
</div>
<div class="ref-section">
<h2>Well-Known Ports (0-1023)</h2>
<table class="ref-table">
<thead>
<tr>
<th>Port</th>
<th>Protocol</th>
<th>Service</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{#each commonPortsContent.wellKnown as port}
<tr>
<td><code>{port.port}</code></td>
<td>{port.protocol}</td>
<td><strong>{port.service}</strong></td>
<td>{port.description}</td>
</tr>
{/each}
</tbody>
</table>
</div>
<div class="ref-section">
<h2>Registered Ports (1024-49151)</h2>
<table class="ref-table">
<thead>
<tr>
<th>Port</th>
<th>Protocol</th>
<th>Service</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{#each commonPortsContent.registered as port}
<tr>
<td><code>{port.port}</code></td>
<td>{port.protocol}</td>
<td><strong>{port.service}</strong></td>
<td>{port.description}</td>
</tr>
{/each}
</tbody>
</table>
</div>
<div class="ref-section">
<h2>Common Service Categories</h2>
<div class="ref-grid two-col">
<div class="grid-item">
<div class="item-title">Web Services</div>
{#each commonPortsContent.categories.web as service}
<div class="item-code">{service.ports} - {service.service}</div>
<div class="item-description" style="color: {service.secure ? 'var(--color-success)' : 'var(--color-error)'}">
{service.secure ? 'Secure' : 'Not secure'}
</div>
{/each}
</div>
<div class="grid-item">
<div class="item-title">Email Services</div>
{#each commonPortsContent.categories.email as service}
<div class="item-code">{service.ports} - {service.service}</div>
<div class="item-description" style="color: {service.secure ? 'var(--color-success)' : 'var(--color-error)'}">
{service.secure ? 'Secure' : 'Not secure'}
</div>
{/each}
</div>
<div class="grid-item">
<div class="item-title">Remote Access</div>
{#each commonPortsContent.categories.remote as service}
<div class="item-code">{service.ports} - {service.service}</div>
<div class="item-description" style="color: {service.secure ? 'var(--color-success)' : 'var(--color-error)'}">
{service.secure ? 'Secure' : 'Not secure'}
</div>
{/each}
</div>
<div class="grid-item">
<div class="item-title">Database Services</div>
{#each commonPortsContent.categories.database as service}
<div class="item-code">{service.ports} - {service.service}</div>
<div class="item-description" style="color: {service.secure ? 'var(--color-success)' : 'var(--color-error)'}">
{service.secure ? 'Secure' : 'Not secure'}
</div>
{/each}
</div>
</div>
</div>
<div class="ref-section">
<h2>Important Security Tips</h2>
<div class="ref-examples">
<div class="examples-title">Remember These</div>
{#each commonPortsContent.tips as tip}
<div class="example-item">
<div class="example-description">{tip}</div>
</div>
{/each}
</div>
<div class="ref-warning">
<div class="warning-title">
<Icon name="shield" size="sm" />
Security Note
</div>
<div class="warning-content">
Many services have both secure and insecure versions. Always use the secure versions (HTTPS, SSH, FTPS, etc.) when possible, especially over untrusted networks.
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,116 @@
<script lang="ts">
import { specialIPv4Content } from '$lib/content/special-use-ipv4.js';
import { site } from '$lib/constants/site';
import Icon from '$lib/components/Icon.svelte';
</script>
<svelte:head>
<title>{specialIPv4Content.title} | {site.title}</title>
<meta name="description" content="{specialIPv4Content.description}" />
<meta name="keywords" content="{site.keywords}, special use IPv4, reserved IP ranges, RFC 6890, private addresses" />
<meta property="og:title" content="{specialIPv4Content.title}" />
<meta property="og:description" content="{specialIPv4Content.description}" />
<meta property="og:url" content="{site.url}/reference/special-use-ipv4" />
</svelte:head>
<div class="page-container">
<div class="ref-page">
<div class="ref-header">
<h1>{specialIPv4Content.title}</h1>
<p class="subtitle">{specialIPv4Content.description}</p>
</div>
<div class="ref-section">
<h2>Complete Special-Use IPv4 Ranges</h2>
<table class="ref-table">
<thead>
<tr>
<th>Network</th>
<th>Purpose</th>
<th>RFC</th>
<th>Routable</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{#each specialIPv4Content.ranges as range}
<tr>
<td><code>{range.network}</code></td>
<td>{range.purpose}</td>
<td>{range.rfc}</td>
<td>
{#if range.routable}
<span style="color: var(--color-success)">Yes</span>
{:else}
<span style="color: var(--color-error)">No</span>
{/if}
</td>
<td>{range.description}</td>
</tr>
{/each}
</tbody>
</table>
</div>
<div class="ref-section">
<h2>Common Address Categories</h2>
<div class="ref-grid two-col">
<div class="grid-item">
<div class="item-title">Private Networks (RFC 1918)</div>
{#each specialIPv4Content.categories.private as network}
<div class="item-code">{network}</div>
{/each}
<div class="item-description">Never routed on the public internet</div>
</div>
<div class="grid-item">
<div class="item-title">Test Networks (RFC 5737)</div>
{#each specialIPv4Content.categories.testing as network}
<div class="item-code">{network}</div>
{/each}
<div class="item-description">Safe for documentation and examples</div>
</div>
<div class="grid-item">
<div class="item-title">Carrier-Grade NAT</div>
{#each specialIPv4Content.categories.cgnat as network}
<div class="item-code">{network}</div>
{/each}
<div class="item-description">ISP shared addressing space</div>
</div>
<div class="grid-item">
<div class="item-title">Special Purpose</div>
{#each specialIPv4Content.categories.special as network}
<div class="item-code">{network}</div>
{/each}
<div class="item-description">Loopback, link-local, multicast</div>
</div>
</div>
</div>
<div class="ref-section">
<h2>Quick Recognition Tips</h2>
<div class="ref-examples">
<div class="examples-title">What Each Range Means</div>
{#each specialIPv4Content.quickTips as tip}
<div class="example-item">
<div class="example-description">{tip}</div>
</div>
{/each}
</div>
<div class="ref-warning">
<div class="warning-title">
<Icon name="alert-triangle" size="sm" />
Important Note
</div>
<div class="warning-content">
If you see 100.64.x.x addresses, your ISP is using Carrier-Grade NAT (CGNAT). This can cause issues with port forwarding, gaming, and some applications that require direct connectivity.
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,150 @@
<script lang="ts">
import { supernetContent } from '$lib/content/supernetting.js';
import { site } from '$lib/constants/site';
import Icon from '$lib/components/Icon.svelte';
</script>
<svelte:head>
<title>{supernetContent.title} | {site.title}</title>
<meta name="description" content="{supernetContent.description}" />
<meta name="keywords" content="{site.keywords}, supernetting, route aggregation, route summarization, CIDR, routing" />
<meta property="og:title" content="{supernetContent.title}" />
<meta property="og:description" content="{supernetContent.description}" />
<meta property="og:url" content="{site.url}/reference/supernetting" />
</svelte:head>
<div class="page-container">
<div class="ref-page">
<div class="ref-header">
<h1>{supernetContent.title}</h1>
<p class="subtitle">{supernetContent.description}</p>
</div>
<div class="ref-section">
<h2>{supernetContent.sections.whatIs.title}</h2>
<p>{supernetContent.sections.whatIs.content}</p>
<div class="ref-highlight">
<div class="highlight-title">
<Icon name="target" size="sm" />
Main Goal
</div>
<div class="highlight-content">
Reduce the number of routes in routing tables while maintaining connectivity to all networks.
</div>
</div>
</div>
<div class="ref-section">
<h2>{supernetContent.sections.requirements.title}</h2>
<p>{supernetContent.sections.requirements.content}</p>
</div>
<div class="ref-section">
<h2>Summarization Examples</h2>
{#each supernetContent.examples as example}
<div class="ref-examples">
<div class="examples-title">{example.title}</div>
<div class="example-item">
<div><strong>Individual Networks:</strong></div>
{#each example.networks as network}
<div class="example-input">{network}</div>
{/each}
<div class="example-arrow">↓ Summarizes to ↓</div>
<div class="example-output">{example.summary}</div>
<div class="example-description">{example.explanation} - {example.addresses}</div>
</div>
</div>
{/each}
</div>
<div class="ref-section">
<h2>{supernetContent.stepByStep.title}</h2>
<ol>
{#each supernetContent.stepByStep.steps as step}
<li>{step}</li>
{/each}
</ol>
</div>
<div class="ref-section">
<h2>{supernetContent.binaryExample.title}</h2>
<p><strong>{supernetContent.binaryExample.scenario}</strong></p>
<table class="ref-table">
<thead>
<tr>
<th>Network</th>
<th>Binary Representation</th>
</tr>
</thead>
<tbody>
{#each supernetContent.binaryExample.binary as row}
<tr>
<td><code>{row.network}</code></td>
<td><code>{row.binary}</code></td>
</tr>
{/each}
</tbody>
</table>
<div class="ref-highlight">
<div class="highlight-title">
<Icon name="eye" size="sm" />
Analysis
</div>
<div class="highlight-content">
{supernetContent.binaryExample.analysis}
</div>
</div>
</div>
<div class="ref-section">
<h2>Benefits of Route Summarization</h2>
<ul>
{#each supernetContent.benefits as benefit}
<li>{benefit}</li>
{/each}
</ul>
</div>
<div class="ref-section">
<h2>Common Pitfalls</h2>
{#each supernetContent.pitfalls as pitfall}
<div class="ref-warning">
<div class="warning-title">
<Icon name="alert-triangle" size="sm" />
{pitfall.title}
</div>
<div class="warning-content">
<p><strong>Problem:</strong> {pitfall.problem}</p>
<p><strong>Example:</strong> {pitfall.example}</p>
</div>
</div>
{/each}
</div>
<div class="ref-section">
<h2>Quick Reference Table</h2>
<table class="ref-table">
<thead>
<tr>
<th>Input Networks</th>
<th>Summary Prefix</th>
<th>Routes Saved</th>
</tr>
</thead>
<tbody>
{#each supernetContent.quickReference as row}
<tr>
<td>{row.networks}</td>
<td><code>{row.summary}</code></td>
<td>{row.saves}</td>
</tr>
{/each}
</tbody>
</table>
</div>
</div>
</div>
+111
View File
@@ -0,0 +1,111 @@
<script lang="ts">
import { vlsmContent } from '$lib/content/vlsm.js';
import { site } from '$lib/constants/site';
import Icon from '$lib/components/Icon.svelte';
</script>
<svelte:head>
<title>{vlsmContent.title} | {site.title}</title>
<meta name="description" content="{vlsmContent.description}" />
<meta name="keywords" content="{site.keywords}, VLSM, variable length subnet masking, subnetting, network design" />
<meta property="og:title" content="{vlsmContent.title}" />
<meta property="og:description" content="{vlsmContent.description}" />
<meta property="og:url" content="{site.url}/reference/vlsm" />
</svelte:head>
<div class="page-container">
<div class="ref-page">
<div class="ref-header">
<h1>{vlsmContent.title}</h1>
<p class="subtitle">{vlsmContent.description}</p>
</div>
<div class="ref-section">
<h2>{vlsmContent.sections.whatIs.title}</h2>
<p>{vlsmContent.sections.whatIs.content}</p>
</div>
<div class="ref-section">
<h2>{vlsmContent.sections.whenWhy.title}</h2>
<p>{vlsmContent.sections.whenWhy.content}</p>
<div class="ref-highlight">
<div class="highlight-title">
<Icon name="lightbulb" size="sm" />
Key Benefit
</div>
<div class="highlight-content">
VLSM prevents IP address waste by letting you create subnets that are exactly the right size for each purpose.
</div>
</div>
</div>
<div class="ref-section">
<h2>{vlsmContent.sections.howItWorks.title}</h2>
<p>{vlsmContent.sections.howItWorks.content}</p>
</div>
<div class="ref-section">
<h2>{vlsmContent.example.title}</h2>
<p><strong>{vlsmContent.example.scenario}</strong></p>
<div class="ref-grid two-col">
<div class="grid-item">
<div class="item-title">Requirements</div>
<ul>
{#each vlsmContent.example.requirements as req}
<li>{req.name}: {req.hosts} hosts (needs {req.needsPrefix})</li>
{/each}
</ul>
</div>
<div class="grid-item">
<div class="item-title">VLSM Solution</div>
<ul>
{#each vlsmContent.example.solution as subnet}
<li><code>{subnet.subnet}</code> - {subnet.use} ({subnet.hosts})</li>
{/each}
</ul>
</div>
</div>
</div>
<div class="ref-section">
<h2>Common Pitfalls and Solutions</h2>
{#each vlsmContent.pitfalls as pitfall}
<div class="ref-warning">
<div class="warning-title">
<Icon name="alert-triangle" size="sm" />
{pitfall.title}
</div>
<div class="warning-content">
<p><strong>Problem:</strong> {pitfall.problem}</p>
<p><strong>Solution:</strong> {pitfall.solution}</p>
</div>
</div>
{/each}
</div>
<div class="ref-section">
<h2>Best Practices</h2>
<ul>
{#each vlsmContent.bestPractices as practice}
<li>{practice}</li>
{/each}
</ul>
</div>
<div class="ref-section">
<h2>Quick Tips</h2>
<div class="ref-examples">
<div class="examples-title">Remember These</div>
{#each vlsmContent.tips as tip}
<div class="example-item">
<div class="example-description">{tip}</div>
</div>
{/each}
</div>
</div>
</div>
</div>
+272
View File
@@ -0,0 +1,272 @@
// Reference pages shared styles
// Used across all /reference/* pages for consistent styling
.ref-page {
max-width: 800px;
margin: 0 auto;
.ref-header {
text-align: center;
margin-bottom: var(--spacing-xl);
h1 {
font-size: var(--font-size-2xl);
font-weight: 700;
color: var(--color-primary);
margin-bottom: var(--spacing-sm);
}
.subtitle {
color: var(--text-secondary);
font-size: var(--font-size-lg);
}
}
.ref-section {
background: var(--bg-secondary);
border: 1px solid var(--border-primary);
border-radius: var(--radius-lg);
padding: var(--spacing-lg);
margin-bottom: var(--spacing-lg);
h2 {
color: var(--text-primary);
font-size: var(--font-size-xl);
font-weight: 600;
margin-bottom: var(--spacing-md);
border-bottom: 1px solid var(--border-primary);
padding-bottom: var(--spacing-sm);
}
h3 {
color: var(--text-primary);
font-size: var(--font-size-lg);
font-weight: 600;
margin: var(--spacing-lg) 0 var(--spacing-sm) 0;
}
p {
color: var(--text-primary);
line-height: 1.6;
margin-bottom: var(--spacing-md);
}
ul, ol {
color: var(--text-primary);
padding-left: var(--spacing-lg);
margin-bottom: var(--spacing-md);
li {
margin-bottom: var(--spacing-xs);
line-height: 1.5;
}
}
code {
background: var(--bg-tertiary);
border: 1px solid var(--color-primary);
color: var(--text-primary);
font-family: var(--font-mono);
font-weight: 600;
padding: 0.25rem 0.5rem;
border-radius: var(--radius-sm);
font-size: 0.9em;
}
pre {
background: var(--bg-tertiary);
border: 1px solid var(--border-primary);
border-radius: var(--radius-md);
padding: var(--spacing-md);
margin: var(--spacing-md) 0;
overflow-x: auto;
code {
background: transparent;
border: none;
padding: 0;
}
}
}
.ref-table {
width: 100%;
border-collapse: collapse;
margin: var(--spacing-md) 0;
background: var(--bg-tertiary);
border-radius: var(--radius-md);
overflow: hidden;
th, td {
padding: var(--spacing-sm) var(--spacing-md);
text-align: left;
border-bottom: 1px solid var(--border-primary);
}
th {
background: var(--color-primary);
color: var(--bg-primary);
font-weight: 600;
font-size: var(--font-size-sm);
}
td {
color: var(--text-primary);
font-size: var(--font-size-sm);
code {
font-size: 0.85em;
}
}
tr:last-child td {
border-bottom: none;
}
tr:hover {
background: var(--bg-secondary);
}
}
.ref-highlight {
background: var(--bg-info);
border: 1px solid var(--border-info);
border-radius: var(--radius-md);
padding: var(--spacing-md);
margin: var(--spacing-md) 0;
.highlight-title {
color: var(--color-info-dark);
font-weight: 600;
margin-bottom: var(--spacing-sm);
display: flex;
align-items: center;
gap: var(--spacing-xs);
}
.highlight-content {
color: var(--color-info-dark);
}
}
.ref-warning {
background: var(--bg-warning);
border: 1px solid var(--border-warning);
border-radius: var(--radius-md);
padding: var(--spacing-md);
margin: var(--spacing-md) 0;
.warning-title {
color: var(--color-warning-dark);
font-weight: 600;
margin-bottom: var(--spacing-sm);
display: flex;
align-items: center;
gap: var(--spacing-xs);
}
.warning-content {
color: var(--color-warning-dark);
}
}
.ref-examples {
background: var(--bg-tertiary);
border: 1px solid var(--border-primary);
border-radius: var(--radius-md);
padding: var(--spacing-md);
margin: var(--spacing-md) 0;
.examples-title {
color: var(--text-primary);
font-weight: 600;
margin-bottom: var(--spacing-sm);
}
.example-item {
margin-bottom: var(--spacing-sm);
.example-input {
font-family: var(--font-mono);
color: var(--color-primary);
font-weight: 600;
}
.example-arrow {
color: var(--text-secondary);
margin: 0 var(--spacing-xs);
}
.example-output {
font-family: var(--font-mono);
color: var(--text-primary);
font-weight: 600;
}
.example-description {
color: var(--text-secondary);
font-size: var(--font-size-sm);
margin-top: var(--spacing-xs);
}
}
}
.ref-grid {
display: grid;
gap: var(--spacing-md);
margin: var(--spacing-md) 0;
&.two-col {
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
&.three-col {
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.grid-item {
background: var(--bg-tertiary);
border: 1px solid var(--border-primary);
border-radius: var(--radius-md);
padding: var(--spacing-md);
.item-title {
color: var(--text-primary);
font-weight: 600;
margin-bottom: var(--spacing-xs);
}
.item-code {
font-family: var(--font-mono);
color: var(--color-primary);
font-weight: 600;
font-size: var(--font-size-sm);
margin-bottom: var(--spacing-xs);
}
.item-description {
color: var(--text-secondary);
font-size: var(--font-size-sm);
}
}
}
}
@media (max-width: 768px) {
.ref-page {
.ref-table {
font-size: var(--font-size-xs);
th, td {
padding: var(--spacing-xs) var(--spacing-sm);
}
}
.ref-grid {
&.two-col,
&.three-col {
grid-template-columns: 1fr;
}
}
}
}