Doridian / wsvpn

VPN over WebSocket and WebTransport
BSD 3-Clause "New" or "Revised" License
123 stars 12 forks source link

[Question]WSVPN can't pass OSPF and BFD messages? #365

Closed Handsome1080P closed 7 months ago

Handsome1080P commented 9 months ago

Server Side,and IP is 10.100.0.1 Client Side,and IP is 10.100.0.2 Server Side tcpdump pic: image Client Side tcpdump pic: image

Handsome1080P commented 9 months ago

My MTU set 1380. image image image No bfd or ospf sessions online.

Handsome1080P commented 9 months ago

Server config: image

Doridian commented 9 months ago

The fact that the packets appear in both the server AND the client means the packets are passing successfully at least partially. The issue is likely OSPF/BFD use multicasting (at least OSPF does), so you will need to switch to a "TAP" interface, not "TUN" (switch mode to TAP on the server config and change all interface names from tunX to tapX)

Also I should note I have not tested broadcast/multicast traffic in WSVPN, so it might not pass even in TAP mode (but I can fix that, TUN mode is effectively incapable of transmitting anything that isn't a unicast IP packet)

Handsome1080P commented 9 months ago

The fact that the packets appear in both the server AND the client means the packets are passing successfully at least partially. The issue is likely OSPF/BFD use multicasting (at least OSPF does), so you will need to switch to a "TAP" interface, not "TUN" (switch mode to TAP on the server config and change all interface names from tunX to tapX)

Also I should note I have not tested broadcast/multicast traffic in WSVPN, so it might not pass even in TAP mode (but I can fix that, TUN mode is effectively incapable of transmitting anything that isn't a unicast IP packet)

I already set BIRD2 connection type use PTP.maybe I need set to PTMP and TAP mode for wsvpn.my other nodes all using PTP mode or PTMP with Wireguard TUN.So I don't think TUN can't send multicast packets.

Handsome1080P commented 9 months ago

NEW server config.I changed mode to Layer2 TAP.still can't get BFD up.I have checked normal connection on Wireguard.Server and client will send message to each others but in WSVPN tunnel I only got client(10.100.0.2) to server(10.100.0.1).Server no response. This is server config: image BIRD2 Server BFD status: image BIRD2 Client BFD status: image TCPDump on Server for WSVPN: image TCPDump on Client for WSVPN: image TCPDump on Server for Wireguard: image TCPDump on Client for Wireguard: image

Handsome1080P commented 9 months ago

Correction,OSPF is working.only BFD I have no ideal.I removed my OSPF'BFD configration,now OSFP connected. image image

Handsome1080P commented 9 months ago

BFD config,client use same as this. image

Handsome1080P commented 9 months ago

and WSVPN TUN mode can't forward IP traffic.OSPF connected but can't forward data.If use TAP mode,I need an additional bridge to route.So,i am back to wireguard.