Closed muja closed 8 months ago
I just noticed even with DHCP working / clients getting IPs, there is no internet access. I believe the nftables
is missing? I'm kinda new to networking/routing -- where would I need to change things to make my setup work?
My general recommendation for the scenario where you have multiple LAN ports is to bridge them together to one interface:
{
"bridges":[
{
"name": "lan0",
"interface_hardware_addrs": [
"64:9d:99:b1:fa:63",
"b8:ce:f6:2f:bf:93",
"a8:a1:59:3a:cc:53"
]
}
],
"interfaces": [
{
"hardware_addr": "b8:ce:f6:2f:aa:93",
"fec": "RS",
"name": "uplink0"
},
{
"name": "lan0",
"addr": "10.0.0.1/24"
}
]
}
Thanks, yes that solved it. Out of curiosity, why didn't the devices on the other ports have network/internet access even when I assigned static IP addresses to them?
And what does the "fec": "RS"
do?
Out of curiosity, why didn't the devices on the other ports have network/internet access even when I assigned static IP addresses to them?
Because the networking configuration, specifically the nftables rules, only configure NAT between lan0 and uplink0, no other interfaces: https://github.com/rtr7/router7/blob/95fc74327defd019c54ef4e8f73f21a584ffee3e/internal/netconfig/netconfig.go#L841-L850
And what does the
"fec": "RS"
do?
Google “fec RS” :) It’s forward error correction, which is needed for some SFP interfaces to work.
I'm trying to get multiple interfaces working. for this I've provided the interfaces in
/perm/interfaces.json
:However,
dhcp4d
only listens onlan0
so I can't get dynamic IPs on the other ports. Obviously this could be fixed insidedhcp4d
which would be awesome but my idea was to simply have a dhcp process running per port, supervised bygokrazy
, configure the lease path and the HTTP server. However, running multiple processes of the same instance with gokrazy doesn't seem possible, right? What would you suggest in my case?