Advertisement
teknoraver

macvlan vs veth

May 15th, 2017
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.48 KB | None | 0 0
  1.  
  2. # PS1='\h($(ip netns identify))\$ '
  3. matteo-desktop()# speedtest --simple
  4. Ping: 4.627 ms
  5. Download: 671.62 Mbit/s
  6. Upload: 187.43 Mbit/s
  7. matteo-desktop()# speedtest --simple
  8. Ping: 4.548 ms
  9. Download: 688.31 Mbit/s
  10. Upload: 187.31 Mbit/s
  11. matteo-desktop()# speedtest --simple
  12. Ping: 3.885 ms
  13. Download: 640.42 Mbit/s
  14. Upload: 175.78 Mbit/s
  15. matteo-desktop()# ping -q -c100 -i.1 192.168.85.1
  16. PING 192.168.85.1 (192.168.85.1) 56(84) bytes of data.
  17.  
  18. --- 192.168.85.1 ping statistics ---
  19. 100 packets transmitted, 100 received, 0% packet loss, time 10871ms
  20. rtt min/avg/max/mdev = 0.261/0.466/0.562/0.078 ms
  21.  
  22.  
  23. [VETH]
  24.  
  25. matteo-desktop()# ip link add veth0 type veth peer name veth1
  26. matteo-desktop()# brctl addif br0 veth0
  27. matteo-desktop()# ip netns add veth
  28. matteo-desktop()# ip link set veth1 netns veth
  29. matteo-desktop()# ip netns exec veth /bin/bash
  30.  
  31. matteo-desktop(veth)# ifconfig veth1 192.168.85.101
  32. matteo-desktop(veth)# ip ro add default via 192.168.85.1
  33.  
  34. matteo-desktop(veth)# speedtest --simple
  35. Ping: 4.067 ms
  36. Download: 489.23 Mbit/s
  37. Upload: 187.48 Mbit/s
  38. matteo-desktop(veth)# speedtest --simple
  39. Ping: 4.709 ms
  40. Download: 462.48 Mbit/s
  41. Upload: 179.38 Mbit/s
  42. matteo-desktop(veth)# speedtest --simple
  43. Ping: 4.768 ms
  44. Download: 494.56 Mbit/s
  45. Upload: 182.91 Mbit/s
  46.  
  47. matteo-desktop(veth)# ping -q -c100 -i.1 192.168.85.1
  48. PING 192.168.85.1 (192.168.85.1) 56(84) bytes of data.
  49.  
  50. --- 192.168.85.1 ping statistics ---
  51. 100 packets transmitted, 100 received, 0% packet loss, time 10882ms
  52. rtt min/avg/max/mdev = 0.253/0.484/0.575/0.059 ms
  53.  
  54.  
  55.  
  56.  
  57.  
  58. [MACVLAN]
  59.  
  60.  
  61. matteo-desktop()# ip link add link eth0 mac0 type macvlan
  62. matteo-desktop()# ip link set mac0 netns macvlan
  63. matteo-desktop()# ip netns exec macvlan /bin/bash
  64.  
  65. matteo-desktop(macvlan)# ifconfig mac0 192.168.85.102
  66. matteo-desktop(macvlan)# ip ro add default gw 192.168.85.1
  67. matteo-desktop(macvlan)# ip ro add default via 192.168.85.1
  68.  
  69. matteo-desktop(macvlan)# speedtest --simple
  70. Ping: 5.04 ms
  71. Download: 653.70 Mbit/s
  72. Upload: 183.12 Mbit/s
  73. matteo-desktop(macvlan)# speedtest --simple
  74. Ping: 4.607 ms
  75. Download: 666.71 Mbit/s
  76. Upload: 183.12 Mbit/s
  77. matteo-desktop(macvlan)# speedtest --simple
  78. Ping: 4.692 ms
  79. Download: 700.53 Mbit/s
  80. Upload: 175.26 Mbit/s
  81.  
  82. matteo-desktop(macvlan)# ping -q -c100 -i.1 192.168.85.1
  83. PING 192.168.85.1 (192.168.85.1) 56(84) bytes of data.
  84.  
  85. --- 192.168.85.1 ping statistics ---
  86. 100 packets transmitted, 100 received, 0% packet loss, time 10871ms
  87. rtt min/avg/max/mdev = 0.284/0.481/0.522/0.056 ms
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement