Linux network bottom-level related knowledge reserve

Source: Internet
Author: User

1: Does the system recognize the NIC

650) this.width=650; "style=" width:668px;height:66px; "title=" 111.jpg "src=" http://s3.51cto.com/wyfs02/M02/4A/19/ Wkiom1qih4cxwznoaads-82ztjq362.jpg "width=" 663 "height=", alt= "Wkiom1qih4cxwznoaads-82ztjq362.jpg"/>

2: Install the driver to load the corresponding module

Use lsmod modprobe mate to modify/etc/modprobe.conf

[Email protected] ~]# Modprobe-l | grep 8139
/lib/modules/2.6.18-238.el5pae/kernel/drivers/net/8139cp.ko
/lib/modules/2.6.18-238.el5pae/kernel/drivers/net/8139too.ko

The driver will be stored in the /lib/modules/<kernel_version>/kernel/drivers/net/*.ko file after normal installation.

3: Set up the network card configuration file

[Email protected] ~]# cd/etc/sysconfig/network-scripts/

Establish Ifcfg-eth0

Device=eth0
Bootproto=static
Hwaddr=c8:1f:66:20:82:ef
ipaddr=192.168.6.2
netmask=255.255.255.0
gateway=192.168.6.1
Onboot=yes

4: Start Nic ifconfig eth0 up

5: Route add route add default GW 192.168.6.1

or IP route add default via 192.168.6.1 dev eth0

6: See if the relevant routing rules are Normal

[[Email protected] ~]# IP rule Default Routing table has 3, the actual use of the main table
0:from All Lookup 255
32766:from All lookup Main
32767:from All Lookup Default

About the network card problems, such as link layer judgment fault-related commands:

Determine the network cable Connection status:

[Email protected] ~]# Mii-tool
eth0:negotiated 100basetx-fd, link ok

Or

[[Email protected] ~]# IP link
1:lo: <LOOPBACK,UP,LOWER_UP> MTU 16436 Qdisc noqueue
Link/loopback 00:00:00:00:00:00 BRD 00:00:00:00:00:00
2:eth0: <broadcast,multicast,up,lower_up> MTU qdisc pfifo_fast qlen 1000
Link/ether 00:1F:D0:D3:65:BB BRD FF:FF:FF:FF:FF:FF

Linux network bottom-level related knowledge reserve

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.