You've already forked net-research
chore: small improvements
This commit is contained in:
@@ -30,16 +30,42 @@ write_files:
|
||||
append: true
|
||||
encoding: b64
|
||||
content: ${hosts_file}
|
||||
- path: /etc/networkd-dispatcher/routable.d/10-disable-offloading
|
||||
owner: root:root
|
||||
permissions: "0755"
|
||||
content: |
|
||||
#!/bin/bash
|
||||
for IF in $(networkctl list --no-legend | awk '/ routable /{print $2}'); do
|
||||
/usr/sbin/ethtool -K "$IF" \
|
||||
rx off tx off sg off tso off ufo off gso off gro off lro off \
|
||||
ntuple off rxhash off rx-gro-hw off || true
|
||||
done
|
||||
- path: /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
|
||||
permissions: '0644'
|
||||
content: |
|
||||
network: {config: disabled}
|
||||
- path: /etc/netplan/01-static.yaml
|
||||
owner: root:root
|
||||
permissions: '0644'
|
||||
content: |
|
||||
network:
|
||||
version: 2
|
||||
renderer: networkd
|
||||
ethernets:
|
||||
enp1s0:
|
||||
dhcp4: false
|
||||
addresses: [${ip}]
|
||||
gateway4: ${gateway}
|
||||
nameservers:
|
||||
addresses: ${nameservers}
|
||||
|
||||
modules:
|
||||
- tcp_bbr
|
||||
- sch_netem
|
||||
|
||||
runcmd:
|
||||
- |
|
||||
cat << 'EOF' > /etc/network/if-up.d/disable-offload
|
||||
#!/bin/bash
|
||||
ethtool -K enp1s0 rx off tx off sg off tso off ufo off gso off gro off lro off ntuple off rxhash off rx-gro-hw off
|
||||
EOF
|
||||
chmod +x /etc/network/if-up.d/disable-offload
|
||||
- /etc/network/if-up.d/disable-offload
|
||||
- modprobe tcp_bbr sch_netem
|
||||
- rm -f /etc/netplan/50-cloud-init.yaml
|
||||
- netplan generate && netplan apply
|
||||
|
||||
- |
|
||||
wget https://github.com/stunnel/static-curl/releases/download/8.14.1/curl-linux-x86_64-dev-8.14.1.tar.xz \
|
||||
|
||||
Reference in New Issue
Block a user