當前位置:首頁 » 幣種行情 » eth0down

eth0down

發布時間: 2022-05-23 21:55:30

Ⅰ 如何查看linux系統的網路介面

方法/步驟

1、進入linux,使用「 cat /etc/services 」命令,可以查看所有服務默認的埠列表信息。

Ⅱ 如何通過命令將網卡eth0的狀態改為down

eth0是指你的一塊網卡或者第一塊網卡,down停止的意思 ifconfig是列出網路信息的意思這個命令是 禁用etho網卡 的意思

Ⅲ linux 從DHCP重新獲取IP地址的命令是什麼

可用指令如下:

1、servicenetworkrestart:重啟服務

2、ifconfigeth0down;ifconfigeth0up:對網卡進行操作

3、sudo dhclient -r//release ip:釋放IP

4、sudo dhclient//:獲取IP

(3)eth0down擴展閱讀:

linux常用命令及技巧

1、date :print or set the system date and time

2、 stty -a: 可以查看或者列印控制字元(Ctrl-C, Ctrl-D, Ctrl-Z等)

3、passwd: print or set the system date and time (用passwd -h查看)

4、logout, login: 登錄shell的登錄和注銷命令

5、pwd: print working directory

6、more, less, head tail: 顯示或部分顯示文件內容.

7、lp/lpstat/cancel, lpr/lpq/lprm: 列印文件.

8、更改文件許可權: chmod u+x..

9、刪除非空目錄:rm -fr dir

10、拷貝目錄: cp -R dir

11、fg jobid :可以將一個後台進程放到前台。

Ⅳ Linux中ifconfig命令作用有哪些

linux中ifconfig命令屬於網路配置命令

ifconfig命令被用於配置和顯示Linux內核中網路介面的網路參數。用ifconfig命令配置的網卡信息,在網卡重啟後機器重啟後,配置就不存在。要想將上述的配置信息永遠的存的電腦里,那就要修改網卡的配置文件了。

語法
ifconfig(參數)

參數
add<地址>:設置網路設備IPv6的ip地址;
del<地址>:刪除網路設備IPv6的IP地址;
down:關閉指定的網路設備;
<hw<網路設備類型><硬體地址>:設置網路設備的類型與硬體地址;
io_addr<I/O地址>:設置網路設備的I/O地址;
irq<IRQ地址>:設置網路設備的IRQ;
media<網路媒介類型>:設置網路設備的媒介類型;
mem_start<內存地址>:設置網路設備在主內存所佔用的起始地址;
metric<數目>:指定在計算數據包的轉送次數時,所要加上的數目;
mtu<位元組>:設置網路設備的MTU;
netmask<子網掩碼>:設置網路設備的子網掩碼;
tunnel<地址>:建立IPv4與IPv6之間的隧道通信地址;
up:啟動指定的網路設備;
-broadcast<地址>:將要送往指定地址的數據包當成廣播數據包來處理;
-pointopoint<地址>:與指定地址的網路設備建立直接連線,此模式具有保密功能;
-promisc:關閉或啟動指定網路設備的promiscuous模式;
IP地址:指定網路設備的IP地址;
網路設備:指定網路設備的名稱。

使用功能示例

啟動關閉指定網卡:
ifconfig eth0 up
ifconfig eth0 down
ifconfig eth0 up為啟動網卡eth0,ifconfig eth0 down為關閉網卡eth0。ssh登陸linux伺服器操作要小心,關閉了就不能開啟了,除非你有多網卡。

為網卡配置和刪除IPv6地址:
ifconfig eth0 add 33ffe:3240:800:1005::2/64 #為網卡eth0配置IPv6地址
ifconfig eth0 del 33ffe:3240:800:1005::2/64 #為網卡eth0刪除IPv6地址

用ifconfig修改MAC地址:
ifconfig eth0 hw ether 00:AA:BB:CC:dd:EE

配置IP地址:
[root@localhost ~]# ifconfig eth0 192.168.2.10
[root@localhost ~]# ifconfig eth0 192.168.2.10 netmask 255.255.255.0
[root@localhost ~]# ifconfig eth0 192.168.2.10 netmask 255.255.255.0 broadcast 192.168.2.255

啟用和關閉arp協議:
ifconfig eth0 arp #開啟網卡eth0 的arp協議
ifconfig eth0 -arp #關閉網卡eth0 的arp協議

設置最大傳輸單元:
ifconfig eth0 mtu 1500 #設置能通過的最大數據包大小為 1500 bytes

Ⅳ linux 測試主機是否有可能未全速運行的網路介面

linux一般使用ifconfig命令修改linux主機的ip、網關或子網掩碼。
1.命令格式:
ifconfig [網路設備] [參數]
2.命令功能:
ifconfig 命令用來查看和配置網路設備。當網路環境發生改變時可通過此命令對網路進行相應的配置。
3.命令參數:
up 啟動指定網路設備/網卡。
down 關閉指定網路設備/網卡。該參數可以有效地阻止通過指定介面的IP信息流,如果想永久地關閉一個介面,我們還需要從核心路由表中將該介面的路由信息全部刪除。
arp 設置指定網卡是否支持ARP協議。
-promisc 設置是否支持網卡的promiscuous模式,如果選擇此參數,網卡將接收網路中發給它所有的數據包
-allmulti 設置是否支持多播模式,如果選擇此參數,網卡將接收網路中所有的多播數據包
-a 顯示全部介面信息
-s 顯示摘要信息(類似於 netstat -i)
add 給指定網卡配置IPv6地址
del 刪除指定網卡的IPv6地址
配置網卡最大的傳輸單元
mtu 設置網卡的最大傳輸單元 (bytes)
netmask 設置網卡的子網掩碼。掩碼可以是有前綴0x的32位十六進制數,也可以是用點分開的4個十進制數。如果不打算將網路分成子網,可以不管這一選項;如果要使用子網,那麼請記住,網路中每一個系統必須有相同子網掩碼。
tunel 建立隧道
dstaddr 設定一個遠端地址,建立點對點通信
-broadcast 為指定網卡設置廣播協議
-pointtopoint 為網卡設置點對點通訊協議
multicast 為網卡設置組播標志
address 為網卡設置IPv4地址
txqueuelen 為網卡設置傳輸列隊的長度
4.使用實例:
實例1:顯示網路設備信息(激活狀態的)
命令:
ifconfig
輸出:
[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:56:BF:26:20
inet addr:192.168.120.204 Bcast:192.168.120.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8700857 errors:0 dropped:0 overruns:0 frame:0
TX packets:31533 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:596390239 (568.7 MiB) TX bytes:2886956 (2.7 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:68 errors:0 dropped:0 overruns:0 frame:0
TX packets:68 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2856 (2.7 KiB) TX bytes:2856 (2.7 KiB)

說明:
eth0 表示第一塊網卡, 其中 HWaddr 表示網卡的物理地址,可以看到目前這個網卡的物理地址(MAC地址)是 00:50:56:BF:26:20
inet addr 用來表示網卡的IP地址,此網卡的 IP地址是 192.168.120.204,廣播地址, Bcast:192.168.120.255,掩碼地址Mask:255.255.255.0
lo 是表示主機的回壞地址,這個一般是用來測試一個網路程序,但又不想讓區域網或外網的用戶能夠查看,只能在此台主機上運行和查看所用的網路介面。比如把 HTTPD伺服器的指定到回壞地址,在瀏覽器輸入 127.0.0.1 就能看到你所架WEB網站了。但只是您能看得到,區域網的其它主機或用戶無從知道。
第一行:連接類型:Ethernet(乙太網)HWaddr(硬體mac地址)
第二行:網卡的IP地址、子網、掩碼
第三行:UP(代表網卡開啟狀態)RUNNING(代表網卡的網線被接上)MULTICAST(支持組播)MTU:1500(最大傳輸單元):1500位元組
第四、五行:接收、發送數據包情況統計
第七行:接收、發送數據位元組數統計信息。
實例2:啟動關閉指定網卡
命令:
ifconfig eth0 up
ifconfig eth0 down
輸出:
說明:
ifconfig eth0 up 為啟動網卡eth0 ;ifconfig eth0 down 為關閉網卡eth0。ssh登陸linux伺服器操作要小心,關閉了就不能開啟了,除非你有多網卡。
實例3:為網卡配置和刪除IPv6地址
命令:
ifconfig eth0 add 33ffe:3240:800:1005::2/64
ifconfig eth0 del 33ffe:3240:800:1005::2/64
輸出:
說明:
ifconfig eth0 add 33ffe:3240:800:1005::2/64 為網卡eth0配置IPv6地址;
ifconfig eth0 add 33ffe:3240:800:1005::2/64 為網卡eth0刪除IPv6地址;
練習的時候,ssh登陸linux伺服器操作要小心,關閉了就不能開啟了,除非你有多網卡。
實例4:用ifconfig修改MAC地址
命令:
ifconfig eth0 hw ether 00:AA:BB:CC:DD:EE
輸出:
[root@localhost ~]# ifconfig eth0 down //關閉網卡
[root@localhost ~]# ifconfig eth0 hw ether 00:AA:BB:CC:DD:EE //修改MAC地址
[root@localhost ~]# ifconfig eth0 up //啟動網卡
[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:AA:BB:CC:DD:EE
inet addr:192.168.120.204 Bcast:192.168.120.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8700857 errors:0 dropped:0 overruns:0 frame:0
TX packets:31533 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:596390239 (568.7 MiB) TX bytes:2886956 (2.7 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:68 errors:0 dropped:0 overruns:0 frame:0
TX packets:68 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2856 (2.7 KiB) TX bytes:2856 (2.7 KiB)
[root@localhost ~]# ifconfig eth0 hw ether 00:50:56:BF:26:20 //關閉網卡並修改MAC地址
[root@localhost ~]# ifconfig eth0 up //啟動網卡
[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:56:BF:26:20
inet addr:192.168.120.204 Bcast:192.168.120.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8700857 errors:0 dropped:0 overruns:0 frame:0
TX packets:31533 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:596390239 (568.7 MiB) TX bytes:2886956 (2.7 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:68 errors:0 dropped:0 overruns:0 frame:0
TX packets:68 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2856 (2.7 KiB) TX bytes:2856 (2.7 KiB)
說明:

實例5:配置IP地址
命令:
輸出:
[root@localhost ~]# ifconfig eth0 192.168.120.56
[root@localhost ~]# ifconfig eth0 192.168.120.56 netmask 255.255.255.0
[root@localhost ~]# ifconfig eth0 192.168.120.56 netmask 255.255.255.0 broadcast 192.168.120.255

說明:
ifconfig eth0 192.168.120.56
給eth0網卡配置IP地:192.168.120.56
ifconfig eth0 192.168.120.56 netmask 255.255.255.0
給eth0網卡配置IP地址:192.168.120.56 ,並加上子掩碼:255.255.255.0
ifconfig eth0 192.168.120.56 netmask 255.255.255.0 broadcast 192.168.120.255
/給eth0網卡配置IP地址:192.168.120.56,加上子掩碼:255.255.255.0,加上個廣播地址: 192.168.120.255

實例6:啟用和關閉ARP協議
命令:
ifconfig eth0 arp
ifconfig eth0 -arp
輸出:
[root@localhost ~]# ifconfig eth0 arp
[root@localhost ~]# ifconfig eth0 -arp

說明:
ifconfig eth0 arp 開啟網卡eth0 的arp協議;
ifconfig eth0 -arp 關閉網卡eth0 的arp協議;

實例7:設置最大傳輸單元
命令:
ifconfig eth0 mtu 1500
輸出:
[root@localhost ~]# ifconfig eth0 mtu 1480
[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:56:BF:26:1F
inet addr:192.168.120.203 Bcast:192.168.120.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1480 Metric:1
RX packets:8712395 errors:0 dropped:0 overruns:0 frame:0
TX packets:36631 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:597062089 (569.4 MiB) TX bytes:2643973 (2.5 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:9973 errors:0 dropped:0 overruns:0 frame:0
TX packets:9973 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:518096 (505.9 KiB) TX bytes:518096 (505.9 KiB)
[root@localhost ~]# ifconfig eth0 mtu 1500
[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:56:BF:26:1F
inet addr:192.168.120.203 Bcast:192.168.120.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8712548 errors:0 dropped:0 overruns:0 frame:0
TX packets:36685 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:597072333 (569.4 MiB) TX bytes:2650581 (2.5 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:9973 errors:0 dropped:0 overruns:0 frame:0
TX packets:9973 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:518096 (505.9 KiB) TX bytes:518096 (505.9 KiB)
[root@localhost ~]#

說明:
設置能通過的最大數據包大小為 1500 bytes

備註:用ifconfig命令配置的網卡信息,在網卡重啟後機器重啟後,配置就不存在。要想將上述的配置信息永遠的存的電腦里,那就要修改網卡的配置文件了。

Ⅵ ETH介面是什麼

ETH介面指的是介面,是目前應用最廣泛的區域網通訊方式,同時也是一種協議。而乙太網介面就是網路數據連接的埠。
乙太網的每個版本都有電纜的最大長度限制(即無須放大的長度),這個范圍內的信號可以正常傳播,超過這個范圍信號將無法傳播。
為了允許建設更大的網路,可以用中繼器把多條電纜連接起來。中繼器是一個物理層設備,它能接收、放大並在兩個方向上重發信號。
(6)eth0down擴展閱讀
幾種常見的乙太網介面類型。
1、SC光纖介面
SC光纖介面在100Base-TX乙太網時代就已經得到了應用,因此當時稱為100Base-FX(F是光纖單詞fiber的縮寫),不過當時由於性能並不比雙絞線突出但是成本卻較高,因此沒有得到普及,現在業界大力推廣千兆網路,SC光纖介面則重新受到重視。
2、RJ-45介面
這種介面就是我們現在最常見的網路設備介面,俗稱「水晶頭」,專業術語為RJ-45連接器,屬於雙絞線乙太網介面類型。RJ-45插頭只能沿固定方向插入,設有一個塑料彈片與RJ-45插槽卡住以防止脫落。
3、FDDI介面
FDDI是目前成熟的LAN技術中傳輸速率最高的一種,具有定時令牌協議的特性,支持多種拓撲結構,傳輸媒體為光纖。光纖分布式數據介面(FDDI)是由美國國家標准化組織(ANSI)制定的在光纜上發送數字信號的一組協議。
參考資料來源:網路-乙太網介面

Ⅶ ifconfig配置ip

一、ifconfig與IP
1、ifconfig添加或修改原IP
ifconfig eth0 192.168.10.199 或
ifconfig eth0 192.168.10.199 netmask 255.255.255.0 up
ifconfig eth0:1 192.168.10.198 netmask 255.255.255.0 up

註:以上兩台效果是一樣的,上面一種寫法是下面一種寫法的減縮版。如果eth0上之前已經配置這IP,該配置會將原來的IP清掉,換成上面配置的IP,但在遠程ssh時最好不要使用該方法,因為網路環境不同。一旦更改不生效,就要跑到機房再進行配置。
2、禁用啟用網卡
ifconfig eth0 down
ifconfig eth0 up

該用法,是不是和ifup eth0、ifdown eth0:1很像?
註:當一塊網卡上配置多個IP時,如eth0、eth0:1時,如果禁掉eth0:1時,eth0上的網卡配置依然生效。但禁掉直接物理網卡口時(即eth0)時,其後面配置的IP (eth0:1等)都將被刪除掉。另外,ifconfig 還可以用於設置mtu和設置網卡的混雜模式:
ifconfig eth0 mtu 1472
利用netstat -i查看
將eth0設置成混雜模式
ifconfig eth0 promisc
取消混雜
ifconfig eth0 -promisc

3、修改網卡mac地址:
ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx

ifconfig查看的信息里,經常被我們忽視的第三行非常有用,如在沒有mii-tool工具時,可以通過其查看網卡連接狀態。
UP(代表網卡開啟狀態)RUNNING(代表網卡的網線被接上)MULTICAST(支持組播)MTU:1500(最大傳輸單元):1500位元組
二、ip命令與IP
ip是iproute2軟體包裡面的一個強大的網路配置工具,它能夠替代一些傳統的網路管理工具,例如ifconfig、route等,使用許可權為超級用戶。
1、ip命令添加一個IP地址:
[root@localhost ~]# ip addr add 192.168.10.198/24 dev eth0:1
[root@localhost ~]# ip addr add 192.168.10.199/24 dev eth0
[root@localhost ~]# ip -f inet addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
inet 192.168.10.26/24 brd 192.168.10.255 scope global eth0
inet 192.168.10.198/24 scope global secondary eth0
inet 192.168.10.199/24 scope global secondary eth0
[root@localhost ~]# ip addr add 192.168.10.200/24 dev eth0:3
[root@localhost ~]# ip -f inet addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
inet 192.168.10.26/24 brd 192.168.10.255 scope global eth0
inet 192.168.10.198/24 scope global secondary eth0
inet 192.168.10.199/24 scope global secondary eth0
inet 192.168.10.200/24 scope global secondary eth0

當然,上面的增加地址的寫法,我們也可以使用以下兩種方式增加,不過由於沒有上面的寫法容易記,我平時很少會用下面的方式增加:
ip addr add local 192.168.4.1/28 brd + label eth0:1 dev eth0
ip addr add 192.168.4.2/24 brd + dev eth1 label eth1:1

由上面的操作命令不難看出,隨便我們怎麼去添加IP,後面的設備名無論是eth0、eth0:1、eth0:100也好,其都不會將原網卡上綁定的地址給清掉。其通過ip addr show 顯示的出的結果都是secondary eth0 。
註:ip addr命令增加的IP ,不能通過ifconfig查看到,也不能通過ifconfig eth0:1 down 或ifdown eth0:1 這樣的方式停掉。
2、ip命令刪除一個IP
[root@localhost ~]# ip addr del 192.168.10.200
Not enough information: "dev" argument is required.
[root@localhost ~]# ip addr del 192.168.10.200 dev eth0
Warning: Executing wildcard deletion to stay compatible with old scripts.
Explicitly specify the prefix length (192.168.10.200/32) to avoid this warning.
This special behaviour is likely to disappear in further releases,
fix your scripts!
[root@localhost ~]# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 40:61:86:98:95:05 brd ff:ff:ff:ff:ff:ff
inet 192.168.10.26/24 brd 192.168.10.255 scope global eth0
inet 192.168.10.198/24 scope global secondary eth0
inet 192.168.10.199/24 scope global secondary eth0
inet6 fe80::4261:86ff:fe98:9505/64 scope link
valid_lft forever preferred_lft forever
3: sit0: <NOARP> mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0
[root@localhost ~]# ip addr del 192.168.10.199/24 dev eth0

在不加掩碼刪除時,其會提示警告,但還是可以將其地址刪掉。ip命令的用法比較多,就不一一列舉了。
三、路由配置
增加路由

route add -net 192.168.6.0/24 gw 192.168.101.254
route add default gw 192.168.101.254

查看路由
ip route list
route –n
netstat –r

四、總結
以上的ifconfig和ip命令配置的信息,重啟都會清除,想要永久生效,還是配置相關的配置文件。不過掌握命令配置方法很重要,在LVS+keepalive等架構上,浮動IP的變動,很多都是通過ip命令來完成的。

Ⅷ linux指令---ifconfig eth0 down,要如何解釋

eth0是指你的一塊網卡或者第一塊網卡,down停止的意思 ifconfig是列出網路信息的意思
這個命令是 禁用etho網卡 的意思

Ⅸ Linux中要禁用網卡是:ifconfig eth0 down,那我使用:ifconfig ip地址 down可以嗎

不可以,ifconfig
後面必須加網卡名。你可以用ifdown
etho來禁用網卡eth0,如果你的機器只有一塊網卡的,你還可以使用service
network
stop來禁掉網卡!如果是redhat
linux的話,你還可以通過system-config-network把激活的eht0禁用。

熱點內容
比特幣場外交易被騙怎麼辦 發布:2025-05-12 17:27:53 瀏覽:151
不賣礦機賣什麼 發布:2025-05-12 15:40:56 瀏覽:848
eth在哪個交易所要合法 發布:2025-05-12 15:05:10 瀏覽:901
元宇宙涉及電子行業 發布:2025-05-12 15:01:29 瀏覽:798
元宇宙可行嗎 發布:2025-05-12 14:49:17 瀏覽:505
區塊鏈運動app 發布:2025-05-12 14:28:28 瀏覽:81
實名認證不屬於去中心化嗎 發布:2025-05-12 14:00:46 瀏覽:79
區塊鏈APP查詢 發布:2025-05-12 13:34:49 瀏覽:922
達沃斯論壇里2019陽光區塊鏈 發布:2025-05-12 13:34:49 瀏覽:593
比特幣現金會歸零嗎 發布:2025-05-12 13:25:05 瀏覽:720