### Calculate IPv6 address from prefix and MAC Source: https://github.com/radvd-project/radvd/blob/master/INTRO.html Example of how a host derives an IPv6 address using an announced prefix and a hardware MAC address. ```text Announced prefix: 2001:db8:0:1:: MAC address: 00:07:E9:7B:02:59 EUI-64 identifier: 0207:e9ff:fe7b:259 Configured address: 2001:db8:0:1:207:e9ff:fe7b:259 ``` -------------------------------- ### Spec File Install Locations Source: https://github.com/radvd-project/radvd/wiki/Building-RPMs Example of defining installation directories in an RPM spec file. These can be overridden by rpmbuild. ```makefile bindir=/usr/local/bin libdir=/usr/local/lib sysconfdir=/etc mandir=/usr/local/man ifdef RPM_DOC_DIR sixdocdir = $(RPM_BUILD_ROOT)/$(RPM_DOC_DIR)/$(RPM_PACKAGE_NAME)-$(RPM_PACKAGE_VERSION) else sixdocdir = /usr/local/doc/sixpack endif ``` -------------------------------- ### Configure Specific Route Advertisement Source: https://context7.com/radvd-project/radvd/llms.txt Guide hosts to use the router for specific destination networks with defined preferences. ```conf # /etc/radvd.conf - Route information interface eth0 { AdvSendAdvert on; prefix 2001:db8:1::/64 { AdvOnLink on; AdvAutonomous on; }; # Advertise specific route to remote network route 2001:db8:remote::/48 { # Route preference: low, medium, or high AdvRoutePreference high; # Route lifetime (default: 3*MaxRtrAdvInterval) AdvRouteLifetime 3600; # Remove route from clients on shutdown RemoveRoute on; }; # Multiple routes with different preferences route 2001:db8:backup::/48 { AdvRoutePreference low; AdvRouteLifetime 1800; }; }; ``` -------------------------------- ### Build package archives Source: https://github.com/radvd-project/radvd/blob/master/RELEASE-PROCESS.md Execute the build pipeline to generate release archives. ```bash ./autogen-container.sh ./configure make packages ``` -------------------------------- ### Build and Sign RPM Packages Source: https://github.com/radvd-project/radvd/wiki/Building-RPMs Commands to build an RPM from a source tarball, sign it, and query package information. ```bash $ rpmbuild -ts radvd-1.7.tar.gz $ rpm --addsign rpm/SRPMS/radvd-1.7-1.src.rpm $ rpm -qip rpm/SRPMS/radvd-1.7-1.src.rpm ``` -------------------------------- ### Create GitHub release Source: https://github.com/radvd-project/radvd/blob/master/RELEASE-PROCESS.md Use the GitHub CLI to publish the release and upload generated artifacts. ```bash gh release create v${VERSION} radvd-${VERSION}.tar.{xz,gz}{,.asc,.sha256,.sha512}` ``` -------------------------------- ### Create RPM Build Directories Source: https://github.com/radvd-project/radvd/wiki/Building-RPMs Creates the standard directory structure required for RPM building within a user's home directory. ```bash $ mkdir ~/rpm ~/rpm/BUILD ~/rpm/RPMS ~/rpm/RPMS/i386 ~/rpm/RPMS/i686 ~/rpm/RPMS/noarch ~/rpm/SOURCES ~/rpm/SPECS ~/rpm/SRPMS ~/rpm/tmp ``` -------------------------------- ### Configure RPM Build Environment Source: https://github.com/radvd-project/radvd/wiki/Building-RPMs Sets up the ~/.rpmmacros file to define the top-level build directory and temporary path for RPM building. ```bash %_topdir /home/rpmbuild/rpm %_tmppath /home/rpmbuild/rpm/tmp ``` -------------------------------- ### Dynamic Interface Configuration Source: https://context7.com/radvd-project/radvd/llms.txt Configure radvd to handle interfaces that may not exist at startup or may be dynamically enabled/disabled using 'IgnoreIfMissing on'. ```conf # /etc/radvd.conf - Dynamic interfaces interface wlan0 { # Don't fail if interface doesn't exist at startup IgnoreIfMissing on; AdvSendAdvert on; # Shorter intervals for mobile scenarios MaxRtrAdvInterval 30; MinRtrAdvInterval 10; prefix 2001:db8:wifi::/64 { AdvOnLink on; AdvAutonomous on; # Shorter lifetimes for dynamic networks AdvValidLifetime 600; AdvPreferredLifetime 300; }; }; interface tun0 { IgnoreIfMissing on; AdvSendAdvert on; prefix 2001:db8:vpn::/64 { AdvOnLink on; AdvAutonomous on; }; }; ``` -------------------------------- ### Configure Basic Interface Advertisements Source: https://context7.com/radvd-project/radvd/llms.txt Enable router advertisements on a specific interface and define a prefix for SLAAC. ```text # /etc/radvd.conf - Basic configuration interface eth0 { # Enable sending router advertisements AdvSendAdvert on; # Advertise a /64 prefix for SLAAC prefix 2001:db8:1::/64 { # Prefix can be used for on-link determination AdvOnLink on; # Prefix can be used for autonomous address configuration AdvAutonomous on; }; }; ``` -------------------------------- ### Configure Base Interface Prefix Generation Source: https://context7.com/radvd-project/radvd/llms.txt Generate a /64 prefix by combining a prefix with the IPv6 address of another interface. ```conf # /etc/radvd.conf - Base interface configuration interface eth1 { AdvSendAdvert on; prefix 2001:db8::/64 { AdvOnLink on; AdvAutonomous on; # Combine with IPv6 address from eth0 to create prefix Base6Interface eth0; }; }; ``` -------------------------------- ### RPM Build Commands Source: https://github.com/radvd-project/radvd/wiki/Building-RPMs Commands to copy a spec file, archive source code, and build an RPM package. ```bash $ cp myspec.spec ~/rpm/SPECS/ $ tar -zcvf ~/rpm/SOURCES/mypackagename-myversionnumber.tar.gz mypackagename-myversionnumber $ rpmbuild -ba ~/rpm/SPECS/myspec.spec ``` -------------------------------- ### Send Public GPG Key to Keyserver Source: https://github.com/radvd-project/radvd/wiki/Building-RPMs Command to upload your public GPG key to a keyserver, making it accessible to others for verification purposes. ```bash $ gpg --keyserver pgp.mit.edu --send-key "USERID" ``` -------------------------------- ### Update configure.ac version Source: https://github.com/radvd-project/radvd/blob/master/RELEASE-PROCESS.md Automated commands to extract the version from the CHANGES file and update the AC_INIT macro in configure.ac. ```bash export VERSION="$(grep Release CHANGES | head -1 | sed s/'.*Release v'//g)" echo "New version identifier is: $VERSION" sed -i -e "/^AC_INIT/s,\[.*\] ,[$VERSION],g" configure.ac ``` -------------------------------- ### RPM Macros for GPG Signing Source: https://github.com/radvd-project/radvd/wiki/Building-RPMs Configuration for ~/.rpmmacros to specify GPG as the signing method and set the GPG user ID and binary path. ```bash %_signature gpg %_gpg_name USERID %_gpgbin /usr/bin/gpg ``` -------------------------------- ### Execute RADVD via Command Line Source: https://context7.com/radvd-project/radvd/llms.txt Run the radvd daemon with various flags for debugging, logging, and security configuration. ```bash # Start radvd with default configuration radvd # Test configuration file for syntax errors radvd --configtest # Run with custom configuration file radvd --config /etc/radvd/custom.conf # Run in foreground without daemonizing (useful for debugging) radvd --nodaemon # Enable debugging (levels 1-5, higher = more verbose) radvd --debug 3 # Run as unprivileged user (recommended for security) radvd --username radvd --pidfile /var/run/radvd/radvd.pid # Use different logging methods radvd --logmethod syslog radvd --logmethod logfile --logfile /var/log/radvd.log radvd --logmethod stderr # Combined example: test config, run as user, with logging radvd --configtest --config /etc/radvd.conf radvd --config /etc/radvd.conf --username radvd --logmethod syslog --pidfile /var/run/radvd/radvd.pid # Display version radvd --version # Display help radvd --help ``` -------------------------------- ### List GPG Signatures Source: https://github.com/radvd-project/radvd/wiki/Building-RPMs Command to display a list of your GPG keys and their signatures. Useful for verifying key details. ```bash $ gpg --list-sigs ``` -------------------------------- ### Manage radvd Service with systemd Source: https://context7.com/radvd-project/radvd/llms.txt Standard systemd commands for controlling the radvd daemon. Includes configuration testing and log access. ```bash sudo systemctl start radvd sudo systemctl stop radvd sudo systemctl restart radvd sudo systemctl enable radvd sudo systemctl status radvd sudo journalctl -u radvd sudo journalctl -u radvd -f sudo systemctl reload radvd # Or send SIGHUP directly: sudo kill -HUP $(cat /var/run/radvd/radvd.pid) sudo radvd --configtest ``` -------------------------------- ### Configure Auto-detected Prefixes Source: https://context7.com/radvd-project/radvd/llms.txt Automatically advertise global prefixes on an interface while optionally ignoring specific ones. ```conf # /etc/radvd.conf - Auto-detect prefixes interface eth0 { AdvSendAdvert on; # Automatically advertise all global prefixes on this interface prefix ::/64 { AdvOnLink on; AdvAutonomous on; AdvValidLifetime 86400; AdvPreferredLifetime 14400; }; # Optionally ignore certain auto-detected prefixes autoignoreprefixes { 2001:db8:ignore::/64; fd00:private::/64; }; }; ``` -------------------------------- ### Configure radvd interface and prefix Source: https://github.com/radvd-project/radvd/blob/master/INTRO.html Basic configuration block for enabling router advertisements on a specific network interface. ```text interface eth0 { AdvSendAdvert on; prefix 2001:db8:0:1::/64 { AdvOnLink on; AdvAutonomous on; }; }; ``` -------------------------------- ### Configure 6to4 Prefix Generation Source: https://context7.com/radvd-project/radvd/llms.txt Automatically generate and advertise 6to4 prefixes based on the IPv4 address of another interface. ```conf # /etc/radvd.conf - 6to4 configuration interface eth1 { AdvSendAdvert on; # Advertise at least every 30 seconds for dynamic addresses MaxRtrAdvInterval 30; MinRtrAdvInterval 10; # 6to4 prefix - first 48 bits replaced with 2002:IPv4addr # SLA ID is 5678 in this example prefix 0:0:0:5678::/64 { AdvOnLink on; AdvAutonomous on; # Use IPv4 address from ppp0 to form 6to4 prefix Base6to4Interface ppp0; # Short lifetimes for dynamic IPv4 addresses AdvValidLifetime 300; AdvPreferredLifetime 120; }; }; ``` -------------------------------- ### Check version consistency Source: https://github.com/radvd-project/radvd/blob/master/RELEASE-PROCESS.md Commands to verify the current version identifier in configuration and changelog files. ```bash grep AC_INIT configure.ac | cut -d[ -f 2 | cut -d] -f 1 grep Release CHANGES | head -1 ``` -------------------------------- ### Configure DHCPv6 Integration Flags Source: https://context7.com/radvd-project/radvd/llms.txt Set managed and other configuration flags to instruct hosts to use DHCPv6 for address and network configuration. ```text interface eth0 { AdvSendAdvert on; # Tell hosts to use DHCPv6 for address configuration # (stateful DHCPv6 in addition to SLAAC) AdvManagedFlag on; # Tell hosts to use DHCPv6 for other configuration # (DNS, NTP, etc. - commonly used with SLAAC) AdvOtherConfigFlag on; # MTU to advertise (0 = don't advertise) AdvLinkMTU 1500; # Default hop limit for outgoing packets AdvCurHopLimit 64; # Neighbor reachability time (milliseconds, 0 = unspecified) AdvReachableTime 0; # Neighbor solicitation retransmit time (milliseconds) AdvRetransTimer 0; prefix 2001:db8:1::/64 { AdvOnLink on; AdvAutonomous on; }; }; ``` -------------------------------- ### Clean Docker environment Source: https://github.com/radvd-project/radvd/blob/master/RELEASE-PROCESS.md Remove the existing build container image to ensure a clean build environment. ```bash docker rmi radvd-autogen:latest ``` -------------------------------- ### Commit and tag release Source: https://github.com/radvd-project/radvd/blob/master/RELEASE-PROCESS.md Create a signed commit and a signed git tag for the new release version. ```bash git commit -s -m "Release ${VERSION}" CHANGES configure.ac git tag -s v${VERSION} -m "$VERSION" ``` -------------------------------- ### Configure Unicast-Only Links Source: https://context7.com/radvd-project/radvd/llms.txt Set up radvd for non-broadcast links such as ISATAP or point-to-point connections. ```conf # /etc/radvd.conf - Unicast-only mode interface isatap0 { AdvSendAdvert on; # Enable for non-multicast links UnicastOnly on; # Respond to solicitations with unicast RAs (RFC 7772) AdvRASolicitedUnicast on; prefix 2001:db8:1::/64 { AdvOnLink on; AdvAutonomous on; }; }; ``` -------------------------------- ### Export Public GPG Key Source: https://github.com/radvd-project/radvd/wiki/Building-RPMs Command to export your public GPG key into an ASCII-armored file. This key can be shared with others for verification. ```bash $ gpg --armor --export "USERID" > my.key.file.asc ``` -------------------------------- ### Sign RPM Package Source: https://github.com/radvd-project/radvd/wiki/Building-RPMs Command to digitally sign an RPM package using GPG. This is a required step for submitting packages to Fedora. ```bash $ rpm --addsign name_of_rpm_package ``` -------------------------------- ### 6LoWPAN Border Router Configuration (ABRO) Source: https://context7.com/radvd-project/radvd/llms.txt Configure radvd as an Authoritative Border Router (ABRO) for 6LoWPAN networks using RFC 6775. Requires UnicastOnly on and AdvCurHopLimit set to 255. ```conf # /etc/radvd.conf - 6LoWPAN ABRO interface lowpan0 { AdvSendAdvert on; # Required for 6LoWPAN UnicastOnly on; # Set hop limit to 255 for ND security AdvCurHopLimit 255; prefix 2001:db8:100:f101::/64 { AdvOnLink on; AdvAutonomous on; AdvRouterAddr on; }; # Authoritative Border Router Option abro fe80::a200:0:0:1/64 { # Version numbers for border router info set AdvVersionLow 10; AdvVersionHigh 2; # Validity time for border router information AdvValidLifetime 2; }; }; ``` -------------------------------- ### Set Advertisement Timing Intervals Source: https://context7.com/radvd-project/radvd/llms.txt Adjust the frequency of unsolicited router advertisements and router preference settings. ```text # /etc/radvd.conf - Advertisement timing interface eth0 { AdvSendAdvert on; # Maximum time between unsolicited RAs (4-65535 seconds) MaxRtrAdvInterval 600; # Minimum time between unsolicited RAs MinRtrAdvInterval 200; # Minimum delay between multicast RAs MinDelayBetweenRAs 3; # Default router lifetime (0 = not a default router) AdvDefaultLifetime 1800; # Router preference for default router selection AdvDefaultPreference medium; # low, medium, or high prefix 2001:db8:1::/64 { AdvOnLink on; AdvAutonomous on; }; }; ``` -------------------------------- ### GPG Key Generation Source: https://github.com/radvd-project/radvd/wiki/Building-RPMs Command to generate a new GPG secret key for signing packages. This process will prompt for user information and a password. ```bash $ gpg --gen-key ``` -------------------------------- ### Configure DNS Server Advertisement (RDNSS) Source: https://context7.com/radvd-project/radvd/llms.txt Advertise recursive DNS server addresses to hosts using the RFC 8106 RDNSS option. ```conf # /etc/radvd.conf - DNS servers interface eth0 { AdvSendAdvert on; prefix 2001:db8:1::/64 { AdvOnLink on; AdvAutonomous on; }; # Single DNS server RDNSS 2001:db8:1::53 { # Lifetime for DNS server validity (default: 3*MaxRtrAdvInterval) AdvRDNSSLifetime 1800; }; # Multiple DNS servers (up to 127 addresses per block) RDNSS 2001:db8:1::53 2001:db8:1::54 2001:4860:4860::8888 { AdvRDNSSLifetime 1800; # Remove DNS servers from clients on shutdown FlushRDNSS on; }; }; ``` -------------------------------- ### Captive Portal Configuration Source: https://context7.com/radvd-project/radvd/llms.txt Advertise a Captive Portal API URL using RFC 8908 for networks with captive portals. Includes RDNSS configuration. ```conf # /etc/radvd.conf - Captive portal interface eth0 { AdvSendAdvert on; prefix 2001:db8:1::/64 { AdvOnLink on; AdvAutonomous on; }; # Captive Portal API URL (RFC 8908/8910) AdvCaptivePortalAPI "https://portal.example.net/api/capport.json"; RDNSS 2001:db8:1::53 { AdvRDNSSLifetime 1800; }; }; ``` -------------------------------- ### Configure Decrementing Lifetimes for DHCPv6-PD Source: https://context7.com/radvd-project/radvd/llms.txt Use this configuration to enable lifetime decrementing for delegated prefixes. Reset the timers using SIGUSR1 when the prefix is renewed. ```text interface eth0 { AdvSendAdvert on; prefix 2001:db8:delegated::/64 { AdvOnLink on; AdvAutonomous on; # Initial lifetimes from DHCPv6 delegation AdvValidLifetime 86400; AdvPreferredLifetime 43200; # Decrement lifetimes with each RA # Reset with SIGUSR1 when prefix is renewed DecrementLifetimes on; }; }; ``` -------------------------------- ### Validate changes Source: https://github.com/radvd-project/radvd/blob/master/RELEASE-PROCESS.md Review modifications to version-controlled files before committing. ```bash git diff CHANGES configure.ac ``` -------------------------------- ### Mobile IPv6 Home Agent Configuration Source: https://context7.com/radvd-project/radvd/llms.txt Configure radvd to act as a Mobile IPv6 Home Agent. Ensure AdvHomeAgentFlag and AdvHomeAgentInfo are enabled. ```conf # /etc/radvd.conf - Mobile IPv6 Home Agent interface eth0 { AdvSendAdvert on; # Enable Home Agent flag AdvHomeAgentFlag on; # Include Home Agent Information option AdvHomeAgentInfo on; # Home Agent lifetime (max 65520 seconds) HomeAgentLifetime 1800; # Home Agent preference (higher = more preferred) HomeAgentPreference 10; # Enable Mobile Router support (NEMO Basic) AdvMobRtrSupportFlag on; # Include Advertisement Interval option AdvIntervalOpt on; # Use interface address instead of prefix for Mobile IPv6 prefix 2001:db8:1::1/64 { AdvOnLink on; AdvAutonomous on; # Required for Mobile IPv6 movement detection AdvRouterAddr on; }; }; ``` -------------------------------- ### NAT64 Prefix Advertisement Source: https://context7.com/radvd-project/radvd/llms.txt Advertise a NAT64 prefix to allow IPv6-only networks to access IPv4 resources. Supports well-known and custom prefixes. ```conf # /etc/radvd.conf - NAT64 configuration interface eth0 { AdvSendAdvert on; prefix 2001:db8:1::/64 { AdvOnLink on; AdvAutonomous on; }; # NAT64 prefix (well-known prefix 64:ff9b::/96) nat64prefix 64:ff9b::/96 { # Lifetime (max 65528, rounded to multiple of 8) AdvValidLifetime 1800; }; # Custom NAT64 prefix (valid lengths: /32, /40, /48, /56, /64, /96) nat64prefix 2001:db8:64::/96 { AdvValidLifetime 3600; }; # DNS server for NAT64 environment RDNSS 2001:db8:1::64 { AdvRDNSSLifetime 1800; }; }; ``` -------------------------------- ### Define Prefix Lifetimes Source: https://context7.com/radvd-project/radvd/llms.txt Specify valid and preferred lifetimes for prefixes to control how long hosts retain address configurations. ```text # /etc/radvd.conf - Prefix lifetimes interface eth0 { AdvSendAdvert on; prefix 2001:db8:1::/64 { AdvOnLink on; AdvAutonomous on; # Time prefix is valid for on-link determination (default: 86400) AdvValidLifetime 86400; # 1 day # Time addresses remain preferred (default: 14400) AdvPreferredLifetime 14400; # 4 hours # Use 'infinity' for permanent prefixes # AdvValidLifetime infinity; # AdvPreferredLifetime infinity; }; # Short-lived prefix for dynamic scenarios prefix 2001:db8:2::/64 { AdvOnLink on; AdvAutonomous on; AdvValidLifetime 300; # 5 minutes AdvPreferredLifetime 120; # 2 minutes }; }; ``` -------------------------------- ### Configure Client Restrictions Source: https://context7.com/radvd-project/radvd/llms.txt Restrict router advertisements to specific clients using unicast addresses. ```conf # /etc/radvd.conf - Client restrictions interface eth0 { AdvSendAdvert on; prefix 2001:db8:1::/64 { AdvOnLink on; AdvAutonomous on; }; # Only send RAs to these specific clients clients { fe80::21f:16ff:fe06:3aab; fe80::21d:72ff:fe96:aaff; fe80::1234:5678:abcd:ef01; # Prefix with ! to explicitly ignore a client !fe80::bad:client:addr:here; }; # Optionally allow responding to RS from unknown clients # while still only sending periodic RAs to listed clients UnrestrictedUnicast on; }; ``` -------------------------------- ### Shutdown Behavior Configuration Source: https://context7.com/radvd-project/radvd/llms.txt Configure radvd's behavior on shutdown, including sending RAs with zero lifetime, deprecating prefixes, and removing routes/DNS entries. ```conf # /etc/radvd.conf - Shutdown behavior interface eth0 { AdvSendAdvert on; # Send RA with zero lifetime on shutdown (removes router) RemoveAdvOnExit on; prefix 2001:db8:1::/64 { AdvOnLink on; AdvAutonomous on; # Deprecate prefix on shutdown (set preferred lifetime to 0) DeprecatePrefix on; }; route 2001:db8:remote::/48 { AdvRoutePreference medium; # Remove route on shutdown RemoveRoute on; }; RDNSS 2001:db8:1::53 { # Remove DNS server on shutdown FlushRDNSS on; }; DNSSL example.com { # Remove search list on shutdown FlushDNSSL on; }; }; ``` -------------------------------- ### Control radvd with Unix Signals Source: https://context7.com/radvd-project/radvd/llms.txt Send signals to the radvd process to reload configuration, reset lifetimes, or shut down gracefully. ```bash kill -HUP $(cat /var/run/radvd/radvd.pid) kill -USR1 $(cat /var/run/radvd/radvd.pid) kill -TERM $(cat /var/run/radvd/radvd.pid) kill -TERM $(cat /var/run/radvd/radvd.pid) kill -TERM $(cat /var/run/radvd/radvd.pid) ``` -------------------------------- ### RA Source Address Configuration Source: https://context7.com/radvd-project/radvd/llms.txt Configure specific source addresses for Router Advertisements, useful for VRRP or failover scenarios. Includes AdvSourceLLAddress option. ```conf # /etc/radvd.conf - Custom RA source address interface eth0 { AdvSendAdvert on; # Include link-layer address in RA AdvSourceLLAddress on; # Specify acceptable source addresses (for VRRP/failover) AdvRASrcAddress { fe80::1; # Virtual router address fe80::21f:16ff:fe06:3aab; # Physical address }; prefix 2001:db8:1::/64 { AdvOnLink on; AdvAutonomous on; }; }; ``` -------------------------------- ### Monitor Router Advertisements with radvdump Source: https://context7.com/radvd-project/radvd/llms.txt Use radvdump to inspect network advertisements. Options include excluding default values and adjusting debug verbosity. ```bash radvdump radvdump --exclude-defaults radvdump --debug 2 radvdump --version ``` -------------------------------- ### Configure DNS Search List (DNSSL) Source: https://context7.com/radvd-project/radvd/llms.txt Advertise DNS search domains to hosts using the RFC 8106 DNSSL option. ```conf # /etc/radvd.conf - DNS search list interface eth0 { AdvSendAdvert on; prefix 2001:db8:1::/64 { AdvOnLink on; AdvAutonomous on; }; RDNSS 2001:db8:1::53 { AdvRDNSSLifetime 1800; }; # DNS search domains DNSSL example.com corp.example.com internal.local { # Lifetime for search list validity AdvDNSSLLifetime 1800; # Remove search list from clients on shutdown FlushDNSSL on; }; }; ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.