Proxmox 配置NAT ipv4 dhcp 和 独立IPv6配置成功了,但是网络卡顿

79次阅读

共计 4668 个字符,预计需要花费 12 分钟才能阅读完成。

内容最后由 古藤君 于 2023-2-7 21:01 编辑 /etc/sysctl.confnet.ipv4.tcp_congestion_control=bbrnet.core.default_qdisc=fqnet.ipv4.conf.all.rp_filter=1net.ipv4.icmp_echo_ignore_broadcasts=1net.ipv4.conf.default.forwarding=1net.ipv4.conf.default.proxy_arp = 0net.ipv4.ip_forward=1kernel.sysrq = 1net.ipv4.conf.default.send_redirects = 1net.ipv4.conf.all.send_redirects = 0net.ipv6.conf.all.accept_dad = 1net.ipv6.conf.all.accept_ra = 0net.ipv6.conf.all.accept_redirects = 1net.ipv6.conf.all.accept_source_route = 0net.ipv6.conf.all.autoconf = 0net.ipv6.conf.all.disable_ipv6 = 0net.ipv6.conf.all.forwarding= 1 复制代码 /etc/dhcp/dhcpd.confsubnet 192.168.18.0 netmask 255.255.255.0 {    range 192.168.18.100 192.168.18.150;    #dns 3    option domain-name-servers 8.8.8.8, 8.8.4.4;    option subnet-mask 255.255.255.0;    option routers 192.168.18.1;    option broadcast-address 192.168.18.255;    default-lease-time 1111;    max-lease-time 500020;}ddns-update-style none; 复制代码 /etc/default/isc-dhcp-serverINTERFACESv4="vmbr1" 复制代码 /etc/network/interfacesauto loiface lo inet loopbackauto eth0iface eth0 inet manualiface eth1 inet manualauto vmbr0iface vmbr0 inet static        address 123.123.123.123/25        gateway 123.123.123.1        bridge-ports eth0        bridge-stp off        bridge-fd 0        dns-nameservers 8.8.8.8 8.8.4.4        hwaddress 0c:c4:7a:71:42:ee        bridge-sftp offiface vmbr0 inet6 static        address 2400:2222:630:80e6::1/64        gateway 2400:2222:630:80e6:ff:ff:ff:ffauto vmbr1iface vmbr1 inet static        address 192.168.18.1/24        bridge-ports none        bridge-stp off        bridge-fd 0        post-up echo 1 > /proc/sys/net/ipv4/ip_forward        post-up iptables -t nat -A POSTROUTING -s \’192.168.18.0/24\’ -o vmbr0 -j MASQUERADE        post-down iptables -t nat -D POSTROUTING -s \’192.168.18.0/24\’ -o vmbr0 -j MASQUERADE 复制代码配置完以上,发现 VPS 网络都通,【ping(v4 和 v6)五次 花费很久】root@hostname:~# ping ipv6.google.comPING ipv6.google.com(hkg07s38-in-x0e.1e100.net (2404:2222:4005:812::200e)) 56 data bytes64 bytes from hkg07s38-in-x0e.1e100.net (2404:2222:4005:812::200e): icmp_seq=1 ttl=121 time=2.18 ms64 bytes from hkg07s38-in-x0e.1e100.net (2404:2222:4005:812::200e): icmp_seq=2 ttl=121 time=2.15 ms64 bytes from hkg07s38-in-x0e.1e100.net (2404:2222:4005:812::200e): icmp_seq=3 ttl=121 time=2.20 ms^C64 bytes from 2404:6800:4005:812::200e: icmp_seq=4 ttl=121 time=2.18 ms— ipv6.google.com ping statistics —4 packets transmitted, 4 received, 0% packet loss, time 15049ms 复制代码 root@hostname:~# ping baidu.comPING baidu.com (39.156.66.10) 56(84) bytes of data.64 bytes from 39.156.66.10 (39.156.66.10): icmp_seq=1 ttl=44 time=42.2 ms64 bytes from 39.156.66.10 (39.156.66.10): icmp_seq=2 ttl=44 time=42.3 ms64 bytes from 39.156.66.10 (39.156.66.10): icmp_seq=3 ttl=44 time=42.3 ms64 bytes from 39.156.66.10 (39.156.66.10): icmp_seq=4 ttl=44 time=42.2 ms^C64 bytes from 39.156.66.10: icmp_seq=5 ttl=44 time=42.2 ms— baidu.com ping statistics —5 packets transmitted, 5 received, 0% packet loss, time 20206msrtt min/avg/max/mdev = 42.168/42.249/42.349/0.061 ms 复制代码没上 dhcp ipv4 的时候 IPv6 网络访问正常,现在趴了别人的贴子,发现出现了以上问题请问我配置哪里有问题呀?古藤君 2023-02-07 21:01 2root@hostname:~# ping 192.168.18.1PING 192.168.18.1 (192.168.18.1) 56(84) bytes of data.64 bytes from 192.168.18.1: icmp_seq=1 ttl=64 time=0.127 ms64 bytes from 192.168.18.1: icmp_seq=2 ttl=64 time=0.126 ms64 bytes from 192.168.18.1: icmp_seq=3 ttl=64 time=0.118 ms64 bytes from 192.168.18.1: icmp_seq=4 ttl=64 time=0.171 ms^C— 192.168.18.1 ping statistics —4 packets transmitted, 4 received, 0% packet loss, time 3004msrtt min/avg/max/mdev = 0.118/0.135/0.171/0.020 ms 复制代码 ping 独服 反应倒是挺迅速的? 古藤君 2023-02-07 21:04 3root@hostname:~# ip a1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00    inet 127.0.0.1/8 scope host lo       valid_lft forever preferred_lft forever    inet6 ::1/128 scope host       valid_lft forever preferred_lft forever2: ens18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000    link/ether aa:b0:dc:dd:43:af brd ff:ff:ff:ff:ff:ff    altname enp0s18    inet6 2400:2222:630:80e6:a8b0:dcff:fedd:43af/64 scope global dynamic mngtmpaddr       valid_lft 2591481sec preferred_lft 604281sec    inet6 fe80::a8b0:dcff:fedd:43af/64 scope link       valid_lft forever preferred_lft forever3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000    link/ether 4e:da:8b:d0:ae:a5 brd ff:ff:ff:ff:ff:ff    altname enp0s19    altname ens19    inet 192.168.18.102/24 brd 192.168.18.255 scope global dynamic eth1       valid_lft 690sec preferred_lft 690sec    inet6 fe80::4cda:8bff:fed0:aea5/64 scope link       valid_lft forever preferred_lft forever 复制代码 supervps 2023-02-07 21:10 4https://lw.al/archives/%e4%ba%91%e6%9c%8d%e5%8a%a1%e5%99%a8%e8%a3%85pve%e4%b8%80%e4%ba%9b%e6%ad%a5%e9%aa%a4%e8%ae%b0%e5%bd%95/ 参考参考 我现在就一直用 pve 古藤君 2023-02-07 21:12 5supervps 发表于 2023-2-7 21:10https://lw.al/archives/%e4%ba%91%e6%9c%8d%e5%8a%a1%e5%99%a8%e8%a3%85pve%e4%b8%80%e4%ba%9b%e6%ad%a5%e … 好的 我去看看。。。我怀疑我这个要么转发 要么 dhcp 出问题了

正文完
 0