{"id":2612,"date":"2025-06-20T09:19:41","date_gmt":"2025-06-20T07:19:41","guid":{"rendered":"http:\/\/clark.tipistrani.it\/?p=2612"},"modified":"2025-08-06T13:07:29","modified_gmt":"2025-08-06T11:07:29","slug":"networking-su-devuan-5-per-ambiente-di-test-con-xen","status":"publish","type":"post","link":"http:\/\/clark.tipistrani.it\/?p=2612","title":{"rendered":"Networking su Devuan 5 per ambiente di test con XEN"},"content":{"rendered":"<p>La parte di networking \u00e8 stata senza dubbio la pi\u00f9 complessa.<br \/>\nl&#8217;inizio \u00e8 stato &#8220;legare&#8221; i mac delle schede di rete al nome eth delle interfacce, il primo passo che deve essere eseguito in sequenza su ambo i nodi \u00e8 installare con apt i pacchetti ifrename bridge-utils ifensalve rispettivamente per creare iftab dove linkare mac a eth, creare le interfacce xenbrx necessarie, creare le interfacce bond necessarie.<br \/>\nLinkare mac a nome interfaccia sarebbe possibile anzi senza condizionale \u00e8 possibile tramite eudev (l&#8217;udev senza systemd) ma \u00e8 una cosa pi\u00f9 complessa che usare iftab.<br \/>\n\/etc\/iftab nel caso in esame \u00e8 un semplice file di testo simile a questo:<br \/>\neth0 \u00a0\u00a0\u00a0mac \u00a0\u00a0\u00a0\u00a000:0a:f7:c0:be:b4<br \/>\neth1 \u00a0\u00a0\u00a0mac \u00a0\u00a0\u00a0\u00a000:0a:f7:c0:be:b5<br \/>\neth2 \u00a0\u00a0\u00a0mac \u00a0\u00a0\u00a0\u00a0b4:45:06:f7:db:86<br \/>\neth3 \u00a0\u00a0\u00a0mac \u00a0\u00a0\u00a0\u00a0b4:45:06:f7:db:87<br \/>\neth4 \u00a0\u00a0\u00a0mac \u00a0\u00a0\u00a0\u00a0a0:36:9f:7c:40:d0<br \/>\neth5 \u00a0\u00a0\u00a0mac \u00a0\u00a0\u00a0\u00a0a0:36:9f:7c:40:d2<br \/>\neth6 \u00a0\u00a0\u00a0mac \u00a0\u00a0\u00a0\u00a0a0:36:9f:7c:39:a8<br \/>\neth7 \u00a0\u00a0\u00a0mac \u00a0\u00a0\u00a0\u00a0a0:36:9f:7c:39:aa<br \/>\nIn questo modo c&#8217;\u00e8 la certezza che le eth mantengano il nome, non mi \u00e8 mai successo che cambiassero nome, ma se hanno messo in piedi una simile situazione vuol dire che il rischi \u00e8 concreto quindi prima di fare danni lo uso.<br \/>\nUna volta definita questa questione modificare il file \/etc\/network\/interfaces in questo modo:<\/p>\n<p># The loopback network interface<br \/>\nauto lo<br \/>\niface lo inet loopback<\/p>\n<p>allow-hotplug eth0<br \/>\niface eth0 inet manual<\/p>\n<p>allow-hotplug eth1<br \/>\niface eth1 inet manual<\/p>\n<p>allow-hotplug eth2<br \/>\niface eth2 inet manual<\/p>\n<p>allow-hotplug eth3<br \/>\niface eth3 inet manual<\/p>\n<p>allow-hotplug eth4<br \/>\niface eth4 inet manual<br \/>\nbond-master bond0<\/p>\n<p>allow-hotplug eth5<br \/>\niface eth5 inet manual<br \/>\nbond-master bond1<\/p>\n<p>allow-hotplug \u00a0eth6<br \/>\niface eth6 inet manual<br \/>\nbond-master bond0<\/p>\n<p>allow-hotplug eth7<br \/>\niface eth7 inet manual<br \/>\nbond-master bond1<\/p>\n<p>### interfaccia di rete LAN<br \/>\nauto xenbr0<br \/>\niface xenbr0 inet static<br \/>\naddress 192.168.2.245<br \/>\nnetmask 255.255.254.0<br \/>\nnetwork 192.168.2.0<br \/>\nbroadcast 192.168.3.255<br \/>\ngateway 192.168.2.241<br \/>\nbridge_ports eth0<br \/>\nbridge_waitport 0<br \/>\nbridge_fd 0<br \/>\nbridge_maxwait 0<br \/>\nbridge_stp off<br \/>\n#### interfaccia firewall virtuali<br \/>\nauto xenbr1<br \/>\niface xenbr1 inet manual<br \/>\nbridge_ports eth1<br \/>\nbridge_waitport 0<br \/>\nbridge_fd 0<br \/>\nbridge_maxwait 0<br \/>\nbridge_stp off<\/p>\n<p>#### interfaccia DMZ<br \/>\nauto xenbr2<br \/>\niface xenbr2 inet static<br \/>\naddress 192.168.200.245<br \/>\nnetmask 255.255.255.0<br \/>\nnetwork 192.168.200.0<br \/>\nbroadcast 192.168.200.255<br \/>\nbridge_ports eth2<br \/>\nbridge_waitports 0<br \/>\nbridge_fd 0<br \/>\nbridge_maxwait 0<br \/>\nbridge_stp off<\/p>\n<p>auto bond0<br \/>\niface bond0 inet static<br \/>\naddress 172.18.19.245<br \/>\nnetmask 255.255.255.0<br \/>\nnetwork 172.18.19.0<br \/>\nbroadcast 172.18.19.255<br \/>\nbond-slaves eth4 eth6<br \/>\nbond-mode 0<br \/>\nbond-miimon 100<br \/>\nbond-updelay 200<br \/>\nbond-downdelay 200<br \/>\nmtu 9000<br \/>\n#<br \/>\nauto bond1<br \/>\niface bond1 inet static<br \/>\naddress 172.19.19.245<br \/>\nnetmask 255.255.255.0<br \/>\nnetwork 172.19.19.0<br \/>\nbroadcast 172.19.19.255<br \/>\nbond-slaves eth5 eth7<br \/>\nbond-mode 0<br \/>\nbond-miimon 100<br \/>\nbond-updelay 200<br \/>\nbond-downdelay 200<br \/>\nmtu 9000<\/p>\n<p>Chiaramente sull&#8217;altro nodo gli IP sono uguali a meno dell&#8217;ultimo ottetto che \u00e8 .246<\/p>\n<p>in \/etc\/sysctl.d\/ creiamo il file 10G.conf che contiene:<br \/>\nnet.ipv4.tcp_congestion_control=cubic<br \/>\nnet.core.somaxconn = 1000<br \/>\nnet.core.netdev_max_backlog = 300000<br \/>\nnet.core.rmem_max = 16777216<br \/>\nnet.core.wmem_max = 16777216<br \/>\nnet.ipv4.tcp_max_syn_backlog = 8096<br \/>\nnet.ipv4.tcp_slow_start_after_idle = 0<br \/>\nnet.ipv4.tcp_tw_reuse = 1<br \/>\nnet.ipv4.ip_local_port_range = 10240 65535<br \/>\nnet.ipv4.tcp_rmem = 4096 87380 16777216<br \/>\nnet.ipv4.tcp_wmem = 4096 65536 16777216<br \/>\nnet.ipv4.tcp_mtu_probing=1<br \/>\nnet.ipv4.route.flush = 1<br \/>\nnet.ipv4.tcp_timestamps=0<br \/>\nnet.ipv4.tcp_fin_timeout=15<br \/>\nnet.ipv4.tcp_sack=0<br \/>\nnet.ipv4.tcp_moderate_rcvbuf=1<br \/>\nvm.vfs_cache_pressure=50<\/p>\n<p>modprobe tcp_cubic e inserire anche in \/etc\/modules per caricarlo ai successivi riavvii.<\/p>\n<p>Rieditare \/etc\/rc.local e aggiungere:<br \/>\n### eth 10gb tuning<br \/>\nifconfig eth4 txqueuelen 300000<br \/>\nifconfig eth4 mtu 9000<br \/>\nethtool -K eth4 rx on<br \/>\nethtool -K eth4 tx on<br \/>\nethtool -K eth4 sg on<br \/>\nethtool -K eth4 tso on<br \/>\nethtool -K eth4 gso on<br \/>\nethtool -K eth4 gro off<br \/>\n###<br \/>\nifconfig eth5 txqueuelen 300000<br \/>\nifconfig eth5 mtu 9000<br \/>\nethtool -K eth5 rx on<br \/>\nethtool -K eth5 tx on<br \/>\nethtool -K eth5 sg on<br \/>\nethtool -K eth5 tso on<br \/>\nethtool -K eth5 gso on<br \/>\nethtool -K eth5 gro off<br \/>\n####<br \/>\nifconfig eth6 txqueuelen 300000<br \/>\nifconfig eth6 mtu 9000<br \/>\nethtool -K eth6 rx on<br \/>\nethtool -K eth6 tx on<br \/>\nethtool -K eth6 sg on<br \/>\nethtool -K eth6 tso on<br \/>\nethtool -K eth6 gso on<br \/>\nethtool -K eth6 gro off<br \/>\n###<br \/>\nifconfig eth7 txqueuelen 300000<br \/>\nifconfig eth7 mtu 9000<br \/>\nethtool -K eth7 rx on<br \/>\nethtool -K eth7 tx on<br \/>\nethtool -K eth7 sg on<br \/>\nethtool -K eth7 tso on<br \/>\nethtool -K eth7 gso on<br \/>\nethtool -K eth7 gro off<br \/>\nLa parte di networking \u00e8 configurata<\/p>\n<p>fonte <a href=\"https:\/\/doc.tranquil.it\/xenserver_xcp-ng\/xcpng-config\/install-xcpng-drbd.html\">https:\/\/doc.tranquil.it\/xenserver_xcp-ng\/xcpng-config\/install-xcpng-drbd.html<\/a><\/p>\n<p><a href=\"http:\/\/clark.tipistrani.it\/?p=2605\">back<\/a>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <a href=\"http:\/\/clark.tipistrani.it\/?p=2624\">home<\/a>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <a href=\"http:\/\/clark.tipistrani.it\/?p=2617\">next<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>La parte di networking \u00e8 stata senza dubbio la pi\u00f9 complessa. l&#8217;inizio \u00e8 stato &#8220;legare&#8221; i mac delle schede di rete al nome eth delle interfacce, il primo passo che deve essere eseguito in sequenza su ambo i nodi \u00e8 installare con apt i pacchetti ifrename bridge-utils ifensalve rispettivamente per creare iftab dove linkare mac [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,14,7,6],"tags":[303,302,86],"class_list":["post-2612","post","type-post","status-publish","format-standard","hentry","category-linux","category-networking","category-sistemi-operativi","category-work","tag-bond","tag-bridge","tag-xen"],"_links":{"self":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/2612","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2612"}],"version-history":[{"count":7,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/2612\/revisions"}],"predecessor-version":[{"id":2674,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/2612\/revisions\/2674"}],"wp:attachment":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2612"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2612"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2612"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}