Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
213 views
in Technique[技术] by (71.8m points)

linux - Unable to bridge traffic with L2TPv3 tunnel

my goal is to bridge a few VLANs over a Layer 2 connection. I succesfully created a L2TPv3 tunnel and a simple VxLAN as well. When using tcpdump, I can see data coming into physical interface and the bridge in host A, but on the other host B, I can only see data coming into the bridge but not being forwarded to the physical interface. Can't seem to figure out what's the issue. I am using Debian 10.7 on Raspberry Pi4.

modprobe br_netfilter
sysctl -p
modprobe nf_defrag_ipv4
modprobe nf_defrag_ipv6
ip l2tp add tunnel tunnel_id 699 peer_tunnel_id 699 encap udp 
local 10.0.0.1 remote 10.0.0.2 udp_sport 699 udp_dport 699
ip l2tp add session tunnel_id 699 session_id 699 peer_session_id 699
ip link set l2tpeth0 up mtu 1446
ip link add brvlan type bridge
ip link set dev brvlan type bridge nf_call_iptables 1
ip link set l2tpeth0 up
ip link set brvlan up
ip link set l2tpeth0 master brvlan
ip link set eth0 master brvlan
# bridge fdb append 00:00:00:00:00:00 dev l2tpeth0 dst 10.4.0.1
root@host-TS:~ # brctl show
bridge name bridge id       STP enabled interfaces
brvlan      8000.060da1087ba5   no      eth0
                                        l2tpeth0

and

root@host-TS:~ # ip -d link
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop master brvlan state DOWN mode DEFAULT group default qlen 1000
    link/ether dc:a6:32:4b:9e:f5 brd ff:ff:ff:ff:ff:ff promiscuity 1 minmtu 68 maxmtu 1500
    bridge_slave state disabled priority 32 cost 100 hairpin off guard off root_block off fastleave off learning on flood on port_id 0x8002 port_no 0x2 designated_port 32770 designated_cost 0 designated_bridge 8000.6:d:a1:8:7b:a5 designated_root 8000.6:d:a1:8:7b:a5 hold_timer    0.00 message_age_timer    0.00 forward_delay_timer    0.00 topology_change_ack 0 config_pending 0 proxy_arp off proxy_arp_wifi off mcast_router 1 mcast_fast_leave off mcast_flood on neigh_suppress off group_fwd_mask 0 group_fwd_mask_str 0x0 vlan_tunnel off isolated off addrgenmode eui64 numtxqueues 5 numrxqueues 5 gso_max_size 65536 gso_max_segs 65535
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 00:90:9e:9d:66:72 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 0 maxmtu 4088 addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
6: l2tpeth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1446 qdisc pfifo_fast master brvlan state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether 06:0d:a1:08:7b:a5 brd ff:ff:ff:ff:ff:ff promiscuity 1 minmtu 0 maxmtu 65535
    bridge_slave state forwarding priority 32 cost 100 hairpin off guard off root_block off fastleave off learning on flood on port_id 0x8001 port_no 0x1 designated_port 32769 designated_cost 0 designated_bridge 8000.6:d:a1:8:7b:a5 designated_root 8000.6:d:a1:8:7b:a5 hold_timer    0.00 message_age_timer    0.00 forward_delay_timer    0.00 topology_change_ack 0 config_pending 0 proxy_arp off proxy_arp_wifi off mcast_router 1 mcast_fast_leave off mcast_flood on neigh_suppress off group_fwd_mask 0 group_fwd_mask_str 0x0 vlan_tunnel off isolated off addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
7: brvlan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1446 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 06:0d:a1:08:7b:a5 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 68 maxmtu 65535
    bridge forward_delay 1500 hello_time 200 max_age 2000 ageing_time 30000 stp_state 0 priority 32768 vlan_filtering 0 bridge_id 8000.6:d:a1:8:7b:a5 designated_root 8000.6:d:a1:8:7b:a5 root_port 0 root_path_cost 0 topology_change 0 topology_change_detected 0 hello_timer    0.00 tcn_timer    0.00 topology_change_timer    0.00 gc_timer  264.05 group_fwd_mask 0 group_address 01:80:c2:00:00:00 mcast_snooping 1 mcast_router 1 mcast_query_use_ifaddr 0 mcast_querier 0 mcast_hash_elasticity 16 mcast_hash_max 4096 mcast_last_member_count 2 mcast_startup_query_count 2 mcast_last_member_interval 100 mcast_membership_interval 26000 mcast_querier_interval 25500 mcast_query_interval 12500 mcast_query_response_interval 1000 mcast_startup_query_interval 3125 mcast_stats_enabled 0 mcast_igmp_version 2 mcast_mld_version 1 nf_call_iptables 1 nf_call_ip6tables 0 nf_call_arptables 0 addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535

Appreciate if I can get some pointers to get this resolved.

Thanks.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
...