Joke Collection Website - Mood Talk - What is a network card?
What is a network card?
A key hardware in a network system is its adapter, which is usually called a network card. In LAN, network card plays an important role. Network cards are used to input and output signals between computers. The network card has its own interrupt number (IRQ) and I/O ground. Network cards include ISA cards, e ISA cards and Ethernet cards used on Apple MAC computers. At present, 16-bit ISA network card and 32-bit PCI network card are widely used. The network card has a buffer memory to store data. Similar to sound cards, network cards usually have their own drivers. When using, insert the network card into the expansion slot of the computer. There is an indicator light on the network card to indicate whether your work is normal or not.
The network card supports different transmission rates, some are 10 megabits per second, some are 100 megabits per second, and some can adapt to 10 megabits or 100 megabits per second.
The network card with remote startup chip can be used on diskless workstation. Diskless workstation, hard disk, or floppy drive. Starting the computer through the network card can ensure the security of the system and avoid viruses. In addition, it can also reduce the cost.
In notebook computers, smart PCMCIA cards are used to exchange data with other computers. In high-speed networks, there are FDDI network cards for optical fiber data distribution interfaces and ATM network cards for different card transmission modes. The network card used for bus topology in LAN is a network card with BNC port, and the transmission medium is a thin coaxial cable of 50 Ω, which needs to be sealed with terminators at both ends of a network segment to form a network loop.
The network card has now become one of the standard configurations of computers. How many secrets does a small network card contain? Let's watch together.
The most commonly used network device is the network card. The network card itself is a LAN (local area network) device, which can be connected to the Internet through gateways, routers and other devices. The Internet itself is made up of countless such LANs.
There are many kinds of network cards, including Ethernet cards, token ring cards and ATM cards. Accord to that control of the data link layer; According to the physical layer, there are wireless network cards, RJ-45 network cards, coaxial cable network cards, optical network cards and so on. Their data link control, addressing and frame structure are different. Physical connection mode, data coding, signal transmission medium and level are different. The following mainly introduces the most commonly used Ethernet cards.
CSMA/CD (Carrier Sense Multiple Access/Collision Detection) control technology adopted by Ethernet. He mainly defined the working modes of physical layer and data link layer. The data link layer and the physical layer realize their respective functions and do not care about each other's operations. There are standard interfaces (such as MII and GMII). ) transfer data and control between them.
The physical layer of Ethernet card can include many technologies, such as RJ45, optical and wireless. The difference between the two is that the physical medium and the medium for transmitting signals are different. These are defined in detail in the IEEE 802 protocol family.
The RJ45 network card we mainly discuss this time belongs to the definition of IEEE802.3.
Second, the composition of the network card
The basic structure of 1. network card
Ethernet cards include two layers of OSI (Open Systems Interconnection) model. Physical layer and data link layer. The physical layer defines the electrical and optical signals, line status, clock reference, data coding and circuits required for data transmission and reception, and provides a standard interface for data link layer devices. The data link layer provides addressing mechanism, data frame construction, data error checking, transmission control and standard data interface for the network layer.
The chip of data link layer in Ethernet card is generally referred to as MAC controller, and the chip of physical layer is referred to as PHY. Many NIC chips combine the functions of MAC and PHY on one chip, such as Intel.
82559 network card and 3COM
3C905 network card. However, the mechanism of MAC and PHY still exists separately, but the appearance is a single chip. Of course, there are also many network cards whose MAC and PHY are made separately, such as DFE-530TX of D-LINK.
2. What is a MAC?
First of all, let's talk about the functions of the MAC chip of the Ethernet card. The Ethernet data link layer actually includes MAC (Media Access Control) sublayer and LLC (Logical Link Control) sublayer. The function of an Ethernet card MAC chip is not only to realize the functions of MAC sublayer and LLC sublayer, but also to provide a PCI interface that meets the specifications to realize data exchange with the host.
After receiving an IP packet (or a packet of other network layer protocols) from the PCI bus, the MAC splits and repackages it into a frame with a maximum of 15 18 bytes and a minimum of 64 bytes. The frame includes the target MAC address, its own source MAC address and the protocol type in the packet (for example, the type of IP packet is indicated by 80). Finally, there is a double-word (4 bytes) CRC code.
But where did the MAC address of the target come from? This involves the ARP protocol (the protocol between the network layer and the data link layer). When transmitting data of a destination IP address for the first time, an ARP packet will be sent out, and the destination address of its MAC is a broadcast address, which reads "Who is the owner of IP address XXX?". XXX。 XXX?” Because it is a broadcast packet, all hosts in this LAN have received this ARP request. The host receiving the request compares this IP address with its own IP address, ignores it if it is different, and sends out an ARP response packet if it is the same. The host of this IP address said in the ARP response after receiving this ARP request packet: "I am the owner of this IP address". His MAC address is in this bag. Determine the destination MAC address of future frames with the IP address. (Other protocols such as IPX/SPX also have corresponding protocols to accomplish these operations. )
The relationship between ip address and MAC address is stored in the host system, called ARP table, which is completed by the driver and operating system. Arp -a can be used in Microsoft system.
Command to view ARP table. The same is true when a data frame is received. After CRC, if there is no CRC verification error, the frame header will be removed, the data packet will be taken out, and passed to the driver and the upper layer protocol inn through standard excuses, and finally it will reach our application correctly.
There are also some control frames, such as traffic control frames, which also need the MAC to directly identify and execute corresponding behaviors.
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 physical layer of Ethernet includes MII/GMII (Media Independent Interface) sublayer, PCS (Physical Coding sublayer), PMA (Physical Media Attachment) sublayer, PMD (Physical Media Dependence) sublayer and MDI sublayer. PHY chip is one of the important functional devices to realize the physical layer, which realizes all the functions of the sub-layers of the previous physical layer.
3. The process of network transmission
When sending data, PHY receives data from MAC (for PHY, there is no concept of frame, but for PHY, address, data and CRC are all data), adds 1 bit error detection code every 4 bits, then converts the parallel data into serial stream data, and then according to the coding rules of physical layer (10Based-T NRZ coding or 65438). (Note: It is hard to understand whether the data on the Internet is digital or analog. I'll talk about it last)
The process of receiving data is the opposite.
Another important function of PHY is to realize some functions of CSMA/ CD. It can detect whether there is data being transmitted on the network, wait if there is data being transmitted, and send the data after waiting for a random time once it detects that the network is idle. If two network cards just send data at the same time, conflicts will inevitably occur. At this point, the conflict detection mechanism can detect the conflict and then wait for a random time to resend the data.
This random time is very particular, it is not a constant, the random time calculated at different times is different, and there are many algorithms to deal with the second collision of the same two hosts with low probability.
When accessing Internt broadband, many netizens like to use network cards with strong ability of "grabbing the line". It is because different PHY collision methods design different calculation random time, which makes some network cards "take advantage". However, line grabbing is only for broadcast domain networks, and it is meaningless for point-to-point connection of local devices such as switching networks and ADSL. And "grabbing the line" is only relative, and there will be no qualitative change.
4. About the conflict between networks
Nowadays, the popularity of switches makes the switching network popular, which makes the collision domain network much less and greatly improves the network bandwidth. However, if you use HUB or * * * to surf the Internet, it still belongs to the conflict domain network, and there are conflicts and collisions. The biggest difference between a switch and a hub is that one is a local area network switching device to build a point-to-point network, and the other is a local area network interconnection device to build a collision domain network.
Our PHY also provides an important function of connecting with the opposite equipment, and displays its current connection status and working status through LED lights to let us know. When we connect the network cable to the network card, the pulse signal sent by PHY will constantly detect that there is equipment on the opposite side. They communicate through a standard "language" and negotiate with each other to determine the connection speed, duplex mode and whether to adopt flow control.
Usually the result of negotiation is the maximum speed and the best duplex mode supported by two devices at the same time. This technology is called automatic negotiation or NWAY, and they refer to the same thing-automatic negotiation.
The output part of 5.5. PHY
Now let's understand the later part of the PHY output. The signal level generated by a CMOS process chip is always greater than 0V (depending on the process and design requirements of the chip), but such a signal will have great DC component loss when it is sent to 100 meter or even farther. Moreover, if the external network is directly connected to the chip, electromagnetic induction (lightning) and static electricity can easily damage the chip.
Then, different grounding modes of equipment and different power grid environments will lead to inconsistent 0V levels between the two parties, so that the signal will be transmitted from point A to point B. Due to the different 0V levels of equipment at point A and point B, a great current will flow from the equipment with high potential to the equipment with low potential. How can we solve this problem?
At this time, the transformer (isolation transformer) appeared. It uses differential mode coupling coil to filter the differential signal sent by PHY to enhance the signal, and couples it to the other end of the connecting network cable through the conversion of electromagnetic field. In this way, not only the network cable and PHY are not physically connected, but also the signal is transmitted, which cuts off the DC component in the signal, and the data can be transmitted in devices with different 0V levels.
The isolation transformer itself is designed to withstand the voltage of 2KV~3KV. It also plays the role of lightning protection induction (I personally think it is not appropriate to use lightning protection here). Some friends' network equipment is easy to burn out in thunderstorm weather, mostly caused by unreasonable PCB design, and the interface of the equipment is burned out. Very few chips are burned out, that is, the isolation transformer plays a protective role.
6. About transmission media
The isolation transformer itself is a passive component, which only couples the PHY signal to the network line and does not play the role of power amplification. So who decides the longest transmission distance of a network card signal?
The maximum transmission distance of the network card and the compatibility of the connection with the other equipment are mainly determined by PHY. However, the output power of PHY is also relatively large, and it can send signals above 100 meters, which is more likely to cause EMI problems. At this time, a suitable transformer is needed to cooperate with it. Marvell PHY of the boss Company can often transmit the distance of 180 ~ 200m, far exceeding the IEEE standard of 100m.
RJ-45 connector realizes the connection between network card and network cable. It has 8 copper sheets, which can be connected with 4 pairs of twisted pairs (8 wires) in the network cable. In the 100M network, 1 and 2 send data, and 3 and 6 receive data. There is a pair of differential signals between 1 and 2, that is, their waveforms are the same, but the phase difference is 180 degrees, and the voltage amplitude at the same time is positive and negative. Such signals can be transmitted farther and have strong anti-interference ability. Similarly, 3 and 6 are also differential signals.
Each of the eight wires in the network cable is twisted together to form a pair. When we make the network cable, we must pay attention to make a pair of 1 and 2, and a pair of 3 and 6. Otherwise, when using this network cable for a long distance, it will lead to no connection or very unstable connection.
Now the new PHY supports cars.
MDI-X function (transformer support is also needed). The functions of RJ-45 interface 1, 2 transmitting signal lines and 3 and 6 receiving signal lines can be automatically exchanged. Some PHYS even support the automatic exchange of positive and negative signals in a pair of wires. In this way, we don't have to worry about whether we need to connect a device with a straight-through network cable or a crossover network cable. This technology has been widely used in switches and SOHO routers.
In the 1000Basd-T network, the most common transmission mode is to use all four twisted pairs in the network cable, with 4, 5, 7 and 8 additional ones, and transmit and receive data at the same time. Because the specification of 1000Based-T network includes AUTO.
MDI-X function, so we can't strictly determine their sending or receiving relationship, depending on the specific negotiation results of both parties.
7.7 How to communicate with each other? PHY and Mike?
Let's continue to pay attention to how PHY and MAC transmit data and communicate with each other. Through the standard MII/MII/ Gigabit (Media Independent) defined by IEEE.
Cross Access (Media Independent Interface) interface connects MAC and PHY. This interface is defined by IEEE. MII interface transfers all data and data control of the network.
MAC uses SMI (serial) to determine the working state of PHY and control PHY.
manage
Interface) interface is completed by reading and writing PHY registers. Some registers of PHY are also defined by IEEE, so that PHY can reflect its current status into the registers, and MAC can constantly read PHY's status registers through SMI bus to know the current status of PHY, such as connection speed and duplex capability. Of course, PHY registers can also be controlled by SMI settings, such as the opening and closing of flow control, self-negotiation mode or forced mode.
We have seen that the MII interface and SMI bus, as well as the status register and control register of PHY are all standardized by IEEE, so Macs of different companies can work in coordination with PHY. Of course, in order to cooperate with some unique functions of PHY of different companies, the driver needs to be modified accordingly.
The realization of the main functions of the network card is basically the above equipment.
There is also an EEPROM chip, generally 93C46. It records the manufacturer ID of the network card chip, the subsystem manufacturer ID, the MAC address of the network card, and some configurations of the network card, such as the address of PHY on SMI bus, the capacity of BOOTROM, whether to enable the BOOTROM boot system, and so on.
Many network cards also have BOOTROM. It is used to boot the operating system of a diskless workstation. Because there is no disk, some programs and protocol stacks needed for booting are put in it, such as RPL and PXE. It is actually a standard PCI.
Read-only memory. So some hard disk write protection cards can be realized by burning the BootRom of the network card. In fact, the ROM of PCI devices can be put into the BIOS of the motherboard. When you start the computer, you can also detect this ROM and correctly identify what device it belongs to. The configuration of AGP is the same as PCI in many places, so the BIOS of many graphics cards can also be put into the motherboard BIOS. This is why we have never seen BOOTROM on the onboard network card.
8. Network card power supply
Finally, the power supply part. Most network cards now use a voltage of 3.3V or lower. Some are dual voltage. Therefore, a power conversion circuit is needed.
And in order to wake up, the network card
Line function, must ensure that all PHY and a very small part of MAC are always in the power-on state, which requires 5V on the motherboard.
Circuit for converting standby voltage into PHY working voltage. After the host is turned on, the working voltage of PHY should be replaced by 5V converted voltage to save 5V.
The consumption of standby. (Many inferior network cards don't do this).
Awakening
Network cards that support lines usually have a WOL interface. That's because PCI2. 1 didn't wake up the host with PCI devices before, so a cable is needed to connect the south bridge through the WOL interface on the motherboard to realize the WOL function.
The new motherboard network card generally supports PCI2.2/2.3, which expands the signal function of PME#, and can realize the wake-up function through PCI bus without that interface.
label
Ethernet cards are composed of these parts. They cooperated closely and coordinated with each other, providing us with a stable and informed network access. The popularity of the Internet not only greatly improves work efficiency, but also enables us to roam freely in the ocean of the Internet!
Precautions:
Is the signal on the network line analog or digital?
The answer is analog signal. Because it is transmitted and received by analog technology. Although the information it transmits is digital, it does not mean that the information it transmits is digital, so the signal can be called a digital signal.
Simple example: We know that the telephone is an analog signal, but when we dial the Internet, the telephone line transmits digital information, but the signal itself is still analog. However, ADSL is also transmitted through telephone lines, but it is a digital signal. It depends on the technology it is transmitted and accepted.
- Previous article:What does my father-in-law get for his birthday? Three birthday gifts recommended to my father-in-law
- Next article:talk nonsense
- Related articles
- Please ask Degang Guo about "not necessarily" in one of the paragraphs.
- Make your own breakfast at home on weekends.
- "Little Frog" Lesson Plan
- What does it mean when a woman takes the initiative to chat with you?
- Love words that girls like to hear.
- How fierce can Tibetan mastiffs be?
- Parents for the first time, children for the first time.
- What color scarf does a black suit look good with?
- Send some emotional sentences (29 sentences) for back pain.
- Children's copywriting phrases are very cute.