한 인터페이스는 모든 IP 주소를 사용하고 다른 인터페이스는 아무것도 사용하지 않습니다.

한 인터페이스는 모든 IP 주소를 사용하고 다른 인터페이스는 아무것도 사용하지 않습니다.

첫 번째 사용자 정의 커널을 구축했는데 몇 가지 문제가 있습니다(이 다른 게시물을 참조하세요).

/etc/network/interfaces컴퓨터의 각 물리적 인터페이스에 하나의 IP 주소를 구성했습니다 . 명령은 ip a각 인터페이스의 IP 주소를 표시합니다.

debian@debian:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> 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: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 64:70:02:11:67:a4 brd ff:ff:ff:ff:ff:ff
    inet 192.168.5.1/24 brd 192.168.5.255 scope global enp7s0
       valid_lft forever preferred_lft forever
    inet6 fe80::6670:2ff:fe11:67a4/64 scope link
       valid_lft forever preferred_lft forever
3: enp0s25: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 00:1c:c0:94:71:d1 brd ff:ff:ff:ff:ff:ff
    inet 192.168.5.2/24 brd 192.168.5.255 scope global enp0s25
       valid_lft forever preferred_lft forever
    inet6 fe80::21c:c0ff:fe94:71d1/64 scope link
       valid_lft forever preferred_lft forever
debian@debian:~$
debian@debian:~$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug enp7s0
#iface enp7s0 inet dhcp
iface enp7s0 inet static
address 192.168.5.1/24


allow-hotplug enp0s25
#iface enp0s25 inet dhcp
iface enp0s25 inet static
address 192.168.5.2/24


debian@debian:~$

enp0s25 = intel interface enp7s0 = realtek interface

문제는 다음과 같습니다.

  • 이더넷 케이블을 인텔 인터페이스(드라이버 e1000e)에 연결하면 두 IP 주소 모두에 ping을 보낼 수 있습니다(다른 인터페이스가 다운된 경우에도).

  • 이더넷 케이블을 realtek tp-link 인터페이스(드라이버 r8169)에 연결하면 IP 주소(관련 IP 포함)에 대해 ping을 보낼 수 없습니다. 케이블이 연결되면 인터페이스가 올라갑니다.

조금 검색했는데 나와 비슷한 문제를 찾을 수 없습니다. Linux에서 표시하는 내용과 인터페이스에서 실제로 발생하는 내용 사이에 차이가 있는 이유를 알고 계십니까?

편집: 이 문제는 사용자 정의 커널과 관련이 없으며 기본 Debian 4.19 커널 버전에도 나타납니다. 그러나 그들은 PfSense를 사용하여 매력처럼 일하고 있었습니다.

편집 2: 현재 경로 테이블(네트워킹 서비스가 다시 시작되고 realtek 인터페이스가 인텔 인터페이스보다 먼저 가동된 후 변경될 수 있음)

debian@debian:~$ ip route
192.168.5.0/24 dev enp0s25 proto kernel scope link src 192.168.5.2
192.168.5.0/24 dev enp7s0 proto kernel scope link src 192.168.5.1
debian@debian:~$

관련 정보