User Tools

Site Tools


prefix_delegation

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
prefix_delegation [2022/08/01 15:32] – [Net3] bentprefix_delegation [2022/08/08 16:07] (current) bent
Line 2: Line 2:
 Subnetting is one of the tools you can use as part of segmenting a LAN in e.g a DMZ, a subnet for IoT devices etc. In this note I'll explain how I did it in IPv6 using [[https://en.wikipedia.org/wiki/Prefix_delegation|Prefix Delegation]]. Subnetting is one of the tools you can use as part of segmenting a LAN in e.g a DMZ, a subnet for IoT devices etc. In this note I'll explain how I did it in IPv6 using [[https://en.wikipedia.org/wiki/Prefix_delegation|Prefix Delegation]].
  
-I took this opportunity to learn more about it. I set up the following test network using VirtualBox: (main router is a real host; the virtual hosts (Netnrun on my workstation)+I took this opportunity to learn more about it. I set up the following test network using VirtualBox: (main router is a real host that runs Gentoo; the virtual hosts (Net0,1,2,...live on my workstation and run ArchLinux or Debian)
    
 {{:wiki:test-network.png?400|}} {{:wiki:test-network.png?400|}}
  
-My ISP has given me a /48 delegation as per RIPE recommendation. I want to subdivide this so that the first subnet level attached to my LAN ('LAN' on the picture) gets a /56 delegation and subnets created under one of these /56 subnets will get /60 delegated.+My ISP has given me a /48 delegation as per RIPE recommendation. I want to subdivide this so that the first level subnets attached to my LAN ('LAN' on the picture) get a /56 delegation. This means that up to 2^8 or 256 subnets could be attached to my LAN. Subnets created under such a /56 subnet (e.g. LAN0) will get /60 delegated. In other words each first level subnet can support up to 2^4 or 16 second level subnets.
  
-My initial intention was do do all of it using [[https://www.freedesktop.org/software/systemd/man/systemd-networkd.html#|systemd-networkd]] only but I very quickly found out that this was not possible with the present (July 2022) version of systemd (251.2). Networkd (as I'll call systemd-networkd in the following) has both a DHCP server and a DHCP client for IPv4 but only a DHCP client for IPv6. So I used [[https://www.isc.org/dhcp/|ISC's dhcp]] package as DHCP server for IPv6.+My initial intention was to do all of it using [[https://www.freedesktop.org/software/systemd/man/systemd-networkd.html#|systemd-networkd]] onlybut I very quickly found out that this was not possible with the present (July 2022) version of systemd (251.2). Networkd (as I'll call systemd-networkd in the following) has both a DHCP server and a DHCP client for IPv4 but only a DHCP client for IPv6. So I used [[https://www.isc.org/dhcp/|ISC's dhcp]] package as DHCP server for IPv6.
  
 In the following I'll treat the routers one by and and highlight what is essential to get **this** In the following I'll treat the routers one by and and highlight what is essential to get **this**
Line 15: Line 15:
 ===== Main router (Rm) ===== ===== Main router (Rm) =====
  
-The main router is a physical host that runs Gentoo. Its network interfaces are all configured using networkd. It provides DHCP service to the LAN and forwards requests from the Internet to the appropriate servers on the LAN.+The main router is a physical host. Its network interfaces are all configured using networkd. It provides DHCP service to the LAN and forwards requests from the Internet to the appropriate servers on the LAN.
  
 It receives a /48 prefix from the ISP and is configured to delegate /56 prefixes to requesting routers on the LAN if so asked. The DHCP6 server is configured to delegate prefixes in the range 1 to f (2001:2db:8073:0100::/56 to 2001:2db:8073:0f00::/56). It receives a /48 prefix from the ISP and is configured to delegate /56 prefixes to requesting routers on the LAN if so asked. The DHCP6 server is configured to delegate prefixes in the range 1 to f (2001:2db:8073:0100::/56 to 2001:2db:8073:0f00::/56).
Line 37: Line 37:
 ===== Net3 ===== ===== Net3 =====
  
-This host is 'just' a host on LAN3. Using SLAAC it get an IPv6 address like 2001:2db:8073:e80:a00:27ff:fed5:e9ee/64 derived from the RA.+This host is 'just' a host on LAN3. Using SLAAC it gets an IPv6 address like 2001:2db:8073:e80:a00:27ff:fed5:e9ee/64 derived from the RA.
  
 Its configuration files are here [[Net3 config|Net3 config]] Its configuration files are here [[Net3 config|Net3 config]]
prefix_delegation.1659367973.txt.gz · Last modified: 2022/08/01 15:32 by bent