summaryrefslogtreecommitdiff
path: root/docs/configexamples/pppoe-ipv6-basic.md
diff options
context:
space:
mode:
authorYuriy Andamasov <yuriy@vyos.io>2026-05-06 20:42:32 +0300
committerYuriy Andamasov <yuriy@vyos.io>2026-05-06 20:42:32 +0300
commit5d6fa52b8985f8068314aba26878a1d7d5cb84e5 (patch)
tree99359ff282846e26b5c5fa2b9b176b35b172809f /docs/configexamples/pppoe-ipv6-basic.md
parent631e454d674ad5111d2b56a6964ead461894a1f6 (diff)
downloadvyos-documentation-5d6fa52b8985f8068314aba26878a1d7d5cb84e5.tar.gz
vyos-documentation-5d6fa52b8985f8068314aba26878a1d7d5cb84e5.zip
feat: flip swap mechanism — MD as primary, RST as override (Phase 1)
This is the first of three phases inverting the per-page swap mechanism so MD becomes the canonical primary and RST becomes the rare override. Phase 1 — file renames + conf.py exclude_patterns flip only: - Rename docs/**/md-<stem>.md to docs/**/<stem>.md (drop md- prefix) for all 254 stems previously listed in docs/_swap.txt - Rename docs/**/<stem>.rst to docs/**/rst-<stem>.rst (add rst- prefix) for the same 254 stems - Repurpose docs/_swap.txt as docs/_rst_overrides.txt; initially empty comment-only since no pages need the RST fallback right now - conf.py exclude_patterns flipped: rst-*.rst is now excluded by default instead of md-*.md - conf.py runtime-artifact references updated to _rst_override_state.json and _md_exclude.txt (Phase 2 will rewrite swap_sources.py to produce these names; for now no swap script runs because overrides list is empty) Phase 2 (next commit on this branch) will rewrite scripts/swap_sources.py with inverted rename direction, delete scripts/import_myst.py + tests, and update tests/test_swap_sources.py for the new semantics. Phase 3 will be the cleanup pass and ready-for-review flip. Generated by robots https://vyos.io
Diffstat (limited to 'docs/configexamples/pppoe-ipv6-basic.md')
-rw-r--r--docs/configexamples/pppoe-ipv6-basic.md114
1 files changed, 114 insertions, 0 deletions
diff --git a/docs/configexamples/pppoe-ipv6-basic.md b/docs/configexamples/pppoe-ipv6-basic.md
new file mode 100644
index 00000000..76984f4b
--- /dev/null
+++ b/docs/configexamples/pppoe-ipv6-basic.md
@@ -0,0 +1,114 @@
+---
+lastproofread: '2021-06-29'
+---
+
+(examples-pppoe-ipv6-basic)=
+
+# PPPoE IPv6 Basic Setup for Home Network
+
+This document is to describe a basic setup using PPPoE with DHCPv6-PD +
+SLAAC to construct a typical home network. The user can follow the steps
+described here to quickly setup a working network and use this as a starting
+point to further configure or fine-tune other settings.
+
+To achieve this, your ISP is required to support DHCPv6-PD. If you're not sure,
+please contact your ISP for more information.
+
+## Network Topology
+
+```{image} /_static/images/pppoe-ipv6-pd-diagram.webp
+:align: center
+:alt: Network Topology Diagram
+:width: 60%
+```
+
+
+## Configurations
+
+### PPPoE Setup
+
+```none
+set interfaces pppoe pppoe0 authentication password <YOUR PASSWORD>
+set interfaces pppoe pppoe0 authentication username <YOUR USERNAME>
+set interfaces pppoe pppoe0 service-name <YOUR SERVICENAME>
+set interfaces pppoe pppoe0 source-interface 'eth0'
+```
+
+- Fill `password` and `user` with the credential provided by your ISP.
+- `service-name` can be an arbitrary string.
+
+### DHCPv6-PD Setup
+
+During address configuration, in addition to assigning an address to the WAN
+interface, ISP also provides a prefix to allow the router to configure addresses
+of LAN interface and other nodes connecting to LAN, which is called prefix
+delegation (PD).
+
+```none
+set interfaces pppoe pppoe0 ipv6 address autoconf
+set interfaces pppoe pppoe0 dhcpv6-options pd 0 interface eth1 address '100'
+```
+
+- Here we use the prefix to configure the address of eth1 (LAN) to form
+ `<prefix>::64`, where `64` is hexadecimal of address 100.
+
+<!-- list break -->
+
+- For home network users, most of time ISP only provides /64 prefix, hence
+ there is no need to set SLA ID and prefix length. See {ref}`pppoe-interface`
+ for more information.
+
+### Router Advertisement
+
+We need to enable router advertisement for LAN network so that PC can receive
+the prefix and use SLAAC to configure the address automatically.
+
+```none
+set service router-advert interface eth1 link-mtu '1492'
+set service router-advert interface eth1 name-server <NAME SERVER>
+set service router-advert interface eth1 prefix ::/64 valid-lifetime '172800'
+```
+
+- Set MTU in advertisement to 1492 because of PPPoE header overhead.
+- Set DNS server address in the advertisement so that clients can obtain it by
+ using RDNSS option. Most operating systems (Windows, Linux, Mac) should
+ already support it.
+- Here we set the prefix to `::/64` to indicate advertising any /64 prefix
+ the LAN interface is assigned.
+- Since some ISPs disconnects continuous connection for every 2~3 days, we set
+ `valid-lifetime` to 2 days to allow PC for phasing out old address.
+
+### Basic Firewall
+
+To have basic protection while keeping IPv6 network functional, we need to:
+- Allow all established and related traffic for router and LAN
+- Allow all icmpv6 packets for router and LAN
+- Allow DHCPv6 packets for router
+
+```none
+set firewall ipv6 name WAN_IN default-action 'drop'
+set firewall ipv6 name WAN_IN rule 10 action 'accept'
+set firewall ipv6 name WAN_IN rule 10 state established 'enable'
+set firewall ipv6 name WAN_IN rule 10 state related 'enable'
+set firewall ipv6 name WAN_IN rule 20 action 'accept'
+set firewall ipv6 name WAN_IN rule 20 protocol 'icmpv6'
+set firewall ipv6 name WAN_LOCAL default-action 'drop'
+set firewall ipv6 name WAN_LOCAL rule 10 action 'accept'
+set firewall ipv6 name WAN_LOCAL rule 10 state established 'enable'
+set firewall ipv6 name WAN_LOCAL rule 10 state related 'enable'
+set firewall ipv6 name WAN_LOCAL rule 20 action 'accept'
+set firewall ipv6 name WAN_LOCAL rule 20 protocol 'icmpv6'
+set firewall ipv6 name WAN_LOCAL rule 30 action 'accept'
+set firewall ipv6 name WAN_LOCAL rule 30 destination port '546'
+set firewall ipv6 name WAN_LOCAL rule 30 protocol 'udp'
+set firewall ipv6 name WAN_LOCAL rule 30 source port '547'
+set firewall ipv6 forward filter rule 10 action jump
+set firewall ipv6 forward filter rule 10 jump-target 'WAN_IN'
+set firewall ipv6 forward filter rule 10 inbound-interface name 'pppoe0'
+set firewall ipv6 input filter rule 10 action jump
+set firewall ipv6 input filter rule 10 jump-target 'WAN_LOCAL'
+set firewall ipv6 input filter rule 10 inbound-interface name 'pppoe0'
+```
+
+Note to allow the router to receive DHCPv6 response from ISP. We need to allow
+packets with source port 547 (server) and destination port 546 (client).