zoukankan      html  css  js  c++  java
  • wget F5 上的域名很慢问题

    现象,wget 挂在 F5 上的服务域名(绑定VS)返回很慢,卡在解析域名上:

    Resolving abc.my.domain.com...

    1、可以 strace wget http://abc.my.domain.com ,看到哪一步系统调用的时候慢了;

    2、发现 wget --inet4-only http://abc.my.domain.com就很快了

    man wget :


           -4
           --inet4-only
           -6
           --inet6-only
               Force connecting to IPv4 or IPv6 addresses. With --inet4-only or -4, Wget will only connect to IPv4 hosts, ignoring AAAA records in DNS, and
               refusing to connect to IPv6 addresses specified in URLs
    . Conversely, with --inet6-only or -6, Wget will only connect to IPv6 hosts and ignore
               A records and IPv4 addresses.

               Neither options should be needed normally. By default, an IPv6-aware Wget will use the address family specified by the host's DNS record. If
               the DNS responds with both IPv4 and IPv6 addresses, Wget will them in sequence until it finds one it can connect to. (Also see "--prefer-fam-
               ily" option described below.)

               These options can be used to deliberately force the use of IPv4 or IPv6 address families on dual family systems, usually to aid debugging or to
               deal with broken network configuration. Only one of --inet6-only and --inet4-only may be specified at the same time. Neither option is avail-
               able in Wget compiled without IPv6 support.

    3、临时在 /etc/hosts文件里添加了域名指向,也能变快:

    # add for host on f5-bigip
    123.123.123.123           abc.my.domain.com

    wget 也很快了。

    4、关闭服务器ipv6地址(好像没有变快):

    vi /etc/modprobe.conf ← 修改相应配置文件,添加如下行到文尾:
    alias net-pf-10 off
    alias ipv6 off

    reboot

    5、wget挂在F5上服务域名很慢的原因,确实因解析ipv6地址造成:

    在安装有djbdns(带ipv6补丁)的服务器上测试查询ipv6记录:

    [ligb@localhost home]$ dnsip6 www.domain.com (没有挂在F5上)
    ::ffff:123.123.123.135         <--很快返回

    [ligb@localhost home]$ dnsip6 adc.my.domain.com (挂在F5上)
    ::ffff:123.123.123.123         <--返回很慢

    6、F5上修改配置解决问题

    F5 --> Link Controller --> Inbound Wide IPs --> abc.my.domain.com 配置页面 --> Configuration:Advanced 配置下,有一项:

    IPv6 NoError Response ,将其设置为“Enabled”即可。

  • 相关阅读:
    基于curl 的zabbix API调用
    zabbix 安装错误汇总
    Zabbix 命令:zabbix_get
    zabbix主动被动模式说明/区别
    zabbix监控托管主机遇到问题
    centOS7服务管理与启动流程
    CentOS 6和CentOS 7防火墙的关闭
    linux 系统安装配置 zabbix服务(源码安装)
    如何配置这个maven仓库的源http://mvnrepository.com/repos
    Intellij IDEA最全的热键表(default keymap)
  • 原文地址:https://www.cnblogs.com/guarder/p/3472042.html
Copyright © 2011-2022 走看看