From f3a3248762c6de2f2bbb0f12c0528a4ad8f5e593 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Tue, 2 Sep 2025 01:34:12 +0100 Subject: [PATCH] Ref pages --- src/lib/constants/nav.ts | 163 +++++++- src/lib/content/arp-vs-ndp.ts | 291 +++++++++++++++ src/lib/content/asn.ts | 251 +++++++++++++ src/lib/content/cgnat.ts | 237 ++++++++++++ src/lib/content/icmp.ts | 290 +++++++++++++++ src/lib/content/ipv6-embedded-ipv4.ts | 184 +++++++++ src/lib/content/ipv6-prefix-lengths.ts | 140 +++++++ src/lib/content/ipv6-privacy-addresses.ts | 352 ++++++++++++++++++ src/lib/content/link-local-apipa.ts | 258 +++++++++++++ src/lib/content/mtu-mss.ts | 207 ++++++++++ src/lib/content/multicast.ts | 220 +++++++++++ src/lib/content/private-vs-public-ip.ts | 222 +++++++++++ src/lib/content/reverse-dns.ts | 214 +++++++++++ src/lib/content/reverse-zones.ts | 285 ++++++++++++++ src/lib/content/wildcard-masks.ts | 209 +++++++++++ src/routes/ip-reference/+page.svelte | 104 ------ src/routes/reference/+page.svelte | 98 ++++- src/routes/reference/arp-vs-ndp/+page.svelte | 219 +++++++++++ src/routes/reference/asn/+page.svelte | 222 +++++++++++ src/routes/reference/cgnat/+page.svelte | 231 ++++++++++++ .../common-subnets/+page.svelte | 0 src/routes/reference/icmp/+page.svelte | 184 +++++++++ .../reference/ipv6-embedded-ipv4/+page.svelte | 159 ++++++++ .../ipv6-prefix-lengths/+page.svelte | 151 ++++++++ .../ipv6-privacy-addresses/+page.svelte | 311 ++++++++++++++++ .../reference/link-local-apipa/+page.svelte | 250 +++++++++++++ src/routes/reference/mtu-mss/+page.svelte | 223 +++++++++++ src/routes/reference/multicast/+page.svelte | 197 ++++++++++ .../network-classes/+page.svelte | 0 .../private-vs-public-ip/+page.svelte | 242 ++++++++++++ .../reserved-ranges/+page.svelte | 0 src/routes/reference/reverse-dns/+page.svelte | 197 ++++++++++ .../reference/reverse-zones/+page.svelte | 284 ++++++++++++++ .../reference/wildcard-masks/+page.svelte | 208 +++++++++++ 34 files changed, 6674 insertions(+), 129 deletions(-) create mode 100644 src/lib/content/arp-vs-ndp.ts create mode 100644 src/lib/content/asn.ts create mode 100644 src/lib/content/cgnat.ts create mode 100644 src/lib/content/icmp.ts create mode 100644 src/lib/content/ipv6-embedded-ipv4.ts create mode 100644 src/lib/content/ipv6-prefix-lengths.ts create mode 100644 src/lib/content/ipv6-privacy-addresses.ts create mode 100644 src/lib/content/link-local-apipa.ts create mode 100644 src/lib/content/mtu-mss.ts create mode 100644 src/lib/content/multicast.ts create mode 100644 src/lib/content/private-vs-public-ip.ts create mode 100644 src/lib/content/reverse-dns.ts create mode 100644 src/lib/content/reverse-zones.ts create mode 100644 src/lib/content/wildcard-masks.ts delete mode 100644 src/routes/ip-reference/+page.svelte create mode 100644 src/routes/reference/arp-vs-ndp/+page.svelte create mode 100644 src/routes/reference/asn/+page.svelte create mode 100644 src/routes/reference/cgnat/+page.svelte rename src/routes/{ip-reference => reference}/common-subnets/+page.svelte (100%) create mode 100644 src/routes/reference/icmp/+page.svelte create mode 100644 src/routes/reference/ipv6-embedded-ipv4/+page.svelte create mode 100644 src/routes/reference/ipv6-prefix-lengths/+page.svelte create mode 100644 src/routes/reference/ipv6-privacy-addresses/+page.svelte create mode 100644 src/routes/reference/link-local-apipa/+page.svelte create mode 100644 src/routes/reference/mtu-mss/+page.svelte create mode 100644 src/routes/reference/multicast/+page.svelte rename src/routes/{ip-reference => reference}/network-classes/+page.svelte (100%) create mode 100644 src/routes/reference/private-vs-public-ip/+page.svelte rename src/routes/{ip-reference => reference}/reserved-ranges/+page.svelte (100%) create mode 100644 src/routes/reference/reverse-dns/+page.svelte create mode 100644 src/routes/reference/reverse-zones/+page.svelte create mode 100644 src/routes/reference/wildcard-masks/+page.svelte diff --git a/src/lib/constants/nav.ts b/src/lib/constants/nav.ts index 9d3ccfe..3fabf1e 100644 --- a/src/lib/constants/nav.ts +++ b/src/lib/constants/nav.ts @@ -17,7 +17,7 @@ export const TOP_NAV: NavItem[] = [ { href: '/subnetting', label: 'Subnetting' }, { href: '/cidr', label: 'CIDR Convert' }, { href: '/ip-address-convertor', label: 'IP Tools' }, - { href: '/ip-reference', label: 'Reference' } + { href: '/reference', label: 'Reference' } ]; // Sections that have sub-pages (drives the conditional SubHeader) @@ -225,26 +225,153 @@ export const SUB_NAV: Record = { ] } ], - '/ip-reference': [ - { - href: '/ip-reference/network-classes', - label: 'Network Classes', - description: 'IP address classes (A, B, C, D, E) and their characteristics', - icon: 'network-classes' + '/reference': [ + { + title: 'Fundamentals', + items: [ + { + href: '/reference/cidr', + label: 'CIDR Notation Explained', + description: 'What CIDR is, why it replaced IP classes, and how to read network prefixes', + icon: 'hash' + }, + { + href: '/reference/vlsm', + label: 'VLSM in Plain English', + description: 'Variable Length Subnet Masking - when to use it and common pitfalls', + icon: 'scissors' + }, + { + href: '/reference/supernetting', + label: 'Route Summarization / Supernetting', + description: 'Combine multiple networks into single routes for efficient routing', + icon: 'layers' + } + ] }, - { - href: '/ip-reference/reserved-ranges', - label: 'Reserved Ranges', - description: 'Private networks, loopback, multicast, and special IP ranges', - icon: 'reserved-ranges' + { + title: 'IPv6 Addressing', + items: [ + { + href: '/reference/ipv6-address-types', + label: 'IPv6 Address Types & Key Prefixes', + description: 'Global unicast, ULA, link-local, multicast, and special IPv6 addresses', + icon: 'globe' + }, + { + href: '/reference/ipv6-prefix-lengths', + label: 'Common IPv6 Prefix Lengths', + description: 'Quick reference for /128, /127, /64, /60, /56, /48, /32 with typical uses', + icon: 'grid' + }, + { + href: '/reference/ipv6-embedded-ipv4', + label: 'IPv4 in IPv6', + description: 'IPv4-mapped addresses, 6to4, Teredo, and transition mechanisms', + icon: 'shuffle' + }, + { + href: '/reference/ipv6-privacy-addresses', + label: 'IPv6 Privacy Addresses', + description: 'SLAAC privacy extensions: temporary vs stable interface identifiers', + icon: 'eye-off' + } + ] }, - { - href: '/ip-reference/common-subnets', - label: 'Common Subnets', - description: 'Quick reference for frequently used subnet configurations', - icon: 'common-subnets' + { + title: 'Special Addresses', + items: [ + { + href: '/reference/special-use-ipv4', + label: 'Special-Use IPv4 Blocks (RFC 6890)', + description: 'Reserved IPv4 ranges including private networks, CGNAT, and test blocks', + icon: 'shield' + }, + { + href: '/reference/private-vs-public-ip', + label: 'Private vs Public IP Addresses', + description: 'Understanding private/public IPs, NAT implications, and identification', + icon: 'lock' + }, + { + href: '/reference/cgnat', + label: 'Carrier-Grade NAT Explained', + description: 'CGNAT (100.64.0.0/10), how to identify it, and service impacts', + icon: 'layers' + }, + { + href: '/reference/link-local-apipa', + label: 'Link-Local & APIPA Addresses', + description: 'IPv4 APIPA (169.254/16) and IPv6 link-local (fe80::/10) at a glance', + icon: 'wifi' + }, + { + href: '/reference/multicast', + label: 'IPv4 & IPv6 Multicast Basics', + description: 'Multicast scopes, well-known groups, and local subnet limitations', + icon: 'radio' + } + ] + }, + { + title: 'DNS & Protocols', + items: [ + { + href: '/reference/reverse-dns', + label: 'Reverse DNS (PTR Records)', + description: 'How in-addr.arpa and ip6.arpa work with examples for IPv4 and IPv6', + icon: 'corner-down-left' + }, + { + href: '/reference/reverse-zones', + label: 'Reverse Zones for CIDR Delegation', + description: 'Minimal reverse DNS zones needed to delegate IPv4 and IPv6 CIDR blocks', + icon: 'corner-down-left' + }, + { + href: '/reference/icmp', + label: 'ICMP & ICMPv6: Common Types', + description: 'Practical guide to ICMP message types for network troubleshooting', + icon: 'activity' + }, + { + href: '/reference/arp-vs-ndp', + label: 'ARP vs NDP', + description: 'Side-by-side comparison of IPv4 ARP and IPv6 Neighbor Discovery', + icon: 'git-compare' + } + ] + }, + { + title: 'Network Operations', + items: [ + { + href: '/reference/asn', + label: 'What is an ASN?', + description: 'Autonomous Systems, BGP basics, and how IP addresses map to ASNs', + icon: 'share-2' + }, + { + href: '/reference/ports', + label: 'Common TCP/UDP Ports', + description: 'Quick reference for frequently used port numbers and services', + icon: 'server' + }, + { + href: '/reference/wildcard-masks', + label: 'ACL Wildcard Masks', + description: 'Wildcard masks vs netmasks, quick conversions and ACL examples', + icon: 'filter' + }, + { + href: '/reference/mtu-mss', + label: 'Common MTU/MSS Values', + description: 'MTU and MSS values for Ethernet, PPPoE, VPN, and overhead calculations', + icon: 'package' + } + ] } - ] + ], }; // Helper: is a nav item active for a given pathname? diff --git a/src/lib/content/arp-vs-ndp.ts b/src/lib/content/arp-vs-ndp.ts new file mode 100644 index 0000000..1f233b7 --- /dev/null +++ b/src/lib/content/arp-vs-ndp.ts @@ -0,0 +1,291 @@ +export const arpVsNdpContent = { + title: "ARP vs NDP", + description: "Side-by-side comparison of ARP (IPv4) and NDP (IPv6) for address resolution and neighbor discovery.", + + sections: { + overview: { + title: "Purpose and Function", + content: `Both ARP (Address Resolution Protocol) and NDP (Neighbor Discovery Protocol) solve the same fundamental problem: how to find the MAC address (link-layer address) when you only know the IP address. + +However, NDP is much more capable than ARP, handling not just address resolution but also router discovery, address autoconfiguration, and duplicate address detection.` + } + }, + + comparison: { + basic: [ + { + aspect: "Primary Purpose", + arp: "Find MAC address from IPv4 address", + ndp: "Find MAC address from IPv6 address + much more" + }, + { + aspect: "Protocol Layer", + arp: "Separate protocol (EtherType 0x0806)", + ndp: "Uses ICMPv6 (part of IPv6)" + }, + { + aspect: "Broadcast/Multicast", + arp: "Uses broadcast (ff:ff:ff:ff:ff:ff)", + ndp: "Uses specific multicast addresses" + }, + { + aspect: "Security", + arp: "No built-in security (vulnerable to spoofing)", + ndp: "Can use IPSec for security" + }, + { + aspect: "Address Space Efficiency", + arp: "Broadcasts to all hosts on subnet", + ndp: "Multicasts only to likely neighbors" + } + ] + }, + + arpDetails: { + title: "ARP (Address Resolution Protocol)", + + messageTypes: [ + { + type: "ARP Request", + description: "Who has IP address X.X.X.X? Tell MAC address Y:Y:Y:Y:Y:Y", + destination: "Broadcast (ff:ff:ff:ff:ff:ff)", + response: "Target host responds if it owns that IP" + }, + { + type: "ARP Reply", + description: "I have IP address X.X.X.X at MAC address Z:Z:Z:Z:Z:Z", + destination: "Unicast to requesting host", + response: "Requesting host updates its ARP table" + }, + { + type: "Gratuitous ARP", + description: "Unsolicited announcement of IP/MAC binding", + destination: "Broadcast", + response: "Hosts update their ARP tables" + }, + { + type: "ARP Probe", + description: "Check if IP address is already in use", + destination: "Broadcast with sender IP as 0.0.0.0", + response: "Conflict if someone responds" + } + ], + + process: [ + "Host A wants to send packet to Host B (knows IP, needs MAC)", + "Host A checks its ARP table for cached entry", + "If no entry, Host A broadcasts ARP Request", + "Host B (owner of target IP) sends ARP Reply with its MAC", + "Host A caches the IP/MAC mapping in ARP table", + "Host A can now send packets to Host B" + ], + + limitations: [ + "No built-in security (ARP spoofing attacks)", + "Broadcasts create network noise", + "No duplicate address detection", + "No router discovery mechanism", + "Cache entries can become stale" + ] + }, + + ndpDetails: { + title: "NDP (Neighbor Discovery Protocol)", + + messageTypes: [ + { + type: "Neighbor Solicitation (NS)", + icmpType: "ICMPv6 Type 135", + description: "IPv6 equivalent of ARP Request", + destination: "Solicited-node multicast address", + purpose: "Find MAC address for IPv6 address" + }, + { + type: "Neighbor Advertisement (NA)", + icmpType: "ICMPv6 Type 136", + description: "IPv6 equivalent of ARP Reply", + destination: "Unicast or all-nodes multicast", + purpose: "Provide MAC address for IPv6 address" + }, + { + type: "Router Solicitation (RS)", + icmpType: "ICMPv6 Type 133", + description: "Find routers on network", + destination: "All-routers multicast (ff02::2)", + purpose: "Discover available routers" + }, + { + type: "Router Advertisement (RA)", + icmpType: "ICMPv6 Type 134", + description: "Router announces its presence and configuration", + destination: "All-nodes multicast (ff02::1)", + purpose: "Provide network configuration info" + }, + { + type: "Redirect", + icmpType: "ICMPv6 Type 137", + description: "Better path to destination", + destination: "Unicast to original sender", + purpose: "Optimize routing path" + } + ], + + process: [ + "Host A wants to communicate with Host B (IPv6 address known)", + "Host A checks its neighbor cache for cached entry", + "If no entry, Host A sends Neighbor Solicitation to solicited-node multicast", + "Only hosts with matching addresses process the NS", + "Host B sends Neighbor Advertisement with its MAC address", + "Host A caches the IPv6/MAC mapping in neighbor cache", + "Periodic reachability confirmation keeps entries fresh" + ], + + advantages: [ + "More efficient (multicast vs broadcast)", + "Built-in duplicate address detection", + "Router discovery and autoconfiguration", + "Neighbor unreachability detection", + "Can use IPSec for security", + "Supports mobile IPv6" + ] + }, + + practicalDifferences: [ + { + scenario: "Network Discovery", + arp: "No router discovery - must be manually configured", + ndp: "Automatic router discovery via Router Advertisements", + impact: "IPv6 hosts can automatically find default gateway" + }, + { + scenario: "Address Conflicts", + arp: "No built-in conflict detection", + ndp: "Duplicate Address Detection (DAD) prevents conflicts", + impact: "IPv6 is more robust against address conflicts" + }, + { + scenario: "Network Efficiency", + arp: "Broadcasts disturb all hosts on subnet", + ndp: "Multicasts only to likely targets", + impact: "IPv6 creates less network noise" + }, + { + scenario: "Security", + arp: "Vulnerable to spoofing attacks", + ndp: "Can use IPSec, harder to spoof multicast", + impact: "IPv6 can be more secure with proper configuration" + }, + { + scenario: "Mobility Support", + arp: "No mobility support", + ndp: "Built-in support for mobile devices", + impact: "IPv6 better for mobile and wireless networks" + } + ], + + troubleshootingCommands: [ + { + purpose: "View ARP Table", + ipv4: "arp -a", + ipv6: "ip -6 neighbor show", + windows: "netsh interface ipv6 show neighbors" + }, + { + purpose: "Clear Cache", + ipv4: "arp -d [ip]", + ipv6: "ip -6 neighbor del [ipv6] dev [interface]", + windows: "netsh interface ipv6 delete neighbors" + }, + { + purpose: "Send Manual Request", + ipv4: "arping [ip]", + ipv6: "ndisc6 [ipv6] [interface]", + windows: "ping [address] (triggers resolution)" + }, + { + purpose: "Monitor Traffic", + ipv4: "tcpdump arp", + ipv6: "tcpdump icmp6 and ip6[40] >= 133 and ip6[40] <= 137", + windows: "Wireshark filter: arp or (icmpv6.type >= 133 and icmpv6.type <= 137)" + } + ], + + commonIssues: [ + { + issue: "ARP Spoofing Attack", + protocol: "ARP", + description: "Attacker sends fake ARP replies to redirect traffic", + detection: "Monitor for duplicate MAC addresses or unusual ARP traffic", + mitigation: "Use ARP inspection, static ARP entries, or 802.1X" + }, + { + issue: "ARP Table Full", + protocol: "ARP", + description: "Too many entries cause legitimate entries to be dropped", + detection: "Intermittent connectivity to some hosts", + mitigation: "Increase ARP table size or implement rate limiting" + }, + { + issue: "Duplicate Address Detection Failure", + protocol: "NDP", + description: "IPv6 address conflicts not properly detected", + detection: "Intermittent IPv6 connectivity", + mitigation: "Check DAD configuration and timing" + }, + { + issue: "Router Advertisement Flooding", + protocol: "NDP", + description: "Rogue RAs cause network disruption", + detection: "Hosts getting wrong IPv6 configuration", + mitigation: "Use RA Guard on switches, monitor for rogue RAs" + } + ], + + bestPractices: [ + { + protocol: "ARP", + practices: [ + "Monitor for ARP spoofing attacks", + "Use static ARP entries for critical servers", + "Implement Dynamic ARP Inspection on switches", + "Set appropriate ARP cache timeouts", + "Monitor ARP table sizes on routers" + ] + }, + { + protocol: "NDP", + practices: [ + "Enable RA Guard on access switches", + "Monitor for rogue Router Advertisements", + "Configure proper DAD timing", + "Use IPSec for NDP security in sensitive environments", + "Monitor neighbor cache sizes" + ] + } + ], + + quickReference: { + arp: [ + "Broadcasts to ff:ff:ff:ff:ff:ff", + "EtherType 0x0806", + "Request/Reply model", + "No security", + "Cache timeout typically 60-240 seconds" + ], + ndp: [ + "Uses solicited-node multicast (ff02::1:ffXX:XXXX)", + "ICMPv6 types 133-137", + "Request/Advertisement + Router Discovery", + "Can use IPSec", + "Neighbor Unreachability Detection" + ] + }, + + migrationTips: [ + "IPv6 NDP is more complex but more capable than ARP", + "Security tools need updating for NDP monitoring", + "NDP multicast addresses must be properly handled by switches", + "Router Advertisement security becomes critical in IPv6", + "Neighbor cache management differs from ARP table management" + ] +}; \ No newline at end of file diff --git a/src/lib/content/asn.ts b/src/lib/content/asn.ts new file mode 100644 index 0000000..44bfef0 --- /dev/null +++ b/src/lib/content/asn.ts @@ -0,0 +1,251 @@ +export const asnContent = { + title: "What is an ASN?", + description: "Understanding Autonomous System Numbers, BGP basics, and how IP addresses map to ASNs in internet routing.", + + sections: { + overview: { + title: "What is an Autonomous System (AS)?", + content: `An Autonomous System (AS) is a collection of IP networks and routers under the control of one organization that presents a common routing policy to the internet. Each AS is identified by a unique number called an ASN (Autonomous System Number). + +Think of an AS as an independent piece of the internet - like an ISP, a large company, or a university - that can make its own decisions about how to route traffic.` + }, + + asn: { + title: "ASN (Autonomous System Number)", + content: `ASNs are unique numbers that identify each Autonomous System. They work like postal codes for internet routing - they help routers know which organization controls which IP addresses. + +ASNs are assigned by Regional Internet Registries (RIRs) and are essential for Border Gateway Protocol (BGP) routing.` + } + }, + + asnTypes: [ + { + range: "1 - 64,511", + name: "16-bit Public ASNs", + description: "Original ASN format, globally unique", + usage: "Large ISPs, major organizations", + examples: ["AS7018 - AT&T", "AS15169 - Google", "AS32934 - Facebook"] + }, + { + range: "64,512 - 65,534", + name: "16-bit Private ASNs", + description: "For private use, not routed on internet", + usage: "Internal networks, testing, private peering", + examples: ["AS64512 - Common private ASN", "AS65001 - Lab networks"] + }, + { + range: "65,536 - 4,199,999,999", + name: "32-bit Public ASNs", + description: "Extended format due to exhaustion of 16-bit", + usage: "New allocations since 2009", + examples: ["AS200000+ - Newer organizations"] + } + ], + + bgpBasics: { + title: "BGP (Border Gateway Protocol) Basics", + description: "BGP is the routing protocol that connects Autonomous Systems together", + + concepts: [ + { + term: "BGP Speaker", + definition: "A router that runs BGP and can announce/receive routes", + example: "ISP edge routers, content delivery network nodes" + }, + { + term: "BGP Peer/Neighbor", + definition: "Two ASes that directly exchange routing information", + example: "Your ISP peers with other ISPs and content networks" + }, + { + term: "Route Advertisement", + definition: "Announcing which IP prefixes your AS can reach", + example: "AS15169 announces it can reach 8.8.8.0/24" + }, + { + term: "AS Path", + definition: "List of ASNs a route has passed through", + example: "Path: AS100 -> AS200 -> AS300 shows route traversal" + } + ], + + types: [ + { + type: "eBGP (External BGP)", + description: "BGP between different Autonomous Systems", + usage: "Inter-ISP routing, connecting to internet", + port: "TCP 179" + }, + { + type: "iBGP (Internal BGP)", + description: "BGP within the same Autonomous System", + usage: "Distributing external routes within large networks", + port: "TCP 179" + } + ] + }, + + ipToAsnMapping: { + title: "How IP Addresses Map to ASNs", + description: "Every public IP address belongs to exactly one ASN", + + process: [ + "RIRs allocate IP blocks to organizations", + "Organizations get assigned an ASN if they need BGP routing", + "The ASN announces (advertises) their IP prefixes via BGP", + "Internet routers learn which ASN controls which IP ranges", + "Traffic destined for those IPs is routed toward that ASN" + ], + + examples: [ + { + ipRange: "8.8.8.0/24", + asn: "AS15169", + organization: "Google LLC", + description: "Google's public DNS servers" + }, + { + ipRange: "1.1.1.0/24", + asn: "AS13335", + organization: "Cloudflare", + description: "Cloudflare's public DNS and CDN" + }, + { + ipRange: "157.240.0.0/16", + asn: "AS32934", + organization: "Facebook", + description: "Facebook's social media platform" + }, + { + ipRange: "192.0.2.0/24", + asn: "N/A", + organization: "TEST-NET-1", + description: "Documentation range, not routed" + } + ] + }, + + lookupTools: { + title: "ASN Lookup Tools", + description: "How to find which ASN owns an IP address", + + methods: [ + { + method: "WHOIS Query", + command: "whois 8.8.8.8", + description: "Command-line lookup for IP ownership", + example: "Shows: AS15169 Google LLC" + }, + { + method: "BGP Looking Glass", + command: "Web-based tools", + description: "View BGP routing tables from ISP perspective", + example: "Shows AS path and route information" + }, + { + method: "Online ASN Tools", + command: "Various websites", + description: "User-friendly ASN and IP lookup services", + example: "ASN lookup databases and APIs" + } + ], + + commonCommands: [ + "whois -h whois.radb.net 8.8.8.8", + "dig TXT 8.8.8.8.origin.asn.cymru.com", + "curl ipinfo.io/8.8.8.8" + ] + }, + + realWorldExamples: [ + { + scenario: "Major ISP", + asn: "AS7018", + organization: "AT&T", + role: "Provides internet connectivity to millions of customers", + ipBlocks: "Hundreds of different IP ranges", + peers: "Connects to other ISPs, content networks, enterprises" + }, + { + scenario: "Content Network", + asn: "AS15169", + organization: "Google", + role: "Serves content globally with low latency", + ipBlocks: "8.8.8.0/24, many others worldwide", + peers: "Peers with ISPs and other content networks" + }, + { + scenario: "Enterprise", + asn: "AS64496", + organization: "Large Corporation", + role: "Multi-homed for redundancy and performance", + ipBlocks: "Corporate public IP ranges", + peers: "Connects to multiple ISPs for redundancy" + }, + { + scenario: "University", + asn: "AS11537", + organization: "University Network", + role: "Provides connectivity for campus and research", + ipBlocks: "Educational institution IP ranges", + peers: "Connects to commercial ISPs and research networks" + } + ], + + benefits: [ + "Enables internet-scale routing between organizations", + "Provides routing policy control and traffic engineering", + "Allows redundant connections for improved reliability", + "Enables direct peering between content and eyeball networks", + "Supports internet growth through hierarchical addressing", + "Facilitates network troubleshooting and security analysis" + ], + + troubleshooting: [ + { + issue: "Slow connections to specific websites", + cause: "Poor BGP routing or lack of direct peering", + investigation: "Check AS path length and peering relationships", + solution: "Contact ISP about peering or use different DNS/CDN" + }, + { + issue: "Cannot reach certain IP ranges", + cause: "BGP routing issues or filtering", + investigation: "Use traceroute and BGP looking glass tools", + solution: "Verify BGP advertisements and routing policies" + }, + { + issue: "Asymmetric routing problems", + cause: "Different AS paths for inbound vs outbound traffic", + investigation: "Check BGP path attributes and policies", + solution: "Adjust BGP policies or consider additional peering" + } + ], + + quickFacts: [ + "AS numbers are globally unique identifiers", + "Every public IP address is announced by exactly one ASN", + "BGP is the only protocol that connects different ASes", + "Private ASNs (64512-65534) are not routed on the internet", + "AS path length affects routing decisions (shorter is preferred)", + "Large organizations often have multiple ASNs for different purposes" + ], + + gettingStarted: [ + { + step: "Understanding Your ISP", + description: "Find out your ISP's ASN and peering relationships", + action: "Use whois lookup on your public IP address" + }, + { + step: "Network Troubleshooting", + description: "Use ASN information to understand connectivity issues", + action: "Learn traceroute and BGP looking glass tools" + }, + { + step: "For Enterprises", + description: "Consider getting your own ASN for multi-homing", + action: "Evaluate benefits of redundant ISP connections" + } + ] +}; \ No newline at end of file diff --git a/src/lib/content/cgnat.ts b/src/lib/content/cgnat.ts new file mode 100644 index 0000000..9c25fd1 --- /dev/null +++ b/src/lib/content/cgnat.ts @@ -0,0 +1,237 @@ +export const cgnatContent = { + title: "Carrier-Grade NAT Explained", + description: "Understanding CGNAT (100.64.0.0/10), how to identify it, and its impact on network services.", + + sections: { + overview: { + title: "What is Carrier-Grade NAT?", + content: `Carrier-Grade NAT (CGNAT) is a large-scale NAT implementation used by ISPs to share a single public IPv4 address among multiple customers. It's also called Large Scale NAT (LSN) or NAT444. + +CGNAT became necessary due to IPv4 address exhaustion - there simply aren't enough public IPv4 addresses for every device to have its own.` + }, + + why: { + title: "Why Do ISPs Use CGNAT?", + content: `ISPs use CGNAT because: +- IPv4 addresses are expensive and scarce +- Customer demand for internet connectivity continues to grow +- Each customer may have multiple devices needing internet access +- Transitioning to IPv6 takes time and planning + +CGNAT allows ISPs to serve more customers with fewer public IPv4 addresses.` + } + }, + + addressRange: { + range: "100.64.0.0/10", + fullRange: "100.64.0.0 to 100.127.255.255", + totalAddresses: "4,194,304 addresses", + rfc: "RFC 6598", + purpose: "Shared Address Space for ISP CGNAT deployments", + + breakdown: [ + { network: "100.64.0.0/12", addresses: "1,048,576", use: "Large ISP CGNAT pool" }, + { network: "100.80.0.0/12", addresses: "1,048,576", use: "Large ISP CGNAT pool" }, + { network: "100.96.0.0/12", addresses: "1,048,576", use: "Large ISP CGNAT pool" }, + { network: "100.112.0.0/12", addresses: "1,048,576", use: "Large ISP CGNAT pool" } + ] + }, + + howItWorks: { + title: "How CGNAT Works", + description: "CGNAT creates a two-layer NAT system", + + layers: [ + { + layer: "Customer NAT", + location: "Home router", + inside: "Private addresses (192.168.x.x, 10.x.x.x)", + outside: "CGNAT address (100.64.x.x)", + purpose: "Translate devices to CGNAT address" + }, + { + layer: "Carrier NAT", + location: "ISP equipment", + inside: "CGNAT addresses (100.64.x.x)", + outside: "Public IPv4 addresses", + purpose: "Translate many customers to shared public IPs" + } + ], + + flow: [ + "Device (192.168.1.100) sends packet to internet", + "Home router NATs to CGNAT address (100.64.50.200)", + "ISP CGNAT translates to public IP (203.0.113.1) with unique port", + "Internet sees traffic from 203.0.113.1:45678", + "Return traffic follows reverse path with port mapping" + ] + }, + + identification: { + title: "How to Spot CGNAT", + + methods: [ + { + method: "Check WAN IP on Router", + description: "Look at your router's WAN/Internet IP address", + cgnatIndicator: "IP address in 100.64.0.0/10 range", + normalIndicator: "Public IP address not in private ranges" + }, + { + method: "Compare Router IP vs Public IP", + description: "Check what the internet sees vs router WAN IP", + cgnatIndicator: "Different addresses (router shows 100.64.x.x, internet sees public IP)", + normalIndicator: "Same address (router and internet see same public IP)" + }, + { + method: "Port Forwarding Behavior", + description: "Try to set up port forwarding", + cgnatIndicator: "Port forwarding doesn't work from internet", + normalIndicator: "Port forwarding works normally" + }, + { + method: "Online IP Detection", + description: "Use whatismyipaddress.com and compare", + cgnatIndicator: "Website shows different IP than router WAN IP", + normalIndicator: "Website shows same IP as router WAN IP" + } + ] + }, + + impacts: { + negative: [ + { + impact: "No Inbound Connections", + description: "Cannot host servers or accept incoming connections", + affectedServices: ["Web servers", "Game servers", "VPN servers", "Remote access"], + workaround: "Use cloud services or VPN tunnels" + }, + { + impact: "Port Forwarding Broken", + description: "Router port forwarding rules don't work from internet", + affectedServices: ["Gaming consoles", "Security cameras", "Home automation"], + workaround: "Use UPnP alternatives or cloud-based solutions" + }, + { + impact: "Geolocation Issues", + description: "Your location may appear incorrect online", + affectedServices: ["Streaming services", "Local search", "Weather"], + workaround: "Contact service providers or use location services" + }, + { + impact: "Gaming Problems", + description: "Multiplayer gaming may have connectivity issues", + affectedServices: ["Console gaming", "P2P games", "Voice chat"], + workaround: "Use gaming VPN or contact ISP for gaming package" + }, + { + impact: "VPN Issues", + description: "Some VPN protocols may not work properly", + affectedServices: ["PPTP", "L2TP", "Some OpenVPN configs"], + workaround: "Use VPN protocols that work through NAT" + } + ], + + positive: [ + "Extends IPv4 address availability", + "Allows ISPs to serve more customers", + "Provides some security through address hiding", + "Reduces need for expensive IPv4 addresses", + "Enables ISPs to offer affordable internet service" + ] + }, + + workarounds: [ + { + solution: "Request Public IP from ISP", + description: "Ask ISP for dedicated public IP (usually costs extra)", + effectiveness: "Complete solution", + cost: "Usually $5-20/month additional" + }, + { + solution: "Use IPv6", + description: "Enable IPv6 on router and devices", + effectiveness: "Works for IPv6-enabled services", + cost: "Free, but limited service support" + }, + { + solution: "VPN with Port Forwarding", + description: "Use VPN service that provides port forwarding", + effectiveness: "Good for specific services", + cost: "VPN subscription fee" + }, + { + solution: "Reverse Proxy Services", + description: "Use services like ngrok, Cloudflare Tunnel", + effectiveness: "Good for web services", + cost: "Varies, some free tiers available" + }, + { + solution: "Cloud Hosting", + description: "Move services to cloud providers", + effectiveness: "Complete solution for hosting", + cost: "Ongoing cloud hosting fees" + } + ], + + troubleshooting: [ + { + issue: "Gaming Console NAT Type Strict", + cause: "CGNAT prevents direct peer-to-peer connections", + diagnosis: "Check console network settings for NAT type", + solution: "Enable UPnP on router, consider gaming VPN, or request public IP" + }, + { + issue: "Security Cameras Not Accessible Remotely", + cause: "CGNAT blocks inbound connections to cameras", + diagnosis: "Port forwarding test fails from outside network", + solution: "Use cloud-based camera service or VPN access" + }, + { + issue: "VPN Server Won't Accept Connections", + cause: "CGNAT prevents inbound VPN connections", + diagnosis: "VPN connections timeout or fail to establish", + solution: "Use cloud VPN service or reverse VPN connection" + }, + { + issue: "Peer-to-Peer Applications Fail", + cause: "Double NAT prevents P2P hole punching", + diagnosis: "Applications report connectivity issues", + solution: "Use relay servers or protocol-specific workarounds" + } + ], + + bestPractices: [ + "Test your setup to confirm if you're behind CGNAT", + "Document affected services and plan workarounds", + "Consider IPv6 deployment as long-term solution", + "Evaluate cost of public IP vs workaround solutions", + "Use cloud services for hosting needs", + "Keep ISP contact info for escalating connectivity issues" + ], + + ispPerspective: [ + "CGNAT allows serving more customers with limited IPv4 space", + "Reduces IPv4 address costs for ISPs", + "Enables competitive pricing for internet service", + "Provides transition time for IPv6 deployment", + "Adds complexity to network troubleshooting", + "May require additional customer support for affected services" + ], + + quickCheck: { + steps: [ + "Check your router's WAN/Internet IP address", + "If it starts with 100.64, you're behind CGNAT", + "Compare with whatismyipaddress.com", + "If different, confirms CGNAT deployment" + ], + + whatToDo: [ + "Test affected services (gaming, port forwarding)", + "Contact ISP about public IP availability and cost", + "Research workarounds for your specific needs", + "Consider IPv6 deployment if supported" + ] + } +}; \ No newline at end of file diff --git a/src/lib/content/icmp.ts b/src/lib/content/icmp.ts new file mode 100644 index 0000000..0e6ed5c --- /dev/null +++ b/src/lib/content/icmp.ts @@ -0,0 +1,290 @@ +export const icmpContent = { + title: "ICMP & ICMPv6: Common Types", + description: "Practical guide to ICMP and ICMPv6 message types and codes you'll encounter in real network troubleshooting.", + + sections: { + overview: { + title: "What is ICMP?", + content: `ICMP (Internet Control Message Protocol) is used by network devices to send error messages and operational information. It's not used for data transfer, but rather for network diagnostics and error reporting. + +ICMPv6 serves the same purpose for IPv6 networks, but also handles additional functions like Neighbor Discovery that ARP handles in IPv4.` + } + }, + + icmpv4Types: [ + { + type: 0, + name: "Echo Reply", + description: "Response to ping request", + commonUse: "Ping response - confirms host is reachable", + example: "When you ping 8.8.8.8 and get a response back", + troubleshooting: "No reply = host down, filtered, or network issue" + }, + { + type: 3, + name: "Destination Unreachable", + description: "Cannot reach the destination", + commonUse: "Various network connectivity problems", + example: "Host unreachable, port unreachable, network unreachable", + troubleshooting: "Check routing, firewall rules, and destination status", + codes: [ + { code: 0, meaning: "Network Unreachable" }, + { code: 1, meaning: "Host Unreachable" }, + { code: 2, meaning: "Protocol Unreachable" }, + { code: 3, meaning: "Port Unreachable" }, + { code: 4, meaning: "Fragmentation Needed (MTU)" }, + { code: 13, meaning: "Communication Prohibited (Firewall)" } + ] + }, + { + type: 5, + name: "Redirect", + description: "Suggests better route to destination", + commonUse: "Router tells host about better path", + example: "Default gateway redirects to more specific router", + troubleshooting: "Often disabled for security reasons" + }, + { + type: 8, + name: "Echo Request", + description: "Ping request message", + commonUse: "Testing connectivity with ping command", + example: "ping 192.168.1.1 sends ICMP type 8", + troubleshooting: "Most common diagnostic tool for connectivity" + }, + { + type: 11, + name: "Time Exceeded", + description: "TTL expired or fragment reassembly timeout", + commonUse: "Traceroute functionality and loop detection", + example: "Each hop in traceroute sends Time Exceeded", + troubleshooting: "Indicates routing loops or excessive hop counts", + codes: [ + { code: 0, meaning: "TTL Expired in Transit" }, + { code: 1, meaning: "Fragment Reassembly Time Exceeded" } + ] + }, + { + type: 12, + name: "Parameter Problem", + description: "Invalid IP header or required option missing", + commonUse: "Malformed packets or unsupported options", + example: "Bad IP header length or unknown IP option", + troubleshooting: "Usually indicates software bugs or attacks" + } + ], + + icmpv6Types: [ + { + type: 1, + name: "Destination Unreachable", + description: "Cannot reach IPv6 destination", + commonUse: "IPv6 connectivity problems", + example: "No route to destination, port unreachable", + troubleshooting: "Similar to ICMPv4 type 3", + codes: [ + { code: 0, meaning: "No Route to Destination" }, + { code: 1, meaning: "Communication Prohibited" }, + { code: 3, meaning: "Address Unreachable" }, + { code: 4, meaning: "Port Unreachable" } + ] + }, + { + type: 2, + name: "Packet Too Big", + description: "Packet exceeds link MTU", + commonUse: "Path MTU discovery for IPv6", + example: "Router can't forward large packet", + troubleshooting: "Check MTU settings along path" + }, + { + type: 3, + name: "Time Exceeded", + description: "Hop limit exceeded", + commonUse: "IPv6 traceroute and loop detection", + example: "IPv6 equivalent of ICMPv4 type 11", + troubleshooting: "Routing loops or too many hops" + }, + { + type: 128, + name: "Echo Request", + description: "IPv6 ping request", + commonUse: "Testing IPv6 connectivity", + example: "ping6 2001:db8::1", + troubleshooting: "Primary IPv6 connectivity test" + }, + { + type: 129, + name: "Echo Reply", + description: "IPv6 ping response", + commonUse: "Response to IPv6 ping", + example: "Confirms IPv6 host is reachable", + troubleshooting: "No reply indicates IPv6 connectivity issues" + }, + { + type: 133, + name: "Router Solicitation (RS)", + description: "Request for router advertisements", + commonUse: "Host discovering IPv6 routers", + example: "New host joining IPv6 network", + troubleshooting: "Part of IPv6 address autoconfiguration" + }, + { + type: 134, + name: "Router Advertisement (RA)", + description: "Router announcing its presence and prefixes", + commonUse: "IPv6 address autoconfiguration", + example: "Router tells hosts about available prefixes", + troubleshooting: "Critical for SLAAC and IPv6 operation" + }, + { + type: 135, + name: "Neighbor Solicitation (NS)", + description: "IPv6 equivalent of ARP request", + commonUse: "Finding MAC address for IPv6 address", + example: "Resolving link-layer address", + troubleshooting: "Part of Neighbor Discovery Protocol" + }, + { + type: 136, + name: "Neighbor Advertisement (NA)", + description: "IPv6 equivalent of ARP reply", + commonUse: "Responding with MAC address", + example: "Response to Neighbor Solicitation", + troubleshooting: "Confirms neighbor reachability" + } + ], + + practicalExamples: [ + { + scenario: "Ping Not Working", + icmpTypes: ["Type 8 (Echo Request)", "Type 0 (Echo Reply)"], + whatToCheck: [ + "Is ICMP type 8 being sent?", + "Is ICMP type 0 coming back?", + "Are firewalls blocking ICMP?", + "Check destination host status" + ], + commonCauses: ["Firewall blocking ICMP", "Host down", "Network congestion"] + }, + { + scenario: "Traceroute Shows * * *", + icmpTypes: ["Type 11 (Time Exceeded)"], + whatToCheck: [ + "Are routers sending Time Exceeded?", + "Firewall blocking ICMP type 11?", + "Router configured to not send ICMP?" + ], + commonCauses: ["ICMP rate limiting", "Security policy", "Router misconfiguration"] + }, + { + scenario: "Large Files Won't Transfer", + icmpTypes: ["Type 3 Code 4 (Fragmentation Needed)", "ICMPv6 Type 2 (Packet Too Big)"], + whatToCheck: [ + "Path MTU discovery working?", + "ICMP being filtered by firewall?", + "MSS clamping configured?" + ], + commonCauses: ["Firewall blocking ICMP", "MTU mismatch", "Fragmentation issues"] + }, + { + scenario: "IPv6 Address Not Working", + icmpTypes: ["Type 135/136 (Neighbor Discovery)", "Type 133/134 (Router Discovery)"], + whatToCheck: [ + "Router Advertisements being sent?", + "Neighbor Discovery working?", + "IPv6 enabled on all devices?" + ], + commonCauses: ["No IPv6 router", "NDP filtering", "IPv6 disabled"] + } + ], + + filteringIssues: [ + { + issue: "Firewall Blocks All ICMP", + problem: "Breaks ping, traceroute, and Path MTU Discovery", + solution: "Allow specific ICMP types (0, 3, 8, 11) instead of blocking all", + recommendation: "Never block ICMP types 3 and 11 completely" + }, + { + issue: "Router Drops ICMP Due to Rate Limiting", + problem: "Intermittent ping/traceroute failures", + solution: "Adjust ICMP rate limiting thresholds", + recommendation: "Configure reasonable rate limits, not zero" + }, + { + issue: "IPv6 NDP Messages Filtered", + problem: "IPv6 connectivity completely broken", + solution: "Allow ICMPv6 types 133-137 on local network", + recommendation: "Critical for IPv6 operation - never filter on LAN" + } + ], + + bestPractices: [ + "Allow ICMP types 0, 3, 8, 11 through firewalls", + "For IPv6, allow ICMPv6 types 1, 2, 3, 128, 129, 133-137", + "Use ICMP rate limiting instead of complete blocking", + "Monitor ICMP traffic for network health", + "Don't filter ICMP on internal networks", + "Log ICMP messages for troubleshooting purposes" + ], + + troubleshootingCommands: [ + { + command: "ping 8.8.8.8", + purpose: "Test IPv4 connectivity with ICMP Echo", + icmpType: "Type 8 (request) and Type 0 (reply)" + }, + { + command: "ping6 2001:db8::1", + purpose: "Test IPv6 connectivity", + icmpType: "Type 128 (request) and Type 129 (reply)" + }, + { + command: "traceroute 8.8.8.8", + purpose: "Show path using ICMP Time Exceeded", + icmpType: "Type 11 (Time Exceeded responses)" + }, + { + command: "traceroute6 ipv6.google.com", + purpose: "IPv6 path tracing", + icmpType: "Type 3 (Time Exceeded)" + }, + { + command: "tcpdump -i eth0 icmp", + purpose: "Capture ICMP traffic for analysis", + icmpType: "All ICMP types" + }, + { + command: "wireshark (filter: icmp or icmpv6)", + purpose: "Detailed ICMP packet analysis", + icmpType: "All ICMP and ICMPv6 types" + } + ], + + quickReference: { + mustAllow: [ + "ICMP Type 0 - Echo Reply (ping responses)", + "ICMP Type 3 - Destination Unreachable", + "ICMP Type 8 - Echo Request (ping)", + "ICMP Type 11 - Time Exceeded (traceroute)", + "ICMPv6 Type 1 - Destination Unreachable", + "ICMPv6 Type 2 - Packet Too Big (MTU)", + "ICMPv6 Type 128/129 - Echo Request/Reply", + "ICMPv6 Type 133-137 - Neighbor Discovery" + ], + neverFilter: [ + "ICMP Type 3 Code 4 (Fragmentation Needed)", + "ICMPv6 Type 2 (Packet Too Big)", + "ICMPv6 Types 135/136 (Neighbor Discovery on LAN)" + ] + }, + + commonMistakes: [ + "Blocking all ICMP types (breaks PMTU discovery)", + "Filtering ICMPv6 Neighbor Discovery on LANs", + "Not understanding the difference between ICMP filtering and rate limiting", + "Blocking ICMP for security without considering operational impact", + "Forgetting that some applications depend on specific ICMP messages" + ] +}; \ No newline at end of file diff --git a/src/lib/content/ipv6-embedded-ipv4.ts b/src/lib/content/ipv6-embedded-ipv4.ts new file mode 100644 index 0000000..d0ebea8 --- /dev/null +++ b/src/lib/content/ipv6-embedded-ipv4.ts @@ -0,0 +1,184 @@ +export const ipv6EmbeddedIPv4Content = { + title: "IPv4 in IPv6", + description: "IPv4-mapped addresses, 6to4, Teredo, and other IPv4-in-IPv6 transition mechanisms.", + + sections: { + overview: { + title: "Why IPv4-in-IPv6?", + content: `During the transition from IPv4 to IPv6, several mechanisms were created to embed or reference IPv4 addresses within IPv6 addresses. These help with compatibility, tunneling, and gradual migration. + +Most of these are legacy mechanisms, but you'll still encounter them in network troubleshooting and configuration.` + } + }, + + mechanisms: [ + { + name: "IPv4-Mapped IPv6 Addresses", + prefix: "::ffff:0:0/96", + fullPrefix: "0000:0000:0000:0000:0000:ffff:0000:0000/96", + status: "Active", + purpose: "Represent IPv4 addresses in IPv6 format for dual-stack applications", + format: "::ffff:w.x.y.z or ::ffff:wxyz (hex)", + examples: [ + "::ffff:192.0.2.1 (maps 192.0.2.1)", + "::ffff:c000:201 (same as above in hex)", + "::ffff:127.0.0.1 (maps 127.0.0.1)" + ], + usage: [ + "Dual-stack socket programming", + "Applications that need to handle both IPv4 and IPv6", + "Internal system representation" + ], + notes: "Still widely used in modern systems for dual-stack compatibility" + }, + { + name: "IPv4-Compatible IPv6 (Deprecated)", + prefix: "::/96", + fullPrefix: "0000:0000:0000:0000:0000:0000:0000:0000/96", + status: "Deprecated", + purpose: "Originally for automatic IPv6 tunneling over IPv4", + format: "::w.x.y.z", + examples: [ + "::192.0.2.1", + "::10.0.0.1" + ], + usage: [ + "Automatic tunneling (no longer used)", + "Early IPv6 transition mechanisms" + ], + notes: "Deprecated due to security concerns. Never use in new deployments." + }, + { + name: "6to4", + prefix: "2002::/16", + fullPrefix: "2002:0000:0000:0000:0000:0000:0000:0000/16", + status: "Deprecated", + purpose: "Automatic tunneling of IPv6 over IPv4 internet", + format: "2002:wxyz::/48 (where wxyz is IPv4 in hex)", + examples: [ + "2002:c000:201::/48 (for 192.0.2.1)", + "2002:0a00:0001::/48 (for 10.0.0.1)" + ], + usage: [ + "Automatic IPv6 connectivity over IPv4", + "Legacy transition mechanism", + "6to4 relay routers" + ], + notes: "Largely deprecated due to reliability issues and NAT incompatibility" + }, + { + name: "Teredo", + prefix: "2001:0::/32", + fullPrefix: "2001:0000:0000:0000:0000:0000:0000:0000/32", + status: "Legacy", + purpose: "IPv6 connectivity through NAT devices", + format: "2001:0:server:flags:cone:port:client:client", + examples: [ + "2001:0:4137:9e76:2847:f613:446a:5dcb", + "2001:0:9d38:90d7:0:0:0:0" + ], + usage: [ + "Microsoft Windows IPv6 connectivity", + "NAT traversal for IPv6", + "Peer-to-peer applications" + ], + notes: "Complex encoding includes server, client IPs, ports, and NAT type" + }, + { + name: "ISATAP", + prefix: "fe80::/64 or 2001:db8::/32", + fullPrefix: "Various prefixes with :0:5efe: infix", + status: "Legacy", + purpose: "IPv6 over IPv4 intranet tunneling", + format: "prefix::5efe:w.x.y.z", + examples: [ + "fe80::5efe:192.0.2.1", + "2001:db8:1:1::5efe:10.0.0.1" + ], + usage: [ + "Enterprise intranet IPv6 deployment", + "Windows automatic tunneling", + "Site-local IPv6 over IPv4" + ], + notes: "Uses special infix :0:5efe: followed by IPv4 address" + }, + { + name: "6rd (IPv6 Rapid Deployment)", + prefix: "Variable", + fullPrefix: "ISP-specific prefix", + status: "Limited Use", + purpose: "ISP-provided IPv6 over existing IPv4 infrastructure", + format: "ISP-prefix:encoded-ipv4::/suffix-length", + examples: [ + "2001:db8:c0a8:101::/64 (example encoding)", + "Varies by ISP implementation" + ], + usage: [ + "ISP IPv6 service over IPv4 infrastructure", + "Broadband IPv6 deployment", + "Customer premises equipment" + ], + notes: "ISP-specific encoding of customer IPv4 address into IPv6 prefix" + } + ], + + recognition: { + title: "Quick Recognition Guide", + patterns: [ + { pattern: "::ffff:x.x.x.x", meaning: "IPv4-mapped address", action: "Extract IPv4 from the end" }, + { pattern: "::x.x.x.x", meaning: "IPv4-compatible (deprecated)", action: "Avoid using" }, + { pattern: "2002:xxxx:xxxx::", meaning: "6to4 address", action: "Convert hex back to IPv4" }, + { pattern: "2001:0::", meaning: "Teredo address", action: "Complex encoding, use tools" }, + { pattern: "xxxx::5efe:x.x.x.x", meaning: "ISATAP address", action: "IPv4 follows :5efe:" } + ] + }, + + conversion: { + title: "IPv4 to Hex Conversion Examples", + examples: [ + { ipv4: "192.0.2.1", hex: "c000:0201", breakdown: "192=c0, 0=00, 2=02, 1=01" }, + { ipv4: "10.0.0.1", hex: "0a00:0001", breakdown: "10=0a, 0=00, 0=00, 1=01" }, + { ipv4: "172.16.1.100", hex: "ac10:0164", breakdown: "172=ac, 16=10, 1=01, 100=64" }, + { ipv4: "203.0.113.1", hex: "cb00:7101", breakdown: "203=cb, 0=00, 113=71, 1=01" } + ] + }, + + modernUsage: [ + "IPv4-mapped addresses are still used in dual-stack applications", + "6to4 and Teredo are mostly disabled by default in modern systems", + "New deployments should use native IPv6 or IPv4/IPv6 dual-stack", + "Legacy mechanisms may appear in old configurations or troubleshooting", + "Most transition mechanisms are being phased out as IPv6 adoption grows" + ], + + troubleshooting: [ + { + issue: "Seeing ::ffff: addresses in logs", + cause: "Dual-stack application treating IPv4 clients as IPv6", + solution: "Normal behavior, indicates IPv4-mapped addressing" + }, + { + issue: "2002:: addresses not working", + cause: "6to4 infrastructure being deprecated", + solution: "Switch to native IPv6 or other transition mechanisms" + }, + { + issue: "Teredo connectivity issues", + cause: "NAT or firewall blocking UDP 3544", + solution: "Configure firewall or disable Teredo if not needed" + }, + { + issue: "ISATAP addresses appearing", + cause: "Windows automatic tunneling enabled", + solution: "Disable if not needed: netsh interface ipv6 set global randomizeidentifiers=disabled" + } + ], + + securityNotes: [ + "IPv4-compatible addresses (::) are deprecated due to security issues", + "6to4 can be exploited for traffic injection attacks", + "Teredo may bypass firewall rules if not properly configured", + "Disable unused transition mechanisms to reduce attack surface", + "Monitor for unexpected embedded IPv4 traffic patterns" + ] +}; \ No newline at end of file diff --git a/src/lib/content/ipv6-prefix-lengths.ts b/src/lib/content/ipv6-prefix-lengths.ts new file mode 100644 index 0000000..316a4b1 --- /dev/null +++ b/src/lib/content/ipv6-prefix-lengths.ts @@ -0,0 +1,140 @@ +export const ipv6PrefixLengthsContent = { + title: "Common IPv6 Prefix Lengths", + description: "Quick reference for common IPv6 prefix lengths and their typical uses in network design.", + + sections: { + overview: { + title: "IPv6 Prefix Length Overview", + content: `IPv6 uses prefix lengths just like IPv4 CIDR, but the numbers are different due to IPv6's 128-bit address space. Understanding common prefix lengths helps with IPv6 network planning and address allocation. + +Unlike IPv4 where /24 is common, IPv6 networks typically use /64 for end-user networks and larger prefixes for routing aggregation.` + } + }, + + commonPrefixes: [ + { + prefix: "/128", + name: "Single Host", + hosts: "1 address", + typical: "Host routes, loopback interfaces", + examples: ["::1/128 - IPv6 loopback", "2001:db8::1/128 - Single server"], + description: "Equivalent to IPv4 /32, identifies one specific address" + }, + { + prefix: "/127", + name: "Point-to-Point Link", + hosts: "2 addresses", + typical: "Router-to-router links", + examples: ["2001:db8:1:1::/127 - Router link"], + description: "Saves address space on point-to-point links, like IPv4 /30" + }, + { + prefix: "/64", + name: "Standard Subnet", + hosts: "18,446,744,073,709,551,616 addresses", + typical: "LAN segments, end-user networks", + examples: ["2001:db8:1::/64 - Office network", "fe80::/64 - Link-local"], + description: "Standard subnet size, allows SLAAC and EUI-64" + }, + { + prefix: "/60", + name: "Small Site", + hosts: "16 /64 subnets", + typical: "Small offices, residential sites", + examples: ["2001:db8:1000::/60 - Small office allocation"], + description: "Provides 16 /64 networks for a small site" + }, + { + prefix: "/56", + name: "Typical Site", + hosts: "256 /64 subnets", + typical: "Medium businesses, large homes", + examples: ["2001:db8:1200::/56 - Business allocation"], + description: "Common allocation for business sites and power users" + }, + { + prefix: "/48", + name: "Large Site", + hosts: "65,536 /64 subnets", + typical: "Enterprises, ISP customers", + examples: ["2001:db8::/48 - Enterprise allocation"], + description: "Traditional site allocation, very generous subnet space" + }, + { + prefix: "/32", + name: "ISP/RIR Allocation", + hosts: "4,294,967,296 /64 subnets", + typical: "ISPs, large organizations", + examples: ["2001:db8::/32 - ISP allocation"], + description: "Minimum allocation from Regional Internet Registries" + } + ], + + usageGuidelines: { + title: "When to Use Each Prefix", + residential: { + title: "Residential/Small Office", + allocations: [ + { size: "/60", description: "Small home with multiple VLANs/networks" }, + { size: "/56", description: "Power user or small business" }, + { size: "/48", description: "Large home office or small enterprise" } + ] + }, + enterprise: { + title: "Enterprise Networks", + allocations: [ + { size: "/48", description: "Single large site" }, + { size: "/44 or /40", description: "Multi-site organization" }, + { size: "/32", description: "Large enterprise or ISP" } + ] + }, + subnets: { + title: "Individual Subnets", + allocations: [ + { size: "/64", description: "Standard LAN segment" }, + { size: "/127", description: "Point-to-point router links" }, + { size: "/128", description: "Loopbacks, host routes" } + ] + } + }, + + comparison: { + title: "IPv4 vs IPv6 Prefix Comparison", + mappings: [ + { ipv4: "/32 (1 host)", ipv6: "/128 (1 host)", note: "Single host address" }, + { ipv4: "/30 (2 hosts)", ipv6: "/127 (2 hosts)", note: "Point-to-point links" }, + { ipv4: "/24 (254 hosts)", ipv6: "/64 (huge)", note: "LAN segment" }, + { ipv4: "/16 (65k hosts)", ipv6: "/48 (65k subnets)", note: "Large network" }, + { ipv4: "/8 (16M hosts)", ipv6: "/32 (4B subnets)", note: "ISP allocation" } + ] + }, + + bestPractices: [ + "Always use /64 for end-user networks (required for SLAAC)", + "Use /127 for point-to-point links to save address space", + "Plan your addressing hierarchy before assigning prefixes", + "Reserve some prefix space for future growth", + "Document your prefix allocation scheme", + "Use consistent prefix lengths within network tiers" + ], + + quickReference: [ + { prefix: "/32", subnets: "4.3B /64s", note: "RIR minimum allocation" }, + { prefix: "/40", subnets: "16M /64s", note: "Large enterprise" }, + { prefix: "/44", subnets: "1M /64s", note: "Medium enterprise" }, + { prefix: "/48", subnets: "65k /64s", note: "Traditional site" }, + { prefix: "/52", subnets: "4k /64s", note: "Large site" }, + { prefix: "/56", subnets: "256 /64s", note: "Typical site" }, + { prefix: "/60", subnets: "16 /64s", note: "Small site" }, + { prefix: "/64", subnets: "1 subnet", note: "End-user network" } + ], + + tips: [ + "IPv6 has so much address space that conservation isn't usually necessary", + "/64 is mandatory for SLAAC (Stateless Address Autoconfiguration)", + "Shorter prefixes mean more subnets available", + "Most home users get /60 or /56 from their ISP", + "Enterprise networks typically start with /48 or shorter", + "Use nibble boundaries (multiples of 4) for easier management" + ] +}; \ No newline at end of file diff --git a/src/lib/content/ipv6-privacy-addresses.ts b/src/lib/content/ipv6-privacy-addresses.ts new file mode 100644 index 0000000..a968e4f --- /dev/null +++ b/src/lib/content/ipv6-privacy-addresses.ts @@ -0,0 +1,352 @@ +export const ipv6PrivacyContent = { + title: "IPv6 Privacy Addresses (RFC 4941/8981)", + description: "SLAAC privacy extensions: temporary vs stable interface identifiers, how they protect privacy, and configuration guidance.", + + sections: { + overview: { + title: "What are IPv6 Privacy Addresses?", + content: `IPv6 privacy addresses (temporary addresses) are automatically generated to prevent tracking based on stable interface identifiers. They're created alongside stable addresses and change periodically. + +Without privacy extensions, devices use predictable interface identifiers (often based on MAC addresses), making them trackable across networks.` + }, + + problem: { + title: "The Privacy Problem", + content: `Standard IPv6 addresses often contain predictable interface identifiers that remain constant across different networks, creating privacy concerns similar to a permanent device fingerprint.` + } + }, + + addressTypes: [ + { + type: "Stable Address (Standard SLAAC)", + formation: "Prefix + EUI-64 or configured interface ID", + example: "2001:db8:1234:5678:21a:2bff:fe3c:4d5e", + characteristics: [ + "Interface identifier stays the same across networks", + "Often derived from MAC address using EUI-64", + "Predictable and trackable across network changes", + "Required for some services that need consistent addressing" + ], + privacy: "Poor - enables tracking across networks" + }, + { + type: "Temporary Address (Privacy Extension)", + formation: "Prefix + cryptographically generated random bits", + example: "2001:db8:1234:5678:a1b2:c3d4:e5f6:7890", + characteristics: [ + "Randomly generated interface identifier", + "Changes periodically (daily by default)", + "Multiple temporary addresses can coexist", + "Used for outbound connections by default" + ], + privacy: "Good - prevents cross-network tracking" + }, + { + type: "Stable Private Address (RFC 7217)", + formation: "Prefix + hash of secret key + network info", + example: "2001:db8:1234:5678:9abc:def0:1234:5678", + characteristics: [ + "Stable within the same network", + "Changes when moving to different networks", + "More predictable than temporary addresses", + "Good balance of privacy and stability" + ], + privacy: "Better - network-specific but stable" + } + ], + + howItWorks: { + title: "How Privacy Extensions Work", + + addressGeneration: [ + "Device receives Router Advertisement with prefix", + "Creates stable address using EUI-64 or configured method", + "Generates temporary address using cryptographic random bits", + "Both addresses are assigned to the same interface", + "Temporary address preferred for outbound connections" + ], + + temporaryLifecycle: [ + "New temporary address generated periodically", + "Old temporary addresses remain valid until expiry", + "Multiple temporary addresses can coexist", + "Addresses have preferred and valid lifetimes", + "Deprecated addresses still accept incoming traffic" + ], + + defaultBehavior: [ + "Outbound connections use temporary addresses", + "Inbound services use stable addresses", + "Applications can request specific address types", + "Operating system manages address selection automatically" + ] + }, + + lifetimes: { + title: "Address Lifetimes", + + preferredLifetime: { + description: "How long address is preferred for new connections", + typical: "1 day (86400 seconds)", + behavior: "After expiry, address can receive but not initiate connections" + }, + + validLifetime: { + description: "How long address remains usable", + typical: "7 days (604800 seconds)", + behavior: "After expiry, address is completely removed" + }, + + regenerationInterval: { + description: "How often new temporary addresses are created", + typical: "5 minutes to 24 hours", + behavior: "New address created before old one expires" + }, + + maxTempAddresses: { + description: "Maximum temporary addresses per prefix", + typical: "5-10 addresses", + behavior: "Oldest addresses removed when limit reached" + } + }, + + osImplementations: { + title: "Operating System Support", + + windows: { + os: "Windows", + defaultBehavior: "Privacy extensions enabled by default (Vista+)", + configuration: [ + "netsh interface ipv6 set global randomizeidentifiers=enabled", + "netsh interface ipv6 set privacy state=enabled", + "Registry: HKLM\\System\\CurrentControlSet\\Services\\Tcpip6\\Parameters" + ], + commands: [ + "netsh interface ipv6 show privacy", + "netsh interface ipv6 show addresses" + ] + }, + + linux: { + os: "Linux", + defaultBehavior: "Varies by distribution, often disabled by default", + configuration: [ + "sysctl net.ipv6.conf.all.use_tempaddr=2", + "sysctl net.ipv6.conf.default.use_tempaddr=2", + "/proc/sys/net/ipv6/conf/*/use_tempaddr" + ], + values: [ + "0 = Disabled", + "1 = Enabled but prefer stable", + "2 = Enabled and prefer temporary" + ], + commands: [ + "ip -6 addr show scope global", + "cat /proc/sys/net/ipv6/conf/eth0/use_tempaddr" + ] + }, + + macos: { + os: "macOS", + defaultBehavior: "Privacy extensions enabled by default", + configuration: [ + "Built into system preferences", + "networksetup command line tool", + "System-wide setting affects all interfaces" + ], + commands: [ + "ifconfig | grep inet6", + "networksetup -getinfo Wi-Fi" + ] + }, + + android: { + os: "Android", + defaultBehavior: "Privacy extensions enabled by default (Android 8+)", + configuration: [ + "Settings > Network & Internet > Advanced", + "Developer options for advanced control", + "Per-network configuration possible" + ], + behavior: "Randomizes MAC and uses privacy addresses" + } + }, + + identifyingAddresses: [ + { + method: "Interface Identifier Pattern", + stable: "Often contains 'fffe' in middle (EUI-64) or predictable pattern", + temporary: "Random-looking interface identifier", + example: "Stable: ::21a:2bff:fe3c:4d5e vs Temporary: ::a1b2:c3d4:e5f6:7890" + }, + { + method: "Address Consistency", + stable: "Same interface ID across different network prefixes", + temporary: "Different interface ID on each network", + example: "Device keeps same ::21a:2bff:fe3c:4d5e on all networks vs random on each" + }, + { + method: "Command Output", + stable: "Often labeled as 'permanent' or primary", + temporary: "Labeled as 'temporary' or 'deprecated'", + example: "Linux ip command shows 'temporary' flag" + } + ], + + troubleshooting: [ + { + issue: "Privacy addresses not working", + symptoms: ["Same IPv6 address on different networks", "Tracking concerns"], + diagnosis: "Check OS privacy extension settings", + solutions: [ + "Enable privacy extensions in OS settings", + "Verify router supports SLAAC", + "Check for disabled IPv6 privacy in network manager" + ] + }, + { + issue: "Too many IPv6 addresses", + symptoms: ["Multiple IPv6 addresses per interface", "Address list constantly changing"], + diagnosis: "Privacy extensions working normally", + solutions: [ + "This is normal behavior for privacy extensions", + "Adjust regeneration timers if needed", + "Reduce max temporary addresses if causing issues" + ] + }, + { + issue: "Applications using wrong address", + symptoms: ["Server not reachable", "Unexpected source addresses"], + diagnosis: "Address selection preference issues", + solutions: [ + "Configure application to bind specific addresses", + "Adjust address selection policy", + "Use stable addresses for server applications" + ] + }, + { + issue: "Privacy addresses not preferred", + symptoms: ["Always using stable addresses for outbound"], + diagnosis: "Address selection policy favoring stable addresses", + solutions: [ + "Configure temporary address preference", + "Check application-specific settings", + "Verify privacy extension configuration" + ] + } + ], + + securityConsiderations: [ + { + aspect: "Privacy Protection", + benefits: [ + "Prevents device tracking across networks", + "Makes traffic analysis more difficult", + "Reduces correlation of activities", + "Protects against location tracking" + ], + limitations: [ + "Application-layer tracking still possible", + "DNS queries may reveal information", + "Stable addresses still exposed for services", + "Requires proper application configuration" + ] + }, + { + aspect: "Network Management", + benefits: [ + "Devices harder to target maliciously", + "Reduces effectiveness of IP-based blocking", + "Makes reconnaissance more difficult" + ], + challenges: [ + "Harder to whitelist specific devices", + "Complicates network troubleshooting", + "May interfere with IP-based access control", + "Requires different monitoring approaches" + ] + } + ], + + bestPractices: [ + "Enable privacy extensions on client devices", + "Use stable addresses only for servers and infrastructure", + "Configure appropriate regeneration intervals", + "Monitor for privacy extension support in applications", + "Balance privacy with network management needs", + "Document which services require stable addressing", + "Test applications with privacy addresses enabled", + "Consider RFC 7217 stable privacy addresses for better balance" + ], + + whenToUse: [ + { + scenario: "Client Devices", + recommendation: "Enable privacy extensions", + reasoning: "Protects user privacy without impacting functionality", + configuration: "Prefer temporary addresses for outbound connections" + }, + { + scenario: "Servers", + recommendation: "Use stable addresses", + reasoning: "Consistent addressing needed for services", + configuration: "Disable privacy extensions or use stable addresses only" + }, + { + scenario: "IoT Devices", + recommendation: "Consider device requirements", + reasoning: "Balance privacy with device management needs", + configuration: "May need stable addresses for remote management" + }, + { + scenario: "Enterprise Networks", + recommendation: "Policy-based approach", + reasoning: "Different requirements for different device types", + configuration: "Client devices: privacy on, servers: stable addresses" + } + ], + + commonMistakes: [ + "Assuming all IPv6 addresses are permanent", + "Not testing applications with privacy addresses", + "Blocking temporary addresses in firewalls", + "Using temporary addresses for server services", + "Not understanding address selection preferences", + "Confusing temporary addresses with link-local addresses", + "Expecting consistent addressing with privacy extensions enabled" + ], + + quickReference: { + addressTypes: [ + "Stable: Same interface ID everywhere (trackable)", + "Temporary: Random interface ID, changes periodically (private)", + "Stable Privacy (7217): Stable per-network, changes between networks" + ], + + identification: [ + "EUI-64 pattern (fffe in middle) = stable address", + "Random-looking interface ID = temporary address", + "Multiple addresses per interface = privacy extensions active" + ], + + configuration: [ + "Windows: netsh interface ipv6 set privacy state=enabled", + "Linux: sysctl net.ipv6.conf.all.use_tempaddr=2", + "macOS: System Preferences > Network > Advanced" + ], + + troubleshooting: [ + "Multiple IPv6 addresses = normal with privacy extensions", + "Same address everywhere = privacy extensions disabled", + "Services unreachable = check stable address binding" + ] + }, + + tools: [ + { tool: "ip -6 addr show", purpose: "Show all IPv6 addresses with flags (Linux)" }, + { tool: "ipconfig /all", purpose: "Display IPv6 addresses and configuration (Windows)" }, + { tool: "ifconfig", purpose: "Show network interfaces and addresses (Unix/macOS)" }, + { tool: "netsh interface ipv6 show addresses", purpose: "Detailed IPv6 address info (Windows)" }, + { tool: "sysctl net.ipv6.conf.all.use_tempaddr", purpose: "Check privacy extension status (Linux)" } + ] +}; \ No newline at end of file diff --git a/src/lib/content/link-local-apipa.ts b/src/lib/content/link-local-apipa.ts new file mode 100644 index 0000000..1f7a2f1 --- /dev/null +++ b/src/lib/content/link-local-apipa.ts @@ -0,0 +1,258 @@ +export const linkLocalApipaContent = { + title: "Link-Local & APIPA Addresses", + description: "Quick guide to IPv4 APIPA (169.254/16) and IPv6 link-local (fe80::/10) addresses - when they appear and what they mean.", + + sections: { + overview: { + title: "What are Link-Local Addresses?", + content: `Link-local addresses are special IP addresses that only work on the local network segment. They're automatically assigned when normal IP configuration fails or isn't available. + +These addresses allow basic network communication even when DHCP servers are down or network configuration is missing.` + } + }, + + apipa: { + title: "IPv4 APIPA (Automatic Private IP Addressing)", + range: "169.254.0.0/16", + fullRange: "169.254.0.1 to 169.254.255.254", + usableRange: "169.254.1.0 to 169.254.254.255", + reservedAddresses: ["169.254.0.0", "169.254.255.255", "169.254.0.x", "169.254.255.x"], + + description: "APIPA addresses are automatically assigned by Windows, macOS, and Linux when DHCP fails", + + whenUsed: [ + "DHCP server is unreachable or down", + "Network cable unplugged then reconnected", + "DHCP lease expires and can't be renewed", + "Static IP conflicts with another device", + "Network interface enabled without configuration" + ], + + howItWorks: [ + "Device requests IP address from DHCP server", + "No DHCP response received after multiple attempts", + "Device randomly selects address in 169.254.x.x range", + "Device sends ARP probe to check if address is already used", + "If no conflict, device assigns itself the address", + "Device continues trying to find DHCP server periodically" + ], + + characteristics: [ + "Only works on local network segment (not routed)", + "Subnet mask is always 255.255.0.0 (/16)", + "No default gateway assigned", + "Cannot reach internet or other subnets", + "Devices can communicate with other APIPA devices" + ], + + troubleshooting: [ + { + symptom: "Computer has 169.254.x.x address", + meaning: "DHCP assignment failed", + solution: "Check DHCP server, network cables, switch ports" + }, + { + symptom: "Can't access internet with APIPA", + meaning: "APIPA addresses are not routed", + solution: "Fix DHCP server or configure static IP" + }, + { + symptom: "Some devices have APIPA, others don't", + meaning: "Inconsistent DHCP server response", + solution: "Check DHCP server capacity and network connectivity" + } + ] + }, + + ipv6LinkLocal: { + title: "IPv6 Link-Local Addresses", + range: "fe80::/10", + fullRange: "fe80:: to febf:ffff:ffff:ffff:ffff:ffff:ffff:ffff", + commonFormat: "fe80::xxxx:xxxx:xxxx:xxxx", + + description: "Every IPv6-enabled interface automatically gets a link-local address", + + formation: [ + "Start with fe80::/64 prefix", + "Interface identifier from MAC address (EUI-64) or random", + "Example: MAC 00:1a:2b:3c:4d:5e becomes fe80::21a:2bff:fe3c:4d5e", + "Modified EUI-64: flip universal/local bit, insert fffe" + ], + + whenUsed: [ + "Neighbor Discovery Protocol (NDP)", + "Router Solicitation and Advertisement", + "Initial IPv6 communication before global addresses", + "DHCPv6 communication", + "Network troubleshooting and diagnostics", + "Always present on IPv6 interfaces" + ], + + characteristics: [ + "Automatically assigned to every IPv6 interface", + "Only valid on local network segment", + "Cannot be routed beyond local link", + "Required for IPv6 to function properly", + "Used for Neighbor Discovery Protocol", + "Subnet prefix is always /64" + ], + + types: [ + { + type: "EUI-64 Based", + description: "Derived from MAC address using EUI-64 process", + example: "fe80::21a:2bff:fe3c:4d5e", + privacy: "Reveals MAC address - privacy concerns" + }, + { + type: "Random", + description: "Randomly generated interface identifier", + example: "fe80::a1b2:c3d4:e5f6:7890", + privacy: "Better privacy, doesn't reveal MAC" + }, + { + type: "Manual", + description: "Administratively configured", + example: "fe80::1", + privacy: "Often used for routers and servers" + } + ] + }, + + comparison: [ + { + aspect: "Address Range", + ipv4: "169.254.0.0/16", + ipv6: "fe80::/10 (commonly fe80::/64)" + }, + { + aspect: "Assignment Method", + ipv4: "Random selection with conflict detection", + ipv6: "Automatic from interface MAC or random" + }, + { + aspect: "When Assigned", + ipv4: "Only when DHCP fails", + ipv6: "Always assigned to every interface" + }, + { + aspect: "Scope", + ipv4: "Local subnet only", + ipv6: "Local link only" + }, + { + aspect: "Internet Access", + ipv4: "No (requires NAT/gateway)", + ipv6: "No (link-local only)" + }, + { + aspect: "Protocol Integration", + ipv4: "Fallback mechanism", + ipv6: "Essential for IPv6 operation" + } + ], + + practicalExamples: [ + { + scenario: "DHCP Server Down", + ipv4Behavior: "Devices get 169.254.x.x addresses, can communicate locally", + ipv6Behavior: "Devices keep fe80:: addresses, IPv6 still works locally", + impact: "Local communication possible, internet access lost" + }, + { + scenario: "Network Isolation Testing", + ipv4Behavior: "Create isolated network with APIPA addresses", + ipv6Behavior: "Devices automatically have link-local connectivity", + impact: "Useful for testing without full network configuration" + }, + { + scenario: "Router Configuration", + ipv4Behavior: "APIPA doesn't help with router access", + ipv6Behavior: "Can access router via its fe80:: address", + impact: "IPv6 provides better administrative access options" + } + ], + + troubleshootingCommands: [ + { + purpose: "View APIPA/Link-Local Addresses", + windows: "ipconfig /all", + linux: "ip addr show", + macOS: "ifconfig" + }, + { + purpose: "Test Link-Local Connectivity", + windows: "ping 169.254.x.x or ping fe80::x%interface", + linux: "ping 169.254.x.x or ping6 fe80::x%eth0", + macOS: "ping 169.254.x.x or ping6 fe80::x%en0" + }, + { + purpose: "Force DHCP Renewal", + windows: "ipconfig /release && ipconfig /renew", + linux: "dhclient -r && dhclient", + macOS: "sudo ipconfig set en0 DHCP" + }, + { + purpose: "View IPv6 Link-Local", + windows: "netsh interface ipv6 show addresses", + linux: "ip -6 addr show scope link", + macOS: "ifconfig | grep fe80" + } + ], + + bestPractices: [ + "Don't block link-local addresses in firewalls", + "Monitor for widespread APIPA addresses (indicates DHCP issues)", + "Use link-local addresses for IPv6 router access", + "Understand that APIPA indicates network configuration problems", + "Test connectivity using link-local addresses for troubleshooting", + "Document link-local addresses of critical infrastructure" + ], + + commonMistakes: [ + "Thinking APIPA addresses provide internet access", + "Blocking fe80::/10 addresses in IPv6 firewalls", + "Not recognizing APIPA as a symptom of DHCP failure", + "Trying to route link-local addresses between subnets", + "Forgetting to specify interface when pinging IPv6 link-local", + "Assuming IPv6 is broken when only seeing link-local addresses" + ], + + quickReference: { + recognition: [ + "169.254.x.x = IPv4 APIPA (DHCP failed)", + "fe80::x = IPv6 link-local (normal and required)", + "APIPA = problem to fix, Link-local = normal operation" + ], + + troubleshooting: [ + "APIPA present? Check DHCP server and connectivity", + "Can ping link-local? Network layer is working", + "IPv6 link-local missing? IPv6 is disabled or broken", + "Multiple APIPA devices? They can communicate locally" + ] + }, + + whenToWorry: [ + { + situation: "Single device has APIPA", + concern: "Low - likely local network issue", + action: "Check cable, switch port, DHCP reservation" + }, + { + situation: "Multiple devices have APIPA", + concern: "High - DHCP server or network problem", + action: "Check DHCP server status, network infrastructure" + }, + { + situation: "No IPv6 link-local addresses", + concern: "High - IPv6 disabled or seriously broken", + action: "Check IPv6 configuration, driver issues" + }, + { + situation: "Can't ping IPv6 link-local", + concern: "Medium - local IPv6 connectivity issue", + action: "Check firewall, interface status, addressing" + } + ] +}; \ No newline at end of file diff --git a/src/lib/content/mtu-mss.ts b/src/lib/content/mtu-mss.ts new file mode 100644 index 0000000..eff52b0 --- /dev/null +++ b/src/lib/content/mtu-mss.ts @@ -0,0 +1,207 @@ +export const mtuMssContent = { + title: "Common MTU/MSS Values", + description: "Reference for Maximum Transmission Unit (MTU) and Maximum Segment Size (MSS) values across different network types.", + + sections: { + overview: { + title: "MTU vs MSS", + content: `MTU (Maximum Transmission Unit) is the largest packet size that can be transmitted over a network link without fragmentation. MSS (Maximum Segment Size) is the largest amount of TCP data that can be sent in a single segment. + +The relationship is: MSS = MTU - IP Header - TCP Header +For IPv4: MSS = MTU - 20 - 20 = MTU - 40 bytes` + } + }, + + commonValues: [ + { + medium: "Ethernet", + mtu: 1500, + mss: 1460, + notes: "Standard Ethernet II frame size", + usage: "Most common in LANs and internet" + }, + { + medium: "PPPoE (DSL)", + mtu: 1492, + mss: 1452, + notes: "PPP over Ethernet adds 8 bytes overhead", + usage: "Common for DSL broadband connections" + }, + { + medium: "Jumbo Frames", + mtu: 9000, + mss: 8960, + notes: "Larger frames for high-performance networks", + usage: "Data centers, storage networks" + }, + { + medium: "802.11 WiFi", + mtu: 1500, + mss: 1460, + notes: "Same as Ethernet for compatibility", + usage: "Wireless LANs" + }, + { + medium: "VPN (typical)", + mtu: 1436, + mss: 1396, + notes: "Varies by VPN protocol and encryption", + usage: "IPSec, OpenVPN, WireGuard tunnels" + }, + { + medium: "GRE Tunnel", + mtu: 1476, + mss: 1436, + notes: "GRE adds 24 bytes of overhead", + usage: "Generic routing encapsulation" + }, + { + medium: "IPv6 over IPv4", + mtu: 1480, + mss: 1440, + notes: "6in4 tunneling overhead", + usage: "IPv6 transition mechanisms" + }, + { + medium: "MPLS", + mtu: 1496, + mss: 1456, + notes: "MPLS label adds 4 bytes per label", + usage: "Service provider networks" + } + ], + + calculations: { + title: "MTU/MSS Calculation Examples", + examples: [ + { + scenario: "Standard Ethernet", + mtu: 1500, + ipHeader: 20, + tcpHeader: 20, + mss: 1460, + calculation: "1500 - 20 (IP) - 20 (TCP) = 1460" + }, + { + scenario: "IPv6 Ethernet", + mtu: 1500, + ipHeader: 40, + tcpHeader: 20, + mss: 1440, + calculation: "1500 - 40 (IPv6) - 20 (TCP) = 1440" + }, + { + scenario: "PPPoE Connection", + mtu: 1492, + ipHeader: 20, + tcpHeader: 20, + mss: 1452, + calculation: "1492 - 20 (IP) - 20 (TCP) = 1452" + } + ] + }, + + overheads: [ + { protocol: "Ethernet Header", overhead: 14, notes: "Destination MAC, Source MAC, EtherType" }, + { protocol: "IPv4 Header", overhead: 20, notes: "Minimum size, can be larger with options" }, + { protocol: "IPv6 Header", overhead: 40, notes: "Fixed size header" }, + { protocol: "TCP Header", overhead: 20, notes: "Minimum size, can be larger with options" }, + { protocol: "UDP Header", overhead: 8, notes: "Fixed size header" }, + { protocol: "PPPoE", overhead: 8, notes: "PPP over Ethernet encapsulation" }, + { protocol: "GRE", overhead: 24, notes: "Generic Routing Encapsulation" }, + { protocol: "IPSec ESP", overhead: "24-32", notes: "Varies by encryption and authentication" }, + { protocol: "MPLS Label", overhead: 4, notes: "Per MPLS label in stack" } + ], + + discovery: { + title: "Path MTU Discovery", + description: "Mechanism to find the largest MTU along a network path", + process: [ + "Send packets with Don't Fragment (DF) bit set", + "If packet is too large, router sends ICMP Fragmentation Needed", + "Sender reduces packet size and tries again", + "Continue until packet goes through successfully", + "Cache the discovered MTU for the destination" + ], + issues: [ + "Firewalls blocking ICMP can break PMTU discovery", + "Results in 'black hole' where large packets are silently dropped", + "TCP MSS clamping can work around this issue" + ] + }, + + troubleshooting: [ + { + issue: "Slow file transfers over VPN", + cause: "Large packets being fragmented due to VPN overhead", + solution: "Reduce MTU on VPN interface or enable MSS clamping" + }, + { + issue: "Web pages not loading completely", + cause: "PMTU discovery failing, large packets dropped", + solution: "Check firewall ICMP rules or reduce interface MTU" + }, + { + issue: "Poor performance on jumbo frame network", + cause: "One device not supporting jumbo frames", + solution: "Ensure all devices in path support same MTU size" + } + ], + + bestPractices: [ + "Use consistent MTU sizes across network segments", + "Test MTU discovery with ping -f -l [size] (Windows) or ping -M do -s [size] (Linux)", + "Configure MSS clamping on routers for VPN/tunneled traffic", + "Monitor for fragmentation in network statistics", + "Document MTU requirements for different network segments", + "Consider jumbo frames for high-throughput applications" + ], + + commands: [ + { + platform: "Windows", + command: "netsh interface ipv4 show subinterfaces", + purpose: "Show MTU for all interfaces" + }, + { + platform: "Linux", + command: "ip link show", + purpose: "Display interface MTU settings" + }, + { + platform: "macOS", + command: "ifconfig", + purpose: "Show interface configuration including MTU" + }, + { + platform: "Cisco IOS", + command: "show interfaces", + purpose: "Display interface MTU values" + } + ], + + testCommands: [ + { + platform: "Windows", + command: "ping -f -l 1472 8.8.8.8", + purpose: "Test maximum packet size (1472 + 28 headers = 1500 MTU)" + }, + { + platform: "Linux", + command: "ping -M do -s 1472 8.8.8.8", + purpose: "Test with Don't Fragment bit set" + }, + { + platform: "Any", + command: "tracepath destination", + purpose: "Discover path MTU to destination" + } + ], + + quickReference: [ + "Standard Ethernet: 1500 MTU / 1460 MSS", + "PPPoE/DSL: 1492 MTU / 1452 MSS", + "Jumbo Frames: 9000 MTU / 8960 MSS", + "VPN (typical): 1436 MTU / 1396 MSS" + ] +}; \ No newline at end of file diff --git a/src/lib/content/multicast.ts b/src/lib/content/multicast.ts new file mode 100644 index 0000000..44cad2c --- /dev/null +++ b/src/lib/content/multicast.ts @@ -0,0 +1,220 @@ +export const multicastContent = { + title: "IPv4 & IPv6 Multicast Basics", + description: "Understanding multicast addressing, scopes, well-known groups, and local subnet limitations.", + + sections: { + overview: { + title: "What is Multicast?", + content: `Multicast allows one sender to transmit data to multiple receivers simultaneously. Unlike broadcast (everyone) or unicast (one specific recipient), multicast sends to a specific group of interested receivers. + +This is more efficient than sending individual unicast packets to each recipient, especially for streaming media, software updates, or real-time communications.` + } + }, + + ipv4Multicast: { + title: "IPv4 Multicast", + range: "224.0.0.0/4 (224.0.0.0 to 239.255.255.255)", + + classes: [ + { + range: "224.0.0.0/24", + name: "Local Network Control Block", + description: "Well-known multicast addresses for protocols", + scope: "Local subnet only", + examples: [ + "224.0.0.1 - All Systems", + "224.0.0.2 - All Routers", + "224.0.0.5 - OSPF All SPF Routers", + "224.0.0.6 - OSPF All DR Routers", + "224.0.0.9 - RIP Version 2", + "224.0.0.22 - IGMP", + "224.0.0.251 - mDNS", + "224.0.0.252 - LLMNR" + ] + }, + { + range: "224.0.1.0/24", + name: "Internetwork Control Block", + description: "Internet-wide control protocols", + scope: "Global", + examples: [ + "224.0.1.1 - NTP", + "224.0.1.60 - DHCP Server/Relay" + ] + }, + { + range: "224.1.0.0 to 224.1.255.255", + name: "AD-HOC Block I", + description: "Transient use for applications", + scope: "Variable", + examples: ["Application-specific addresses"] + }, + { + range: "224.2.0.0 to 224.2.255.255", + name: "SDP/SAP Block", + description: "Session Directory Protocol", + scope: "Global", + examples: ["Session announcements"] + }, + { + range: "239.0.0.0/8", + name: "Organization Local Scope", + description: "Private multicast addresses", + scope: "Organization-wide", + examples: ["Private applications, enterprise use"] + } + ] + }, + + ipv6Multicast: { + title: "IPv6 Multicast", + range: "ff00::/8 (all addresses starting with ff)", + + structure: { + format: "ff[flags][scope]::/16", + flags: [ + { bit: "0", meaning: "Reserved (always 0)" }, + { bit: "0", meaning: "Reserved (always 0)" }, + { bit: "0", meaning: "Reserved (always 0)" }, + { bit: "T", meaning: "0=Permanent, 1=Temporary" } + ], + scopes: [ + { code: "0", name: "Reserved" }, + { code: "1", name: "Interface-Local" }, + { code: "2", name: "Link-Local" }, + { code: "3", name: "Reserved" }, + { code: "4", name: "Admin-Local" }, + { code: "5", name: "Site-Local" }, + { code: "8", name: "Organization-Local" }, + { code: "e", name: "Global" } + ] + }, + + wellKnown: [ + { + address: "ff01::1", + name: "All Nodes (Interface-Local)", + description: "All nodes on the same interface" + }, + { + address: "ff02::1", + name: "All Nodes (Link-Local)", + description: "All nodes on the local network segment" + }, + { + address: "ff02::2", + name: "All Routers (Link-Local)", + description: "All routers on the local network segment" + }, + { + address: "ff02::5", + name: "OSPFv3 All SPF Routers", + description: "All OSPF routers" + }, + { + address: "ff02::6", + name: "OSPFv3 All DR Routers", + description: "OSPF designated routers" + }, + { + address: "ff02::9", + name: "RIPng Routers", + description: "RIP next generation routers" + }, + { + address: "ff02::fb", + name: "mDNSv6", + description: "Multicast DNS over IPv6" + }, + { + address: "ff05::2", + name: "All Routers (Site-Local)", + description: "All routers within the site" + } + ] + }, + + limitations: [ + { + title: "Local Subnet Only Caveat", + description: "Many multicast addresses are designed for local subnet use only", + details: [ + "224.0.0.x addresses don't cross router boundaries by default", + "ff02:: addresses are link-local scope in IPv6", + "Routers need multicast routing (PIM, IGMP) to forward between subnets", + "Without multicast routing, traffic stays on the local segment", + "This is intentional for protocol efficiency and security" + ] + }, + { + title: "IGMP/MLD Requirements", + description: "Devices must signal interest in multicast groups", + details: [ + "IGMP (IPv4) or MLD (IPv6) tells routers which groups are wanted", + "Without IGMP/MLD, routers may drop multicast traffic", + "Switches need IGMP snooping to avoid flooding", + "Managed switches should have multicast features enabled" + ] + }, + { + title: "Firewall Considerations", + description: "Firewalls often block multicast by default", + details: [ + "Corporate firewalls frequently block multicast ranges", + "Home routers may not forward multicast between VLANs", + "VPN tunnels typically don't carry multicast traffic", + "Cloud environments often don't support multicast" + ] + } + ], + + commonProtocols: [ + { protocol: "OSPF", ipv4: "224.0.0.5, 224.0.0.6", ipv6: "ff02::5, ff02::6", purpose: "Routing protocol communication" }, + { protocol: "RIP", ipv4: "224.0.0.9", ipv6: "ff02::9", purpose: "Routing updates" }, + { protocol: "DHCP", ipv4: "224.0.0.252", ipv6: "ff02::1:2", purpose: "Configuration relay" }, + { protocol: "mDNS", ipv4: "224.0.0.251", ipv6: "ff02::fb", purpose: "Zero-configuration networking" }, + { protocol: "LLMNR", ipv4: "224.0.0.252", ipv6: "ff02::1:3", purpose: "Link-local name resolution" }, + { protocol: "SSDP", ipv4: "239.255.255.250", ipv6: "ff0x::c", purpose: "UPnP device discovery" } + ], + + troubleshooting: [ + { + issue: "Multicast not working across VLANs", + causes: ["No multicast routing configured", "IGMP snooping disabled", "Firewall blocking"], + solutions: ["Enable PIM on routers", "Configure IGMP snooping", "Allow multicast ranges in firewall"] + }, + { + issue: "High multicast traffic flooding network", + causes: ["No IGMP snooping", "Switches flooding multicast", "Rogue applications"], + solutions: ["Enable IGMP snooping on switches", "Monitor multicast sources", "Implement multicast rate limiting"] + }, + { + issue: "Devices not receiving multicast", + causes: ["Not joined to group", "IGMP queries not working", "Wrong scope"], + solutions: ["Verify group membership", "Check IGMP querier", "Use correct multicast scope"] + } + ], + + bestPractices: [ + "Use appropriate multicast scopes (link-local vs site-local vs global)", + "Enable IGMP snooping on managed switches", + "Configure multicast routing (PIM) only where needed", + "Monitor multicast traffic to prevent network flooding", + "Use organization-local ranges (239.x.x.x) for private applications", + "Test multicast applications in isolated environments first", + "Document multicast group assignments to avoid conflicts" + ], + + quickReference: { + ipv4: [ + "224.0.0.1 - All systems on subnet", + "224.0.0.2 - All routers on subnet", + "239.x.x.x - Private/organization use" + ], + ipv6: [ + "ff02::1 - All nodes on link", + "ff02::2 - All routers on link", + "ff0x::... - Various scopes (x = scope)" + ] + } +}; \ No newline at end of file diff --git a/src/lib/content/private-vs-public-ip.ts b/src/lib/content/private-vs-public-ip.ts new file mode 100644 index 0000000..659ae10 --- /dev/null +++ b/src/lib/content/private-vs-public-ip.ts @@ -0,0 +1,222 @@ +export const privateVsPublicContent = { + title: "Private vs Public IP Addresses", + description: "Understanding the difference between private and public IP addresses, NAT implications, and quick identification methods.", + + sections: { + overview: { + title: "What's the Difference?", + content: `Private IP addresses are used within local networks and are not routed on the public internet. Public IP addresses are globally unique and can be reached from anywhere on the internet. + +The key difference is reachability: private IPs are only reachable within their local network, while public IPs are reachable from anywhere on the internet.` + } + }, + + privateRanges: [ + { + range: "10.0.0.0/8", + fullRange: "10.0.0.0 to 10.255.255.255", + addresses: "16,777,216 addresses", + class: "Class A private range", + commonUse: "Large enterprises, ISP internal networks", + examples: ["10.0.0.1", "10.1.1.1", "10.200.50.100"] + }, + { + range: "172.16.0.0/12", + fullRange: "172.16.0.0 to 172.31.255.255", + addresses: "1,048,576 addresses", + class: "Class B private range", + commonUse: "Medium businesses, cloud providers", + examples: ["172.16.0.1", "172.20.1.1", "172.31.255.254"] + }, + { + range: "192.168.0.0/16", + fullRange: "192.168.0.0 to 192.168.255.255", + addresses: "65,536 addresses", + class: "Class C private range", + commonUse: "Home networks, small offices", + examples: ["192.168.1.1", "192.168.0.100", "192.168.100.50"] + } + ], + + publicRanges: { + description: "All IP addresses not in private, reserved, or special-use ranges", + characteristics: [ + "Globally unique and routable on the internet", + "Assigned by Regional Internet Registries (RIRs)", + "Can be reached from anywhere on the internet", + "Cost money to obtain and maintain", + "Limited supply (IPv4 exhaustion)" + ], + examples: [ + { ip: "8.8.8.8", owner: "Google Public DNS" }, + { ip: "1.1.1.1", owner: "Cloudflare DNS" }, + { ip: "13.107.42.14", owner: "Microsoft services" }, + { ip: "151.101.193.140", owner: "Reddit" } + ] + }, + + natImplications: { + title: "NAT (Network Address Translation) Implications", + + privateToPublic: { + title: "Private Networks Accessing Internet", + description: "Private addresses must be translated to public addresses to reach the internet", + process: [ + "Device with private IP (192.168.1.100) wants to access internet", + "Router/NAT device translates to public IP (203.0.113.50)", + "Internet sees traffic from public IP, not private IP", + "Return traffic is translated back to private IP" + ], + benefits: [ + "Allows many devices to share one public IP", + "Provides security through address hiding", + "Conserves public IP addresses", + "Enables local network management" + ] + }, + + publicToPrivate: { + title: "Internet Accessing Private Networks", + description: "Direct access from internet to private IPs requires special configuration", + challenges: [ + "Private IPs are not routed on internet", + "NAT blocks unsolicited inbound connections", + "Port forwarding needed for specific services", + "VPN required for general access" + ], + solutions: [ + "Port forwarding for specific services", + "VPN for secure remote access", + "DMZ for less secure but simple access", + "Reverse proxy for web services" + ] + } + }, + + identification: { + quickCheck: [ + { + method: "IP Range Check", + description: "Look at first octets of IP address", + private: "10.x.x.x, 172.16-31.x.x, 192.168.x.x", + public: "Any other address not in reserved ranges" + }, + { + method: "Reachability Test", + description: "Try to reach from external network", + private: "Cannot be reached from internet", + public: "Can be reached from internet (if not firewalled)" + }, + { + method: "Router Configuration", + description: "Check WAN vs LAN interface addresses", + private: "LAN interfaces use private addresses", + public: "WAN interface uses public address (unless CGNAT)" + } + ], + + tools: [ + { tool: "whatismyipaddress.com", purpose: "Shows your public IP as seen by internet" }, + { tool: "ipconfig / ifconfig", purpose: "Shows local IP addresses on your device" }, + { tool: "Router admin page", purpose: "Shows WAN (public) and LAN (private) IPs" }, + { tool: "traceroute", purpose: "Shows path including public/private hops" } + ] + }, + + commonScenarios: [ + { + scenario: "Home Network", + setup: "Router gets public IP from ISP, creates private network inside", + privateIPs: "Devices use 192.168.1.x addresses", + publicIP: "Router WAN interface gets ISP-assigned public IP", + natBehavior: "All devices share the one public IP through NAT" + }, + { + scenario: "Office Network", + setup: "Firewall/router creates private network for employee devices", + privateIPs: "Computers use 10.x.x.x or 172.16.x.x addresses", + publicIP: "Multiple public IPs for different services", + natBehavior: "Outbound NAT for internet access, port forwarding for servers" + }, + { + scenario: "Cloud Infrastructure", + setup: "Virtual machines in private subnets with NAT gateway", + privateIPs: "VMs use 10.x.x.x addresses within VPC", + publicIP: "Elastic/floating IPs assigned as needed", + natBehavior: "NAT gateway for outbound, load balancers for inbound" + }, + { + scenario: "CGNAT Environment", + setup: "ISP uses CGNAT, customers get private IPs", + privateIPs: "Home router gets 100.64.x.x address (CGNAT range)", + publicIP: "Shared among multiple customers", + natBehavior: "Double NAT - home NAT + ISP CGNAT" + } + ], + + troubleshooting: [ + { + issue: "Can't Access Server from Internet", + possibleCauses: ["Server has private IP", "No port forwarding", "Firewall blocking"], + diagnosis: "Check if server IP is private, test port forwarding", + solution: "Configure port forwarding or use public IP" + }, + { + issue: "Two Networks Can't Communicate", + possibleCauses: ["Both using same private range", "No routing configured"], + diagnosis: "Check for IP address conflicts, routing tables", + solution: "Use different private ranges or configure routing" + }, + { + issue: "VPN Not Working", + possibleCauses: ["Private IP conflicts", "NAT traversal issues"], + diagnosis: "Check for address space overlap", + solution: "Reconfigure IP ranges or use different VPN protocol" + } + ], + + bestPractices: [ + "Use private IPs for internal networks", + "Reserve public IPs for internet-facing services only", + "Plan private IP ranges to avoid conflicts", + "Document your IP addressing scheme", + "Use DHCP for dynamic private IP assignment", + "Implement proper firewall rules for public IPs", + "Monitor public IP usage and costs" + ], + + securityConsiderations: [ + { + aspect: "Private Network Security", + considerations: [ + "Private IPs provide security through obscurity", + "Still need internal security measures", + "Lateral movement possible within private networks", + "Monitor internal network traffic" + ] + }, + { + aspect: "Public IP Security", + considerations: [ + "Public IPs are constantly scanned and attacked", + "Require robust firewall and security measures", + "DDoS protection may be necessary", + "Regular security updates and monitoring essential" + ] + } + ], + + quickReference: { + privateRanges: [ + "10.0.0.0/8 (10.0.0.0 - 10.255.255.255)", + "172.16.0.0/12 (172.16.0.0 - 172.31.255.255)", + "192.168.0.0/16 (192.168.0.0 - 192.168.255.255)" + ], + identificationTips: [ + "If it starts with 10, 172.16-31, or 192.168 = private", + "If reachable from internet without NAT = public", + "Check your router - WAN IP is public, LAN IPs are private", + "Use online tools to see your public IP" + ] + } +}; \ No newline at end of file diff --git a/src/lib/content/reverse-dns.ts b/src/lib/content/reverse-dns.ts new file mode 100644 index 0000000..124a771 --- /dev/null +++ b/src/lib/content/reverse-dns.ts @@ -0,0 +1,214 @@ +export const reverseDnsContent = { + title: "Reverse DNS (in-addr.arpa / ip6.arpa)", + description: "How reverse DNS works, PTR record construction, and examples for IPv4 and IPv6 addresses.", + + sections: { + overview: { + title: "What is Reverse DNS?", + content: `Reverse DNS (rDNS) converts IP addresses back to domain names using PTR records. While normal DNS goes from name to IP address, reverse DNS goes from IP address to name. + +This is used for logging, email verification, security checks, and troubleshooting. Many mail servers require valid reverse DNS to accept email.` + }, + + howWorks: { + title: "How Reverse DNS Works", + content: `Reverse DNS uses special domains that represent IP addresses in reverse order: + +- IPv4 uses the .in-addr.arpa domain +- IPv6 uses the .ip6.arpa domain + +The IP address is reversed and each part becomes a label in the domain name, then a PTR record provides the hostname.` + } + }, + + ipv4Reverse: { + title: "IPv4 Reverse DNS (in-addr.arpa)", + + process: [ + "Take the IPv4 address (e.g., 192.0.2.1)", + "Reverse the octets (1.2.0.192)", + "Add .in-addr.arpa domain (1.2.0.192.in-addr.arpa)", + "Query for PTR record at that name", + "PTR record contains the hostname" + ], + + examples: [ + { + ip: "192.0.2.1", + reversed: "1.2.0.192.in-addr.arpa", + ptrRecord: "host1.example.com", + explanation: "Each octet becomes a label, in reverse order" + }, + { + ip: "10.0.0.1", + reversed: "1.0.0.10.in-addr.arpa", + ptrRecord: "gateway.internal", + explanation: "Private addresses can have internal PTR records" + }, + { + ip: "172.16.254.1", + reversed: "1.254.16.172.in-addr.arpa", + ptrRecord: "router.company.local", + explanation: "Common for infrastructure devices" + }, + { + ip: "8.8.8.8", + reversed: "8.8.8.8.in-addr.arpa", + ptrRecord: "dns.google", + explanation: "Public DNS servers typically have rDNS" + } + ], + + delegation: { + title: "Network Delegation", + explanation: "ISPs delegate reverse DNS zones to customers for their IP blocks", + examples: [ + { + network: "192.0.2.0/24", + zone: "2.0.192.in-addr.arpa", + description: "Entire /24 network reverse zone" + }, + { + network: "203.0.113.0/27", + zone: "0-27.113.0.203.in-addr.arpa", + description: "Smaller subnet with CNAME delegation" + } + ] + } + }, + + ipv6Reverse: { + title: "IPv6 Reverse DNS (ip6.arpa)", + + process: [ + "Take IPv6 address and expand to full form", + "Remove colons and reverse all hex digits", + "Insert dots between each hex digit", + "Add .ip6.arpa domain", + "Query for PTR record" + ], + + examples: [ + { + ip: "2001:db8::1", + expanded: "2001:0db8:0000:0000:0000:0000:0000:0001", + nibbles: "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa", + ptrRecord: "host1.example.com", + explanation: "Each hex digit (nibble) becomes a separate label" + }, + { + ip: "2001:db8:85a3::8a2e:370:7334", + expanded: "2001:0db8:85a3:0000:0000:8a2e:0370:7334", + nibbles: "4.3.3.7.0.7.3.0.e.2.a.8.0.0.0.0.0.0.0.0.3.a.5.8.8.b.d.0.1.0.0.2.ip6.arpa", + ptrRecord: "server.company.net", + explanation: "Full expansion required before nibble reversal" + }, + { + ip: "fe80::1%eth0", + expanded: "fe80:0000:0000:0000:0000:0000:0000:0001", + nibbles: "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f.ip6.arpa", + ptrRecord: "(typically not configured)", + explanation: "Link-local addresses rarely have reverse DNS" + } + ], + + delegation: { + title: "IPv6 Reverse Delegation", + explanation: "IPv6 reverse zones are typically delegated on nibble boundaries", + examples: [ + { + network: "2001:db8::/32", + zone: "8.b.d.0.1.0.0.2.ip6.arpa", + description: "Typical RIR allocation reverse zone" + }, + { + network: "2001:db8:1::/48", + zone: "1.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa", + description: "Site allocation reverse zone" + } + ] + } + }, + + practicalExamples: { + title: "Practical Examples and Tools", + + digExamples: [ + { + command: "dig -x 8.8.8.8", + description: "Query reverse DNS for 8.8.8.8", + expectedResult: "dns.google." + }, + { + command: "dig PTR 8.8.8.8.in-addr.arpa", + description: "Direct PTR query (same as above)", + expectedResult: "dns.google." + }, + { + command: "dig -x 2001:4860:4860::8888", + description: "IPv6 reverse DNS query", + expectedResult: "dns.google." + }, + { + command: "nslookup 1.1.1.1", + description: "Windows/generic reverse lookup", + expectedResult: "one.one.one.one." + } + ], + + commonChecks: [ + "Email servers checking sender reputation", + "Web server logs showing hostnames instead of IPs", + "Security tools identifying suspicious connections", + "Network troubleshooting and asset identification", + "Compliance auditing and documentation" + ] + }, + + troubleshooting: [ + { + issue: "No reverse DNS record found", + causes: ["PTR record not configured", "Wrong delegation", "DNS server issue"], + solutions: ["Check with IP provider", "Verify PTR record exists", "Test different DNS servers"] + }, + { + issue: "Reverse DNS doesn't match forward DNS", + causes: ["Misconfigured PTR record", "Stale DNS cache", "Wrong hostname"], + solutions: ["Verify PTR points to correct name", "Clear DNS cache", "Check forward/reverse match"] + }, + { + issue: "Email being rejected due to missing rDNS", + causes: ["Mail server missing PTR record", "PTR doesn't match HELO name"], + solutions: ["Configure PTR record with ISP", "Ensure PTR matches mail server name"] + } + ], + + bestPractices: [ + "Always configure reverse DNS for mail servers", + "Use meaningful hostnames in PTR records", + "Ensure forward and reverse DNS match", + "Keep PTR records up to date when changing hostnames", + "Test reverse DNS from multiple locations", + "Document your reverse DNS naming convention" + ], + + quickReference: { + ipv4: [ + "192.0.2.1 → 1.2.0.192.in-addr.arpa", + "10.0.0.1 → 1.0.0.10.in-addr.arpa", + "Use 'dig -x' for easy reverse lookups" + ], + ipv6: [ + "2001:db8::1 → 1.0.0.0...8.b.d.0.1.0.0.2.ip6.arpa", + "Each hex digit gets its own label (nibble format)", + "Much longer than IPv4 reverse names" + ] + }, + + tools: [ + { name: "dig -x", description: "Command-line reverse DNS lookup" }, + { name: "nslookup", description: "Cross-platform DNS lookup tool" }, + { name: "host", description: "Linux/Unix DNS lookup utility" }, + { name: "Online reverse DNS tools", description: "Web-based lookup services" } + ] +}; \ No newline at end of file diff --git a/src/lib/content/reverse-zones.ts b/src/lib/content/reverse-zones.ts new file mode 100644 index 0000000..ff97d0e --- /dev/null +++ b/src/lib/content/reverse-zones.ts @@ -0,0 +1,285 @@ +export const reverseZonesContent = { + title: "Reverse Zones for CIDR Delegation", + description: "Minimal reverse DNS zones needed to properly delegate IPv4 and IPv6 CIDR blocks with practical examples.", + + sections: { + overview: { + title: "What are Reverse Zones?", + content: `Reverse DNS zones map IP addresses back to domain names using special domains (.in-addr.arpa for IPv4, .ip6.arpa for IPv6). When you're delegated a CIDR block, you need to create the corresponding reverse zones for proper DNS operation. + +Reverse zones are essential for mail servers, logging, security tools, and network troubleshooting.` + }, + + delegation: { + title: "How Reverse Delegation Works", + content: `Your ISP or RIR delegates reverse DNS authority for your IP blocks to your DNS servers. You then create the reverse zones and populate them with PTR records that map IP addresses to hostnames. + +The delegation happens at specific boundaries that align with IP addressing hierarchy.` + } + }, + + ipv4Zones: { + title: "IPv4 Reverse Zones (in-addr.arpa)", + + classfullBoundaries: [ + { + cidr: "/8", + example: "10.0.0.0/8", + reverseZone: "10.in-addr.arpa", + description: "Entire Class A network", + delegation: "Usually handled by RIRs, not end users" + }, + { + cidr: "/16", + example: "172.16.0.0/16", + reverseZone: "16.172.in-addr.arpa", + description: "Class B network", + delegation: "Large organizations or ISPs" + }, + { + cidr: "/24", + example: "192.168.1.0/24", + reverseZone: "1.168.192.in-addr.arpa", + description: "Class C network - most common delegation", + delegation: "Standard small business / organization" + } + ], + + classlessDelegation: [ + { + cidr: "/25", + example: "203.0.113.0/25", + addresses: "128 addresses", + problem: "Doesn't align with octet boundaries", + solution: "Use CNAME delegation with bit notation", + zones: ["0-25.113.0.203.in-addr.arpa", "1-25.113.0.203.in-addr.arpa"] + }, + { + cidr: "/26", + example: "203.0.113.64/26", + addresses: "64 addresses", + problem: "Quarter of /24, doesn't align with octets", + solution: "CNAME delegation for 64-127 range", + zones: ["64-26.113.0.203.in-addr.arpa"] + }, + { + cidr: "/27", + example: "203.0.113.128/27", + addresses: "32 addresses", + problem: "Eighth of /24, complex delegation", + solution: "CNAME delegation with range notation", + zones: ["128-27.113.0.203.in-addr.arpa"] + } + ], + + practicalExamples: [ + { + scenario: "Small Business with /24", + network: "192.0.2.0/24", + reverseZone: "2.0.192.in-addr.arpa", + ptrRecords: [ + "1.2.0.192.in-addr.arpa. IN PTR mail.example.com.", + "10.2.0.192.in-addr.arpa. IN PTR web.example.com.", + "50.2.0.192.in-addr.arpa. IN PTR server1.example.com." + ], + delegation: "ISP delegates entire /24 reverse zone to customer DNS" + }, + { + scenario: "Medium Business with /23", + network: "198.51.100.0/23", + reverseZones: ["100.51.198.in-addr.arpa", "101.51.198.in-addr.arpa"], + description: "Two /24 reverse zones needed", + delegation: "ISP delegates both zones or uses automation" + } + ] + }, + + ipv6Zones: { + title: "IPv6 Reverse Zones (ip6.arpa)", + + nibbleBoundaries: [ + { + cidr: "/32", + example: "2001:db8::/32", + reverseZone: "8.b.d.0.1.0.0.2.ip6.arpa", + description: "Typical RIR allocation to ISP", + delegation: "RIR delegates to ISP" + }, + { + cidr: "/48", + example: "2001:db8:1234::/48", + reverseZone: "4.3.2.1.8.b.d.0.1.0.0.2.ip6.arpa", + description: "Typical site allocation", + delegation: "ISP delegates to organization" + }, + { + cidr: "/56", + example: "2001:db8:1234:ab00::/56", + reverseZone: "0.0.b.a.4.3.2.1.8.b.d.0.1.0.0.2.ip6.arpa", + description: "Large home or small business", + delegation: "Common residential allocation" + }, + { + cidr: "/64", + example: "2001:db8:1234:5678::/64", + reverseZone: "8.7.6.5.4.3.2.1.8.b.d.0.1.0.0.2.ip6.arpa", + description: "Single subnet", + delegation: "Individual subnet reverse zone" + } + ], + + practicalExamples: [ + { + scenario: "Enterprise with /48", + network: "2001:db8:1234::/48", + reverseZone: "4.3.2.1.8.b.d.0.1.0.0.2.ip6.arpa", + subZones: [ + "0.0.0.0.4.3.2.1.8.b.d.0.1.0.0.2.ip6.arpa (/64)", + "1.0.0.0.4.3.2.1.8.b.d.0.1.0.0.2.ip6.arpa (/64)", + "a.b.c.d.4.3.2.1.8.b.d.0.1.0.0.2.ip6.arpa (/64)" + ], + management: "Create master zone, delegate individual /64s as needed" + } + ] + }, + + zoneCreation: { + title: "Creating Reverse Zones", + + ipv4Example: { + network: "192.0.2.0/24", + zoneName: "2.0.192.in-addr.arpa", + zoneFile: `$TTL 86400 +2.0.192.in-addr.arpa. IN SOA ns1.example.com. hostmaster.example.com. ( + 2024010101 ; serial + 3600 ; refresh + 1800 ; retry + 1209600 ; expire + 86400 ) ; minimum + + IN NS ns1.example.com. + IN NS ns2.example.com. + +1 IN PTR mail.example.com. +10 IN PTR web.example.com. +50 IN PTR server1.example.com. +100 IN PTR workstation.example.com.`, + + explanation: [ + "Zone name is network reversed + in-addr.arpa", + "SOA record defines zone authority and parameters", + "NS records point to authoritative name servers", + "PTR records map IP to hostname (just last octet for /24)" + ] + }, + + ipv6Example: { + network: "2001:db8:1234::/48", + zoneName: "4.3.2.1.8.b.d.0.1.0.0.2.ip6.arpa", + zoneFile: `$TTL 86400 +4.3.2.1.8.b.d.0.1.0.0.2.ip6.arpa. IN SOA ns1.example.com. hostmaster.example.com. ( + 2024010101 ; serial + 3600 ; refresh + 1800 ; retry + 1209600 ; expire + 86400 ) ; minimum + + IN NS ns1.example.com. + IN NS ns2.example.com. + +; Delegate /64 subnets +0.0.0.0 IN NS ns1.example.com. +0.0.0.0 IN NS ns2.example.com. + +1.0.0.0 IN NS ns1.example.com. +1.0.0.0 IN NS ns2.example.com.`, + + explanation: [ + "Zone name is full prefix in nibble format + ip6.arpa", + "Each hex digit becomes separate label in reverse", + "Can delegate individual /64 subnets within /48", + "Much longer zone names than IPv4" + ] + } + }, + + delegationScenarios: [ + { + scenario: "ISP to Customer (/24)", + delegation: "ISP adds NS records for customer's DNS servers in their reverse zone", + customerActions: [ + "Set up DNS servers with reverse zone", + "Create PTR records for important hosts", + "Test reverse lookups work correctly" + ], + ispActions: [ + "Add NS delegation in parent zone", + "Update WHOIS records if required", + "Verify customer DNS servers are working" + ] + }, + { + scenario: "Organization Internal (/16 split)", + delegation: "Large organization splits /16 into /24s for different departments", + process: [ + "Create master zone for entire /16", + "Delegate individual /24s to department DNS servers", + "Each department manages their own PTR records" + ] + } + ], + + bestPractices: [ + "Always create reverse zones for your allocated IP blocks", + "Ensure PTR records match forward DNS (A/AAAA records)", + "Use consistent naming conventions for reverse records", + "Monitor reverse DNS resolution for important services", + "Automate PTR record creation/updates where possible", + "Test reverse lookups from multiple external locations", + "Keep reverse zone serial numbers updated when making changes" + ], + + troubleshooting: [ + { + issue: "Reverse lookups not working", + causes: ["Zone not delegated", "DNS server not responding", "PTR records missing"], + diagnosis: "Use dig -x [ip] to test reverse resolution", + solution: "Check delegation, verify DNS server config, add PTR records" + }, + { + issue: "Mail servers rejecting email", + causes: ["Missing PTR record for mail server IP", "PTR doesn't match HELO name"], + diagnosis: "Check mail server logs, test PTR record", + solution: "Create PTR record that matches mail server hostname" + }, + { + issue: "IPv6 reverse lookups failing", + causes: ["Complex nibble format errors", "Zone delegation issues"], + diagnosis: "Verify zone name format, test with dig -x", + solution: "Double-check nibble format, verify IPv6 DNS configuration" + } + ], + + quickReference: { + zoneFormulas: [ + "IPv4 /24: [third].[second].[first].in-addr.arpa", + "IPv4 /16: [second].[first].in-addr.arpa", + "IPv6 /48: [nibbles-reversed].ip6.arpa", + "IPv6 /64: [more-nibbles-reversed].ip6.arpa" + ], + + essentialRecords: [ + "SOA record (required for all zones)", + "NS records (delegation to authoritative servers)", + "PTR records (actual IP to name mappings)", + "Match PTR with forward A/AAAA records" + ] + }, + + tools: [ + { tool: "dig -x [ip]", purpose: "Test reverse DNS lookup" }, + { tool: "nslookup [ip]", purpose: "Basic reverse lookup test" }, + { tool: "host [ip]", purpose: "Simple reverse resolution check" }, + { tool: "online reverse DNS tools", purpose: "Test from external perspective" } + ] +}; \ No newline at end of file diff --git a/src/lib/content/wildcard-masks.ts b/src/lib/content/wildcard-masks.ts new file mode 100644 index 0000000..c98166c --- /dev/null +++ b/src/lib/content/wildcard-masks.ts @@ -0,0 +1,209 @@ +export const wildcardMasksContent = { + title: "ACL Wildcard Masks", + description: "Understanding wildcard masks for ACLs - how they differ from subnet masks and quick conversion methods.", + + sections: { + overview: { + title: "What are Wildcard Masks?", + content: `Wildcard masks are used in Access Control Lists (ACLs) to specify which parts of an IP address to match. Unlike subnet masks, wildcard masks use inverted logic: + +- 0 means "must match exactly" +- 1 means "don't care" or "can be anything" + +This is the opposite of subnet masks, where 1 means network and 0 means host.` + }, + + difference: { + title: "Wildcard vs Subnet Masks", + content: `The key difference is the bit meaning: + +**Subnet Mask:** 1 = network portion, 0 = host portion +**Wildcard Mask:** 0 = must match, 1 = don't care + +Wildcard masks are essentially the inverse (bitwise NOT) of subnet masks.` + } + }, + + conversionExamples: [ + { + subnet: "255.255.255.0", + subnetBinary: "11111111.11111111.11111111.00000000", + wildcard: "0.0.0.255", + wildcardBinary: "00000000.00000000.00000000.11111111", + description: "/24 network - match first 24 bits exactly, any host" + }, + { + subnet: "255.255.248.0", + subnetBinary: "11111111.11111111.11111000.00000000", + wildcard: "0.0.7.255", + wildcardBinary: "00000000.00000000.00000111.11111111", + description: "/21 network - match first 21 bits, any of last 11 bits" + }, + { + subnet: "255.255.255.252", + subnetBinary: "11111111.11111111.11111111.11111100", + wildcard: "0.0.0.3", + wildcardBinary: "00000000.00000000.00000000.00000011", + description: "/30 network - match first 30 bits, last 2 can vary" + }, + { + subnet: "255.0.0.0", + subnetBinary: "11111111.00000000.00000000.00000000", + wildcard: "0.255.255.255", + wildcardBinary: "00000000.11111111.11111111.11111111", + description: "/8 network - match first 8 bits, rest don't care" + } + ], + + quickConversion: { + title: "Quick Conversion Method", + steps: [ + "Take the subnet mask", + "Subtract each octet from 255", + "The result is your wildcard mask" + ], + formula: "Wildcard = 255.255.255.255 - Subnet Mask", + examples: [ + { subnet: "255.255.255.0", calculation: "255-255, 255-255, 255-255, 255-0", wildcard: "0.0.0.255" }, + { subnet: "255.255.240.0", calculation: "255-255, 255-255, 255-240, 255-0", wildcard: "0.0.15.255" }, + { subnet: "255.255.255.252", calculation: "255-255, 255-255, 255-255, 255-252", wildcard: "0.0.0.3" } + ] + }, + + aclExamples: [ + { + title: "Cisco Router ACL Examples", + entries: [ + { + acl: "access-list 10 permit 192.168.1.0 0.0.0.255", + meaning: "Allow entire 192.168.1.0/24 network", + explanation: "First 24 bits must match, last 8 bits don't care" + }, + { + acl: "access-list 10 deny 10.0.0.0 0.255.255.255", + meaning: "Block entire 10.0.0.0/8 network", + explanation: "First 8 bits must match, last 24 bits don't care" + }, + { + acl: "access-list 10 permit 172.16.0.0 0.0.255.255", + meaning: "Allow 172.16.0.0/16 network", + explanation: "First 16 bits must match, last 16 bits don't care" + }, + { + acl: "access-list 10 permit 192.168.1.100 0.0.0.0", + meaning: "Allow only host 192.168.1.100", + explanation: "All 32 bits must match exactly" + } + ] + }, + { + title: "Juniper Firewall Examples", + entries: [ + { + acl: "from source-address 10.0.0.0/8", + meaning: "Match 10.0.0.0/8 network", + explanation: "Juniper uses CIDR notation, equivalent to wildcard 0.255.255.255" + }, + { + acl: "from source-address 192.168.1.0/24", + meaning: "Match 192.168.1.0/24 network", + explanation: "Equivalent to wildcard mask 0.0.0.255" + } + ] + } + ], + + specialCases: [ + { + case: "Any Host (0.0.0.0 255.255.255.255)", + wildcard: "255.255.255.255", + meaning: "Match any IP address", + usage: "Often written as 'any' in ACLs" + }, + { + case: "Specific Host (X.X.X.X 0.0.0.0)", + wildcard: "0.0.0.0", + meaning: "Match exactly one IP address", + usage: "Can be written as just the IP without mask" + }, + { + case: "Odd/Even Addresses", + wildcard: "0.0.0.1", + meaning: "Last bit can vary (odd/even addresses)", + usage: "Match pairs of consecutive addresses" + }, + { + case: "Every 4th Address", + wildcard: "0.0.0.3", + meaning: "Last 2 bits can vary", + usage: "Match groups of 4 consecutive addresses" + } + ], + + commonMistakes: [ + { + mistake: "Using subnet mask instead of wildcard mask", + problem: "ACL won't match intended addresses", + solution: "Remember to invert the mask (subtract from 255.255.255.255)" + }, + { + mistake: "Forgetting wildcard mask entirely", + problem: "Many devices assume 0.0.0.0 (host-only match)", + solution: "Always specify the wildcard mask explicitly" + }, + { + mistake: "Using non-contiguous wildcard bits", + problem: "Can create unexpected matches", + solution: "Stick to contiguous bit patterns for predictable results" + } + ], + + platformDifferences: [ + { + platform: "Cisco IOS", + format: "access-list [number] [permit|deny] [source] [wildcard]", + example: "access-list 10 permit 192.168.1.0 0.0.0.255", + notes: "Explicit wildcard mask required" + }, + { + platform: "Cisco ASA", + format: "access-list [name] [permit|deny] [protocol] [source/mask] [dest/mask]", + example: "access-list INSIDE permit ip 192.168.1.0/24 any", + notes: "Can use CIDR notation or wildcard masks" + }, + { + platform: "Juniper", + format: "from source-address [network/prefix]", + example: "from source-address 192.168.1.0/24", + notes: "Uses CIDR notation, not wildcard masks" + }, + { + platform: "Palo Alto", + format: "[network/prefix] or [start-ip]-[end-ip]", + example: "192.168.1.0/24 or 192.168.1.1-192.168.1.254", + notes: "CIDR or range format, no wildcard masks" + } + ], + + quickReference: [ + { prefix: "/32", subnet: "255.255.255.255", wildcard: "0.0.0.0", use: "Single host" }, + { prefix: "/30", subnet: "255.255.255.252", wildcard: "0.0.0.3", use: "4 addresses" }, + { prefix: "/29", subnet: "255.255.255.248", wildcard: "0.0.0.7", use: "8 addresses" }, + { prefix: "/28", subnet: "255.255.255.240", wildcard: "0.0.0.15", use: "16 addresses" }, + { prefix: "/27", subnet: "255.255.255.224", wildcard: "0.0.0.31", use: "32 addresses" }, + { prefix: "/26", subnet: "255.255.255.192", wildcard: "0.0.0.63", use: "64 addresses" }, + { prefix: "/25", subnet: "255.255.255.128", wildcard: "0.0.0.127", use: "128 addresses" }, + { prefix: "/24", subnet: "255.255.255.0", wildcard: "0.0.0.255", use: "256 addresses" }, + { prefix: "/16", subnet: "255.255.0.0", wildcard: "0.0.255.255", use: "65k addresses" }, + { prefix: "/8", subnet: "255.0.0.0", wildcard: "0.255.255.255", use: "16M addresses" } + ], + + tips: [ + "Remember: wildcard 0 = must match, 1 = don't care", + "Quick conversion: subtract subnet mask from 255.255.255.255", + "Test your ACLs in a lab before production deployment", + "Use 'any' keyword instead of 0.0.0.0 255.255.255.255 for readability", + "Document the purpose of each ACL entry", + "Wildcard masks don't have to match subnet boundaries" + ] +}; \ No newline at end of file diff --git a/src/routes/ip-reference/+page.svelte b/src/routes/ip-reference/+page.svelte deleted file mode 100644 index b8b8693..0000000 --- a/src/routes/ip-reference/+page.svelte +++ /dev/null @@ -1,104 +0,0 @@ - - -
-
-

Network Reference

-

Essential networking information and constants for IP address planning.

-
- -
- -

Network Classes

-

Class A/B/C summary with default masks, ranges, and usage.

- View → -
- - -

Reserved Ranges

-

Loopback, link-local, private (RFC 1918), multicast & more.

- View → -
- - -

Common Subnets

-

Handy CIDR ↔ mask table with typical usage and host counts.

- View → -
-
- - -
-

- - Pro Tips -

-
    -
  • Always plan for future growth when choosing subnet sizes
  • -
  • Use /30 subnets for point-to-point links to save addresses
  • -
  • Consider VLSM (Variable Length Subnet Masking) for efficient allocation
  • -
  • Private addresses (RFC 1918) are not routable on the Internet
  • -
-
-
- - diff --git a/src/routes/reference/+page.svelte b/src/routes/reference/+page.svelte index 3ce1936..b511d7b 100644 --- a/src/routes/reference/+page.svelte +++ b/src/routes/reference/+page.svelte @@ -27,6 +27,24 @@ description: "Global unicast, ULA, link-local, multicast, and special IPv6 addresses", icon: "globe" }, + { + title: "Common IPv6 Prefix Lengths", + path: "/reference/ipv6-prefix-lengths", + description: "Quick reference for /128, /127, /64, /60, /56, /48, /32 with typical uses", + icon: "grid" + }, + { + title: "IPv4 in IPv6", + path: "/reference/ipv6-embedded-ipv4", + description: "IPv4-mapped addresses, 6to4, Teredo, and transition mechanisms", + icon: "shuffle" + }, + { + title: "IPv4 & IPv6 Multicast Basics", + path: "/reference/multicast", + description: "Multicast scopes, well-known groups, and local subnet limitations", + icon: "radio" + }, { title: "Special-Use IPv4 Blocks (RFC 6890)", path: "/reference/special-use-ipv4", @@ -38,6 +56,72 @@ path: "/reference/ports", description: "Quick reference for frequently used port numbers and services", icon: "server" + }, + { + title: "ACL Wildcard Masks", + path: "/reference/wildcard-masks", + description: "Wildcard masks vs netmasks, quick conversions and ACL examples", + icon: "filter" + }, + { + title: "Common MTU/MSS Values", + path: "/reference/mtu-mss", + description: "MTU and MSS values for Ethernet, PPPoE, VPN, and overhead calculations", + icon: "package" + }, + { + title: "Reverse DNS (PTR Records)", + path: "/reference/reverse-dns", + description: "How in-addr.arpa and ip6.arpa work with examples for IPv4 and IPv6", + icon: "corner-down-left" + }, + { + title: "What is an ASN?", + path: "/reference/asn", + description: "Autonomous Systems, BGP basics, and how IP addresses map to ASNs", + icon: "share-2" + }, + { + title: "ICMP & ICMPv6: Common Types", + path: "/reference/icmp", + description: "Practical guide to ICMP message types for network troubleshooting", + icon: "activity" + }, + { + title: "ARP vs NDP", + path: "/reference/arp-vs-ndp", + description: "Side-by-side comparison of IPv4 ARP and IPv6 Neighbor Discovery", + icon: "git-compare" + }, + { + title: "Private vs Public IP Addresses", + path: "/reference/private-vs-public-ip", + description: "Understanding private/public IPs, NAT implications, and identification", + icon: "lock" + }, + { + title: "Carrier-Grade NAT Explained", + path: "/reference/cgnat", + description: "CGNAT (100.64.0.0/10), how to identify it, and service impacts", + icon: "layers" + }, + { + title: "Link-Local & APIPA Addresses", + path: "/reference/link-local-apipa", + description: "IPv4 APIPA (169.254/16) and IPv6 link-local (fe80::/10) at a glance", + icon: "wifi" + }, + { + title: "Reverse Zones for CIDR Delegation", + path: "/reference/reverse-zones", + description: "Minimal reverse DNS zones needed to delegate IPv4 and IPv6 CIDR blocks", + icon: "corner-down-left" + }, + { + title: "IPv6 Privacy Addresses", + path: "/reference/ipv6-privacy-addresses", + description: "SLAAC privacy extensions: temporary vs stable interface identifiers", + icon: "eye-off" } ]; @@ -99,11 +183,11 @@

More References Coming Soon

We're continuously adding more networking references. Coming soon:

@@ -112,7 +196,7 @@ \ No newline at end of file + diff --git a/src/routes/reference/arp-vs-ndp/+page.svelte b/src/routes/reference/arp-vs-ndp/+page.svelte new file mode 100644 index 0000000..d4b1baa --- /dev/null +++ b/src/routes/reference/arp-vs-ndp/+page.svelte @@ -0,0 +1,219 @@ + + + + {arpVsNdpContent.title} | {site.title} + + + + + + + +
+
+
+

{arpVsNdpContent.title}

+

{arpVsNdpContent.description}

+
+ +
+

{arpVsNdpContent.sections.overview.title}

+

{arpVsNdpContent.sections.overview.content}

+
+ +
+

Side-by-Side Comparison

+ + + + + + + + + + {#each arpVsNdpContent.comparison.basic as item} + + + + + + {/each} + +
AspectARP (IPv4)NDP (IPv6)
{item.aspect}{item.arp}{item.ndp}
+
+ +
+

{arpVsNdpContent.arpDetails.title}

+ +

ARP Message Types

+ {#each arpVsNdpContent.arpDetails.messageTypes as type} +
+
{type.type}
+
+
Description: {type.description}
+
Destination: {type.destination}
+
Response: {type.response}
+
+
+ {/each} + +

ARP Process

+
    + {#each arpVsNdpContent.arpDetails.process as step} +
  1. {step}
  2. + {/each} +
+ +

ARP Limitations

+
    + {#each arpVsNdpContent.arpDetails.limitations as limitation} +
  • {limitation}
  • + {/each} +
+
+ +
+

{arpVsNdpContent.ndpDetails.title}

+ +

NDP Message Types

+ {#each arpVsNdpContent.ndpDetails.messageTypes as type} +
+
{type.type}
+
+
ICMP Type: {type.icmpType}
+
Description: {type.description}
+
Destination: {type.destination}
+
Purpose: {type.purpose}
+
+
+ {/each} + +

NDP Process

+
    + {#each arpVsNdpContent.ndpDetails.process as step} +
  1. {step}
  2. + {/each} +
+ +

NDP Advantages Over ARP

+
    + {#each arpVsNdpContent.ndpDetails.advantages as advantage} +
  • {advantage}
  • + {/each} +
+
+ +
+

Practical Differences

+ {#each arpVsNdpContent.practicalDifferences as diff} +
+
{diff.scenario}
+
+
ARP (IPv4): {diff.arp}
+
NDP (IPv6): {diff.ndp}
+
Impact: {diff.impact}
+
+
+ {/each} +
+ +
+

Troubleshooting Commands

+ + + + + + + + + + + {#each arpVsNdpContent.troubleshootingCommands as cmd} + + + + + + + {/each} + +
PurposeIPv4 (ARP)IPv6 (NDP)Windows
{cmd.purpose}{cmd.ipv4}{cmd.ipv6}{cmd.windows}
+
+ +
+

Common Issues

+ {#each arpVsNdpContent.commonIssues as issue} +
+
+ + {issue.issue} ({issue.protocol}) +
+
+

Description: {issue.description}

+

Detection: {issue.detection}

+

Mitigation: {issue.mitigation}

+
+
+ {/each} +
+ +
+

Best Practices

+ {#each arpVsNdpContent.bestPractices as practices} +

{practices.protocol} Best Practices

+
    + {#each practices.practices as practice} +
  • {practice}
  • + {/each} +
+ {/each} +
+ +
+

Quick Reference

+
+
+
ARP Key Points
+ {#each arpVsNdpContent.quickReference.arp as point} +
{point}
+ {/each} +
+ +
+
NDP Key Points
+ {#each arpVsNdpContent.quickReference.ndp as point} +
{point}
+ {/each} +
+
+
+ +
+

IPv4 to IPv6 Migration Tips

+
+
Important Considerations
+ {#each arpVsNdpContent.migrationTips as tip} +
+
{tip}
+
+ {/each} +
+ +
+
+ + Key Takeaway +
+
+ While NDP is more complex than ARP, it's also much more capable and efficient. Understanding both protocols is essential for mixed IPv4/IPv6 environments. +
+
+
+
+
\ No newline at end of file diff --git a/src/routes/reference/asn/+page.svelte b/src/routes/reference/asn/+page.svelte new file mode 100644 index 0000000..d1a638c --- /dev/null +++ b/src/routes/reference/asn/+page.svelte @@ -0,0 +1,222 @@ + + + + {asnContent.title} | {site.title} + + + + + + + +
+
+
+

{asnContent.title}

+

{asnContent.description}

+
+ +
+

{asnContent.sections.overview.title}

+

{asnContent.sections.overview.content}

+
+ +
+

{asnContent.sections.asn.title}

+

{asnContent.sections.asn.content}

+
+ +
+

ASN Number Ranges

+ {#each asnContent.asnTypes as type} +
+
{type.name}
+
+
Range: {type.range}
+
Description: {type.description}
+
Usage: {type.usage}
+
Examples:
+ {#each type.examples as example} +
{example}
+ {/each} +
+
+ {/each} +
+ +
+

{asnContent.bgpBasics.title}

+

{asnContent.bgpBasics.description}

+ +

Key BGP Concepts

+
+ {#each asnContent.bgpBasics.concepts as concept} +
+
{concept.term}
+
+ Definition: {concept.definition}
+ Example: {concept.example} +
+
+ {/each} +
+ +

BGP Types

+ + + + + + + + + + + {#each asnContent.bgpBasics.types as type} + + + + + + + {/each} + +
TypeDescriptionUsagePort
{type.type}{type.description}{type.usage}{type.port}
+
+ +
+

{asnContent.ipToAsnMapping.title}

+

{asnContent.ipToAsnMapping.description}

+ +

How It Works

+
    + {#each asnContent.ipToAsnMapping.process as step} +
  1. {step}
  2. + {/each} +
+ +

Real-World Examples

+ + + + + + + + + + + {#each asnContent.ipToAsnMapping.examples as example} + + + + + + + {/each} + +
IP RangeASNOrganizationDescription
{example.ipRange}{example.asn}{example.organization}{example.description}
+
+ +
+

{asnContent.lookupTools.title}

+

{asnContent.lookupTools.description}

+ +
+ {#each asnContent.lookupTools.methods as method} +
+
{method.method}
+
{method.command}
+
+ {method.description}
+ {method.example} +
+
+ {/each} +
+ +

Common Lookup Commands

+
+
Try These Commands
+ {#each asnContent.lookupTools.commonCommands as command} +
+ {command} +
+ {/each} +
+
+ +
+

Real-World AS Examples

+ {#each asnContent.realWorldExamples as example} +
+
{example.scenario}: {example.asn}
+
+
Organization: {example.organization}
+
Role: {example.role}
+
IP Blocks: {example.ipBlocks}
+
Peering: {example.peers}
+
+
+ {/each} +
+ +
+

Benefits of the AS System

+
    + {#each asnContent.benefits as benefit} +
  • {benefit}
  • + {/each} +
+
+ +
+

Troubleshooting with ASN Information

+ {#each asnContent.troubleshooting as issue} +
+
+ + {issue.issue} +
+
+

Likely Cause: {issue.cause}

+

Investigation: {issue.investigation}

+

Solution: {issue.solution}

+
+
+ {/each} +
+ +
+

Getting Started with ASN Knowledge

+ {#each asnContent.gettingStarted as step} +
+
+ + {step.step} +
+
+

{step.description}

+

Action: {step.action}

+
+
+ {/each} +
+ +
+

Quick Facts to Remember

+
+
Key Points
+ {#each asnContent.quickFacts as fact} +
+
{fact}
+
+ {/each} +
+
+
+
\ No newline at end of file diff --git a/src/routes/reference/cgnat/+page.svelte b/src/routes/reference/cgnat/+page.svelte new file mode 100644 index 0000000..84f9ad4 --- /dev/null +++ b/src/routes/reference/cgnat/+page.svelte @@ -0,0 +1,231 @@ + + + + {cgnatContent.title} | {site.title} + + + + + + + +
+
+
+

{cgnatContent.title}

+

{cgnatContent.description}

+
+ +
+

{cgnatContent.sections.overview.title}

+

{cgnatContent.sections.overview.content}

+
+ +
+

{cgnatContent.sections.why.title}

+

{cgnatContent.sections.why.content}

+
+ +
+

CGNAT Address Range

+
+
+ + Shared Address Space +
+
+

Range: {cgnatContent.addressRange.range}

+

Full Range: {cgnatContent.addressRange.fullRange}

+

Total Addresses: {cgnatContent.addressRange.totalAddresses}

+

RFC: {cgnatContent.addressRange.rfc}

+
+
+ +

Address Breakdown

+ + + + + + + + + + {#each cgnatContent.addressRange.breakdown as block} + + + + + + {/each} + +
Network BlockAvailable AddressesTypical Use
{block.network}{block.addresses}{block.use}
+
+ +
+

{cgnatContent.howItWorks.title}

+

{cgnatContent.howItWorks.description}

+ +

Two-Layer NAT System

+ + + + + + + + + + + + {#each cgnatContent.howItWorks.layers as layer} + + + + + + + + {/each} + +
LayerLocationInside AddressOutside AddressPurpose
{layer.layer}{layer.location}{layer.inside}{layer.outside}{layer.purpose}
+ +

Traffic Flow

+
    + {#each cgnatContent.howItWorks.flow as step} +
  1. {step}
  2. + {/each} +
+
+ +
+

{cgnatContent.identification.title}

+ {#each cgnatContent.identification.methods as method} +
+
{method.method}
+
+
Description: {method.description}
+
CGNAT Indicator: {method.cgnatIndicator}
+
Normal Indicator: {method.normalIndicator}
+
+
+ {/each} +
+ +
+

Impact on Services

+ +

Negative Impacts

+ {#each cgnatContent.impacts.negative as impact} +
+
+ + {impact.impact} +
+
+

Description: {impact.description}

+

Affected Services: {impact.affectedServices.join(', ')}

+

Workaround: {impact.workaround}

+
+
+ {/each} + +

Positive Aspects

+
    + {#each cgnatContent.impacts.positive as positive} +
  • {positive}
  • + {/each} +
+
+ +
+

Workarounds and Solutions

+ {#each cgnatContent.workarounds as solution} +
+
{solution.solution}
+
+
Description: {solution.description}
+
Effectiveness: {solution.effectiveness}
+
Cost: {solution.cost}
+
+
+ {/each} +
+ +
+

Troubleshooting Common Issues

+ {#each cgnatContent.troubleshooting as issue} +
+
+ + {issue.issue} +
+
+

Cause: {issue.cause}

+

Diagnosis: {issue.diagnosis}

+

Solution: {issue.solution}

+
+
+ {/each} +
+ +
+

Quick CGNAT Check

+ +
+
+
Steps to Check
+
    + {#each cgnatContent.quickCheck.steps as step} +
  1. {step}
  2. + {/each} +
+
+ +
+
What to Do Next
+
    + {#each cgnatContent.quickCheck.whatToDo as action} +
  • {action}
  • + {/each} +
+
+
+
+ +
+

Best Practices

+
    + {#each cgnatContent.bestPractices as practice} +
  • {practice}
  • + {/each} +
+
+ +
+

ISP Perspective

+
+
Why ISPs Use CGNAT
+ {#each cgnatContent.ispPerspective as reason} +
+
{reason}
+
+ {/each} +
+ +
+
+ + Understanding the Trade-off +
+
+ CGNAT is a necessary compromise. It allows ISPs to provide affordable internet service during IPv4 exhaustion, but at the cost of some functionality. The long-term solution is IPv6 adoption. +
+
+
+
+
\ No newline at end of file diff --git a/src/routes/ip-reference/common-subnets/+page.svelte b/src/routes/reference/common-subnets/+page.svelte similarity index 100% rename from src/routes/ip-reference/common-subnets/+page.svelte rename to src/routes/reference/common-subnets/+page.svelte diff --git a/src/routes/reference/icmp/+page.svelte b/src/routes/reference/icmp/+page.svelte new file mode 100644 index 0000000..b7646de --- /dev/null +++ b/src/routes/reference/icmp/+page.svelte @@ -0,0 +1,184 @@ + + + + {icmpContent.title} | {site.title} + + + + + + + +
+
+
+

{icmpContent.title}

+

{icmpContent.description}

+
+ +
+

{icmpContent.sections.overview.title}

+

{icmpContent.sections.overview.content}

+
+ +
+

Common ICMPv4 Types

+ {#each icmpContent.icmpv4Types as type} +
+
Type {type.type}: {type.name}
+
+
Description: {type.description}
+
Common Use: {type.commonUse}
+
Example: {type.example}
+
Troubleshooting: {type.troubleshooting}
+ {#if type.codes} +
Common Codes:
+
    + {#each type.codes as code} +
  • Code {code.code}: {code.meaning}
  • + {/each} +
+ {/if} +
+
+ {/each} +
+ +
+

Common ICMPv6 Types

+ {#each icmpContent.icmpv6Types as type} +
+
Type {type.type}: {type.name}
+
+
Description: {type.description}
+
Common Use: {type.commonUse}
+
Example: {type.example}
+
Troubleshooting: {type.troubleshooting}
+ {#if type.codes} +
Common Codes:
+
    + {#each type.codes as code} +
  • Code {code.code}: {code.meaning}
  • + {/each} +
+ {/if} +
+
+ {/each} +
+ +
+

Practical Troubleshooting Scenarios

+ {#each icmpContent.practicalExamples as scenario} +
+
+ + {scenario.scenario} +
+
+

ICMP Types Involved: {scenario.icmpTypes.join(', ')}

+

What to Check:

+
    + {#each scenario.whatToCheck as check} +
  • {check}
  • + {/each} +
+

Common Causes: {scenario.commonCauses.join(', ')}

+
+
+ {/each} +
+ +
+

Common ICMP Filtering Issues

+ {#each icmpContent.filteringIssues as issue} +
+
{issue.issue}
+
+
Problem: {issue.problem}
+
Solution: {issue.solution}
+
Recommendation: {issue.recommendation}
+
+
+ {/each} +
+ +
+

Troubleshooting Commands

+ + + + + + + + + + {#each icmpContent.troubleshootingCommands as cmd} + + + + + + {/each} + +
CommandPurposeICMP Type Used
{cmd.command}{cmd.purpose}{cmd.icmpType}
+
+ +
+

Best Practices for ICMP

+
    + {#each icmpContent.bestPractices as practice} +
  • {practice}
  • + {/each} +
+
+ +
+

ICMP Quick Reference

+ +
+
+
Always Allow These
+ {#each icmpContent.quickReference.mustAllow as type} +
{type}
+ {/each} +
+ +
+
Never Filter These
+ {#each icmpContent.quickReference.neverFilter as type} +
{type}
+ {/each} +
Critical for proper network operation
+
+
+
+ +
+

Common Mistakes to Avoid

+
+
Don't Do These
+ {#each icmpContent.commonMistakes as mistake} +
+
{mistake}
+
+ {/each} +
+ +
+
+ + Security vs Functionality +
+
+ Don't block all ICMP for security. Instead, use rate limiting and allow essential types. Blocking ICMP completely breaks critical network functions like Path MTU Discovery and IPv6 Neighbor Discovery. +
+
+
+
+
\ No newline at end of file diff --git a/src/routes/reference/ipv6-embedded-ipv4/+page.svelte b/src/routes/reference/ipv6-embedded-ipv4/+page.svelte new file mode 100644 index 0000000..cc05f57 --- /dev/null +++ b/src/routes/reference/ipv6-embedded-ipv4/+page.svelte @@ -0,0 +1,159 @@ + + + + {ipv6EmbeddedIPv4Content.title} | {site.title} + + + + + + + +
+
+
+

{ipv6EmbeddedIPv4Content.title}

+

{ipv6EmbeddedIPv4Content.description}

+
+ +
+

{ipv6EmbeddedIPv4Content.sections.overview.title}

+

{ipv6EmbeddedIPv4Content.sections.overview.content}

+
+ +
+

IPv4-in-IPv6 Mechanisms

+ {#each ipv6EmbeddedIPv4Content.mechanisms as mechanism} +
+
+ {mechanism.name} + [{mechanism.status}] +
+
+
Prefix: {mechanism.prefix}
+
Purpose: {mechanism.purpose}
+
Format: {mechanism.format}
+
Examples:
+ {#each mechanism.examples as example} +
{example}
+ {/each} +
Usage:
+
    + {#each mechanism.usage as use} +
  • {use}
  • + {/each} +
+
Note: {mechanism.notes}
+
+
+ {/each} +
+ +
+

{ipv6EmbeddedIPv4Content.recognition.title}

+ + + + + + + + + + {#each ipv6EmbeddedIPv4Content.recognition.patterns as pattern} + + + + + + {/each} + +
PatternMeaningWhat to Do
{pattern.pattern}{pattern.meaning}{pattern.action}
+
+ +
+

{ipv6EmbeddedIPv4Content.conversion.title}

+

To understand embedded addresses, you need to convert IPv4 addresses to hexadecimal:

+ + + + + + + + + + + {#each ipv6EmbeddedIPv4Content.conversion.examples as example} + + + + + + {/each} + +
IPv4 AddressHex EquivalentBreakdown
{example.ipv4}{example.hex}{example.breakdown}
+ +
+
+ + Quick Tip +
+
+ Each IPv4 octet becomes 2 hex digits. For example: 192 = C0, 168 = A8, so 192.168.1.1 becomes C0A8:0101. +
+
+
+ +
+

Modern Usage Guidelines

+
    + {#each ipv6EmbeddedIPv4Content.modernUsage as guideline} +
  • {guideline}
  • + {/each} +
+
+ +
+

Common Troubleshooting Issues

+ {#each ipv6EmbeddedIPv4Content.troubleshooting as issue} +
+
+ + {issue.issue} +
+
+

Cause: {issue.cause}

+

Solution: {issue.solution}

+
+
+ {/each} +
+ +
+

Security Considerations

+
+
Important Security Notes
+ {#each ipv6EmbeddedIPv4Content.securityNotes as note} +
+
{note}
+
+ {/each} +
+ +
+
+ + Security Warning +
+
+ Many IPv4-in-IPv6 transition mechanisms have known security vulnerabilities. Disable unused mechanisms and monitor for unexpected embedded address patterns in your network. +
+
+
+
+
\ No newline at end of file diff --git a/src/routes/reference/ipv6-prefix-lengths/+page.svelte b/src/routes/reference/ipv6-prefix-lengths/+page.svelte new file mode 100644 index 0000000..c302c89 --- /dev/null +++ b/src/routes/reference/ipv6-prefix-lengths/+page.svelte @@ -0,0 +1,151 @@ + + + + {ipv6PrefixLengthsContent.title} | {site.title} + + + + + + + +
+
+
+

{ipv6PrefixLengthsContent.title}

+

{ipv6PrefixLengthsContent.description}

+
+ +
+

{ipv6PrefixLengthsContent.sections.overview.title}

+

{ipv6PrefixLengthsContent.sections.overview.content}

+
+ +
+

Common IPv6 Prefix Lengths

+ {#each ipv6PrefixLengthsContent.commonPrefixes as prefix} +
+
{prefix.prefix} - {prefix.name}
+
+
Capacity: {prefix.hosts}
+
Typical Use: {prefix.typical}
+
Description: {prefix.description}
+
Examples:
+ {#each prefix.examples as example} +
{example}
+ {/each} +
+
+ {/each} +
+ +
+

Usage Guidelines

+ +
+
+
{ipv6PrefixLengthsContent.usageGuidelines.residential.title}
+ {#each ipv6PrefixLengthsContent.usageGuidelines.residential.allocations as alloc} +
{alloc.size}
+
{alloc.description}
+ {/each} +
+ +
+
{ipv6PrefixLengthsContent.usageGuidelines.enterprise.title}
+ {#each ipv6PrefixLengthsContent.usageGuidelines.enterprise.allocations as alloc} +
{alloc.size}
+
{alloc.description}
+ {/each} +
+ +
+
{ipv6PrefixLengthsContent.usageGuidelines.subnets.title}
+ {#each ipv6PrefixLengthsContent.usageGuidelines.subnets.allocations as alloc} +
{alloc.size}
+
{alloc.description}
+ {/each} +
+
+
+ +
+

IPv4 vs IPv6 Comparison

+ + + + + + + + + + {#each ipv6PrefixLengthsContent.comparison.mappings as mapping} + + + + + + {/each} + +
IPv4 EquivalentIPv6 UsageNote
{mapping.ipv4}{mapping.ipv6}{mapping.note}
+
+ +
+

Quick Reference Table

+ + + + + + + + + + {#each ipv6PrefixLengthsContent.quickReference as row} + + + + + + {/each} + +
PrefixAvailable /64 SubnetsTypical Use
{row.prefix}{row.subnets}{row.note}
+
+ +
+

Best Practices

+
    + {#each ipv6PrefixLengthsContent.bestPractices as practice} +
  • {practice}
  • + {/each} +
+ +
+
+ + Key Rule +
+
+ Always use /64 for end-user networks. This is required for SLAAC (Stateless Address Autoconfiguration) and many IPv6 features. +
+
+
+ +
+

Planning Tips

+
+
Remember These
+ {#each ipv6PrefixLengthsContent.tips as tip} +
+
{tip}
+
+ {/each} +
+
+
+
\ No newline at end of file diff --git a/src/routes/reference/ipv6-privacy-addresses/+page.svelte b/src/routes/reference/ipv6-privacy-addresses/+page.svelte new file mode 100644 index 0000000..439d6b9 --- /dev/null +++ b/src/routes/reference/ipv6-privacy-addresses/+page.svelte @@ -0,0 +1,311 @@ + + + + {ipv6PrivacyContent.title} | {site.title} + + + + + + + +
+
+
+

{ipv6PrivacyContent.title}

+

{ipv6PrivacyContent.description}

+
+ +
+

{ipv6PrivacyContent.sections.overview.title}

+

{ipv6PrivacyContent.sections.overview.content}

+
+ +
+

{ipv6PrivacyContent.sections.problem.title}

+

{ipv6PrivacyContent.sections.problem.content}

+
+ +
+

IPv6 Address Types

+ {#each ipv6PrivacyContent.addressTypes as type} +
+
{type.type}
+
+
Formation: {type.formation}
+
Example: {type.example}
+
Privacy Level: {type.privacy}
+ +

Characteristics:

+
    + {#each type.characteristics as characteristic} +
  • {characteristic}
  • + {/each} +
+
+
+ {/each} +
+ +
+

{ipv6PrivacyContent.howItWorks.title}

+ +

Address Generation Process

+
    + {#each ipv6PrivacyContent.howItWorks.addressGeneration as step} +
  1. {step}
  2. + {/each} +
+ +

Temporary Address Lifecycle

+
    + {#each ipv6PrivacyContent.howItWorks.temporaryLifecycle as step} +
  1. {step}
  2. + {/each} +
+ +

Default Operating System Behavior

+
    + {#each ipv6PrivacyContent.howItWorks.defaultBehavior as behavior} +
  • {behavior}
  • + {/each} +
+
+ +
+

{ipv6PrivacyContent.lifetimes.title}

+ +
+
+
Preferred Lifetime
+
{ipv6PrivacyContent.lifetimes.preferredLifetime.description}
+
Typical: {ipv6PrivacyContent.lifetimes.preferredLifetime.typical}
+
Behavior: {ipv6PrivacyContent.lifetimes.preferredLifetime.behavior}
+
+ +
+
Valid Lifetime
+
{ipv6PrivacyContent.lifetimes.validLifetime.description}
+
Typical: {ipv6PrivacyContent.lifetimes.validLifetime.typical}
+
Behavior: {ipv6PrivacyContent.lifetimes.validLifetime.behavior}
+
+ +
+
Regeneration Interval
+
{ipv6PrivacyContent.lifetimes.regenerationInterval.description}
+
Typical: {ipv6PrivacyContent.lifetimes.regenerationInterval.typical}
+
Behavior: {ipv6PrivacyContent.lifetimes.regenerationInterval.behavior}
+
+ +
+
Max Temporary Addresses
+
{ipv6PrivacyContent.lifetimes.maxTempAddresses.description}
+
Typical: {ipv6PrivacyContent.lifetimes.maxTempAddresses.typical}
+
Behavior: {ipv6PrivacyContent.lifetimes.maxTempAddresses.behavior}
+
+
+
+ +
+

{ipv6PrivacyContent.osImplementations.title}

+ + {#each Object.entries(ipv6PrivacyContent.osImplementations) as [key, os]} + {#if typeof os === 'object' && os.os} +
+
{os.os}
+
+
Default Behavior: {os.defaultBehavior}
+ +

Configuration:

+ {#each os.configuration as config} + {config} + {/each} + + {#if os.values} +

Values:

+
    + {#each os.values as value} +
  • {value}
  • + {/each} +
+ {/if} + +

Useful Commands:

+ {#each os.commands as command} + {command} + {/each} + + {#if os.behavior} +
Behavior: {os.behavior}
+ {/if} +
+
+ {/if} + {/each} +
+ +
+

Identifying Address Types

+ + + + + + + + + + + {#each ipv6PrivacyContent.identifyingAddresses as method} + + + + + + + {/each} + +
MethodStable AddressTemporary AddressExample
{method.method}{method.stable}{method.temporary}{method.example}
+
+ +
+

Troubleshooting

+ {#each ipv6PrivacyContent.troubleshooting as issue} +
+
+ + {issue.issue} +
+
+

Symptoms: {issue.symptoms.join(', ')}

+

Diagnosis: {issue.diagnosis}

+
Solutions:
+
    + {#each issue.solutions as solution} +
  • {solution}
  • + {/each} +
+
+
+ {/each} +
+ +
+

Security Considerations

+ {#each ipv6PrivacyContent.securityConsiderations as security} +
+
{security.aspect}
+
+

Benefits:

+
    + {#each security.benefits as benefit} +
  • {benefit}
  • + {/each} +
+ +

{security.limitations ? 'Limitations' : 'Challenges'}:

+
    + {#each (security.limitations || security.challenges) as item} +
  • {item}
  • + {/each} +
+
+
+ {/each} +
+ +
+

When to Use Privacy Addresses

+ {#each ipv6PrivacyContent.whenToUse as scenario} +
+
{scenario.scenario}
+
+
Recommendation: {scenario.recommendation}
+
Reasoning: {scenario.reasoning}
+
Configuration: {scenario.configuration}
+
+
+ {/each} +
+ +
+

Best Practices

+
    + {#each ipv6PrivacyContent.bestPractices as practice} +
  • {practice}
  • + {/each} +
+
+ +
+

Common Mistakes

+
    + {#each ipv6PrivacyContent.commonMistakes as mistake} +
  • {mistake}
  • + {/each} +
+
+ +
+

Quick Reference

+ +
+
+
Address Types
+ {#each ipv6PrivacyContent.quickReference.addressTypes as type} +
{type}
+ {/each} +
+ +
+
Identification
+ {#each ipv6PrivacyContent.quickReference.identification as tip} +
{tip}
+ {/each} +
+
+ +
+
+
Configuration
+ {#each ipv6PrivacyContent.quickReference.configuration as config} +
{config}
+ {/each} +
+ +
+
Troubleshooting
+ {#each ipv6PrivacyContent.quickReference.troubleshooting as tip} +
{tip}
+ {/each} +
+
+ +
+
+ + Key Point +
+
+ Privacy extensions create multiple IPv6 addresses per interface. Temporary addresses change periodically for privacy, while stable addresses remain consistent for services. Both can coexist on the same interface. +
+
+
+ +
+

Useful Tools

+
+ {#each ipv6PrivacyContent.tools as tool} +
+
{tool.tool}
+
{tool.purpose}
+
+ {/each} +
+
+
+
\ No newline at end of file diff --git a/src/routes/reference/link-local-apipa/+page.svelte b/src/routes/reference/link-local-apipa/+page.svelte new file mode 100644 index 0000000..df013fe --- /dev/null +++ b/src/routes/reference/link-local-apipa/+page.svelte @@ -0,0 +1,250 @@ + + + + {linkLocalApipaContent.title} | {site.title} + + + + + + + +
+
+
+

{linkLocalApipaContent.title}

+

{linkLocalApipaContent.description}

+
+ +
+

{linkLocalApipaContent.sections.overview.title}

+

{linkLocalApipaContent.sections.overview.content}

+
+ +
+

{linkLocalApipaContent.apipa.title}

+ +
+
Address Range
+
+
Network: {linkLocalApipaContent.apipa.range}
+
Full Range: {linkLocalApipaContent.apipa.fullRange}
+
Usable Range: {linkLocalApipaContent.apipa.usableRange}
+
Reserved: {linkLocalApipaContent.apipa.reservedAddresses.join(', ')}
+
+
+ +

{linkLocalApipaContent.apipa.description}

+ +

When APIPA is Used

+
    + {#each linkLocalApipaContent.apipa.whenUsed as reason} +
  • {reason}
  • + {/each} +
+ +

How APIPA Works

+
    + {#each linkLocalApipaContent.apipa.howItWorks as step} +
  1. {step}
  2. + {/each} +
+ +

APIPA Characteristics

+
    + {#each linkLocalApipaContent.apipa.characteristics as characteristic} +
  • {characteristic}
  • + {/each} +
+ +

Troubleshooting APIPA Issues

+ {#each linkLocalApipaContent.apipa.troubleshooting as issue} +
+
+ + {issue.symptom} +
+
+

Meaning: {issue.meaning}

+

Solution: {issue.solution}

+
+
+ {/each} +
+ +
+

{linkLocalApipaContent.ipv6LinkLocal.title}

+ +
+
Address Range
+
+
Network: {linkLocalApipaContent.ipv6LinkLocal.range}
+
Full Range: {linkLocalApipaContent.ipv6LinkLocal.fullRange}
+
Common Format: {linkLocalApipaContent.ipv6LinkLocal.commonFormat}
+
+
+ +

{linkLocalApipaContent.ipv6LinkLocal.description}

+ +

Address Formation

+
    + {#each linkLocalApipaContent.ipv6LinkLocal.formation as step} +
  1. {step}
  2. + {/each} +
+ +

When IPv6 Link-Local is Used

+
    + {#each linkLocalApipaContent.ipv6LinkLocal.whenUsed as use} +
  • {use}
  • + {/each} +
+ +

IPv6 Link-Local Characteristics

+
    + {#each linkLocalApipaContent.ipv6LinkLocal.characteristics as characteristic} +
  • {characteristic}
  • + {/each} +
+ +

Types of IPv6 Link-Local Addresses

+
+ {#each linkLocalApipaContent.ipv6LinkLocal.types as type} +
+
{type.type}
+
{type.description}
+
Example: {type.example}
+
Privacy: {type.privacy}
+
+ {/each} +
+
+ +
+

IPv4 APIPA vs IPv6 Link-Local Comparison

+ + + + + + + + + + + {#each linkLocalApipaContent.comparison as row} + + + + + + {/each} + +
AspectIPv4 APIPAIPv6 Link-Local
{row.aspect}{row.ipv4}{row.ipv6}
+
+ +
+

Practical Examples

+ {#each linkLocalApipaContent.practicalExamples as example} +
+
{example.scenario}
+
+
IPv4 Behavior: {example.ipv4Behavior}
+
IPv6 Behavior: {example.ipv6Behavior}
+
Impact: {example.impact}
+
+
+ {/each} +
+ +
+

Troubleshooting Commands

+ + + + + + + + + + + + {#each linkLocalApipaContent.troubleshootingCommands as cmd} + + + + + + + {/each} + +
PurposeWindowsLinuxmacOS
{cmd.purpose}{cmd.windows}{cmd.linux}{cmd.macOS}
+
+ +
+

When to Worry

+ {#each linkLocalApipaContent.whenToWorry as situation} +
+
{situation.situation}
+
+
Concern Level: {situation.concern}
+
Action: {situation.action}
+
+
+ {/each} +
+ +
+

Best Practices

+
    + {#each linkLocalApipaContent.bestPractices as practice} +
  • {practice}
  • + {/each} +
+
+ +
+

Common Mistakes

+
    + {#each linkLocalApipaContent.commonMistakes as mistake} +
  • {mistake}
  • + {/each} +
+
+ +
+

Quick Reference

+ +
+
+
Recognition
+ {#each linkLocalApipaContent.quickReference.recognition as item} +
{item}
+ {/each} +
+ +
+
Troubleshooting
+ {#each linkLocalApipaContent.quickReference.troubleshooting as item} +
{item}
+ {/each} +
+
+ +
+
+ + Key Difference +
+
+ IPv4 APIPA (169.254.x.x) indicates a problem - DHCP failed. IPv6 link-local (fe80::) is normal and required - every IPv6 interface has one. +
+
+
+
+
\ No newline at end of file diff --git a/src/routes/reference/mtu-mss/+page.svelte b/src/routes/reference/mtu-mss/+page.svelte new file mode 100644 index 0000000..74d0c41 --- /dev/null +++ b/src/routes/reference/mtu-mss/+page.svelte @@ -0,0 +1,223 @@ + + + + {mtuMssContent.title} | {site.title} + + + + + + + +
+
+
+

{mtuMssContent.title}

+

{mtuMssContent.description}

+
+ +
+

{mtuMssContent.sections.overview.title}

+

{mtuMssContent.sections.overview.content}

+ +
+
+ + Key Formula +
+
+ MSS = MTU - IP Header - TCP Header
+ For IPv4: MSS = MTU - 20 - 20 = MTU - 40 bytes +
+
+
+ +
+

Common MTU/MSS Values

+ + + + + + + + + + + + {#each mtuMssContent.commonValues as value} + + + + + + + + {/each} + +
MediumMTUMSSUsageNotes
{value.medium}{value.mtu}{value.mss}{value.usage}{value.notes}
+
+ +
+

{mtuMssContent.calculations.title}

+ {#each mtuMssContent.calculations.examples as example} +
+
{example.scenario}
+
+
MTU: {example.mtu} bytes
+
IP Header: {example.ipHeader} bytes
+
TCP Header: {example.tcpHeader} bytes
+
Resulting MSS: {example.mss} bytes
+
Calculation: {example.calculation}
+
+
+ {/each} +
+ +
+

Protocol Overheads

+ + + + + + + + + + {#each mtuMssContent.overheads as overhead} + + + + + + {/each} + +
Protocol/HeaderOverhead (Bytes)Notes
{overhead.protocol}{overhead.overhead}{overhead.notes}
+
+ +
+

{mtuMssContent.discovery.title}

+

{mtuMssContent.discovery.description}

+ +

PMTU Discovery Process

+
    + {#each mtuMssContent.discovery.process as step} +
  1. {step}
  2. + {/each} +
+ +

Common Issues

+
    + {#each mtuMssContent.discovery.issues as issue} +
  • {issue}
  • + {/each} +
+
+ +
+

Troubleshooting Common Issues

+ {#each mtuMssContent.troubleshooting as issue} +
+
+ + {issue.issue} +
+
+

Cause: {issue.cause}

+

Solution: {issue.solution}

+
+
+ {/each} +
+ +
+

Useful Commands

+ +

Checking MTU Settings

+ + + + + + + + + + {#each mtuMssContent.commands as cmd} + + + + + + {/each} + +
PlatformCommandPurpose
{cmd.platform}{cmd.command}{cmd.purpose}
+ +

Testing MTU Size

+ + + + + + + + + + {#each mtuMssContent.testCommands as cmd} + + + + + + {/each} + +
PlatformCommandPurpose
{cmd.platform}{cmd.command}{cmd.purpose}
+
+ +
+

Best Practices

+
    + {#each mtuMssContent.bestPractices as practice} +
  • {practice}
  • + {/each} +
+ +
+
+ + Performance Tip +
+
+ Mismatched MTU sizes can cause significant performance issues. Always ensure consistent MTU values across your network path, especially for high-throughput applications. +
+
+
+ +
+

Quick Reference

+
+
Common Values to Remember
+ {#each mtuMssContent.quickReference as value} +
+
{value}
+
+ {/each} +
+ +
+
+ + Important Note +
+
+ When troubleshooting connectivity issues, especially with VPNs or tunnels, MTU/MSS mismatches are often the culprit. Test with smaller packet sizes if large transfers fail but small ones succeed. +
+
+
+
+
\ No newline at end of file diff --git a/src/routes/reference/multicast/+page.svelte b/src/routes/reference/multicast/+page.svelte new file mode 100644 index 0000000..a063e60 --- /dev/null +++ b/src/routes/reference/multicast/+page.svelte @@ -0,0 +1,197 @@ + + + + {multicastContent.title} | {site.title} + + + + + + + +
+
+
+

{multicastContent.title}

+

{multicastContent.description}

+
+ +
+

{multicastContent.sections.overview.title}

+

{multicastContent.sections.overview.content}

+
+ +
+

{multicastContent.ipv4Multicast.title}

+

Range: {multicastContent.ipv4Multicast.range}

+ + {#each multicastContent.ipv4Multicast.classes as multicastClass} +
+
{multicastClass.name}
+
+
Range: {multicastClass.range}
+
Description: {multicastClass.description}
+
Scope: {multicastClass.scope}
+
Examples:
+ {#each multicastClass.examples as example} +
{example}
+ {/each} +
+
+ {/each} +
+ +
+

{multicastContent.ipv6Multicast.title}

+

Range: {multicastContent.ipv6Multicast.range}

+ +

Address Structure

+

Format: {multicastContent.ipv6Multicast.structure.format}

+ +
+
+
Flag Bits
+ {#each multicastContent.ipv6Multicast.structure.flags as flag} +
{flag.bit} - {flag.meaning}
+ {/each} +
+ +
+
Scope Values
+ {#each multicastContent.ipv6Multicast.structure.scopes as scope} +
{scope.code} - {scope.name}
+ {/each} +
+
+ +

Well-Known IPv6 Multicast Addresses

+ + + + + + + + + + {#each multicastContent.ipv6Multicast.wellKnown as addr} + + + + + + {/each} + +
AddressNameDescription
{addr.address}{addr.name}{addr.description}
+
+ +
+

Common Protocol Multicast Addresses

+ + + + + + + + + + + {#each multicastContent.commonProtocols as protocol} + + + + + + + {/each} + +
ProtocolIPv4IPv6Purpose
{protocol.protocol}{protocol.ipv4}{protocol.ipv6}{protocol.purpose}
+
+ +
+

Important Limitations

+ {#each multicastContent.limitations as limitation} +
+
+ + {limitation.title} +
+
+

{limitation.description}

+
    + {#each limitation.details as detail} +
  • {detail}
  • + {/each} +
+
+
+ {/each} +
+ +
+

Troubleshooting Common Issues

+ {#each multicastContent.troubleshooting as issue} +
+
{issue.issue}
+
+
Common Causes:
+
    + {#each issue.causes as cause} +
  • {cause}
  • + {/each} +
+
Solutions:
+
    + {#each issue.solutions as solution} +
  • {solution}
  • + {/each} +
+
+
+ {/each} +
+ +
+

Best Practices

+
    + {#each multicastContent.bestPractices as practice} +
  • {practice}
  • + {/each} +
+
+ +
+

Quick Reference

+
+
+
IPv4 Quick List
+ {#each multicastContent.quickReference.ipv4 as addr} +
{addr}
+ {/each} +
+ +
+
IPv6 Quick List
+ {#each multicastContent.quickReference.ipv6 as addr} +
{addr}
+ {/each} +
+
+ +
+
+ + Key Remember +
+
+ Most multicast addresses are designed for local subnet use only. Without proper multicast routing configuration, traffic won't cross router boundaries. +
+
+
+
+
\ No newline at end of file diff --git a/src/routes/ip-reference/network-classes/+page.svelte b/src/routes/reference/network-classes/+page.svelte similarity index 100% rename from src/routes/ip-reference/network-classes/+page.svelte rename to src/routes/reference/network-classes/+page.svelte diff --git a/src/routes/reference/private-vs-public-ip/+page.svelte b/src/routes/reference/private-vs-public-ip/+page.svelte new file mode 100644 index 0000000..6abee88 --- /dev/null +++ b/src/routes/reference/private-vs-public-ip/+page.svelte @@ -0,0 +1,242 @@ + + + + {privateVsPublicContent.title} | {site.title} + + + + + + + +
+
+
+

{privateVsPublicContent.title}

+

{privateVsPublicContent.description}

+
+ +
+

{privateVsPublicContent.sections.overview.title}

+

{privateVsPublicContent.sections.overview.content}

+
+ +
+

Private IP Address Ranges (RFC 1918)

+ {#each privateVsPublicContent.privateRanges as range} +
+
{range.range} - {range.class}
+
+
Full Range: {range.fullRange}
+
Total Addresses: {range.addresses}
+
Common Use: {range.commonUse}
+
Examples:
+ {#each range.examples as example} + {example} + {/each} +
+
+ {/each} +
+ +
+

Public IP Addresses

+

{privateVsPublicContent.publicRanges.description}

+ +

Characteristics

+
    + {#each privateVsPublicContent.publicRanges.characteristics as characteristic} +
  • {characteristic}
  • + {/each} +
+ +

Examples

+ + + + + + + + + {#each privateVsPublicContent.publicRanges.examples as example} + + + + + {/each} + +
Public IPOwner/Service
{example.ip}{example.owner}
+
+ +
+

{privateVsPublicContent.natImplications.title}

+ +
+
+
{privateVsPublicContent.natImplications.privateToPublic.title}
+
{privateVsPublicContent.natImplications.privateToPublic.description}
+ +

Process:

+
    + {#each privateVsPublicContent.natImplications.privateToPublic.process as step} +
  1. {step}
  2. + {/each} +
+ +

Benefits:

+
    + {#each privateVsPublicContent.natImplications.privateToPublic.benefits as benefit} +
  • {benefit}
  • + {/each} +
+
+ +
+
{privateVsPublicContent.natImplications.publicToPrivate.title}
+
{privateVsPublicContent.natImplications.publicToPrivate.description}
+ +

Challenges:

+
    + {#each privateVsPublicContent.natImplications.publicToPrivate.challenges as challenge} +
  • {challenge}
  • + {/each} +
+ +

Solutions:

+
    + {#each privateVsPublicContent.natImplications.publicToPrivate.solutions as solution} +
  • {solution}
  • + {/each} +
+
+
+
+ +
+

Quick Identification Methods

+ + + + + + + + + + + + {#each privateVsPublicContent.identification.quickCheck as method} + + + + + + + {/each} + +
MethodDescriptionPrivate IndicatorPublic Indicator
{method.method}{method.description}{method.private}{method.public}
+ +

Useful Tools

+
+ {#each privateVsPublicContent.identification.tools as tool} +
+
{tool.tool}
+
{tool.purpose}
+
+ {/each} +
+
+ +
+

Common Network Scenarios

+ {#each privateVsPublicContent.commonScenarios as scenario} +
+
{scenario.scenario}
+
+
Setup: {scenario.setup}
+
Private IPs: {scenario.privateIPs}
+
Public IP: {scenario.publicIP}
+
NAT Behavior: {scenario.natBehavior}
+
+
+ {/each} +
+ +
+

Troubleshooting Common Issues

+ {#each privateVsPublicContent.troubleshooting as issue} +
+
+ + {issue.issue} +
+
+

Possible Causes: {issue.possibleCauses.join(', ')}

+

Diagnosis: {issue.diagnosis}

+

Solution: {issue.solution}

+
+
+ {/each} +
+ +
+

Security Considerations

+ {#each privateVsPublicContent.securityConsiderations as security} +
+
{security.aspect}
+
+
    + {#each security.considerations as consideration} +
  • {consideration}
  • + {/each} +
+
+
+ {/each} +
+ +
+

Best Practices

+
    + {#each privateVsPublicContent.bestPractices as practice} +
  • {practice}
  • + {/each} +
+
+ +
+

Quick Reference

+ +
+
+
Private IP Ranges
+ {#each privateVsPublicContent.quickReference.privateRanges as range} +
{range}
+ {/each} +
+ +
+
Identification Tips
+ {#each privateVsPublicContent.quickReference.identificationTips as tip} +
{tip}
+ {/each} +
+
+ +
+
+ + Key Rule +
+
+ If an IP starts with 10, 172.16-31, or 192.168, it's private. Everything else (except other reserved ranges) is public. Private IPs need NAT to reach the internet. +
+
+
+
+
\ No newline at end of file diff --git a/src/routes/ip-reference/reserved-ranges/+page.svelte b/src/routes/reference/reserved-ranges/+page.svelte similarity index 100% rename from src/routes/ip-reference/reserved-ranges/+page.svelte rename to src/routes/reference/reserved-ranges/+page.svelte diff --git a/src/routes/reference/reverse-dns/+page.svelte b/src/routes/reference/reverse-dns/+page.svelte new file mode 100644 index 0000000..0fb50e9 --- /dev/null +++ b/src/routes/reference/reverse-dns/+page.svelte @@ -0,0 +1,197 @@ + + + + {reverseDnsContent.title} | {site.title} + + + + + + + +
+
+
+

{reverseDnsContent.title}

+

{reverseDnsContent.description}

+
+ +
+

{reverseDnsContent.sections.overview.title}

+

{reverseDnsContent.sections.overview.content}

+
+ +
+

{reverseDnsContent.sections.howWorks.title}

+

{reverseDnsContent.sections.howWorks.content}

+
+ +
+

{reverseDnsContent.ipv4Reverse.title}

+ +

Process Steps

+
    + {#each reverseDnsContent.ipv4Reverse.process as step} +
  1. {step}
  2. + {/each} +
+ +

IPv4 Examples

+ {#each reverseDnsContent.ipv4Reverse.examples as example} +
+
IP Address: {example.ip}
+
+
Reverse Name: {example.reversed}
+
PTR Record: {example.ptrRecord}
+
Explanation: {example.explanation}
+
+
+ {/each} + +

Network Delegation

+

{reverseDnsContent.ipv4Reverse.delegation.explanation}

+ + + + + + + + + + {#each reverseDnsContent.ipv4Reverse.delegation.examples as example} + + + + + + {/each} + +
NetworkReverse ZoneDescription
{example.network}{example.zone}{example.description}
+
+ +
+

{reverseDnsContent.ipv6Reverse.title}

+ +

Process Steps

+
    + {#each reverseDnsContent.ipv6Reverse.process as step} +
  1. {step}
  2. + {/each} +
+ +

IPv6 Examples

+ {#each reverseDnsContent.ipv6Reverse.examples as example} +
+
IP Address: {example.ip}
+
+
Expanded: {example.expanded}
+
Reverse Name: {example.nibbles}
+
PTR Record: {example.ptrRecord}
+
Note: {example.explanation}
+
+
+ {/each} + +
+
+ + IPv6 Complexity +
+
+ IPv6 reverse DNS names are much longer than IPv4 because each hex digit becomes a separate label. A single IPv6 address creates a 72-character reverse DNS name! +
+
+
+ +
+

{reverseDnsContent.practicalExamples.title}

+ +

Command Examples

+ + + + + + + + + + {#each reverseDnsContent.practicalExamples.digExamples as example} + + + + + + {/each} + +
CommandDescriptionExpected Result
{example.command}{example.description}{example.expectedResult}
+ +

Common Use Cases

+
    + {#each reverseDnsContent.practicalExamples.commonChecks as check} +
  • {check}
  • + {/each} +
+
+ +
+

Troubleshooting Common Issues

+ {#each reverseDnsContent.troubleshooting as issue} +
+
+ + {issue.issue} +
+
+

Causes: {issue.causes.join(', ')}

+

Solutions: {issue.solutions.join(', ')}

+
+
+ {/each} +
+ +
+

Best Practices

+
    + {#each reverseDnsContent.bestPractices as practice} +
  • {practice}
  • + {/each} +
+
+ +
+

Quick Reference & Tools

+ +
+
+
IPv4 Quick Examples
+ {#each reverseDnsContent.quickReference.ipv4 as example} +
{example}
+ {/each} +
+ +
+
IPv6 Quick Examples
+ {#each reverseDnsContent.quickReference.ipv6 as example} +
{example}
+ {/each} +
+
+ +

Useful Tools

+
+ {#each reverseDnsContent.tools as tool} +
+
{tool.name}
+
{tool.description}
+
+ {/each} +
+
+
+
\ No newline at end of file diff --git a/src/routes/reference/reverse-zones/+page.svelte b/src/routes/reference/reverse-zones/+page.svelte new file mode 100644 index 0000000..0eace55 --- /dev/null +++ b/src/routes/reference/reverse-zones/+page.svelte @@ -0,0 +1,284 @@ + + + + {reverseZonesContent.title} | {site.title} + + + + + + + +
+
+
+

{reverseZonesContent.title}

+

{reverseZonesContent.description}

+
+ +
+

{reverseZonesContent.sections.overview.title}

+

{reverseZonesContent.sections.overview.content}

+
+ +
+

{reverseZonesContent.sections.delegation.title}

+

{reverseZonesContent.sections.delegation.content}

+
+ +
+

{reverseZonesContent.ipv4Zones.title}

+ +

Classful Boundaries (Octet-Aligned)

+ + + + + + + + + + + + {#each reverseZonesContent.ipv4Zones.classfullBoundaries as boundary} + + + + + + + + {/each} + +
CIDRExampleReverse ZoneDescriptionDelegation
{boundary.cidr}{boundary.example}{boundary.reverseZone}{boundary.description}{boundary.delegation}
+ +

Classless Delegation (CNAME Method)

+ {#each reverseZonesContent.ipv4Zones.classlessDelegation as delegation} +
+
{delegation.cidr} - {delegation.example}
+
+
Addresses: {delegation.addresses}
+
Problem: {delegation.problem}
+
Solution: {delegation.solution}
+
Zone Names:
+ {#each delegation.zones as zone} + {zone} + {/each} +
+
+ {/each} + +

Practical IPv4 Examples

+ {#each reverseZonesContent.ipv4Zones.practicalExamples as example} +
+
{example.scenario}
+
+
Network: {example.network}
+
Reverse Zone: {example.reverseZone}
+ {#if example.reverseZones} +
Reverse Zones:
+ {#each example.reverseZones as zone} + {zone} + {/each} +
Description: {example.description}
+ {:else} +
PTR Records:
+ {#each example.ptrRecords as record} + {record} + {/each} + {/if} +
Delegation: {example.delegation}
+
+
+ {/each} +
+ +
+

{reverseZonesContent.ipv6Zones.title}

+ +

Nibble Boundaries (4-bit Aligned)

+ + + + + + + + + + + + {#each reverseZonesContent.ipv6Zones.nibbleBoundaries as boundary} + + + + + + + + {/each} + +
CIDRExampleReverse ZoneDescriptionDelegation
{boundary.cidr}{boundary.example}{boundary.reverseZone}{boundary.description}{boundary.delegation}
+ +

Practical IPv6 Examples

+ {#each reverseZonesContent.ipv6Zones.practicalExamples as example} +
+
{example.scenario}
+
+
Network: {example.network}
+
Master Zone: {example.reverseZone}
+
Sub-zones:
+ {#each example.subZones as zone} + {zone} + {/each} +
Management: {example.management}
+
+
+ {/each} +
+ +
+

{reverseZonesContent.zoneCreation.title}

+ +
+
+
IPv4 Example ({reverseZonesContent.zoneCreation.ipv4Example.network})
+
Zone Name: {reverseZonesContent.zoneCreation.ipv4Example.zoneName}
+ +

Zone File:

+
{reverseZonesContent.zoneCreation.ipv4Example.zoneFile}
+ +

Explanation:

+
    + {#each reverseZonesContent.zoneCreation.ipv4Example.explanation as point} +
  • {point}
  • + {/each} +
+
+ +
+
IPv6 Example ({reverseZonesContent.zoneCreation.ipv6Example.network})
+
Zone Name: {reverseZonesContent.zoneCreation.ipv6Example.zoneName}
+ +

Zone File:

+
{reverseZonesContent.zoneCreation.ipv6Example.zoneFile}
+ +

Explanation:

+
    + {#each reverseZonesContent.zoneCreation.ipv6Example.explanation as point} +
  • {point}
  • + {/each} +
+
+
+
+ +
+

Delegation Scenarios

+ {#each reverseZonesContent.delegationScenarios as scenario} +
+
{scenario.scenario}
+
+
Delegation: {scenario.delegation}
+ + {#if scenario.customerActions} +
Customer Actions:
+
    + {#each scenario.customerActions as action} +
  • {action}
  • + {/each} +
+ +
ISP Actions:
+
    + {#each scenario.ispActions as action} +
  • {action}
  • + {/each} +
+ {:else} +
Process:
+
    + {#each scenario.process as step} +
  1. {step}
  2. + {/each} +
+ {/if} +
+
+ {/each} +
+ +
+

Troubleshooting

+ {#each reverseZonesContent.troubleshooting as issue} +
+
+ + {issue.issue} +
+
+

Possible Causes: {issue.causes.join(', ')}

+

Diagnosis: {issue.diagnosis}

+

Solution: {issue.solution}

+
+
+ {/each} +
+ +
+

Best Practices

+
    + {#each reverseZonesContent.bestPractices as practice} +
  • {practice}
  • + {/each} +
+
+ +
+

Quick Reference

+ +
+
+
Zone Name Formulas
+ {#each reverseZonesContent.quickReference.zoneFormulas as formula} +
{formula}
+ {/each} +
+ +
+
Essential Records
+ {#each reverseZonesContent.quickReference.essentialRecords as record} +
{record}
+ {/each} +
+
+ +
+
+ + Key Rule +
+
+ IPv4 reverse zones reverse the octets (192.0.2.0/24 → 2.0.192.in-addr.arpa). IPv6 reverse zones reverse the nibbles (2001:db8::/32 → 8.b.d.0.1.0.0.2.ip6.arpa). +
+
+
+ +
+

Testing Tools

+
+ {#each reverseZonesContent.tools as tool} +
+
{tool.tool}
+
{tool.purpose}
+
+ {/each} +
+
+
+
\ No newline at end of file diff --git a/src/routes/reference/wildcard-masks/+page.svelte b/src/routes/reference/wildcard-masks/+page.svelte new file mode 100644 index 0000000..7d08b9b --- /dev/null +++ b/src/routes/reference/wildcard-masks/+page.svelte @@ -0,0 +1,208 @@ + + + + {wildcardMasksContent.title} | {site.title} + + + + + + + +
+
+
+

{wildcardMasksContent.title}

+

{wildcardMasksContent.description}

+
+ +
+

{wildcardMasksContent.sections.overview.title}

+

{wildcardMasksContent.sections.overview.content}

+
+ +
+

{wildcardMasksContent.sections.difference.title}

+

{wildcardMasksContent.sections.difference.content}

+ +
+
+ + Key Difference +
+
+ Wildcard masks are the bitwise inverse of subnet masks. If you know one, you can calculate the other by subtracting from 255.255.255.255. +
+
+
+ +
+

Conversion Examples

+ {#each wildcardMasksContent.conversionExamples as example} +
+
{example.description}
+
+
Subnet Mask: {example.subnet}
+
Subnet Binary: {example.subnetBinary}
+
Wildcard Mask: {example.wildcard}
+
Wildcard Binary: {example.wildcardBinary}
+
+
+ {/each} +
+ +
+

{wildcardMasksContent.quickConversion.title}

+

Formula: {wildcardMasksContent.quickConversion.formula}

+ +

Steps:

+
    + {#each wildcardMasksContent.quickConversion.steps as step} +
  1. {step}
  2. + {/each} +
+ +

Examples:

+ + + + + + + + + + {#each wildcardMasksContent.quickConversion.examples as example} + + + + + + {/each} + +
Subnet MaskCalculationWildcard Mask
{example.subnet}{example.calculation}{example.wildcard}
+
+ +
+

ACL Examples by Platform

+ {#each wildcardMasksContent.aclExamples as platform} +

{platform.title}

+ {#each platform.entries as entry} +
+
{entry.meaning}
+
+
ACL Entry: {entry.acl}
+
Explanation: {entry.explanation}
+
+
+ {/each} + {/each} +
+ +
+

Special Cases

+
+ {#each wildcardMasksContent.specialCases as specialCase} +
+
{specialCase.case}
+
Wildcard: {specialCase.wildcard}
+
+ Meaning: {specialCase.meaning}
+ Usage: {specialCase.usage} +
+
+ {/each} +
+
+ +
+

Platform Differences

+ + + + + + + + + + + {#each wildcardMasksContent.platformDifferences as platform} + + + + + + + {/each} + +
PlatformFormatExampleNotes
{platform.platform}{platform.format}{platform.example}{platform.notes}
+
+ +
+

Quick Reference Table

+ + + + + + + + + + + {#each wildcardMasksContent.quickReference as row} + + + + + + + {/each} + +
CIDRSubnet MaskWildcard MaskAddresses
{row.prefix}{row.subnet}{row.wildcard}{row.use}
+
+ +
+

Common Mistakes

+ {#each wildcardMasksContent.commonMistakes as mistake} +
+
+ + {mistake.mistake} +
+
+

Problem: {mistake.problem}

+

Solution: {mistake.solution}

+
+
+ {/each} +
+ +
+

Tips for Success

+
+
Remember These
+ {#each wildcardMasksContent.tips as tip} +
+
{tip}
+
+ {/each} +
+ +
+
+ + Quick Memory Aid +
+
+ Wildcard 0 = "must match exactly", Wildcard 1 = "don't care". Think of it as a mask where 0 blocks changes and 1 allows anything. +
+
+
+
+
\ No newline at end of file