alternate_address
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
alternate_address [2023/10/25 17:59] – bent | alternate_address [2025/01/05 16:03] (current) – [Service script] bent | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Alternate address ====== | ====== Alternate address ====== | ||
- | Hi Bent | + | Based on my experiments with [[prefix_delegation|IPv6 prefix delegation and subnetting]] I determined a prefix to delegate to Steve. Steve has asked for a /64 delegation like the one I would get from him. The prefix became 1011, derived in this manner: My LAN (0019) is actually subnet 0 in the first level (/56), subnet 1 in the next level (/60) and subnet 9 in the third level (/64). So the 1011 is subnet 10 (first level), 1 second level and again 1 third level. The initial 10 could also be interpreted as subnet 1 in a /52 allocation and subnet 0 in the /56 allocation giving a total of four possible subnet levels. |
- | So here's what I think we'll need to do (syntax may not be quite right!) | ||
- | === a) Steve' | + | ===== Steve' |
+ | (basically excerpts from an email) | ||
- | i) on my VPN router | + | i) on the VPN router |
ip addr add dev br-lan 2a06: | ip addr add dev br-lan 2a06: | ||
ip route add default from 2a06: | ip route add default from 2a06: | ||
- | ii) on ictoan | + | ii) on Ictoan |
ip addr add br-lan 2a06: | ip addr add br-lan 2a06: | ||
ip route add default from 2a06: | ip route add default from 2a06: | ||
- | a) on vultrgate | + | a) on Vultrgate |
ip route add 2a06: | ip route add 2a06: | ||
ip route add 2001: | ip route add 2001: | ||
Add 2001: | Add 2001: | ||
- | === b) Bent's end 2001: | + | ===== Bent's end 2001: |
+ | ==== gate-rpi ==== | ||
+ | The basic IP commands are: | ||
+ | ip addr add dev eth0 2001: | ||
+ | ip route add default from 2001: | ||
+ | ip -6 route add 2a06: | ||
+ | Two of the three commands are easily transferred to Networkd configurations files but the one with ' | ||
+ | #/ | ||
+ | [Match] | ||
+ | Name=eth0 | ||
+ | | ||
+ | [Network] | ||
+ | Address=192.168.19.44/ | ||
+ | DNS=192.168.19.5 | ||
+ | IPForward=yes | ||
+ | Address=2a06: | ||
+ | Address=2001: | ||
+ | IPv6AcceptRA=yes | ||
+ | and for the tunnel interface (wg0): | ||
+ | #/ | ||
+ | [Match] | ||
+ | Name=wg0 | ||
+ | | ||
+ | [Network] | ||
+ | Address=10.8.3.2/ | ||
+ | IPForward=yes | ||
+ | | ||
+ | [Route] | ||
+ | # | ||
+ | Destination=2a06: | ||
- | i) on gate-rpi | + | ==== Spot ==== |
- | ip addr add dev br-lan | + | Similarly the basic IP commands are: |
- | ip route add default from 2001: | + | ip addr add dev enp2s0 |
- | ip -6 route add 2a06: | + | ip route add default from 2001: |
- | + | The ' | |
- | ii) on Spot | + | Configuration file for enp2s0: |
- | ip addr add dev br-lan 2001: | + | [Match] |
- | ip route add default from 2001: | + | Name=enp2s0 |
- | + | ||
- | IP numbers and device names may not be correct! | + | [Network] |
- | Some firewall additions may be required..... | + | Address=192.168.19.5/ |
- | Does this all seem right????? | + | Gateway=192.168.19.254 |
- | + | Address=2a06: | |
- | Steve | + | |
+ | | ||
+ | |||
+ | | ||
+ | Address=2001: | ||
+ | PreferredLifetime=0 | ||
+ | (the PreferredLifetime=0 is there to prevent usein this address as source address for outgoing connections | ||
+ | ==== Service script ==== | ||
+ | #/ | ||
+ | [Unit] | ||
+ | Description=Return route for IPv6 traffic | ||
+ | After=network-online.target | ||
+ | | ||
+ | [Service] | ||
+ | ExecStart=/ | ||
+ | ExecStop=/ | ||
+ | Type=oneshot | ||
+ | RemainAfterExit=yes | ||
+ | | ||
+ | [Install] | ||
+ | WantedBy=multi-user.target | ||
+ | This is the script from Spot. The one on gate-rpi is identical except for the interface name which is eth0 on gate-rpi. It doesn' |
alternate_address.1698256781.txt.gz · Last modified: 2023/10/25 17:59 by bent