This essay will explain in detail the Linux network Card Advanced command, IP alias and Linux under the multi-NIC binding knowledgeFirst, the Network card Advanced commandIn a previous essay, the Linux Learning CentOS (ix)--LINUX System network environment configuration, detailed explained the Linux system under the network environment configuration and so on the knowledge, we have learned some basic commands about the network configuration. Some of the advanced commands for network cards in Lin
on the remote terminal, you can put 2 commands together to execute.To set up a virtual network card, you need to change the network card configuration file name to Ens33:0,ip address change one.Added virtual network card IP also can be ping through the ↑[[email protected] network-scripts]# Mii-tool ENS33 See if the network cable is connected[[email protected] network-scripts]# Ethtool Ens33 can also see if the NIC is connected[[email protected] netwo
= bond0 // these two rows are mainly used for System service network restart
SLAVE = yes // is automatically enabled later
BOOTPROTO = none
HWADDR = XXXXXXXXXXXXXX
# Cp ifcfg-eth0 ifcfg-eth1
# Vi ifcfg-eth1
DEVICE = eth1
USERCTL = no
ONBOOT = yes
MASTER = bond0 // these two rows are mainly used for System service network restart
SLAVE = yes // is automatically enabled later
BOOTPROTO = none
HWADDR = XXXXXXXXXXXXXX
4. Edit the Startup File
# Vi/etc/rc. d/rc. local
Add at the end:
Ifenslave bo
required if necessary. Whether the correctness and timing of data can be ensured requires further careful tests.
2. fault tolerance mode of the network adapter (mode = BOND_MODE_ACTIVEBACKUP)
The configuration method of the fault tolerance mode is similar to that of the load balancing mode. you just need to modify/etc/modprobe. conf.
Alias bond0 bonding
Options bond0 mode = 1 miimon = 100
The mii link detection method is used here, which is diff
)
Interrupt: 15
In this case, the failure of a Nic only results in a decrease in the outbound bandwidth of the server and does not affect network usage.
You can view bond0's working Status query to learn about the working status of bonding in detail.
[Root @ rhas-13 bonding] # cat/proc/net/bonding/bond0
Bonding. c: v2.4.1 (September 15,200 3)
Bonding Mode: load balancing (round-robin)
MII Status: up
MII
starts, you can add a line in the configuration file:/etc/modules. conf:
Alias net? Pf? 10 ipv6 # automatically load IPv6 module on demand
4. Adjust the NIC Working Mode
Currently, most network interfaces work in adaptive mode. When configuring network interface parameters, we seldom consider the network interface mode. Sometimes we find that some network interface modules have been loaded, but they are unstable in some modes. For example, I use a miscellaneous brand of XXX.
The
configuration content of each directory and the library to be used.
* Write inittab:
* Copy the line 21 si: sysinit:/etc/rc. d/rc. sysint in the host machine/etc/inittab to/mnt/sysroot/etc/inittab.
* No rc. Sysinit exists in the new rc. d, so we need to create it ourselves. rc. sysinit is a shell script.
* To run the shell file, add the bash configuration.
* To facilitate adding the database to each command file, write a cp. sh
After importing the basic command link library, you can enter th
dropped: 0 overruns: 0 carrier: 0
Collisions: 0 txqueuelen: 0
RX Bytes: 960 (960.0 B) TX Bytes: 960 (960.0 B) that is to say, in Master/Slave Mode, when a network interface fails (for example, a master switch loses power ), if the network is not interrupted, the system will follow cat/etc/rc. d/RC. in local, the specified Nic works in sequence, and the machine can still provide external services, enabling the failure protection function. you can view the working status of bond0.
[Root @ localho
driver and the upper-layer protocol inn through a standard excuse, in the end, our application will be correctly implemented. There are also some control frames. For example, the traffic control frame also needs to be recognized and executed by the Mac directly.
One end of the Ethernet MAC chip is connected to the computer PCI bus, and the other end is connected to the PHY chip. The Ethernet physical layer also includes the MII/gmii (Media independen
Label: reset F4 dp83848
As early as before graduation, I had debugged stm32f407 + dp83848. This debugging took another two days. Stm32 supports two industrial standard interfaces to connect to the external physical layer's PHY module. They are media-independent interfaces (MII) and simplified interfaces (rmii ). In the previous MII mode used by the PHY chip, the current rmii mode is used for this debuggin
/sysconfig/network
Networking=yes
Hostname=am1
gateway=192.168.100.2
Restart the Network Service app just configured
#/etc/init.d/network Restart
Bringing up interface bond0 okbringing up interface eth0 okbringing up interface eth1 OK
# Cat Http://qkxue.net/proc/net/bonding/bond0
Ethernet Channel Bonding Driver:v2.6.3-rh (June 8, 2005) Bonding Mode:fault-tolerance (active-backup)
Primary Slave:none
Currently Active Slave:eth0
=yes
Hostname=am1
gateway=192.168.100.2
Restart the Network Service app just configured
#/etc/init.d/network Restart
Bringing up interface bond0 okbringing up interface eth0 okbringing up interface eth1 OK
# cat/proc/net/bonding/bond0
Ethernet Channel Bonding Driver:v2.6.3-rh (June 8, 2005) Bonding Mode:fault-tolerance (active-backup)
Primary Slave:none
Currently Active Slave:eth0
MII Status:up
the Bond0 interface is not up)# cat/proc/net/bonding/bond0bonding Mode:adaptive Load Balancing//Bind mode: currently ALD mode (mode 6), i.e. high availability and load Balancing mode primary Slave : nonecurrently Active Slave:em1mii status:up//interface state: Up (Mii is media independent interface abbreviation, mouth meaning) MII Polling Interval (ms): 100//Interface Polling time inter
various devices is different, but its nature is the same.void Dm9000_probe (struct platform_device *pdev){struct Net_device *ndev; It's the core.Ndev = Alloc_etherdev (sizeof (struct private_data)); --The following parameters are actually Ndev's private dataSet_netdev_dev (Ndev, pdev->dev); --#define SET_NETDEV_DEV (NET, Pdev) ((net)->dev.parent = (Pdev)) Set Ndev parent device to PdevEther_setup (Ndev); --the core of the function is to initialize the members of the Ndev.--The following is a se
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.