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

查看 99|回复 4
作者:古藤君   
   
/etc/sysctl.conf
[ol]net.ipv4.tcp_congestion_control=bbr
net.core.default_qdisc=fq
net.ipv4.conf.all.rp_filter=1
net.ipv4.icmp_echo_ignore_broadcasts=1
net.ipv4.conf.default.forwarding=1
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.ip_forward=1
kernel.sysrq = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
net.ipv6.conf.all.accept_dad = 1
net.ipv6.conf.all.accept_ra = 0
net.ipv6.conf.all.accept_redirects = 1
net.ipv6.conf.all.accept_source_route = 0
net.ipv6.conf.all.autoconf = 0
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.all.forwarding=1[/ol]复制代码
/etc/dhcp/dhcpd.conf
[ol]subnet 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;[/ol]复制代码
/etc/default/isc-dhcp-server
[ol]
INTERFACESv4="vmbr1"
[/ol]复制代码
/etc/network/interfaces
[ol]
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
iface eth1 inet manual
auto vmbr0
iface 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 off
iface vmbr0 inet6 static
        address 2400:2222:630:80e6::1/64
        gateway 2400:2222:630:80e6:ff:ff:ff:ff
auto vmbr1
iface 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
[/ol]复制代码
配置完以上,发现小鸡网络都通,【 ping(v4和v6)五次  花费很久】
[ol][email protected]:~# ping ipv6.google.com
PING ipv6.google.com(hkg07s38-in-x0e.1e100.net (2404:2222:4005:812::200e)) 56 data bytes
64 bytes from hkg07s38-in-x0e.1e100.net (2404:2222:4005:812::200e): icmp_seq=1 ttl=121 time=2.18 ms
64 bytes from hkg07s38-in-x0e.1e100.net (2404:2222:4005:812::200e): icmp_seq=2 ttl=121 time=2.15 ms
64 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[/ol]复制代码
[ol][email protected]:~# ping baidu.com
PING 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 ms
64 bytes from 39.156.66.10 (39.156.66.10): icmp_seq=2 ttl=44 time=42.3 ms
64 bytes from 39.156.66.10 (39.156.66.10): icmp_seq=3 ttl=44 time=42.3 ms
64 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 20206ms
rtt min/avg/max/mdev = 42.168/42.249/42.349/0.061 ms[/ol]复制代码
没上dhcp ipv4的时候ipv6网络访问正常,现在趴了别人的贴子,发现出现了以上问题
请问我配置哪里有问题呀?

代码, 网络, 发现

古藤君
OP
  
[ol][email protected]:~# ping 192.168.18.1
PING 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 ms
64 bytes from 192.168.18.1: icmp_seq=2 ttl=64 time=0.126 ms
64 bytes from 192.168.18.1: icmp_seq=3 ttl=64 time=0.118 ms
64 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 3004ms
rtt min/avg/max/mdev = 0.118/0.135/0.171/0.020 ms[/ol]复制代码
ping母鸡 反应倒是挺迅速的
古藤君
OP
  
[email protected]:~# ip a
[ol]
1: lo:  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 forever
2: ens18:
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 forever
3: eth1:
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[/ol]复制代码
supervps   
https://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
古藤君
OP
  

supervps 发表于 2023-2-7 21:10
https://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出问题了
您需要登录后才可以回帖 登录 | 立即注册

返回顶部