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

How to determine the location of multiple network ports under suse linux11

2025-01-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

How to determine the location of multiple network ports under suse linux11? in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

When installing SUSE LINUX11 SP2 and SUSE LINUX11 SP1 versions on the same dawning A620R-G server, it is found that the location relationship of the ethX of the operating system corresponding to each physical network port is also changing, which interferes with the correct configuration of IP with three different network segments.

For example:

1. When the suse11sp2 operating system is manually installed, the corresponding ethX of the operating system corresponding to each physical network port is as follows:

two。 When the suse11sp1 operating system is deployed through the management port, the corresponding ethX of the operating system corresponding to each physical network port is as follows:

Need to set the correspondence table of three kinds of network ports with different functions (the three types of network ports correspond to the network ports on different switches)

We find that the corresponding positions of each port of the ethx are also changing. If you set three different network ports according to the sequential location, it will obviously be misplaced. So how to accurately determine the location of each network port under SUSE LINUX11?

Method 1: unplug the network cable or UP DOWN port

It is determined by the original network cable of the corresponding port to see that the corresponding light on the switch flashes. Or ifdown ethX or ifup ethX look at the warning message on the switch to determine whether the network port is plugged in correctly.

Method 2 interface configuration

There is a graphical configuration interface for network settings in YAST. The top four network ports of the built-in network card are shown below the four network ports of the external network card on the PCI, which are usually arranged in order. If the first port is connected to C3 management switch, the second port is connected to the service access switch, and the third port is connected to the storage access switch, the corresponding IP can be configured directly according to the location order. Even if there is a mistake, it can be fine-tuned and corrected.

Method 3 uses the ETHTOOL command to facilitate determination

Ethtool is a command used to query and set network card parameters under Linux.

Summary of usage:

Ethtool ethX / / query the basic settings of ethX network port

Ethtool-h / / displays command help for ethtool (help)

Ethtool-I ethX / / query the relevant information of ethX network port

Ethtool-d ethX / / query ethX network port registration information

Ethtool-r ethX / / resets the ethX port to adaptive mode

Ethtool-S ethX / / query the statistics of sending and receiving packets on ethX network port

Ethtool-pethX / / View the device location corresponding to the corresponding device name

Ethtool-s ethX [speed 10 | 100 | 1000]\ / / set the network port rate to 10Universe 100max 1000m

[duplex half | full]\ / / set half / full duplex of the network port

[autoneg on | off]\ / / sets whether the network port is self-negotiated

[port tp | aui | bnc | mii]\ / / set the network port type

Check the ethtool method of the network interface corresponding to the Nic:

Ethtool-p eth0

After you enter, the light next to the interface of the network card corresponding to eth0 will flash, so you can quickly determine the location of the eth0 port. (press Ctrl+C to end

Command, stop flashing)

About setting the network port rate:

Ethtool-s ethX [speed 10 | 100 | 1000]

This method is only temporary, if it is permanent, it needs to be set as follows:

1. Ethtool settings can be saved through the / etc/sysconfig/network/ifcfg-ethX file to activate options the next time the device starts.

For example: ethtool-s eth0 speed 100duplex full autoneg off

This directive sets the eth0 device to full-duplex adaptive at a speed of 100Mbs. To set these parameters when eth0 starts, modify the file / etc/sysconfig/network/ifcfg-eth0 by adding the following line:

ETHTOOL_OPTS= "speed 100duplex full autoneg off"

2. Write the ethtool settings to / etc/rc.d/rc.local.

For example:

Touch / var/lock/subsys/local

ETHTOOL_OPTS= "speed 100duplex full autoneg off"

This is the answer to the question about how to determine the location of multiple network ports under suse linux11. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.

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: 239

*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