Code Monkey home page Code Monkey logo

Comments (5)

DanielG avatar DanielG commented on June 14, 2024

Indeed it is. A fact I exploit in my latest (unpublished) generalized iteration of this dhcp multihoming script. Really this example is quite outdated, if you're implementing this on modern systems I would recommend trying source-specific routing[1] ala ip route add default from $WAN_IP dev $WAN_IFACE. No need to fiddle with multiple routing tables then. I haven't tested it with IPv4 yet but from reading the kernel source it should work for /32 addresses. Let me know if you test it out.

[1]: See https://arxiv.org/pdf/1403.0445.pdf for motivation etc.

from dhcp-policy-routing.

DanielG avatar DanielG commented on June 14, 2024

Ok, turns out SSR isn't supported on the IPv4 side after all. Instead I've updated the entire thing for the latest iteration of this setup using just plain'ol dhclient since I found dhcpcd too finicky and unpredictable.

The route table IDs are now derrived from the DHCP assigned IP addresses so there's no need for manual table configuration anymore.

This iteration also fixes LAN address reachability and use with stuff that only supports fwmarks not source IP binding (cough wireguard cough).

from dhcp-policy-routing.

SpareSimian avatar SpareSimian commented on June 14, 2024

Thanks so much! I'd read through the paper and was googling for examples and all I could find were 10-year-old articles about how it didn't work with IPv4, so I parked the project temporarily. Now I feel motivated to go back to it!

from dhcp-policy-routing.

DanielG avatar DanielG commented on June 14, 2024

Sorry about that. I've been working a lot with IPv6 lately. It's easy to forget how stuck in time IPv4 is feature wise on linux :)

Let me know how your deployment turns out.

from dhcp-policy-routing.

SpareSimian avatar SpareSimian commented on June 14, 2024

I installed it and it seems to work, using dhcpcd. I made one change to the suggested procedure and put multihomed in /usr/local/sbin instead of /etc to reduce clutter in /etc. I symlink that to /etc/dhcpcd.exit-hook. System is 2023-02-21-raspios-bullseye-arm64. (I started to investigate switching to dhclient only to find that ISC has stopped development on that while dhcpcd is still under active development. I'm already using Kea for the server side on my home system.)

from dhcp-policy-routing.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.