IP Interface Configuration in Windows
1. IP Configuration:
         o Each host adapter needs an IP address, subnet mask, and default gateway.
         o DNS server addresses are also usually configured.
   2. Static vs. Dynamic Configuration:
         o Static IP addressing can be complex for large numbers of hosts.
         o Dynamic IP addressing via DHCP is more common for ease of management.
   3. Naming Conventions:
         o Windows adapters: "Ethernet", "Ethernet2", etc.
         o Configuration through GUI or command line.
   4. Command Line Tools:
         o netsh: Configure and view IP settings.
                ▪   netsh interface ip set address "Ethernet" dhcp
                ▪   netsh interface ip set address "Ethernet" static 10.1.0.1
                    255.255.255.0 10.1.0.254
                ▪   netsh interface ip show config
         o   PowerShell:
                ▪ Query configuration: Get-NetAdapter, Get-NetIPAddress
                ▪ Apply configuration: New-NetIPAddress, Set-NetIPAddress
   5. ipconfig Command:
         o ipconfig: Basic IP information.
         o ipconfig /all: Detailed configuration including DHCP and MAC addresses.
         o ipconfig /renew: Renew DHCP lease.
         o ipconfig /release: Release DHCP lease.
         o ipconfig /displaydns: Display DNS cache.
         o ipconfig /flushdns: Clear DNS cache.
         o ipconfig /registerdns: Register the host with a DNS server.
IP Interface Configuration in Linux
   1. Interface Naming:
         o Legacy: eth0, eth1, etc.
         o Newer conventions: enp0s3, etc.
   2. Persistent vs. Running Configuration:
         o Persistent configuration applied at boot.
         o Running configuration can be changed but needs to be made persistent.
   3. Configuration Tools:
         o Legacy Tools:
                 ▪ ifconfig: Deprecated for managing interfaces.
                 ▪ ifup/ifdown: Scripts to bring interfaces up/down.
         o Modern Tools:
                 ▪ ip command (part of iproute2 package):
                         ▪ Show configuration: ip addr
                         ▪ Show single interface: ip addr show dev eth0
                         ▪ Enable/disable interface: ip link set eth0 up|down
                         ▪ Modify IP configuration: ip addr add|delete
                 ▪ NetworkManager and nmcli: Manage network settings.
                 ▪ systemd-networkd and netplan: Manage network settings in newer
                     distributions.
ARP Cache Utility
   1. Purpose: Resolve and cache MAC addresses for IP addresses on the local network.
   2. Commands:
         o Windows:
                ▪ arp -a or arp -g: Show ARP cache.
                ▪ arp -s IPAddress MACAddress: Add ARP entry.
                ▪ arp -d *: Delete all ARP entries.
         o Linux:
                ▪ ip neigh: Show ARP cache.
ICMP and ping Utility
   1. Purpose: Test and troubleshoot connectivity using ICMP packets.
   2. Basic Usage:
         o ping IPAddress: Send ICMP request packets to the destination host.
   3. Interpreting Results:
         o Successful reply: "Reply from IPAddress" with RTT.
         o Number of hops: TTL field (initial value minus current TTL).
   4. Error Messages:
         o "Destination host unreachable": No routing information.
         o "Request timed out": Host is unavailable or cannot route a reply.
   5. Common Switches:
         o -t: Ping until interrupted.
         o -4 or -6: Force IPv4 or IPv6.
         o -c: Specify the number of packets to send (Linux).
TCP/IP Command Line Utilities:
   •   Purpose: Gather configuration information and troubleshoot communication issues over an
       IP network.
   •   netsh: Configure and report IP settings in Windows.
           o netsh interface ip set address "Ethernet" dhcp (Set DHCP)
           o   netsh interface ip set address "Ethernet" static 10.1.0.1
               255.255.255.0 10.1.0.254 (Set static IP)
           o   netsh interface ip show config (Show IP configuration)
   •   PowerShell: More commonly used for script-based configuration.
           o Get-NetAdapter, Get-NetIPAddress (Query configuration)
           o New-NetIPAddress, Set-NetIPAddress (Apply or modify configuration)
   •   ipconfig: Basic configuration reporting.
           o ipconfig (Display basic IP configuration)
           o ipconfig /all (Complete TCP/IP configuration)
           o ipconfig /renew, ipconfig /release (DHCP commands)
           o ipconfig /displaydns, ipconfig /flushdns, ipconfig /registerdns
               (DNS commands)
   •   Linux equivalents: ifconfig, ip (iproute2 package), nmcli (NetworkManager), systemd-
       networkd, netplan.
ARP Cache Utility:
    •    Purpose: Diagnose local addressing and packet delivery problems.
    •    Commands:
             o arp -a (Show ARP cache)
             o arp -s IPAddress MACAddress (Add ARP entry)
             o arp -d * (Delete ARP entries)
    •    Linux command: ip neigh (Replaces arp).
ICMP and ping:
    •    Purpose: Report errors and test connectivity.
    •    Basic Usage: ping IPAddress
    •    Error Messages:
             o "Destination host unreachable" (No routing information)
             o "Request timed out" (Host unavailable or cannot route a reply)
    •    Switches:
             o -t (Continuous ping)
             o -4 or -6 (Force IPv4 or IPv6)
Network Troubleshooting:
Hardware and Interface Issues:
    •    Power Issues: Surges, spikes, brownouts, blackouts. Use UPS for protection.
    •    Hardware Failure: Check network adapters, switches, routers, and cabling. Use cable testers
         and status LEDs.
    •    Interface Status: Verify with LEDs, command line utilities. Check for speed/duplex
         mismatches and collisions.
IP Configuration Issues:
    •    Incorrect IP Address: Ensure correct subnet masks and unique IP addresses.
    •    Incorrect Subnet Mask: Mismatched masks can cause routing issues.
    •    Duplicate IP/MAC Address: Use arp -a, arping to detect and resolve conflicts.
Connectivity Tests:
    1.   Loopback Address: ping 127.0.0.1
    2.   Local Host IP Address: Ensure proper network adapter function.
    3.   Default Gateway: Verify router connectivity.
    4.   Other Hosts on Same Subnet: Test for local link issues.
    5.   Remote Host: Check routing through the gateway.
DNS Issues:
    •    DNS Configuration: Use ipconfig /all (Windows) or check /etc/resolv.conf (Linux).
    •    Ping by Host Name: Troubleshoot name resolution problems.
Multicast Flooding:
    •   Problem: Switches flood multicast traffic if not multicast-aware.
    •   Solution: Enable IGMP snooping to filter multicast traffic.
IPv4 vs. IPv6
    •   IPv4: 32-bit addresses, approx. 4.3 billion addresses.
    •   IPv6: 128-bit addresses, approx. 340 undecillion addresses.
    •   IPv4 address exhaustion due to inefficient allocation and high demand.
IPv6 Address Format
    •   Structure: Eight groups of four hex digits, separated by colons.
    •   Example: 2001:0db8:0000:0000:0abc:0000:def0:1234.
    •   Compression: Leading zeros can be omitted, and consecutive zeros can be replaced
        with "::" (only once per address). For example, 2001:db8::abc:0:def0:1234.
Address Types and Prefixes
    •   Global Unicast: Routable on the Internet (Prefix: 2000::/3).
    •   Link Local: Used within a single link (Prefix: fe80::/10).
    •   Multicast: One-to-many communication (Prefix: ff00::/8).
    •   Unspecified: 0:0:0:0:0:0:0:0 (often ::).
    •   Loopback: 0:0:0:0:0:0:0:1 (often ::1).
    •   Documentation/Examples: Prefix 2001:db8::/32.
IPv6 Header Fields
    •   Traffic Class: Packet priority.
    •   Flow Label: QoS management.
    •   Payload Length: Length of payload (max 64 KB, or Jumbo Payload for larger).
    •   Next Header: Type of the next header.
    •   Hop Limit: Replaces TTL in IPv4.
Address Configuration
    •   Interface ID: Last 64 bits of an address.
    •   EUI-64: Derived from the MAC address, with "fffe" inserted in the middle.
    •   Privacy Extensions: Uses pseudorandom numbers for interface IDs to enhance
        privacy.
Neighbor Discovery Protocol (ND)
    •   Functions:
           o Address Autoconfiguration: Automatic configuration of IP addresses.
           o Prefix Discovery: Determines network prefixes.
           o Local Address Resolution: Finds local nodes and routers.
           o Redirection: Indicates better routes.
Stateless Address Autoconfiguration (SLAAC)
  •   Generates link-local addresses.
  •   Uses ND protocol to test uniqueness and discover routers.
  •   Can combine with DHCPv6 for stateful autoconfiguration.
ICMPv6
  •   Similar to ICMPv4 but includes new features like "Packet Too Big" messages.
  •   Supports ND and MLD protocols.
Transition Mechanisms
  •   Dual Stack: Hosts run both IPv4 and IPv6.
  •   Tunneling: Encapsulates IPv6 packets within IPv4 packets (e.g., 6to4, 6RD, Teredo,
      GRE).
Common IPv6 Address Prefixes
  •   Global Unicast: 2000::/3.
  •   Link Local Unicast: fe80::/10.
  •   Multicast: ff00::/8.
  •   Multicast (Link Local): ff02::/16 (e.g., ff02::1 for all nodes, ff02::2 for all routers).
  •   Solicited-node: ff02::1:ff00:0/104