Demystifying Network Connections: Interfaces, Switches and other devices for Beginners
Andrew Despres

Andrew Despres @andrew_despres

About: IT Helpdesk for over 10 years. Started off in Retail IT and worked my way into K-12 EDU helpdesk. Currently working for a Google Workspace/GCP specialized MSP. Always learning. Always growing.

Location:
Edmonton
Joined:
Oct 27, 2024

Demystifying Network Connections: Interfaces, Switches and other devices for Beginners

Publish Date: Jul 28
0 0

Preamble:
This space will be utilized to synthesize my notes and help improve my learning process while I study for the CompTIA Network+ N10-009 certification exam. Please follow along for more Network+ notes and feel free to ask any questions or, if I get something wrong, offer suggestions to correct any mistakes.

Network Interface Cards

The transceiver component responsible for physically connecting a host to the transmission medium is implemented in a network interface card/controller (NIC), also referred to as a network adapter. Most Ethernet adapters designed for use with copper cabling now support Gigabit Ethernet. A different kind of adapter would have to be provisioned for a fiber link. Adapters that support 10 GbE or 40 GbE come at a considerable price premium over basic Gigabit models. A NIC may also provision multiple ports on the same card. This allows either connections to different networks or aggregating the separate links into a higher bandwidth channel.

Animated example of an NIC

Each Ethernet network interface port has a unique hardware address known as the Media Access Control (MAC) address. This may also be referred to as the Ethernet address (EA) or, in IEEE terminology, as the extended unique identifier (EUI). A MAC address is also referred to as a local or physical address.

Modular Transceivers

A network might involve the use of multiple types of cabling. When this occurs, server, switch, and router equipment must be able to terminate different cable and connector types. Enterprise servers, switches, and routers are available with modular, hot-swappable transceivers for different types of fiber optic and copper connections.

SFP/SFP+

Small form-factor pluggable (SFP) transceivers use LC connectors and support Gigabit Ethernet data rates. Enhanced SFP (SFP+) is an updated specification to support 10 GbE but still uses the LC form factor. There are different modules to support the various Ethernet standards and fiber mode type (10GBASE-SR versus 10GBASE-LR, for instance).

Switch with hot-pluggable SFP fiber transceivers.Switch with hot-pluggable SFP fiber transceivers.

Note: You will often see the term "MSA" in conjunction with modular transceivers. Multi-source agreement (MSA) is intended to ensure that a transceiver from one vendor is compatible with the switch/router module of another vendor.

Note: There are also transceivers that support the Fibre Channel storage area network (SAN) protocol. These are not compatible with Ethernet switches.

QSFP/QSFP+

Quad small form-factor pluggable (QSFP) is a transceiver form factor that supports 4 x 1 Gbps links, typically aggregated to a single 4 Gbps channel. Enhanced quad small form-factor pluggable (QSFP+) is designed to support 40 GbE by provisioning 4 x 10 Gbps links. QSFP+ is typically used with parallel fiber and multi-fiber push-on (MPO) termination. QSFP+ can also be used with Wavelength Division Multiplexing (WDM) Ethernet standards.

There are also SFP+ and QSFP+ transceivers with Direct Attach Copper (DAC) ports. WDM transceivers must be installed in matched pairs. The Tx wavelength used on one side must match the Rx wavelength used on the other.

Transceiver Mismatch Issues

Modular transceivers are designed to be used with a specific type of optical fiber. For example, transceivers designed for single mode fiber use laser diodes while multimode fiber transceivers use LEDs or a different type of laser (VCSEL). Different transceivers are designed to work at different optical wavelengths (typically 850nm, 1300nm, or 1550nm) and support different Ethernet standards and bit rates. This means it is important to check the manufacturer's documentation for the interface to ensure the correct fiber type is used, not only for the fiber optic cable, but also for the fiber patch cords used to connect to it at each end. Mismatches between cable, patch cords, and interfaces may lead to significant signal loss.

As well as the fiber mode, there are three main ways of deploying fiber:
• Duplex uses two strands for transmit (Tx) and receive (Rx).
• Parallel uses multiple strands (typically eight or twenty) to implement Tx and Rx channels.

• Wavelength Division Multiplexing uses either a single bidirectional strand or dual unidirectional strands to implement multiple channels, distinguished by wavelengths.

Each type is implemented by a different transceiver model. These might need to be installed in matched pairs. For example, when using BiDi, the Tx wavelength used by one transceiver must connect through to the same wavelength on the other transceiver's Rx port.

Transceiver Signal Strength Issues

Although fiber optic cable does not suffer from attenuation in the same way as copper cable or to the same extent, there will still be some loss of signal strength from one end of the connection to the other. This is due to microscopic imperfections in the structure of the glass fiber and in the smoothness of the edge of the core, leading to some small fraction of the light within the core being scattered or absorbed. Attenuation can be tested using an optical source and optical power meter (or fiber light meter), which may be purchased together as a fiber testing kit.

An optical link budget, or loss budget, is the amount of loss suffered by all components along a fiber transmission path. This is calculated using the following parameters:

  • Attenuation—This is the loss over the length of the cable, based on fiber type and the wavelength used. Single mode has a loss of up to 0.4 dB/km, while multimode can be from 0.8 dB/km to 3 dB/km.
  • Connectors—Each connector in the path incurs a loss, usually assumed to be 0.75 dB.
  • Splices—Additional splices in the cable are budgeted at around 1 dB for mechanical and 0.3 dB for fusion.

Typically, an estimated loss budget is calculated when planning the link. The link is tested at deployment to derive an actual value. Differences between these values may reveal an installation fault or some unexpected source of signal loss.

The loss budget must be less than the power budget. The power budget is calculated from the transceiver transmit (Tx) power and receiver (Rx) sensitivity, which are both typically measured in dB per milliwatt or dBm. For example, if Tx is -8 dBm and Rx is -15 dBm, then the power budget is 7 dB.

Note: dBm measures signal strength against a reference value, where 0 dBm is 1 milliwatt. A negative dBm is typical of Ethernet transceivers, which output less than 1 mw.

If the loss budget is 5 dB, the margin between the power budget and loss budget will be 2 dB. Margin is a safety factor to account for suboptimal installation conditions (such as bends or stress), aging, repair of accidental damage (additional splices), and performance under different thermal conditions (extreme temperatures can cause loss).

If the margin between the transmitter power and link budget is low, the link is less likely to achieve the expected bandwidth. There may be opportunities to improve performance with better or fewer splices, or it may be necessary to use an amplifier to boost the signal. Most outdoor plans would be designed with a margin of at least 5 dB. In a datacenter where conditions are less variable a lower margin might be acceptable.

Ethernet Frame Format

The transceiver implements a link at the Physical layer, but Ethernet interfaces also perform addressing and framing functions at layer 2 of the OSI model. This is referred to as the Data Link layer.

Ethernet encapsulates the payload from higher layer protocols within a protocol data unit (PDU) called a frame. The basic format of an Ethernet frame and Ethernet headers is shown in the following figure.

Header fields in an Ethernet frame.

Preamble

The preamble and start frame delimiter (SFD) are used for clock synchronization and as part of the CSMA/CD protocol to identify collisions. The preamble consists of 8 bytes of alternating 1s and 0s with the SFD being two consecutive 1s at the end. This is not technically considered to be part of the frame.

EtherType

The 2-byte EtherType field is usually used to indicate the type of protocol in the frame payload. For example, a frame carrying an IPv4 packet would have an EtherType value of 0x0800; one carrying IPv6 data would be 0x86DD.

Note: You might see the 2-byte field described as the EtherType/Length field. When Ethernet was being developed, there were several alternative frame formats, one of which used the 2-byte field to indicate the frame length. To maintain compatibility, EtherTypes are values of 0x0600 (1536 in decimal) or greater. Anything less than that would be interpreted as the payload length.

Error Checking

The error checking field contains a 32-bit (4-byte) checksum called a cyclic redundancy check (CRC) or frame check sequence (FCS). The CRC is calculated based on the contents of the frame; the receiving node performs the same calculation and, if it matches, accepts the frame. There is no mechanism for retransmission if damage is detected nor is the CRC completely accurate at detecting damage; these are functions of error checking in protocols operating at higher layers.

Media Access Control Address Format

The source and destination addresses in a frame are 48-bit Media Access Control (MAC) identifiers. The notation format of this number differs depending on the system architecture. It is often displayed as six groups of two hexadecimal digits with colon or hyphen separators or no separators at all (for example, 00:60:8c:12:3a:bc or 00608c123abc) or as three groups of four hex digits with period separators (0060.8c12.3abc, for instance).

Burned-in Addresses

The IEEE gives each network adapter manufacturer a range of numbers, and the manufacturer hard codes every interface produced with a unique number from their range. This is called the burned-in address or the universal address. The first six hex digits (3 bytes or octets), also known as the organizationally unique identifier (OUI), identify the manufacturer of the adapter. The last six digits are a serial number.

An organization can decide to use locally administered addresses in place of the manufacturers' universal coding systems. This can be used to make MACs meaningful in terms of location on the network, but it adds a significant amount of administrative overhead. A locally administered address is defined by changing the universal/local (U/L) bit from 0 to 1. The rest of the address is configured using the card driver or network management software. It becomes the network administrator's responsibility to ensure that all interfaces are configured with a unique MAC.

Consider the MAC address 01:13:10:6B:17:A8. First, convert the initial octet "01" from hexadecimal to binary, which gives you 00000001. In this binary representation, the rightmost bit—the least significant bit—is 1, meaning the address is multicast. The bit immediately to the left of that, the second least significant bit, is 0, signifying hat the address is globally unique (universally administered).

Captured Ethernet frame showing the resolved OUI and IG and LG bits in the destination<br>
(broadcast) and source addresses. Note that Wireshark uses local/global (L/G) terminology<br>
rather than universal/local (U/L).

Broadcast Address

The I/G bit of a MAC address determines whether the frame is addressed to an individual node (0) or a group (1). The latter is used for broadcast and multicast transmissions. A MAC address consisting entirely of 1s is the broadcast address (ff:ff:ff:ff:ff:ff).

A unicast transmission is one sent to an individual host. This is achieved by adding the host's unique MAC address as the destination address. When a frame uses the broadcast address as the destination address, it should be processed by all nodes that receive the frame. These nodes are said to be within the same broadcast domain.

Hubs

Most Ethernet networks are implemented so that each end system node is wired to a central intermediate system. In early types of Ethernet, this function was performed by a hub. While hubs are no longer widely deployed as standalone appliances, it is important to understand the basic functions they perform.

A hub acts like a multiport repeater so that every port receives transmissions sent from any other port. As a repeater, the hub works only at the Physical layer. Electrically, the network segment looks like a single length of cable. Consequently, every hub port is part of the same shared media access area and within the same collision domain. All node interfaces are half-duplex, using the CSMA/CD protocol, and the media bandwidth (10 Mbps or 100 Mbps) is shared between all nodes.

A broadcast transmission is sent to all hosts in the same logical network area. In Ethernet, this is accomplished by using the broadcast MAC address ff:ff:ff:ff:ff:ff. A unicast transmission is addressed to a single host only, using its MAC address. With hubs, all interfaces receive all unicast and broadcast transmissions. Hosts are typically configured to ignore unicast transmissions that are not addressed to them. However, setting an interface to promiscuous mode allows a host to capture (or "sniff") all unicast transmissions sent via the hub. This is a major security weakness of hubs.

When Ethernet is wired with a hub there needs to be a means of distinguishing the interface on an end system (a computing host) from the interface on an intermediate system (the hub). The end system interface is referred to as medium dependent interface (MDI); the interface on the hub is referred to as MDI crossover (MDIX). This means that the transmit (Tx) wires on the host connect to receive (Rx) wires on the hub.

Example of how Hubs work

There are no configuration options for a hub. You just connect the device to a power source and then connect the network cables for the hosts that are going to be part of the network segment served by the hub.

There are no configuration options for a hub. You just connect the device to a power source and then connect the network cables for the hosts that are going to be part of the network segment served by the hub.

Bridges

An Ethernet bridge works at the Data Link layer (layer 2) to establish separate physical network segments while keeping all nodes in the same logical network. This reduces the number of collisions caused by having too many nodes contending for access.

Example of how Bridges work

The broadcast domain includes collision domain A and collision domain B. Collision domain A shows a 100 M b p s hub connected to four end systems. Collision domain B shows a 10 M b p s hub connected to two end systems. 100 M b p s hub and 10 M b p s hub are connected outside the domains via a bridge.

The previous figure shows how a bridge creates separate collision domains. Each hub is a shared access media area. The nodes connected to the hubs share the available bandwidth—a 100 Mbps Ethernet for domain A and a 10 Mbps Ethernet for domain B—because only one node within each collision domain can communicate at any one time. The bridge isolates these segments from each other, so nodes in domain B do not slow down or contend with nodes in domain A. The bridge does allow nodes to communicate with the other collision domain. It does this by forwarding only the appropriate traffic. This creates a single logical network, referred to as a layer 2 broadcast domain.

An Ethernet bridge builds a forwarding database to track which addresses are associated with which of its ports. When the bridge is initialized, the database's MAC address table is empty, but information is constantly added as the bridge listens to the connected segments. Entries are flushed out of the table after a period to ensure the information remains current.

If no record of the MAC address exists or the frame is a broadcast or multicast, then the bridge floods the frame to all segments except for the source segment (acting like a hub).

Switches

The problems created by contention can be more completely resolved by moving from a shared Ethernet system to a switched Ethernet. Hubs and bridges are replaced with switches. Gigabit Ethernet and faster can only be deployed using switches.

An Ethernet switch performs the same sort of function as a bridge, but in a more granular way and for many more ports than are supported by bridges. Each switch port is a separate collision domain. In effect, the switch establishes a point to point full-duplex link between any two network nodes. This is referred to as micro-segmentation.

Example of how Switches work

Because each port is in a separate collision domain, collisions can occur only if the port is operating in half-duplex mode. This would only be the case if a legacy network card or a hub is attached to it. Even then, collisions affect only the micro-segment between the switch port and the connected interface; they do not slow down the whole network. As with a bridge, traffic on all switch ports is in the same broadcast domain unless the switch is configured to implement virtual LANs (VLANs).

Ethernet Switch Types

Ethernet switches from different vendors come in a variety of ranges to support various sizes of networks. While a basic model might feature 12 to 48 ports and little scope for expansion, advanced switches support interconnections via high-speed backplanes and expandable capacity through plug-in modules plus power supply redundancy, management consoles, and transceivers for fiber optic connectivity.

Visual example of a Network Switch

The market is dominated by Cisco's Catalyst and Nexus platforms (over 55% of sales), but other notable vendors include HP Enterprise, Huawei, Juniper, Arista, Linksys, D-Link, NETGEAR, and NEC.

Ethernet switches can be distinguished using the following general categories:

  • Unmanaged versus managed—On a SOHO network, switches are more likely to be unmanaged, standalone units that can be added to the network and run without any configuration. The switch functionality might also be built into an Internet router/modem. On a corporate network, switches are most likely to be managed. This means the switch settings can be configured. If a managed switch is left unconfigured, it functions the same as an unmanaged switch does.
  • Stackable—Switches that can be connected together and operate as a group. The switch stack can be managed as a single unit.
  • Modular versus fixed—A fixed switch comes with a set number of ports that cannot be changed or upgraded. A modular switch has slots for plug-in cards, meaning it can be configured with different numbers and types of ports.
  • Desktop versus rack-mounted—Simple unmanaged switches with five or eight ports might be supplied as small freestanding units that can be placed on a desktop. Most larger switches are designed to be fitted to the standard-size racks that are used to hold networking equipment

Visual Example of Stackable Switches

Switch Interface Configuration

Configuration of a managed switch can be performed at a command-line interface (CLI). Once you have established a connection to the switch's management interface, you can configure settings for each of the switch port interfaces. These settings control the network link configured for each client device attaching to the switch. Most switch operating systems work in multiple command modes or hierarchies. For example, Cisco IOS has three principal modes:

  • User EXEC mode—This is a read-only mode where commands can be used to run basic troubleshooting tools. This mode is indicated by the > prompt.
  • Privileged EXEC mode—This allows the user to report the configuration, show system status, reboot or shut down the appliance, and backup and restore the system configuration. This mode is activated using the enable command from user EXEC mode. It is denoted by a # prompt.
  • Global configuration mode—This allows the user to write configuration updates. It is activated by using the configure terminal command from privileged mode and indicated by a (config)# prompt.

Most switch CLIs also support TAB and/or use of ? to list different ways to complete a partial instruction.

Interfaces are identified by type, slot, and port number. For example, GigabitEthernet 0/2 (or G0/2) is port #2 on the first 10/100/1000 slot (or only slot).

NOTE: Stackable switches precede interface identifiers with a module ID. For example, GigabitEthernet 3/0/2 is the second port on the first slot in the third module in the stack. Note that this numbering does vary between manufacturers. Also, some start from zero and some from one.

Switches normally support a range of Ethernet standards so that older and newer network adapters can all be connected to the same network. In most cases, the port on the switch is set to auto-negotiate speed (10/100/1000) and full- or half-duplex operation. A static configuration can be applied manually if necessary.

NOTE: If you don't use autonegotiation, you need to manually configure the speed and duplex to match both devices. For best performance, if one end of the connection is hard coded, it's advised to hard code the other end and not rely on autonegotiation.

To configure the first interface, from global config mode, run interface GigabitEthernet0/1. This changes the prompt to (config-if)#. Some of the main subcommands are the following:

  • shutdown disables the interface; no shutdown enables the interface.
  • speed and duplex are both normally set to auto (the default). Using speed 100 and duplex half would apply a static configuration.
  • switchport configures switching mode characteristics. Interfaces connected to computer devices are usually set to switchport mode access. switchport port-security allows configuration of various security mechanisms.

Once done, run exit. To make changes persistent, run do copy running-config startup-config.

Cisco IOS switch interface configuration commands.Cisco IOS switch interface configuration commands.

NOTE: copy is a privileged mode command. do copy allows you to run the command from within config mode. You can use the range command to configure a number of interfaces simultaneously. For example, interface range GigabitEthernet0/1-24 enters configuration mode for all 24 interfaces in module 0.

This deep dive into network interfaces and switches lays a crucial foundation for understanding how data travels across networks. From the unique identity of a MAC address to the intelligent forwarding of a modern switch, and the introduction to Cisco’s iOS commands, these components are the building blocks of virtually every network you'll encounter. Keep exploring, keep learning, and you'll be well on your way to mastering the concepts needed for your CompTIA Network+ exam and a successful career in IT!

Comments 0 total

    Add comment