Through the ifconfig to see if there are eth1 exist, if there is no network cable is not connected, or the network card is not good use.
If there is a eth1, then use the following command:
#ifconfig eth1 Down
# ifconfig eth1 192.168.0.*
#route add-net 192.168.0.1
Add route (assuming Route 1 is 92.168.0)
#ifconfig eth1 up
Sometimes this still doesn't work, restart the next NetworkManager service restart
#Server NetworkManager restart
We all know that under Linux a fast network card, the gateway default under/etc/sysconfig/network, but now if there are two network cards, and IP
Address (inside, outside) is not the same network segment, we want to specify two gateways, then how to specify it.
1, first note/etc/sysconfig/network under: (This step can be, but do not!) )
Networking=yes
Hostname=linuxman
#GATEWAY =x.x.x.x
2, then cd/etc/sysconfig/network-scripts under, in this folder has ifcfg-eth0,ifcfg-eth1 two files, this is two
Configuration file for each network card.
For example: Ifcfg-eth0 is as follows (before Gateway is added):
# Intel Corporation 82801G (ICH7 Family) LAN Controller
Device=eth0
Bootproto=static
broadcast=192.168.0.255
Hwaddr=00:13:72:ce:29:90
ipaddr=192.168.0.110
netmask=255.255.255.0
network=192.168.0.0
Onboot=yes
Type=ethernet
3, vi ifcfg-eth0 in the network card added:
gateway=x.x.x.x (! Notice that you want to capitalize in front)
After the document is changed:
Device=eth0
Bootproto=static
broadcast=192.168.0.255
Hwaddr=00:13:72:ce:29:90
ipaddr=192.168.0.110
netmask=255.255.255.0
network=192.168.0.0
gateway=x.x.x.x
Onboot=yes
Type=ethernet
ETH1 also adds the gateway in this way.
4. Then restart the network card:
Ifdown eth0;ifup eth0
Ifdown eth1;ifup eth1
Or:
/etc/rc.d/init.d/network restart
Network card startup issues