(1)靜態IP內容以下vim
# vim/etc/network/interfaces服務器
# This file describes the network interfacesavailable on your systemdom
# and how to activate them. For more information, seeinterfaces(5).ide
# The loopback network interfaceoop
auto lospa
iface lo inet loopbackrest
# The primary network interfaceorm
allow-hotplug eth0 //即插即用server
auto eth0 //網卡自啓動排序
iface eth0 inet static
address192.168.0.42
netmask255.255.255.0
gateway192.168.0.1 //內網的無網關是能夠不填寫
(2)dhcp自動獲取
Allow-hotplug eth0
iface eth0 inet dhcp //dhcp獲取IP地址
auto eth0
#/etc/init.d/ networking restart //重啓網卡
#ifconfig eth0 down\up //關閉和開啓eth0網卡 或者 #ifdown eth0 && ifup eth0
# /etc/init.d/networking stop && /etc/init.d/networkingstart //Debian6須要這樣重啓網卡
#vim /etc/hostname //修改計算機名
#vim /etc/hosts //修改hosts解析
#vim /etc/resolv.conf //配置DNS 例如:nameserver 202.106.0.20
(3)一塊網卡編輯多個地址
auto eth0:1
iface eth0:1 inet static
adderss X.X.X.X
netmask X.X.X.X.
(4)編輯:resolv.conf文件
nameserver #定義DNS服務器的IP地址
domain #定義本地域名,可不寫
search #定義域名的搜索列表,可不寫
sortlist #對返回的域名進行排序,可不寫
#cat /etc/resolv.conf的一個示例:
nameserver 202.96.128.86
nameserver 202.96.128.166
(5)修改網卡MAC地址
# vim/etc/network/interfaces
hwaddress ether 00:00:39:9E:58:3C //對應的網卡配置文件中加入新MAC地址
臨時地修改也能夠這樣
ifconfig eth0 down
ifconfig eth0 hw ether XX:XX:XX:XX:XX:XX
ifconfig eth0 up
(6)網卡驅動說明
Debian7系統中沒有DellR410的驅動須要手動安裝驅動,但在DellR420中已經默認識別到驅動。