Networking All-in-One For Dummies. Doug Lowe
Читать онлайн книгу.network. Each network interface provides a port, which is the plug-in point for the interface. Generally speaking, the terms port and interface are synonymous.
A network interface might be a separate add-on card for a computer, in which case the interface is called a network interface card (NIC). On some devices, such as printers, separate network interface cards are still common. But nearly all desktop and laptop computers have a network interface built into the computer’s motherboard, so separate NICs are rarely used on desktop computers or laptops. NICs are still widely used on servers, however, as servers are often configured with two or more interfaces; using a separate card for the interface allows for more flexibility.
The term adapter is often used as a synonym for interface. Port, interface, adapter — three words that mean the same thing.
Every network interface must have a unique identifier called a MAC address. (MAC stands for media access control, but that won’t be on the test.) Each MAC address is unique throughout the entire world. I have no idea whether MAC addresses are unique throughout the galaxy; it’s entirely possible that the computer system on some invading alien spacecraft would have a MAC address that is the same as your laptop, but if that were to happen, I doubt you’d be too concerned about fixing your network.
MAC addresses are important because they provide the means for a network to keep track of the devices that make up the network. Without MAC addresses, it would be impossible to know what devices are on the network. And it would be impossible to send information to a particular device or to know which particular device sent information.
The term physical address is sometimes used as a synonym for MAC address. The two terms are interchangeable.
MAC addresses are a part of layer 2 of the OSI Reference Model, called the link layer. This layer is responsible for the exchange of basic information on a network. The ability to uniquely identify every device on a network is a key component of enabling that to happen.
MAC addresses are 48 bits in length, which means that more than 280 trillion devices can be assigned unique MAC addresses before we run out. When written, MAC addresses are written in six octets separated by hyphens. An octet is a group of eight binary bits, written as a two-digit number in hexadecimal notation, which uses the letters A through F in addition to the digits 0 through 9 to represent the value of each octet. A typical MAC address looks like this:
48-2C-6A-1E-59-3D
If you want to see the MAC address of your computer’s network adapter, open a command prompt and type ipconfig /all. Scroll through the output from this command to see the MAC address (ipconfig calls a physical address) for each interface on your computer. For example, here’s the ipconfig output for the built-in adapter on my SurfaceBook:
Ethernet adapter Ethernet 2: Media State ……………………………………………….. : Media disconnected Connection-specific DNS Suffix . : bcf-engr.pri Description ……………………………………………….. : Surface Ethernet Adapter Physical Address ……………………………………… : 58-82-A8-9C-A7-28 DHCP Enabled ………………………………………………. : Yes Autoconfiguration Enabled ……………… : Yes
Here, you can see the MAC address is 58-82-A8-9C-A7-28.
A MAC address is technically associated with a network interface, not with the device that uses that interface. For example, if your computer’s motherboard has a network interface built in, the MAC address of the network interface is pretty much married to the motherboard. However, if your computer has a separate NIC, the MAC address is a part of the card, not the computer that the card is plugged into. If you remove the interface card from one computer and install it in another, the MAC address travels with the card. The key points to remember here are that in order for a computer, printer, or any other device to connect to a network, that device must contain a network interface. That interface has a unique MAC address, which is the primary way that the network can distinguish one device from another.
Pondering Packets
When two or more devices are connected to a network via cables plugged into their network interfaces, those devices can exchange information with one another. This bit of magic is accomplished through the use of packets, which are relatively small units of data that are sent and received through the network interface and cables. A network packet always originates at a single network interface, called the sender, and it’s usually (but not always) sent to a single network interface, called the destination.
A packet is very similar to an envelope that you would send through standard mail delivery. It includes the MAC address of both the sender and the destination, as well as some other interesting header information, along with a payload that contains the actual data being sent by the packet. You can think of the payload as what you would put in an envelope you want to send through the mail. You wouldn’t dream of dropping an envelope in the mail without writing the recipient’s address, as well as your own address, on the envelope. So it is with packets.
The payload of an Ethernet packet may be a packet created by some higher-level protocol, such as IP. This is analogous to putting a letter in an envelope, putting that envelope in a larger envelope, and sending it through the mail. When the recipient receives your mail, she opens the envelope only to find another envelope that must be opened. That envelope may itself contain another envelope and so on, like Russian nesting dolls.
The term frame is often used instead of packet, but technically they’re not quite the same. Every packet begins with a preamble, which consists of 56 bits of alternating zeros and ones. This preamble is used by the electronic circuitry of the interfaces to get their clocks synchronized properly so they can accurately read the rest of the packet. It’s the rest of the packet that is technically called the frame. In other words, a packet consists of a preamble followed by a frame. Because the preamble is of concern only to the electronic engineers that design network interfaces, most non-engineers use the terms packet and frame interchangeably.
Ethernet has a standard packet format that all packets sent on an Ethernet network must follow. An Ethernet packet contains the following information:
Preamble: The preamble consists of 56 bits of alternating ones and zeros and is used to synchronize the precise timing required to read packet data.
Start-of-frame marker: A start-of-frame marker is a single byte that indicates that the frame is about to begin.
Destination MAC address (six bytes).
Sender MAC address (six bytes).
Tag: The tag, which is used to support virtual local area networks (VLANs), is optional. A VLAN lets you divide two or more distinct LANs on a shared physical infrastructure (for example, cables and switches). (For more information about VLANs, see Chapter 3 of this minibook, as well as Book 3, Chapter 1.)
Ethertype (two bytes): This field indicates