Debian系統學習筆記(2):網卡配置信息

2、網卡配置信息

1靜態IP內容如下

# vim/etc/network/interfaces

# This file describes the network interfacesavailable on your system

# and how to activate them. For more information, seeinterfaces(5).

 

# The loopback network interface

auto lo

iface lo inet loopback

 

# The primary network interface

allow-hotplug eth0         //即插即用

auto eth0                  //網卡自啓動

iface eth0 inet static

         address192.168.0.42

         netmask255.255.255.0

         gateway192.168.0.1     //內網的無網關是可以不填寫

2dhcp自動獲取

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

 iface  eth01 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中已經默認識別到驅動。


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章