Linux學(xué)習(xí)之CentOS(二十九)--Linux網(wǎng)卡高級(jí)命令、IP別名及多網(wǎng)卡綁定的方法
本篇隨筆將詳細(xì)講解Linux系統(tǒng)的網(wǎng)卡高級(jí)命令、IP別名以及Linux下多網(wǎng)卡綁定的知識(shí)
一、網(wǎng)卡高級(jí)命令
在之前的一篇隨筆里L(fēng)inux學(xué)習(xí)之CentOS(九)--Linux系統(tǒng)的網(wǎng)絡(luò)環(huán)境配置,詳細(xì)講解了Linux系統(tǒng)下的網(wǎng)絡(luò)環(huán)境配置等知識(shí),我們了解了一些關(guān)于網(wǎng)絡(luò)配置的一些基本命令。在這里將補(bǔ)充一些Linux系統(tǒng)下有關(guān)網(wǎng)卡的一些高級(jí)命令。
①mii-tool 命令
mii-tool命令我們可以用來(lái)查看網(wǎng)卡狀態(tài)信息,包括了以太網(wǎng)連接是否正常,使用的是哪種型號(hào)的網(wǎng)卡等等
[root@xiaoluo ~]# mii-tool eth0 eth0: no autonegotiation, 100baseTx-FD, link ok
我們從輸出的信息可以看到,當(dāng)前以太網(wǎng)連接正常,以太網(wǎng)的速率是100M每秒,通過(guò)這個(gè)命令我們可以看到網(wǎng)卡底層的一些信息,當(dāng)有時(shí)我們?cè)谏蠈油ㄟ^(guò)ping、traceroute等命令進(jìn)行網(wǎng)絡(luò)排錯(cuò)時(shí),如果發(fā)現(xiàn)網(wǎng)絡(luò)還是不能連接暢通,這時(shí)就可以使用這個(gè)命令來(lái)查看是否是以太網(wǎng)連接出問(wèn)題了
②ethtool 命令
通過(guò)mii-tool命令可以查看網(wǎng)卡的一些底層信息,但是如果我們想要查看網(wǎng)卡的更詳細(xì)信息,就可以使用ethtool 這個(gè)命令,它可以將網(wǎng)卡的所有信息都詳細(xì)列出來(lái)
[root@xiaoluo ~]# ethtool eth0 Settings for eth0: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Speed: 1000Mb/s Duplex: Full Port: Twisted Pair PHYAD: 0 Transceiver: internal Auto-negotiation: on MDI-X: Unknown Supports Wake-on: umbg Wake-on: d Current message level: 0x00000007 (7) drv probe link Link detected: yes
包括網(wǎng)卡支持的鏈接速率、雙工模式等等信息都能查看到
如果說(shuō)我們想要查看網(wǎng)卡的驅(qū)動(dòng)信息,可以在 ethtool 命令后加上 -i 參數(shù),就能顯示網(wǎng)卡的驅(qū)動(dòng)信息了
[root@xiaoluo ~]# ethtool -i eth0 driver: e1000 version: 7.3.21-k8-NAPI firmware-version: bus-info: 0000:00:03.0 supports-statistics: yes supports-test: yes supports-eeprom-access: yes supports-register-dump: yes supports-priv-flags: no
如果說(shuō)我們還需要查看網(wǎng)卡當(dāng)前底層工作狀態(tài)信息,可以在命令后加上 -S 參數(shù)
[root@xiaoluo ~]# ethtool -S eth0 NIC statistics: rx_packets: 3255 tx_packets: 898 rx_bytes: 477575 tx_bytes: 2228309 rx_broadcast: 2190 tx_broadcast: 198 rx_multicast: 0 tx_multicast: 6 rx_errors: 0 tx_errors: 0 tx_dropped: 0 multicast: 0 collisions: 0 rx_length_errors: 0 rx_over_errors: 0 rx_crc_errors: 0 rx_frame_errors: 0 rx_no_buffer_count: 0 rx_missed_errors: 0 tx_aborted_errors: 0 tx_carrier_errors: 0 tx_fifo_errors: 0 tx_heartbeat_errors: 0 tx_window_errors: 0 tx_abort_late_coll: 0 tx_deferred_ok: 0 tx_single_coll_ok: 0 tx_multi_coll_ok: 0 tx_timeout_count: 0 tx_restart_queue: 0 rx_long_length_errors: 0 rx_short_length_errors: 0 rx_align_errors: 0 tx_tcp_seg_good: 263 tx_tcp_seg_failed: 0 rx_flow_control_xon: 0 rx_flow_control_xoff: 0 tx_flow_control_xon: 0 tx_flow_control_xoff: 0 rx_long_byte_count: 477575 rx_csum_offload_good: 0 rx_csum_offload_errors: 0 alloc_rx_buff_failed: 0 tx_smbus: 0 rx_smbus: 0 dropped_smbus: 0
包括網(wǎng)卡發(fā)送了多少數(shù)據(jù)包、接受了多少數(shù)據(jù)包等信息都能看到。
所以通過(guò) mii-tool 和 ethtool 這兩個(gè)命令,我們可以看到網(wǎng)卡更多的底層信息以及網(wǎng)卡的物理信息等等,這可能會(huì)為我們?cè)谶M(jìn)行網(wǎng)絡(luò)排錯(cuò)時(shí)提供便利
二、IP別名
在Linux系統(tǒng)中,我們可以在一塊物理網(wǎng)卡上配置多個(gè)IP地址,以此來(lái)實(shí)現(xiàn)類(lèi)似子接口的功能,我們稱(chēng)之為IP別名。當(dāng)然在其他操作系統(tǒng)上,比如windowns、mac os上也支持在一塊物理網(wǎng)卡配置多個(gè)IP地址。比如說(shuō)我們的Linux主機(jī)作為一個(gè)DHCP服務(wù)器,它可能要為不同的網(wǎng)段分配多個(gè)IP地址,在Linux系統(tǒng)中,我們通過(guò)IP別名來(lái)實(shí)現(xiàn)在一塊物理網(wǎng)卡上配置多個(gè)IP地址。
【注意:】要使用IP別名來(lái)配置多個(gè)IP地址,我們首先需要關(guān)閉NetworkManager服務(wù)
在CentOS或者RHEL上,都默認(rèn)會(huì)啟用NerworkManager這個(gè)服務(wù)來(lái)對(duì)網(wǎng)卡進(jìn)行管理,NetworkManager服務(wù)其實(shí)就是我們操作系統(tǒng)右上方那兩個(gè)小電腦圖標(biāo),我們?cè)趫D形化界面可以點(diǎn)擊那個(gè)來(lái)指定使用哪塊網(wǎng)卡,但是我們?nèi)绻枰褂肐P別名,就必須要禁用掉這個(gè)服務(wù)
[root@xiaoluo ~]# service NetworkManager stop Stopping NetworkManager daemon: [ OK ] // 停掉我們的NetworkManager服務(wù),此時(shí)我們可以發(fā)現(xiàn)右上角那個(gè)圖標(biāo)就不見(jiàn)了 [root@xiaoluo ~]# chkconfig NetworkManager off // NetworkManager這個(gè)服務(wù)默認(rèn)會(huì)開(kāi)機(jī)啟動(dòng),所以我們將其設(shè)置成開(kāi)機(jī)不啟動(dòng) [root@xiaoluo ~]# chkconfig --list | grep NetworkManager NetworkManager 0:off 1:off 2:off 3:off 4:off 5:off 6:off
在停掉NetworkManager服務(wù)以后我們就可以使用IP別名技術(shù)來(lái)配置多個(gè)IP地址了,這里我們使用 ip 這個(gè)命令,命令語(yǔ)法格式如下:
ip addr add 172.25.215.40/24 dev etho label eth0:0
后面的eth0:0 表示,我們給eth0這塊網(wǎng)卡增加一個(gè)IP別名,后面那個(gè)0表示別名號(hào),第二個(gè)別名就可以寫(xiě)成 eth0:1
我們首先通過(guò) ifconfig 命令來(lái)查看我們當(dāng)前網(wǎng)卡的信息
[root@xiaoluo ~]# ifconfig eth0 Link encap:Ethernet HWaddr 08:00:27:D7:F8:84 inet addr:172.25.215.40 Bcast:172.25.215.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fed7:f884/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5801 errors:0 dropped:0 overruns:0 frame:0 TX packets:2011 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:819876 (800.6 KiB) TX bytes:2288399 (2.1 MiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:167 errors:0 dropped:0 overruns:0 frame:0 TX packets:167 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:14861 (14.5 KiB) TX bytes:14861 (14.5 KiB)
此時(shí)我們的eth0網(wǎng)卡信息就會(huì)顯示出來(lái),我們此時(shí)通過(guò)ip命令來(lái)給eth0添加一個(gè)IP別名
[root@xiaoluo ~]# ip addr add 172.25.215.31/24 dev eth0 label eth0:0 [root@xiaoluo ~]# ifconfig eth0 Link encap:Ethernet HWaddr 08:00:27:D7:F8:84 inet addr:172.25.215.40 Bcast:172.25.215.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fed7:f884/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6323 errors:0 dropped:0 overruns:0 frame:0 TX packets:2011 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:914440 (893.0 KiB) TX bytes:2288399 (2.1 MiB) eth0:0 Link encap:Ethernet HWaddr 08:00:27:D7:F8:84 inet addr:172.25.215.31 Bcast:0.0.0.0 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:167 errors:0 dropped:0 overruns:0 frame:0 TX packets:167 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:14861 (14.5 KiB) TX bytes:14861 (14.5 KiB)
我們看到,此時(shí)我們對(duì)出來(lái)了一塊 eth0:0 網(wǎng)卡,其實(shí)這個(gè)就是eth0網(wǎng)卡的一個(gè)IP別名,eth0上就有兩個(gè)IP地址了,此時(shí)我們通過(guò)外面的主機(jī)ping這兩個(gè)IP地址都是可以ping通的,如果說(shuō)我們需要永久保存這個(gè)信息,我們就需要在 /etc/sysconfig/network-scripts 這個(gè)文件下建立一個(gè)名字為 ifcfg.eth0:0 這樣的配置文件,新建的IP別名是什么,那么就在這個(gè)目錄下建立一個(gè)與該名字對(duì)應(yīng)的文件即可
[root@xiaoluo ~]# cd /etc/sysconfig/network-scripts/ [root@xiaoluo network-scripts]# ls ifcfg-eth0 ifdown-isdn ifup-aliases ifup-plusb init.ipv6-global ifcfg-lo ifdown-post ifup-bnep ifup-post net.hotplug ifdown ifdown-ppp ifup-eth ifup-ppp network-functions ifdown-bnep ifdown-routes ifup-ippp ifup-routes network-functions-ipv6 ifdown-eth ifdown-sit ifup-ipv6 ifup-sit ifdown-ippp ifdown-tunnel ifup-isdn ifup-tunnel ifdown-ipv6 ifup ifup-plip ifup-wireless [root@xiaoluo network-scripts]# vi ifcfg-eth0:0 DEVICE=eth0:0 // 設(shè)備名字 IPADDR=172.25.215.31 // IP地址 PREFIX=24 // 前綴是24,其實(shí)就是相當(dāng)于子網(wǎng)掩碼有24位 ONPARENT=yes // eth0:0是eth0的IP別名,yes表示附屬于eth0
通過(guò)添加上述的配置文件,我們的IP別名信息就能永久保存了。
三、多網(wǎng)卡綁定
為什么要使用多網(wǎng)卡綁定技術(shù)呢?我們知道如果使用一塊網(wǎng)卡進(jìn)行網(wǎng)絡(luò)數(shù)據(jù)傳輸時(shí)其速度是有限的,即使是千兆網(wǎng)卡,其速度也是有限制的,我們?yōu)榱颂岣邘?,我們可以將多塊物理網(wǎng)卡綁定成一塊邏輯網(wǎng)卡,這樣網(wǎng)卡的速率就是多塊網(wǎng)卡的速率了。
Linux支持將多塊物理網(wǎng)卡綁定成一塊邏輯網(wǎng)卡,綁定后的邏輯網(wǎng)卡可以并行使用組成其的所有物理網(wǎng)卡,通過(guò)這樣的方式可以提高帶寬以及網(wǎng)路的穩(wěn)定性
我們?cè)趯⒍鄩K物理網(wǎng)卡綁定成一塊邏輯網(wǎng)卡以后,我們的IP地址就要求配置在這塊邏輯網(wǎng)卡上了,而非多塊物理網(wǎng)卡
Linux下支持三種模式的網(wǎng)卡綁定:
①模式0:平衡輪訓(xùn) 使用這種模式來(lái)進(jìn)行多網(wǎng)卡綁定時(shí)我們可以提高網(wǎng)絡(luò)的帶寬,其流量是從綁定的多塊網(wǎng)卡上平均分配的
②模式1:主動(dòng)備份 使用這種模式來(lái)進(jìn)行多網(wǎng)卡綁定時(shí)我們可以提高網(wǎng)絡(luò)的穩(wěn)定性,這種模式不會(huì)提高網(wǎng)絡(luò)的帶寬,每次只有一塊網(wǎng)卡在走流量,只有當(dāng)這塊網(wǎng)卡發(fā)生故障時(shí),綁定在一起的其它物理網(wǎng)卡才會(huì)工作
③模式3:廣播模式 這種模式一般都不用
我們?nèi)绻胪ㄟ^(guò)多網(wǎng)卡綁定來(lái)提升網(wǎng)絡(luò)的帶寬,就選擇模式0,如果想提高網(wǎng)絡(luò)的穩(wěn)定性,則選擇模式1
下面我們來(lái)看看如何進(jìn)行網(wǎng)卡綁定的配置
①網(wǎng)卡綁定以后我們需要給我們的邏輯網(wǎng)卡取一個(gè)名字,通常格式為 bondn,n代表的是編號(hào),如 /dev/bond0, /dev/bond1
②然后我們需要在 /etc/sysconfig/network-scripts 這個(gè)目錄下創(chuàng)建該邏輯網(wǎng)卡的配置文件,如:
/etc/sysconfig/network-scripts/ifc-bond0
[root@xiaoluo network-scripts]# vi ifcfg-bond0 DEVICE=bond0 // 設(shè)備名字 IPADDR=172.25.215.200 // 網(wǎng)卡ip地址 PREFIX=24 // 子網(wǎng)掩碼24位 ONBOOT=yes // 開(kāi)機(jī)啟動(dòng)yes BOOTPROTO=none // 啟動(dòng)協(xié)議,因?yàn)槲覀兪鞘謩?dòng)配置IP,所以設(shè)置成none,如果是通過(guò)DHCP動(dòng)態(tài)分配,則設(shè)置成dhcp USERCTL=no // 關(guān)閉掉用戶(hù)控制 BONDING_OPTS="mode=1 miimon=5" // 這個(gè)是bond網(wǎng)卡最主要的配置,我們的bond網(wǎng)卡其實(shí)是根據(jù)一個(gè)叫做bonding的驅(qū)動(dòng)來(lái)配置的,后面跟配置參數(shù),這里我們使用的是模式1(主動(dòng)備份)
因?yàn)槲覀円褂枚嗑W(wǎng)卡綁定,所以我們這里再添加一塊網(wǎng)卡,然后根據(jù)提示就可以添加一塊新網(wǎng)卡了,我們這里添加一塊網(wǎng)卡eth1,使用ifconfig查看一下:
[root@xiaoluo network-scripts]# ifconfig bond0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 inet addr:172.25.215.200 Bcast:172.25.215.255 Mask:255.255.255.0 UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) eth0 Link encap:Ethernet HWaddr 08:00:27:D7:F8:84 inet6 addr: fe80::a00:27ff:fed7:f884/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1285 errors:0 dropped:0 overruns:0 frame:0 TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:221706 (216.5 KiB) TX bytes:468 (468.0 b) eth1 Link encap:Ethernet HWaddr 08:00:27:F4:7D:CC inet6 addr: fe80::a00:27ff:fef4:7dcc/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1196 errors:0 dropped:0 overruns:0 frame:0 TX packets:95 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:216126 (211.0 KiB) TX bytes:4806 (4.6 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:73 errors:0 dropped:0 overruns:0 frame:0 TX packets:73 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:6330 (6.1 KiB) TX bytes:6330 (6.1 KiB)
此時(shí)我們計(jì)算機(jī)里面就有兩塊網(wǎng)卡了,因?yàn)槲覀冃枰獙⑦@兩塊網(wǎng)卡綁定到bond0這個(gè)邏輯網(wǎng)卡中,所以我們要在兩塊網(wǎng)卡的配置文件里面添加兩條語(yǔ)句:
MASTER=bond0 // 將這兩塊網(wǎng)卡綁定到bond0這塊邏輯網(wǎng)卡上
SLAVE=yes // SLAVE=yes表示這兩塊網(wǎng)卡附屬于bond0這塊網(wǎng)卡
[root@xiaoluo network-scripts]# vi ifcfg-eth0 DEVICE=eth0 HWADDR=08:00:27:D7:F8:84 TYPE=Ethernet UUID=2877e96e-6ddd-443b-a337-bafa7c77c6e5 ONBOOT=no NM_CONTROLLED=yes BOOTPROTO=none IPV6INIT=no USERCTL=no MASTER=bond0 SLAVE=yes [root@xiaoluo network-scripts]# vi ifcfg-eth1 DEVICE=eth1 BOOTPROTO=none TYPE=Ethernet PEERDNS=yes IPV6INIT=no ONBOOT=no USERCTL=no HWADDR=08:00:27:f4:7d:cc MASTER=bond0 SLAVE=yes
之前說(shuō)過(guò)bond0這塊網(wǎng)卡其實(shí)是通過(guò)一個(gè)叫做 bonding 的驅(qū)動(dòng)來(lái)配置的,所以我們還需要為bond0這塊網(wǎng)卡添加驅(qū)動(dòng)支持,將這個(gè)驅(qū)動(dòng)添加到 /etc/modprobe.d/ 這個(gè)目錄下
[root@xiaoluo network-scripts]# cd /etc/modprobe.d/ [root@xiaoluo modprobe.d]# ls anaconda.conf blacklist-visor.conf dist.conf openfwwf.conf blacklist.conf dist-alsa.conf dist-oss.conf
這個(gè)文件夾下放的都是我們系統(tǒng)所需驅(qū)動(dòng)的配置文件,我們這時(shí)需要給我們的bonding添加一個(gè)名字為 bonding.conf 的配置文件
[root@xiaoluo modprobe.d]# vi bonding.conf alias bond0 bonding
此時(shí)配置好以后,我們就可以通過(guò) ifup bond0 來(lái)啟動(dòng)我們的bond0網(wǎng)卡
[root@xiaoluo network-scripts]# ifup bond0 Active connection state: activated Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/2
此時(shí)我們可以通過(guò)ifconfig命令來(lái)查看一下當(dāng)前網(wǎng)卡信息:
[root@xiaoluo network-scripts]# ifconfig bond0 Link encap:Ethernet HWaddr 08:00:27:D7:F8:84 inet addr:172.25.215.200 Bcast:172.25.215.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fed7:f884/64 Scope:Link UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 RX packets:8175 errors:0 dropped:0 overruns:0 frame:0 TX packets:117 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1417884 (1.3 MiB) TX bytes:6230 (6.0 KiB) eth0 Link encap:Ethernet HWaddr 08:00:27:D7:F8:84 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:4131 errors:0 dropped:0 overruns:0 frame:0 TX packets:22 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:711693 (695.0 KiB) TX bytes:1424 (1.3 KiB) eth1 Link encap:Ethernet HWaddr 08:00:27:D7:F8:84 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:4044 errors:0 dropped:0 overruns:0 frame:0 TX packets:95 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:706191 (689.6 KiB) TX bytes:4806 (4.6 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:81 errors:0 dropped:0 overruns:0 frame:0 TX packets:81 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:7226 (7.0 KiB) TX bytes:7226 (7.0 KiB)
此時(shí)我們通過(guò) ping 命令來(lái)ping我們外面的主機(jī),發(fā)現(xiàn)已經(jīng)可以正常ping通的
[root@xiaoluo network-scripts]# ping 172.25.215.25 PING 172.25.215.25 (172.25.215.25) 56(84) bytes of data. bytes from 172.25.215.25: icmp_seq=1 ttl=64 time=1.78 ms bytes from 172.25.215.25: icmp_seq=2 ttl=64 time=1.10 ms bytes from 172.25.215.25: icmp_seq=3 ttl=64 time=1.08 ms bytes from 172.25.215.25: icmp_seq=4 ttl=64 time=0.811 ms bytes from 172.25.215.25: icmp_seq=5 ttl=64 time=1.17 ms ***********************************************************************************
這個(gè)時(shí)候我們的bond0網(wǎng)卡就已經(jīng)配置成功了,它是由兩塊物理網(wǎng)卡組成的,我們可以根據(jù)需要,比如說(shuō)要提高網(wǎng)絡(luò)帶寬或者提高網(wǎng)絡(luò)穩(wěn)定性來(lái)設(shè)置bond0的網(wǎng)卡綁定模式即可
本篇隨筆詳細(xì)講解了Linux網(wǎng)卡的一些高級(jí)命令以及如何在給一塊物理網(wǎng)卡配置多個(gè)IP地址,我們稱(chēng)之為IP別名,當(dāng)然還有我們的多網(wǎng)卡綁定配置?。?!
原文鏈接:http://www.cnblogs.com/xiaoluo501395377/archive/2013/05/26/3100065.html
以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
相關(guān)文章
一條命令讓你明白shell中read命令的常用參數(shù)
今天小編就為大家分享一篇關(guān)于一條命令讓你明白shell中read命令的常用參數(shù),小編覺(jué)得內(nèi)容挺不錯(cuò)的,現(xiàn)在分享給大家,具有很好的參考價(jià)值,需要的朋友一起跟隨小編來(lái)看看吧2019-03-03Linux系統(tǒng)下如何創(chuàng)建普通用戶(hù)并更改用戶(hù)組
這篇文章主要介紹了Linux系統(tǒng)下如何創(chuàng)建普通用戶(hù)并更改用戶(hù)組問(wèn)題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-04-04CentOS 7.3配置Nginx虛擬主機(jī)的方法步驟
這篇文章主要介紹了CentOS 7.3配置Nginx虛擬主機(jī)的方法步驟,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2019-02-02高性能HTTP加速器Varnish-3.0.3搭建、配置及優(yōu)化步驟
這篇文章主要介紹了高性能HTTP加速器Varnish-3.0.3搭建、配置及優(yōu)化步驟,需要的朋友可以參考下2016-02-02在Linux中限制root用戶(hù)SSH遠(yuǎn)程登錄的流程詳解
在Linux系統(tǒng)中,root用戶(hù)擁有最高權(quán)限,因此為了增強(qiáng)系統(tǒng)安全性,我們通常會(huì)限制root用戶(hù)通過(guò)SSH遠(yuǎn)程登錄,本文將介紹如何在Linux系統(tǒng)中限制root用戶(hù)的SSH遠(yuǎn)程登錄,需要的朋友可以參考下2024-03-03linux vps服務(wù)器進(jìn)程kswapd0與events/0消耗大量CPU的問(wèn)題
使用了阿里云的vps服務(wù)器網(wǎng)站宕了兩次機(jī),發(fā)工單給阿里云,發(fā)現(xiàn)原因是服務(wù)器的CPU 100%了,這也是vps的弊端,內(nèi)容給的相對(duì)小2014-03-03Linux平臺(tái)Segmentation fault(段錯(cuò)誤)調(diào)試過(guò)程
這篇文章主要介紹了Linux平臺(tái)Segmentation fault(段錯(cuò)誤)調(diào)試過(guò)程,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-09-09linux之如何查看進(jìn)程占用網(wǎng)速和流量使用情況
這篇文章主要介紹了linux之如何查看進(jìn)程占用網(wǎng)速和流量使用情況,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-04-04