为openfiler添加第二块网卡

[root@leisharedisk ~]# cd /etc/sysconfig/network-scripts/
[root@leisharedisk network-scripts]# ls -lrt ifcfg-eth*
-rw-r--r--  1 root root 172 Oct  6 10:24 ifcfg-eth0
[root@leisharedisk network-scripts]# cp ifcfg-eth0 ifcfg-eth1
[root@leisharedisk network-scripts]# vi ifcfg-eth1
DEVICE=eth1  --->改为eth1
BOOTPROTO=static
BROADCAST=192.168.188.255
HWADDR=00:0C:29:FF:E3:DB  --->改为第二块网卡的mic地址,可以从vmware中,该虚拟机的Network Adapter Advanced Settings里看到。
IPADDR=192.168.188.169  --->改为第二块网卡的ip地址
NETMASK=255.255.255.0
NETWORK=192.168.188.0
ONBOOT=yes
TYPE=Ethernet
[root@leisharedisk network-scripts]# ifup eth1
[root@leisharedisk network-scripts]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:FF:E3:D1  
          inet addr:192.168.188.170  Bcast:192.168.188.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:feff:e3d1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1687 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1760 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:194401 (189.8 Kb)  TX bytes:837156 (817.5 Kb)
          Interrupt:19 Base address:0x2024 

eth1      Link encap:Ethernet  HWaddr 00:0C:29:FF:E3:DB  
          inet addr:192.168.188.169  Bcast:192.168.188.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:feff:e3db/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:496 (496.0 b)
          Interrupt:19 Base address:0x20a4 

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:123 errors:0 dropped:0 overruns:0 frame:0
          TX packets:123 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:7862 (7.6 Kb)  TX bytes:7862 (7.6 Kb)

[root@leisharedisk network-scripts]#


 

你可能感兴趣的:(Linux)