내 설정은 다음과 같습니다.
$ ping 192.168.1.251 PING 192.168.1.251 (192.168.1.251) 56(84) bytes of data. From 192.168.1.22 icmp_seq=1 Destination Host Unreachable From 192.168.1.22 icmp_seq=2 Destination Host Unreachable From 192.168.1.22 icmp_seq=3 Destination Host Unreachable ^C --- 192.168.1.251 ping statistics --- 5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 80ms pipe 4
Windows 10과 Debian 10에서 모두 동일한 방식으로 구성된 인터페이스입니다. 즉, 둘 다 동일한 고정 IP 주소 (192.168.1.22)와 동일한 서브넷 마스크 (255.255.255.0)를 갖습니다.
ARP는 장치 (IP 주소 192.168.1.251)도 거기에 있음을 알 수 있습니다.
$ sudo arp-scan 192.168.1.251 Interface: enp0s25, datalink type: EN10MB (Ethernet) Starting arp-scan 1.9.5 with 1 hosts (https://github.com/royhills/arp-scan) 0 packets received by filter, 0 packets dropped by kernel Ending arp-scan 1.9.5: 1 hosts scanned in 2.538 seconds (0.39 hosts/sec). 0 responded
케이블을 연결하고 분리하면 실제로 장치를 ping하려는이 인터페이스에서 "연결된 링크"가 "예"및 "아니요"로 바뀝니다.
$ sudo ethtool enp0s25 Settings for enp0s25: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Supported FEC modes: Not reported Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Speed: 1000Mb/s Duplex: Full Port: Twisted Pair PHYAD: 1 Transceiver: internal Auto-negotiation: on MDI-X: on (auto) Supports Wake-on: pumbg Wake-on: g Current message level: 0x00000007 (7) drv probe link Link detected: yes
질문 : 왜 데비안 10에서 장치를 핑할 수 없지만 Windows 10에서 번거롭지 않게 할 수있는 이유는 무엇입니까? 저는 3 ~ 4 시간 넘게이 문제를 해결하기 위해 제가 생각할 수있는 모든 가능한 순열과 조합을 테스트하고 있습니다.
추신 Windows 10 호스트에서 실행되는 Linux VM (정보가 추가되는 경우)에서 장치를 성공적으로 ping 할 수도 있지만 베어 메탈에 직접 설치된 Linux에서는 ping 할 수 없습니다.
업데이트 / 편집 :
의견의 피드백에 따라 다음 테스트를 수행했습니다.
$ traceroute -UL 192.168.1.251
traceroute to 192.168.1.251 (192.168.1.251), 30 hops max, 60 byte packets
1 192.168.1.252 (192.168.1.252) 3070.385 ms !H 3070.330 ms !H 3070.314 ms !H
결국 성공했습니다. ~ 3 초가 걸렸습니다.
$ sudo route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
link-local 0.0.0.0 255.255.0.0 U 1000 0 0 enp0s25
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
192.168.1.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s25
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
$ ping -r 192.168.1.251
PING 192.168.1.251 (192.168.1.251) 56(84) bytes of data.
From 192.168.1.252 icmp_seq=1 Destination Host Unreachable
From 192.168.1.252 icmp_seq=2 Destination Host Unreachable
From 192.168.1.252 icmp_seq=3 Destination Host Unreachable
From 192.168.1.252 icmp_seq=4 Destination Host Unreachable
From 192.168.1.252 icmp_seq=5 Destination Host Unreachable
From 192.168.1.252 icmp_seq=6 Destination Host Unreachable
^C
--- 192.168.1.251 ping statistics ---
7 packets transmitted, 0 received, +6 errors, 100% packet loss, time 147ms
pipe 4
그런 다음 랩톱을 Windows 10으로 재부팅하고 Ubuntu 18.04 LTS Virtual Machine을 시작했습니다.
# ping 192.168.1.251
Pinging 192.168.1.251 with 32 bytes of data:
Reply from 192.168.1.251: bytes=32 time<1ms TTL=255
Reply from 192.168.1.251: bytes=32 time<1ms TTL=255
Reply from 192.168.1.251: bytes=32 time<1ms TTL=255
Reply from 192.168.1.251: bytes=32 time<1ms TTL=255
Ping statistics for 192.168.1.251:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
$ ping 192.168.1.251
PING 192.168.1.251 (192.168.1.251) 56(84) bytes of data.
64 bytes from 192.168.1.251: icmp_seq=1 ttl=255 time=0.459 ms
64 bytes from 192.168.1.251: icmp_seq=2 ttl=255 time=0.561 ms
64 bytes from 192.168.1.251: icmp_seq=3 ttl=255 time=0.385 ms
64 bytes from 192.168.1.251: icmp_seq=4 ttl=255 time=0.428 ms
^C
--- 192.168.1.251 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3066ms
rtt min/avg/max/mdev = 0.385/0.458/0.561/0.066 ms
$ traceroute -UL 192.168.1.251
traceroute to 192.168.1.251 (192.168.1.251), 30 hops max, 60 byte packets
1 192.168.1.251 (192.168.1.251) 0.594 ms !P 0.527 ms !P 0.497 ms !P
$ sudo route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.3.0 0.0.0.0 255.255.255.0 U 0 0 0 lxcbr0
link-local 0.0.0.0 255.255.0.0 U 1000 0 0 virbr0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 enp0s9
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
마지막으로, 랩톱에 설치된 데비안 10에 특별한 방화벽이나 iptable 규칙을 설정하지 않았습니다. 이것은 물론 필요에 따라 다른 사용자 패키지가 설치된 표준 / 기본 설치입니다 (특별한 네트워크 구성은 수행되지 않음).
편집 2 : 그래서, 최근 댓글 이후, 나는 이것 과 이것 에 따라 "방화벽"또는 iptable 규칙을 비활성화하여 핑을 차단할 수 있습니다 (실제로 핑은 증상 중 하나 일뿐입니다. PC 측에 서버가 있습니다. 내 원래 문제였던 네트워크 장치와도 통신 할 수 없습니다.)
내가 시도한 내용은 다음과 같습니다. 결과는 다음과 같습니다.
ufw
하거나 nftables
또는 firewalld
설치되지 않습니다. 또한 host.deny
파일 이 없습니다 .$ sudo ufw status
sudo: ufw: command not found
$ sudo nftables
sudo: nftables: command not found
$ cat /etc/host.deny
cat: /etc/host.deny: No such file or directory
$ sudo systemctl disable firewalld
Failed to disable unit: Unit file firewalld.service does not exist.
$ sudo firewall-cmd --state
sudo: firewall-cmd: command not found
iptables
살펴 보겠습니다. iptable에 대한 다음 항목을 모두 찾는 것이 흥미 롭습니다.$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
ACCEPT udp -- anywhere anywhere udp dpt:bootps
ACCEPT tcp -- anywhere anywhere tcp dpt:67
Chain FORWARD (policy DROP)
target prot opt source destination
DOCKER-USER all -- anywhere anywhere
DOCKER-ISOLATION-STAGE-1 all -- anywhere anywhere
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
DOCKER all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere 192.168.122.0/24 ctstate RELATED,ESTABLISHED
ACCEPT all -- 192.168.122.0/24 anywhere
ACCEPT all -- anywhere anywhere
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- anywhere anywhere udp dpt:bootpc
Chain DOCKER (1 references)
target prot opt source destination
Chain DOCKER-ISOLATION-STAGE-1 (1 references)
target prot opt source destination
DOCKER-ISOLATION-STAGE-2 all -- anywhere anywhere
RETURN all -- anywhere anywhere
Chain DOCKER-ISOLATION-STAGE-2 (1 references)
target prot opt source destination
DROP all -- anywhere anywhere
RETURN all -- anywhere anywhere
Chain DOCKER-USER (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
일부 규칙은 Docker 용이고 일부는 일반적입니다. 나는 그 규칙과 설정이 무엇을하는지 모르겠지만, 그것들을 제거하고 모든 컨트롤을 비활성화합시다 (테스트 목적으로-무언가가 작동하는지 확인하기 위해). 이를 달성하기 위해 다음 단계를 수행했습니다 (위에 언급 된 링크 중 하나에서 문자 그대로 복사).
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
이로 인해 iptable
아래와 같이 멋진 구성 이 생겼습니다 .
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ping
여전히 실패하고 traceroute
여전히 ~ 3000 + 밀리 초가 걸립니다.나는 network-manager
데비안 10 의 서비스가 랩톱에 데비안 10의 베어 메탈 설치와 핑 문제가없는 Windows 10에서 실행되는 우분투 18.04 가상 머신 사이의 유일한 차이점이기 때문에 어떻게 든 책임이 있다고 의심하기 시작했습니다. 장치.)
보너스 정보 : Windows 10 위에 Debian 6이 실행되는 또 다른 가상 머신이 있으며 네트워크 장치를 ping 할 수도 있습니다.
편집 3 :
nmap은 호스트를 찾을 수 있습니다.
nmap -Pns 192.168.1.200/32
Starting Nmap 7.70 ( https://nmap.org ) at 2021-01-21 14:42 CET
Nmap scan report for 192.168.1.200
Host is up (0.062s latency).
All 1000 scanned ports on 192.168.1.200 are filtered
Nmap done: 1 IP address (1 host up) scanned in 5.90 seconds
그래서 거의 1 년 동안 이에 대해 후속 조치를 취하지 않은 후 오늘 여러 가지 다른 작업을 시도하고 다른 Linux 배포판 포럼을 샅샅이 뒤져 마침내 여기서 금메달을 쳤습니다 .
다음을 수행 한 후 성공적으로 핑을 수행 할 수있었습니다 (손가락을 엇갈리게 유지하여 그대로 유지되지만 현재 상태가 좋아 보입니다).
에서 여기에 , 나는이 시도.
sudo lshw -C network
그 이더넷 포트에 대해 어떤 하드웨어가 있는지 보여주었습니다.
*-network
description: Ethernet interface
product: Ethernet Connection I217-LM
vendor: Intel Corporation
physical id: 19
bus info: pci@0000:00:19.0
logical name: enp0s25
version: 04
serial: 70:5a:df:b9:a7:47
size: 100Mbit/s
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k duplex=full firmware=0.13-4 ip=192.168.1.34 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s
resources: irq:31 memory:d2100000-d211ffff memory:d213a000-d213afff ioport:6040(size=32)
인텔 에서 최신 드라이버를 다운로드했습니다 .
cp e1000e-3.0.4.tar.gz /usr/local/src/
cd /usr/local/src/
tar xzvf e1000e-3.0.4.tar.gz
rmmod e1000e
apt-get install linux-headers-amd64
cd e1000e-3.0.4/src/
make install
재부팅하고 쾅! 핑과 모든 작업! 때때로 일을 시작하려면 직접해야합니다.
저를이 트랙에 넣은 아이디어는 다른 이더넷 포트 (실제로는 실제 이더넷 포트가 아닙니다. USB 동글이지만 요점은 아닙니다)를 통해 거의 모든 것을 핑하고 수행 할 수 있다는 것입니다. 그 자체로는 아무것도 작동하지 않았습니다 (어떻게 든 traceroute와 nmap이 통과 한 것을 제외하고는 방법을 모르겠습니다).
이 랩탑 (Windows 10 옆)에 데비안을 설치했을 때 3 ~ 4 년 전에 "Fast Boot"가 BIOS에서 활성화되었을 수 있고 이더넷 드라이버가 설치되지 않았을 수도 있습니다. 아마도!
몇 주 후 피드백 / 업데이트 :
몇 주 동안 이것을 관찰 한 후에는 어떤 이유로 든 간헐적으로 만 작동합니다. 작동했지만 작동을 멈췄습니다. 그리고 오늘 다시 작동하기 시작했습니다. 진짜 문제는 다른 곳에있을 수 있습니다. 오늘 제가 다르게 한 한 가지는 네트워크 관리자에서 "자동 연결"을 설정 한 것입니다. 그게 차이를 만들까요?
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다