
내 Ubuntu 18 시스템에는 2포트 Intel NIC가 있고, 사용하지 않는 마더보드에도 NIC가 있습니다. 원래는 서로 다른 IP를 사용하여 두 개의 NIC를 설정하고 싶었지만 실패했고 이제는 동일한 NIC 포트에 두 개의 IP가 있지만 두 개의 인터페이스(eth0 및 p4p1)에 있습니다. 종종 컴퓨터를 재부팅할 때 Ubuntu는 NIC(연결되지 않음)의 다른 이더넷 포트로 전환하고 내 구성에서 어디가 잘못되었는지 파악할 수 없습니다. 이거 보시고 해결하신 분 계신가요? 궁극적으로 나는 두 개의 IP를 분리하고 각각 자체 이더넷 포트를 갖고 싶습니다. 소프트웨어 인터페이스를 하드웨어 포트에 할당하는 방법을 알 수 없습니다. 로그와 구성을 제공하겠습니다. 필요한 것이 무엇인지 알려주세요. 감사해요.
# lshw -C network
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:01:00.0
logical name: p4p1
version: 06
serial: 10:bf:48:40:ba:c3
size: 1Gbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168e-3_0.0.4 03/27/12 ip=192.168.0.120 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
resources: irq:35 ioport:e000(size=256) memory:fd004000-fd004fff memory:fd000000-fd003fff
*-network:0
description: Ethernet interface
product: 82571EB/82571GB Gigabit Ethernet Controller D0/D1 (copper applications)
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:04:00.0
logical name: eth0
version: 06
serial: 00:15:17:ba:ee:72
size: 1Gbit/s
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list rom 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=5.11-2 ip=192.168.0.150 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:37 memory:fe9a0000-fe9bffff memory:fe980000-fe99ffff ioport:d020(size=32) memory:fe960000-fe97ffff
*-network:1 DISABLED
description: Ethernet interface
product: 82571EB/82571GB Gigabit Ethernet Controller D0/D1 (copper applications)
vendor: Intel Corporation
physical id: 0.1
bus info: pci@0000:04:00.1
logical name: eth1
version: 06
serial: 00:15:17:ba:ee:73
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k firmware=5.11-2 latency=0 link=no multicast=yes port=twisted pair
resources: irq:38 memory:fe940000-fe95ffff memory:fe920000-fe93ffff ioport:d000(size=32) memory:fe900000-fe91ffff
# 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).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto p4p1
iface p4p1 inet static
address 192.168.0.120
netmask 255.255.255.0
gateway 192.168.0.1
network 192.168.0.0
dns-nameservers 192.168.0.170 192.168.0.171
auto eth0
iface eth0 inet static
address 192.168.0.150
netmask 255.255.255.0
gateway 192.168.0.1
network 192.168.0.0
dns-nameservers 192.168.0.170 192.168.0.171
iface eth1 inet manual
#auto eth1
#iface eth1 inet static
# address 192.168.0.151
# netmask 255.255.255.0
# gateway 192.168.0.1
# network 192.168.0.0
# dns-nameservers 192.168.0.170 192.168.0.171
No yaml files.
답변1
다음을 시도해 보세요...
# 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).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto p4p1
iface p4p1 inet static
hwaddress 10:bf:48:40:ba:c3
metric 100
address 192.168.0.120
netmask 255.255.255.0
gateway 192.168.0.1
network 192.168.0.0
dns-nameservers 192.168.0.170 192.168.0.171
auto eth0
iface eth0 inet static
hwaddress 00:15:17:ba:ee:72
metric 200
address 192.168.0.150
netmask 255.255.255.0
gateway 192.168.0.1
network 192.168.0.0
dns-nameservers 192.168.0.170 192.168.0.171
auto eth1
iface eth1 inet static
hwaddress 00:15:17:ba:ee:73
metric 300
address 192.168.0.151
netmask 255.255.255.0
gateway 192.168.0.1
network 192.168.0.0
dns-nameservers 192.168.0.170 192.168.0.171