나는 dhclient
다음과 같이 시작했습니다:
syslog:
...
Dec 27 03:26:03 HOST dhclient[13412]: DHCPDISCOVER on enp4s0 to 255.255.255.255 port 67 interval 3 (xid=0x859ef640)
Dec 27 03:26:03 HOST dhclient[13435]: DHCPREQUEST of 192.168.1.199 on enp4s0 to 255.255.255.255 port 67 (xid=0x40f69e85)
Dec 27 03:26:03 HOST dhclient[13435]: DHCPOFFER of 192.168.1.199 from 192.168.1.1
Dec 27 03:26:03 HOST dhclient[13435]: DHCPACK of 192.168.1.199 from 192.168.1.1
Dec 27 03:26:03 HOST dhclient[13435]: bound to 192.168.1.199 -- renewal in 1045201 seconds.
작동하는 것처럼 보이지만 ifconfig
주소가 표시되지 않습니다.
ifconfig enp4s0
enp4s0 Link encap:Ethernet HWaddr 00:08:a2:48:48:48
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::208:a2ff:fe0c:f648/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1189 errors:0 dropped:0 overruns:0 frame:0
TX packets:23 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:135707 (135.7 KB) TX bytes:2264 (2.2 KB)
Memory:dfd00000-dfd1ffff
- 해결 방법이 있나요?
- 현재 테스트에서는 192.168.1.199가 이라고 대답
ping
하지만 때로는 그렇지 않은 경우도 있습니다.
- 편집하다 -
cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto enp4s0
iface enp4s0 inet manual
dhclient
수동으로 시작 해요
- 편집하다 -
ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
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
7: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:08:a2:48:48:48 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 brd 192.168.1.255 scope global enp4s0
valid_lft forever preferred_lft forever
inet 192.168.1.199/24 brd 192.168.1.255 scope global secondary enp4s0
valid_lft forever preferred_lft forever
inet6 fe80::208:a2ff:fe0c:f648/64 scope link
valid_lft forever preferred_lft forever
답변1
@Johan Myréen 덕분에 다음 명령을 통해 깨달았습니다 ip addr
.
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
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
7: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:08:a2:48:48:48 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 brd 192.168.1.255 scope global enp4s0
valid_lft forever preferred_lft forever
inet 192.168.1.199/24 brd 192.168.1.255 scope global secondary enp4s0
valid_lft forever preferred_lft forever
inet6 fe80::208:a2ff:fe0c:f648/64 scope link
valid_lft forever preferred_lft forever
어떤 이유로 이 인터페이스 enp4s0
에는기초적인그리고중학교주소, dhcp
IP가 위치한 곳중학교알 수 없는 이유로 주소가 변경되었습니다.
이유는 모르겠지만 이 문제를 해결하는 데 도움이 되는 것은 전화하는 것입니다.
ip addr flush dev enp4s0
어떤 새로 고침 인터페이스 - 그럼 나는청소 시작할당될 때DHCP 주소