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鏈嶅姟鍣ㄥ湴鍧