User Tools

Site Tools


main_router

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
main_router [2022/07/18 18:01] – created 2a06:4000:8073:19::2main_router [2022/08/08 15:24] (current) – [DHCPv6 configuration] bent
Line 1: Line 1:
-Configuration files for the Main Router+====== Configuration files for the Main Router ====== 
 +===== Network configuration ===== 
 +==== Upstream interface (enp6s0) ====
  
 +The upstream network interface is configured to act as a DHCP client (both IPv4 and IPv6). It also sets this host as a router and will accept Router Announcements (RA)
 +
 +  #/etc/systemd/network/enp6s0.network
 +  #
 +  [Match]
 +  Name=enp6s0
 +  
 +  [Network]
 +  DHCP=yes
 +  IPv6AcceptRA=yes
 +  IPForward=yes
 +  
 +  [DHCP]
 +  UseDNS=yes
 +  UseDomains=yes
 +  Anonymize=false
 +  IAID=1
 +  RouteMetric=100
 +  
 +
 +====Downstream interface (br0)=====
 +
 +This interface sends Router Announcements (RA) on the LAN with the 'Managed' bit set. The interface itself gets static IPv4 and IPv6 addresses. Hosts on the LAN will use SLAAC and configure addresses as 2001:db8:8073:19::/64 (Sent as an option in the RA - Line 'SubnetID=19')
 +
 +  #/etc/systemd/network/br0.network
 +  #
 +  [Match]
 +  Name=br0
 +  
 +  [Network]
 +  Address=192.168.19.1/24
 +  DNS=192.168.19.5
 +  IPForward=yes
 +  IPv6SendRA=yes
 +  IPv6PrefixDelegation=yes
 +  Address=fe80::19/64
 +  Address=2001:db8:8073:19::1/64
 +  
 +  [Route]
 +  Gateway=192.168.19.20
 +  Destination=192.168.21.0/24
 +  
 +  [IPv6SendRA]
 +  Managed=yes
 +  RouterLifetimeSec=1800
 +  
 +  [DHCPv6PrefixDelegation]
 +  SubnetId=19
 +  
 +==== DHCPv6 configuration ====
 +
 +Here is only shown the parts that are relevant for prefix delagation. The DHCP sections are omitted.
 +
 +
 +  #/etc/dhcp/dhcpd6.conf
 +  #
 +  ...
 +  # don't serve enp6s0 (WAN IF)
 +  subnet6 2001:2db:8::8073/128 {
 +  }
 +  
 +  subnet6 2001:2db:8073:19::/64 {
 +      # Range for clients
 +      range6 2001:2db:8073:19::129 2001:2db:8073:19::254;
 +  
 +      # Range for clients requesting a temporary address
 +      range6 2001:2db:8073:19::/64 temporary;
 +  
 +      # Additional options
 +      option dhcp6.name-servers 2001:2db:8073:19::5;
 +     
 +      # Prefix range for delegation to sub-routers
 +      prefix6 2001:2db:8073:0100:: 2001:2db:8073:0f00:: /56;
 +  }
 +  ...
 +  
 +  
main_router.1658167313.txt.gz · Last modified: 2022/07/18 18:01 by 2a06:4000:8073:19::2