Linux網路設定

網路卡預設設定儲存區
/etc/udev/rules.d/70-persistent-net.rules
如下面所示
有找到兩張網卡分別命名為eth0 eth1
# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:03.0 (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:61:13:49", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:08.0 (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:07:ca:54", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

網卡設定值
/etc/network/interfaces
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
# automatically added when upgrading
auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
# automatically added when upgrading
auto eth0
iface eth0 inet static
        address 211.21.247.10
        netmask 255.255.255.248
        network 211.23.247.8
        broadcast 211.23.247.15

auto eth1
iface eth1 dhcp

0 意見:

張貼留言