IPv4가 손실되고 DHCP가 계속 IP를 요청함

IPv4가 손실되고 DHCP가 계속 IP를 요청함

Ubuntu 16.04를 사용하면 거의 매일 Avahi 데몬에 의해 삭제된 IPv4 주소가 손실됩니다.

또한 DHCP가 주소를 다시 요청하기 위해 임대 시간이 완료될 때까지 "대기"하지 않고 몇 분마다 요청을 수행하지만 어떤 패턴도 볼 수 없습니다.

그런 다음 Avahi Daemon은 갑자기 오류 없이 인터페이스 eth0에서 IP를 철회합니다.

Aug 11 11:55:14 jorgee avahi-daemon[2734]: Withdrawing address record for 192.168.2.94 on eth0.

이것은 시스템 로그의 마지막 부분입니다.

Aug 11 11:43:11 jorgee systemd[1]: Started Automatically refresh installed snaps.
Aug 11 11:43:11 jorgee systemd[1]: snapd.refresh.timer: Adding 4h 33min 5.892892s random time.
Aug 11 11:43:11 jorgee systemd[1]: snapd.refresh.timer: Adding 48min 39.947211s random time.
Aug 11 11:43:13 jorgee dbus[2803]: [system] Reloaded configuration
Aug 11 11:44:04 jorgee dhclient[12492]: DHCPREQUEST of 192.168.2.94 on eth0 to 192.168.2.254 port 67 (xid=0x188018e6)
Aug 11 11:44:04 jorgee dhclient[12492]: DHCPACK of 192.168.2.94 from 192.168.2.254
Aug 11 11:44:04 jorgee root: /etc/dhcp/dhclient-enter-hooks.d/avahi-autoipd returned non-zero exit status 1
Aug 11 11:44:05 jorgee dhclient[12492]: bound to 192.168.2.94 -- renewal in 800 seconds.
Aug 11 11:46:15 jorgee dhclient[12636]: DHCPREQUEST of 192.168.2.94 on eth0 to 192.168.2.254 port 67 (xid=0x51cc22fc)
Aug 11 11:46:15 jorgee dhclient[12636]: DHCPACK of 192.168.2.94 from 192.168.2.254
Aug 11 11:46:15 jorgee root: /etc/dhcp/dhclient-enter-hooks.d/avahi-autoipd returned non-zero exit status 1
Aug 11 11:46:15 jorgee dhclient[12636]: bound to 192.168.2.94 -- renewal in 758 seconds.
Aug 11 11:47:33 jorgee dhclient[12712]: DHCPREQUEST of 192.168.2.94 on eth0 to 192.168.2.254 port 67 (xid=0x6788bfce)
Aug 11 11:47:33 jorgee dhclient[12712]: DHCPACK of 192.168.2.94 from 192.168.2.254
Aug 11 11:47:33 jorgee root: /etc/dhcp/dhclient-enter-hooks.d/avahi-autoipd returned non-zero exit status 1
Aug 11 11:47:33 jorgee dhclient[12712]: bound to 192.168.2.94 -- renewal in 746 seconds.
Aug 11 11:49:08 jorgee systemd-timesyncd[12709]: Timed out waiting for reply from 192.168.2.254:123 (192.168.2.254).
Aug 11 11:52:42 jorgee dhclient[14855]: DHCPREQUEST of 192.168.2.94 on eth0 to 192.168.2.254 port 67 (xid=0x41dfce98)
Aug 11 11:52:42 jorgee dhclient[14855]: DHCPACK of 192.168.2.94 from 192.168.2.254
Aug 11 11:52:42 jorgee dhclient[14855]: bound to 192.168.2.94 -- renewal in 703 seconds.
Aug 11 11:54:16 jorgee dhclient[12677]: DHCPREQUEST of 192.168.2.94 on eth0 to 192.168.2.254 port 67 (xid=0x7456460e)
Aug 11 11:54:16 jorgee dhclient[12677]: DHCPACK of 192.168.2.94 from 192.168.2.254
Aug 11 11:54:16 jorgee root: /etc/dhcp/dhclient-enter-hooks.d/avahi-autoipd returned non-zero exit status 1
Aug 11 11:54:17 jorgee dhclient[12677]: bound to 192.168.2.94 -- renewal in 770 seconds.
Aug 11 11:55:14 jorgee avahi-daemon[2734]: Withdrawing address record for 192.168.2.94 on eth0.
Aug 11 11:55:14 jorgee avahi-daemon[2734]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.2.94.
Aug 11 11:55:14 jorgee avahi-daemon[2734]: Interface eth0.IPv4 no longer relevant for mDNS.
Aug 11 11:55:16 jorgee whoopsie[2731]: [11:55:16] Cannot reach: https://daisy.ubuntu.com
Aug 11 11:55:16 jorgee whoopsie[2731]: [11:55:16] offline
Aug 11 11:56:14 jorgee sudo: pam_ecryptfs: pam_sm_authenticate: /home/jorgee is already mounted
Aug 11 11:56:34 jorgee dhclient[11554]: DHCPREQUEST of 192.168.2.94 on eth0 to 192.168.2.254 port 67 (xid=0x2894ec32)
Aug 11 11:56:34 jorgee dhclient[11554]: send_packet: Network is unreachable
Aug 11 11:56:34 jorgee dhclient[11554]: send_packet: please consult README file regarding broadcast address.
Aug 11 11:56:34 jorgee dhclient[11554]: dhclient.c:2386: Failed to send 300 byte long packet over fallback interface.
Aug 11 11:56:37 jorgee dhclient[11554]: DHCPREQUEST of 192.168.2.94 on eth0 to 192.168.2.254 port 67 (xid=0x2894ec32)
Aug 11 11:56:37 jorgee dhclient[11554]: send_packet: Network is unreachable
Aug 11 11:56:37 jorgee dhclient[11554]: send_packet: please consult README file regarding broadcast address.
Aug 11 11:56:37 jorgee dhclient[11554]: dhclient.c:2386: Failed to send 300 byte long packet over fallback interface.
Aug 11 11:56:42 jorgee dhclient[11554]: DHCPREQUEST of 192.168.2.94 on eth0 to 192.168.2.254 port 67 (xid=0x2894ec32)
Aug 11 11:56:42 jorgee dhclient[11554]: send_packet: Network is unreachable
Aug 11 11:56:42 jorgee dhclient[11554]: send_packet: please consult README file regarding broadcast address.
Aug 11 11:56:42 jorgee dhclient[11554]: dhclient.c:2386: Failed to send 300 byte long packet over fallback interface.

편집하다:

바인딩 9 구성:

acl lan {
    127.0.0.0/8;
    192.168.0.0/16;
};

view "lan-dmz" {
        match-clients { key lan-dmz; !key wan; lan; };
        server 192.168.1.24 { keys lan-dmz; };
        allow-recursion {lan; };
        recursion yes;
        zone "aaaa.edu.ar" {
        type master;
        file "/var/cache/bind/aaaa.edu.ar.lan-dmz";
};
        zone "aaaa.local" IN {
        type forward;
        forwarders { 192.168.1.123; 192.168.1.124;};
        };

};
view "wan" {
        match-clients { key wan; !key lan-dmz; !lan; any; };
        server 192.168.1.24 { keys wan; };
        recursion no;
        zone "aaaa.edu.ar" {
        type master;
    allow-transfer { 192.168.1.24; 170.210.44.2; 170.210.44.3; };
        allow-query { any; };
        also-notify { 192.168.1.24; 170.210.44.2; 170.210.44.3; };
        file "/var/cache/bind/aaaa.edu.ar.wan";


};
};

답변1

avhi-autoipd 설치 스크립트가 실패한 것 같습니다. 그러면 다음과 같은 로그가 생성됩니다.

Aug 11 11:54:16 jorgee root: /etc/dhcp/dhclient-enter-hooks.d/avahi-autoipd returned non-zero exit status 1

이는 연결 실패로 간주될 수 있으며 시간 초과 후 DHCP가 다시 시도하게 될 수 있습니다. 명령이 /usr/sbin/avahi-autoipd -k $interface실패했을 가능성이 높습니다. 적절한 값을 사용하여 이 명령을 실행해 보십시오 $interface. 패키지를 다시 설치하거나 지워야 할 수도 있습니다 avahi-autoipd.

관련 정보