{"id":4637,"date":"2015-08-31T08:26:52","date_gmt":"2015-08-31T06:26:52","guid":{"rendered":"https:\/\/www.bdjl.de\/localhost\/?p=4637"},"modified":"2015-09-01T08:39:21","modified_gmt":"2015-09-01T06:39:21","slug":"bonding","status":"publish","type":"post","link":"https:\/\/www.bdjl.de\/localhost\/?p=4637","title":{"rendered":"Bonding"},"content":{"rendered":"<div id=\"attachment_4642\" style=\"width: 650px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.bdjl.de\/localhost\/wp-content\/uploads\/2015\/09\/IMG_20150805_162906-cut.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4642\" class=\"wp-image-4642 size-medium\" src=\"https:\/\/www.bdjl.de\/localhost\/wp-content\/uploads\/2015\/09\/IMG_20150805_162906-cut-640x396.jpg\" alt=\"IMG_20150805_162906-cut\" width=\"640\" height=\"396\" srcset=\"https:\/\/www.bdjl.de\/localhost\/wp-content\/uploads\/2015\/09\/IMG_20150805_162906-cut-640x396.jpg 640w, https:\/\/www.bdjl.de\/localhost\/wp-content\/uploads\/2015\/09\/IMG_20150805_162906-cut-1024x633.jpg 1024w, https:\/\/www.bdjl.de\/localhost\/wp-content\/uploads\/2015\/09\/IMG_20150805_162906-cut-624x386.jpg 624w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><p id=\"caption-attachment-4642\" class=\"wp-caption-text\">Zwischenstadium beim Einrichten. Ein Upllink zu BelWue und der erste 4-er-Bond\/Trunk zum Server.<\/p><\/div>\n<p>Mit vier Netzwerkkabeln vom Server zum Core-Switch und vom dem aus weiter mit jeweils 4 Kabeln zum n\u00e4chsten &#8230;<\/p>\n<pre class=\"lang:default decode:true \">apt-get install ifenslave-2.6 net-tools ethtool<\/pre>\n<p>Die<em> \/etc\/network\/interfaces<\/em> dazu<\/p>\n<pre class=\"lang:default decode:true \"># The loopback network interface\r\nauto lo\r\niface lo inet loopback\r\n\r\n# Erst alle echten Interfaces hochziehen\r\nauto eth0\r\niface eth0 inet manual\r\n        bond-master bond0\r\n\r\nauto eth1\r\niface eth1 inet manual\r\n        bond-master bond0\r\n\r\nauto eth2\r\niface eth2 inet manual\r\n        bond-master bond0\r\n\r\nauto eth3\r\niface eth3 inet manual\r\n        bond-master bond0\r\n\r\n# Trunk0 \/ Bond0\r\nauto bond0\r\niface bond0 inet manual\r\n        bond-slaves eth0 eth1 eth2 eth3\r\n        bond-mode 0\r\n\r\n# VLAN   FARBE   INHALT\r\n# 100    BLACK   KABEL BW \/ Fritz BOX\r\n# 101    GREY    Infrastruktur (Switches etc.)\r\n# 102    RED     BELWUE Netze\r\n# 20     BROWN   VWNetz\r\n# 40     GREEN   paedagogisches Netz\r\n# 41     BLUE    WLAN public (p\u00e4d. Netz)\r\n# 50     PINK    WLAN lehrer\r\n\r\n# The LINK to BELWUE\r\nauto bond0.102\r\niface bond0.102 inet static\r\n        address xxx.xx.xx.194\r\n        netmask 255.255.255.240\r\n        network xxx.xx.xx.192\r\n        broadcast xxx.xx.xx.207\r\n        gateway xxx.xx.xx.193\r\n        # dns-* options are implemented by the resolvconf package, if installed\r\n        dns-nameservers xxx.xx.xx.4\r\n        dns-search domain.tld\r\n        # iptables vorbereiten - evtl. unnoetig\r\n        up sysctl -w net.ipv4.ip_forward=1\r\n        up modprobe ip_tables iptable_nat\r\n        # Portweiterleitung von K9393 auf B443 fuer OMD\r\n        up iptables -t nat -A PREROUTING -p tcp -i bond0.102 --dport 9393 -j DNAT --to-destination 192.168.0.2:443\r\n        up iptables -A FORWARD -p tcp -d 192.168.0.2 --dport 9393 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT\r\n\r\n\r\nauto bond0.101\r\niface bond0.101 inet static\r\n        vlan-raw-device bond0\r\n        address 192.168.0.1\r\n        netmask 255.255.255.0\r\n        network 192.168.0.0\r\n        broadcast 192.168.0.255\r\n        dns-nameservers 127.0.0.1\r\n        dns-search grey\r\n        # add NAT \/ Masquerade for grey network\r\n        up sysctl -w net.ipv4.ip_forward=1\r\n        up modprobe ip_tables iptable_nat\r\n        up iptables -A FORWARD -o bond0.102 -i bond0.101 -s 192.168.0.0\/24 -m conntrack --ctstate NEW -j ACCEPT\r\n        up iptables -A FORWARD -o bond0.102 -i bond0.101 -s 192.168.0.0\/24 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT\r\n        up iptables -t nat -A POSTROUTING -o bond0.102  -j MASQUERADE\r\n\r\nauto bond0.40\r\niface bond0.40 inet manual\r\n        vlan-raw-device bond0\r\n        up ifconfig $IFACE up\r\n        down ifconfig $IFACE down\r\n\r\nauto bond0.41\r\niface bond0.41 inet manual\r\n        vlan-raw-device bond0\r\n        up ifconfig $IFACE up\r\n        down ifconfig $IFACE down\r\n\r\nauto bond0.50\r\niface bond0.50 inet manual\r\n        vlan-raw-device bond0\r\n        up ifconfig $IFACE up\r\n        down ifconfig $IFACE down\r\n\r\nauto bond0.20\r\niface bond0.20 inet manual\r\n        vlan-raw-device bond0\r\n        up ifconfig $IFACE up\r\n        down ifconfig $IFACE down<\/pre>\n<p>Im Switch die Trunks einrichten und die VLANs den Trunks zuweisen. Reboot. Tut.<\/p>\n<div id=\"attachment_4646\" style=\"width: 650px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.bdjl.de\/localhost\/wp-content\/uploads\/2015\/08\/IMG_20150810_165043-2.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4646\" class=\"wp-image-4646 size-medium\" src=\"https:\/\/www.bdjl.de\/localhost\/wp-content\/uploads\/2015\/08\/IMG_20150810_165043-2-640x906.jpg\" alt=\"IMG_20150810_165043-2\" width=\"640\" height=\"906\" srcset=\"https:\/\/www.bdjl.de\/localhost\/wp-content\/uploads\/2015\/08\/IMG_20150810_165043-2-640x906.jpg 640w, https:\/\/www.bdjl.de\/localhost\/wp-content\/uploads\/2015\/08\/IMG_20150810_165043-2-724x1024.jpg 724w, https:\/\/www.bdjl.de\/localhost\/wp-content\/uploads\/2015\/08\/IMG_20150810_165043-2-624x883.jpg 624w, https:\/\/www.bdjl.de\/localhost\/wp-content\/uploads\/2015\/08\/IMG_20150810_165043-2.jpg 1832w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><p id=\"caption-attachment-4646\" class=\"wp-caption-text\">Die zentralen Switches sind nun verkabelt und auch der Neubau h\u00e4ngt mit immerhin 2 Glasfasterleitungen an der Strippe.<\/p><\/div>\n<p>Zuerst hatten wir <a href=\"https:\/\/wiki.ubuntuusers.de\/Netzwerkkarten_b%C3%BCndeln#Bonding-Modi\" target=\"_blank\">Mode 4<\/a> eingerichtet. Die Geschwindigkeit war aber entt\u00e4uschend. Mit Round Robin \/ Mode 0 geht jetzt aber heftig mehr durch die Leitungen, wenn auch nicht das 4-fache. Au\u00dferdem: Einzelne R\u00e4ume bleiben etwas magerer angebunden &#8211; z.B. der Neubau, der nun mit &#8222;nur&#8220; 2 Glasfaserleitungen am Core-Switch h\u00e4ngt.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mit vier Netzwerkkabeln vom Server zum Core-Switch und vom dem aus weiter mit jeweils 4 Kabeln zum n\u00e4chsten &#8230; apt-get install ifenslave-2.6 net-tools ethtool Die \/etc\/network\/interfaces dazu # The loopback network interface auto lo iface lo inet loopback # Erst alle echten Interfaces hochziehen auto eth0 iface eth0 inet manual bond-master bond0 auto eth1 iface [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,10],"tags":[531,208,532,530,472],"class_list":["post-4637","post","type-post","status-publish","format-standard","hentry","category-linux","category-schule","tag-bonding","tag-netzwerk","tag-switch","tag-trunks","tag-vlan"],"_links":{"self":[{"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=\/wp\/v2\/posts\/4637","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4637"}],"version-history":[{"count":9,"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=\/wp\/v2\/posts\/4637\/revisions"}],"predecessor-version":[{"id":4648,"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=\/wp\/v2\/posts\/4637\/revisions\/4648"}],"wp:attachment":[{"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4637"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4637"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4637"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}