Network card startup issues

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.