suse虛擬ipeth0
㈠ SUSE LINUX10 雙網卡綁定,求高手給點具體的步驟啊。。網上的都天大概了 我看不懂 我才開始弄這個。。
編輯文件
# vi /etc/sysconfig/network/ifcfg-bond0 插入如下內容
BOOTPROTO='static'
IPADDR='10.34.81.21' ------此為IP
NETMASK='255.255.255.0' ------此為mask
STARTMODE='onboot'
BONDING_MASTER='yes'
BONDING_MODULE_OPTS='mode=1 miimon=200 use_carrier=1'
BONDING_SLAVE0='eth1' -----------網卡A
BONDING_SLAVE1='eth2' -----------網卡B
檢查網卡配置
# /etc/sysconfig/network/ 下有沒有eth1、eth2的MAC地址配置,若有,則刪除,必須刪除
配置默認網關
# vi routes 插入如下內容
default 10.34.81.126
啟動雙網卡綁定
# rcnetwork restart
檢查當前綁定網卡
# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.0.1 (January 9, 2006)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth1
MII Status: up 此及以下三個UP表示成功
MII Polling Interval (ms): 200
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:18:82:50:6c:6a
Slave Interface: eth2
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:18:82:50:6c:6b
㈡ linuxifcfg-ens33linuxifcfg
linuxsuse濡備綍淇鏀圭綉鍏籌紵
ifconfigeth0ip鏇存敼IP緗戝叧鍙浠ョ敤route鍛戒護鏌ョ湅淇鏀規坊鍔犵綉鍏硆outeadddefaultgw緗戝叧鍦板潃鍒犻櫎緗戝叧routedeldefaultgw緗戝叧鍦板潃鐢ㄨ繖涓や釜鍛戒護鏀筦鍙鑳戒繚璇佸湪鐢佃剳寮鐫鐨勬椂鍊欑敤`鑰屼笖浣犱竴閲嶆柊鍚鍔ㄨ繖淇╁湴鍧灝變細榪樺師鍒頒互鍓嶇殑`涓嶆兂榪樺師鍙浠ユ敼閰嶇疆鏂囦歡緗戝叧IP閮藉湪/etc/sysconfig/network-scripts/ifcfg-eth0榪欎釜鏂囦歡閲屾敼鍙浠ユ案涔呬繚瀛楧NS鏄鍦/etc/resolv.conf榪欎釜閰嶇疆鏂囦歡閲屼慨鏀逛慨鏀瑰悗涔熸槸姘鎬箙淇濆瓨鏌ョ湅鏈嶅姟鏄鍚﹀惎鍔ㄤ綘鍙浠ョ敤service鏈嶅姟鍚峴tatus寮鍚鏈嶅姟service鏈嶅姟鍚峴tart鍏抽棴鏈嶅姟service鏈嶅姟鍚峴top鏌ョ湅鍏ㄩ儴鏈嶅姟鍚鍔ㄧ姸鎬乧hkconfig--list
Linux鍒涘緩緗戞ˉ鐨勬柟娉曪紵
1銆佸緩絝嬬綉妗touch/etc/sysconfig/network-scripts/ifcfg-br0寤虹珛緗戞ˉ閰嶇疆鏂囦歡ifcfg-br0vi/etc/sysconfig/network-scripts/ifcfg-br02銆佹坊鍔犵綉鍗″埌緗戞ˉ鎶奺th0鍜宔th1涓ょ綉鍗℃坊鍔犲埌緗戞ˉ涓銆備慨鏀筫th1緗戝崱閰嶇疆鏂囦歡vi/etc/sysconfig/network-scripts/ifcfg-eth0淇鏀筫th2緗戝崱閰嶇疆鏂囦歡vi/etc/sysconfig/network-scripts/ifcfg-eth23.閲嶅惎緗戠粶鏈嶅姟servicenetworkrestart
linux淇鏀筰p鐢ㄥ懡浠vi/etc/sysconfig/network-scripts/ifcfg銆備箣鍚庢庝箞鎿嶄綔錛
vi榪涘叆鍚庯紝鎸塱鍙樻垚緙栬緫妯″紡錛屽睆騫曚笅鏂規湁涓狪NSERT瀛楁牱錛岃繖鏃惰窡windows鐨勮頒簨鏈涓鏍蜂簡錛屾敼鍚с傚唴瀹硅佷笅鏀瑰畬鍚庢寜ESC閿錛屽啀杈撳叆鍐掑彿x鈥斺:x淇濆瓨閫鍑恆俿ervicenetworkrestart浣犵殑IP灝卞嚭鏉ヤ簡銆侱EVICE=eth0BOOTPROTO=noneIPADDR=192.168.0.1GATEWAY=192.168.0.254ONBOOT=yesTYPE=Ethernet
linux緗戝崱閰嶇疆鏂囦歡ifcfg-eth0涓㈠け錛屾庝箞鍥炰簨錛
榪欎釜娌℃湁濂藉姙娉曪紝鍙鑳芥牴鎹浣犵殑緇忛獙浜嗭紝濡傛灉鏄緋葷粺綆$悊鍛樼殑璇濓紝澶氱敤涓嬩笉鍚岀殑鍙戣岀増灝辯煡閬撲簡錛屼竴鑸鏄痙eb鍙戣岀増鏈夎嚜宸辯殑鐗瑰緛錛屾瘮濡倁buntu鐨勬槸/etc/network/interfaces鏂囦歡redhat鍙婂叾centos絳夋槸/etc/system-config/network-scripts/鐩褰曚笅鎴栬...
linux緋葷粺濡備綍淇鏀筪ns錛
涓銆乿i/etc/sysconfig/network-script/ifcfg-緗戝崱鍚嶈繘鍏ョ綉緇滅紪杈
IPADDR=浣犵殑IP鍦板潃
NETMASK=瀛愮綉鎺╃爜
GATEWAY=緗戝叧
DNS1=浣犺佽劇疆鐨凞NS鏈嶅姟鍣↖P鍦板潃
浜屻乿i/etc/resolv.conf
娣誨姞涓鏉
nameserver8.8.8.8#8.8.8.8渚挎槸浣犻渶瑕佽劇疆鐨凞NS鏈嶅姟鍣ㄥ湴鍧