Skip to content

同一张物理网卡上多个运营商出口的选择支持 #34

Description

@GuangYu-yu

场景: OpenWrt 多 WAN 拨号(联通 + 移动 + 电信),通过 LAN 口将三条线路的地址下发给 Windows 电脑。电脑一张物理网卡上同时拿到三个运营商的地址:

IPv6: 2408:.../64 联通
IPv6: 2409:.../64 移动
IPv6: 240e:.../64 电信
IPv4: 10.0.1.2/24 → OpenWrt 策略路由 → 联通
IPv4: 10.0.2.2/24 → OpenWrt 策略路由 → 移动
IPv4: 10.0.3.2/24 → OpenWrt 策略路由 → 电信

IPv6 不同 /64 子网 bind() 即可路由到不同运营商;IPv4 通过 OpenWrt 侧做多子网 + 策略路由,电脑 bind() 对应子网的源 IP 即可选择出口,均不需要 IP_UNICAST_IF 。

在没有实现Linux版本情况下,可以通过这种方式实现叠加。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions