Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Cloud Computing Learning Route course outline Courseware: CentOS7 modifies the network card to eth0

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Cloud Computing Learning Route course outline Courseware: CentOS7 modifies the network card to eth0:

=

CentOS7 is already installed

Modify the network card configuration file mv ifcfg-eno16777728 ifcfg-eth0vim ifcfg-eth0

DEVICE=eth0

NAME=eth0

Ethtool important 5 stars

Command option

Struct ethtool_ops member function

The Ethtool command displays the source of the parameters (take the network card driver BNX2 as an example)

None-s

Get_settingsget_wol get_msglevel get_link set_settings set_wol set_msglevel

Get the network card speed and other information from the network card register, which can be configured.

-a-A

Get_pauseparam set_pauseparam

Get the status of the Autonegotiate/RX/TX module from the network card register: on oroff, configurable.

-C-C

Get_coalesceset_coalesce

Get the coalescing parameter from the Nic register: after TX/RX a packet, delay the time of TX/RX interrupt (us) / number of packets. -decreasing this value can improve the response time of the network card. When rx-usecs&rx-frames is also set to 0, the RX interrupt stops. When tx-usecs&tx-frames is also set to 0, the TX interrupt stops.

-g-G

Get_ringparam set_ringparam

Except for the value of the current TX/RX ring (read from the network card register, configurable), the other information is fixed by the network card bnx2 itself.

-K-K

Get_rx_csumget_tx_csum get_sg get_tso set_rx_csum set_tx_csum set_sg set_tso

The display information is read from the variable that holds the state and there is no corresponding register. Therefore, modules such as TX/RX parity have been in the on state and cannot actually be modified.

-I

Get_ drvinfo[self _ test_count, get_stats_coun,t get_regs_len, get_eeprom_len]

The information fixed by the Nic bnx2 itself, such as:-driver: bnx2 version: 1.4.30 firmware-version: 1.8.0.5 bus-info: 0000 bus-info 09VR 00.0-

-d

Get_drvinfoget_regs

No, that is, the function get_regs is not implemented in bnx2.

-e-E

Get_eepromset_eeprom

No, that is, the function get_eeprom is not implemented in bnx2.

-r

Nway_reset

Configure the MII_BMCR register of the network card and restart the Auto negotiation module.

-p

Phys_id

Configure the network card BNX2_EMAC_LED register to realize the LED flash function.

-t

Self_test

By configuring the network card register, test the hardware module of the network card one by one: registers,memory,loopback,Link stat,interrupt.

-S

Get_ethtool_stats

The display information comes from the structure variable stats_blk in the network card driver. (the network card reads the data in the registers BNX2_HC_STATISTICS_ADDR_ L and BNX2_HC_STATISTICS_ADDR_H into the structural volume variable struct statistics_block * stats_blk in real time through DMA. )-the data displayed are all calculated from the network card register, and the meaning of each item needs to be consulted in the network card (chip) manual.

As can be seen above, the ethtool command is used to display / configure the Nic hardware (registers).

Example

To check the speed of the network card on the machine: 100 megabits or gigabytes, please enter:

After the ethool eth0 operation is completed, the Speed: item in the output information indicates the speed of the network card. To stop the sending module TX of the network card, please enter:

After the ethtool-A tx off eth0 operation is complete, enter ethtool-an eth0 to see if the tx module has been stopped. To see what kind of driver is used for the network card eth0, please enter:

After the ethtool-I eth0 operation is completed, information such as driver: bnx2;version: 1.4.30 is displayed. To turn off the verification function of the network card for the received packets, please enter:

After the ethtool-K eth0 rx off operation is completed, you can enter ethtool-k eth0 to see if the verification function has been stopped. If there are two network cards installed on the machine, which network card does eth0 correspond to? Enter:

After the operation of ethtool-p eth0 10, to see which network card's led light is flashing, eth0 corresponds to which network card. Check the network card, is there any error when receiving / sending data? Please enter:

Ethtool-S eth0 slows down the speed of the gigabit network card to 100 megabits, please enter:

Ethtool-s eth0 speed 100

You can also check whether the machine is plugged into the network.

Cabinet A Server1 needs network expansion

Be a bond!

Problem: there is no network port available for the uplink switch.

Solution 1: go offline or migrate servers in the same group

Any one. Purpose: the uplink exchange is free.

1 available network port

Solution 2: migrate Server1 to 2

Switch spare network port location

Question 2

There is a special intranet cable in the enterprise.

External network line management card network line

For different colors, the internal network is generally yellow and the external network is red.

The management card is green, which makes an eye-catching distinction between internal and external tubes. And

The transmission rate is different. Network cable classification-- > network course learning

1 configure remote management card IP by entering bios on site

2 IPMI tools can be done remotely

3. Integration cannot be done.

Question 3: after the server adds the network card

The system can't recognize it.

/ etc/udev/rules.d/

70-persistent-net.rules View 70 Files

Then go to the Nic configuration file to modify the correct MAC

There is a MAC line in the network card configuration file in the enterprise.

Deletion is not recommended.

If deleted, the network card will often be out of order.

Most of them are HP servers

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report