几种网络隧道的性能简单测试(使用iPerf3)
【摘要】 TLDR隧道协议无IpIpIpSitUDP带宽(MB/s)1305128812891259在一种工作负载下,进行简单测试,IpIp与IpSit性能相当,UDP稍差。 测试服务器信息测试Server服务器:172.31.183.57测试Client服务器:172.31.183.58网络掩码:255.255.240.0 无隧道# serveriperf3 -s -f K# clientiper...
TLDR
隧道协议 | 无 | IpIp | IpSit | UDP |
---|---|---|---|---|
带宽(MB/s) | 1305 | 1288 | 1289 | 1259 |
在一种工作负载下,进行简单测试,IpIp与IpSit性能相当,UDP稍差。
测试服务器信息
测试Server服务器:172.31.183.57
测试Client服务器:172.31.183.58
网络掩码:255.255.240.0
无隧道
# server
iperf3 -s -f K
# client
iperf3 -c $IP -f M
server侧观测
client侧观测
ipip隧道
# 开启ipip隧道
modprobe ipip
# server
ip tunnel add ipip_tunnel mode ipip local 172.31.183.57 remote 172.31.183.58 ttl 32
ip link set ipip_tunnel up
sysctl -w net.ipv4.conf.all.rp_filter=0
sysctl -w net.ipv4.conf.ipip_tunnel.rp_filter=0
ip addr add 172.31.183.59/32 dev ipip_tunnel
ip route add 172.31.183.60 dev ipip_tunnel
# client
ip tunnel add ipip_tunnel mode ipip local 172.31.183.58 remote 172.31.183.57 ttl 32
ip link set ipip_tunnel up
sysctl -w net.ipv4.conf.all.rp_filter=0
sysctl -w net.ipv4.conf.ipip_tunnel.rp_filter=0
ip addr add 172.31.183.60/32 dev ipip_tunnel
ip route add 172.31.183.59 dev ipip_tunnel
clean
# server
ip route del 172.31.183.60 dev ipip_tunnel
ip addr del 172.31.183.59/32 dev ipip_tunnel
ip link del ipip_tunnel
# client
ip route del 172.31.183.59 dev ipip_tunnel
ip addr del 172.31.183.60/32 dev ipip_tunnel
ip link del ipip_tunnel
client侧观测
ipSet隧道
# server
ip link add name sit_tunnel type sit local 172.31.183.57 remote 172.31.183.58 mode any
ip link set sit_tunnel up
sysctl -w net.ipv4.conf.all.rp_filter=0
sysctl -w net.ipv4.conf.sit_tunnel.rp_filter=0
ip addr add 172.31.183.59/32 dev sit_tunnel
ip route add 172.31.183.60 dev sit_tunnel
# client
ip link add name sit_tunnel type sit local 172.31.183.58 remote 172.31.183.57 mode any
ip link set sit_tunnel up
sysctl -w net.ipv4.conf.all.rp_filter=0
sysctl -w net.ipv4.conf.sit_tunnel.rp_filter=0
ip addr add 172.31.183.60/32 dev sit_tunnel
ip route add 172.31.183.59 dev sit_tunnel
clean
# server
ip route del 172.31.183.60 dev sit_tunnel
ip addr del 172.31.183.59/32 dev sit_tunnel
ip link del sit_tunnel
# client
ip route del 172.31.183.59 dev sit_tunnel
ip addr del 172.31.183.60/32 dev sit_tunnel
ip link del sit_tunnel
client侧观测
UDP隧道
# server
ip link add vxlan_tunnel type vxlan id 42 dstport 4789 local 172.31.183.57 remote 172.31.183.58 dev eth0
ip link set vxlan_tunnel up
sysctl -w net.ipv4.conf.all.rp_filter=0
sysctl -w net.ipv4.conf.vxlan_tunnel.rp_filter=0
ip addr add 172.31.183.59/32 dev vxlan_tunnel
ip route add 172.31.183.60 dev vxlan_tunnel
# client
ip link add vxlan_tunnel type vxlan id 42 dstport 4789 local 172.31.183.58 remote 172.31.183.57 dev eth0
ip link set vxlan_tunnel up
sysctl -w net.ipv4.conf.all.rp_filter=0
sysctl -w net.ipv4.conf.vxlan_tunnel.rp_filter=0
ip addr add 172.31.183.60/32 dev vxlan_tunnel
ip route add 172.31.183.59 dev vxlan_tunnel
clean
# server
ip route del 172.31.183.60 dev vxlan_tunnel
ip addr del 172.31.183.59/32 dev vxlan_tunnel
ip link del vxlan_tunnel
# client
ip route del 172.31.183.59 dev vxlan_tunnel
ip addr del 172.31.183.60/32 dev vxlan_tunnel
ip link del vxlan_tunnel
client侧观测
【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)