linux 設置網卡地址

# The loopback network interface

auto lo eth0 eth1
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
    address 18.11.9.130
    netmask 255.255.255.224
    #network 172.16.0.0
    #broadcast 172.16.255.255
    gateway 18.11.9.225

allow-hotplug eth1
iface eth1 inet static
    address 192.168.1.10
    netmask 255.255.255.0
    network 192.168.1.0

    dns-nameservers 61.177.7.1

    #dns-search localhost vim

-------------------------------------------------------------------- oop

vim /etc/network/interfaces  編輯網卡文件 rest

/etc/init.d/networking restart  重啓網卡 server

相關文章
相關標籤/搜索