Ethernet

Vicente González Ruiz

December 25, 2013

Contents

1 Basics
2 Servicio
3 Topologies
4 Nomenclature
5 Port-based VS Shared Memory switches
6 Layer 3 switches
7 Attacks
8 Virtual LANs (VLANs)
9 VLAN trunks
10 Types of VLANs
11 VLAN Switch Port Modes
12 Inter-LAN communication using a layer 3 switch
13 Direcciones f’isicas
14 Estructura del frame
15 Tamaño m’aximo y m’inimo de frame
16 Ethernet 10Base2
 16.1 El cable Ethernet coaxial
 16.2 El protocolo CSMA/CD en Ethernet
 16.3 Eficiencia
 16.4 Puentes
 16.5 Las tablas de conmutaci’on
 16.6 Flooding (inundaci’on)
 16.7 Encaminamiento multicast
17 Network redundancy implies error resilience
 17.1 El ’arbol de expansi’on (spanning tree)
 17.2 The Spanning Tree Protocol (STP, IEEE 203.1D)
18 Brigde ID (BID)
19 BPDU frames
20 Algorithm for the selection of the root bridge
21 Port cost
22 The Spanning Tree Algorithm (STA)
23 Port clasification
24 Largest network diameter
25 The Rapid STP (RTSP, IEEE 802.1w)
26 Multiple STP (MSTP
27 Ethernet conmutada
 27.1 Concentradores (hubs)
 27.2 Conmutadores (switches)
 27.3 El cable usado en Ethernet conmutada
 27.4 Encaminamiento usando conmutadores
 27.5 Ethernet 10BaseT y Ethernet 100BaseT
 27.6 El cable Ethernet 10BaseT y Ethernet 100BaseT
 27.7 Ethernet 100Base{T—F}X
 27.8 Ethernet Gigabit Ethernet (1000BaseT) y Ethernet 10 Gigabit
 27.9 El cable Ethernet Gigabit (1000BaseT) y Ethernet 10 Gigabit
 27.10 El cable 1000BaseSX y 1000BaseLX
28 Resumen
29 Encaminamiento entre BSSs
30 Mobilidad entre BSSs

1 Basics

2 Servicio

3 Topologies

4 Nomenclature

5 Port-based VS Shared Memory switches

6 Layer 3 switches

7 Attacks

8 Virtual LANs (VLANs)

VLAN technology allows the separation of large broadcast domains into smaller ones (VLANs). Smaller broadcasts domains limit the number of devices participating in broadcasts and allow devices to be separated into functional groupings. It is possible also to extend a VLAN over several switches, which can be very useful for networks that are geographically distant and can not be conected using a one swhich.

Different VLANs are like different networks.

Switch ports belongs to one o more VLANs.

VLANs are identified by numbers and there is two ranges::

  1. Normal Range VLANs: Identified by a VLAN ID between 1 and 1005, where IDs 1002 through 1005 are reserved for Token Ring and FDDI VLANs. Can be managed with by the VLAN Trunking Protocol (VTP)
  2. Extended Range VLANs: Identified by a VLAN ID between 1006 and 4094. Normally are used by ISPs to extend their infraestructure to a greater number of customers. Can’t be managed by the VTP.

9 VLAN trunks

The links that connects switches and that transmitt data of different VLANs are called VLAN trunks. Without VLAN trunks, the number of connections between two switched should be equal to the number of VLANs that is defined in both switches. With VLAN trunks, only a link is necessary.

Frames that are transmitten in a VLAN trunk need to be encapsulated in a 802.1Q frame, which adds a header with the tag of the VLAN to that the frame belongs. There is no difference between a the VLAN’s traffic and a LAN’s traffic.

10 Types of VLANs

Frames are tagged with a VLAN number that can be used to classify the frames.

  1. Default VLAN: When the switch boots, there is only a VLAN defined, the default VLAN (usually, the VLAN number 1) and all ports belongs to that VLAN. It is always available and it can not be renamed nor deleted. The default VLAN is used for protocols such as the Spanning Tree Protocol (STP).
  2. Data VLAN (or user VLAN): A VLAN that is configured to carry only user-generated traffic (email, HTTP, VoIP without QoS, etc.).
  3. Voice VLAN: Spefifically defined for carry voice data (VoIP) within a QoS (Quality of Service) context. A switch prioritices voice frames.
  4. Native VLAN: Used to send non-tagged (native) frames (those that go over non-trunk ports). If the frame is tagged, the native VLAN drops it. By default, the native VLAN is the VLAN number 1 (the default VLAN). See the IEEE 802.1Q specification for more information.
  5. Nanagement VLAN: Used for management purposes (has an IP address asigned).

11 VLAN Switch Port Modes

A port can be configure to support these VLAN types:

  1. Static VLAN: Those ports that are manually assigned to a VLAN.
  2. Dynamic VLAN: Those ports that are controlled by a VLAN Membership Policy Server (VMPS).
  3. Voice VLAN: Those ports that are assigned to a VoIP VLAN, supporting, for example, a IP telephone.

12 Inter-LAN communication using a layer 3 switch

VLANs act like different (separated LANs). If fact, hosts attached to a VLAN or other, dones not notice anything special. For this reason, if a host of one VLAN want to communicate with other hosts of other VLAN we need a router or a layer 3 switch (that are not the same!):

13 Direcciones f’isicas

14 Estructura del frame

  1. Pre’ambulo (8 bytes): consta de XXXX XXXY donde X = 1010 1010 e Y = 1010 1011. Se utiliza para sincronizar los relojes del emisor y del receptor que miden la duraci’on de los bits del frame.
  2. Dir. f’isica destino (6 bytes): dir del adaptador destino.
  3. Dir. f’isica fuente (6 bytes): dir del adaptador origen.
  4. Tipo (2 bytes): identifica el protocolo usado en la capa de red (IP, Novell IPX, AppleTalk, etc.).
  5. Datos (entre 46 y 1.500 bytes): paquete de datos transportado. La capa de red se encarga de la segmentaci’on y del relleno con ceros (si estos fueran necesarios).
  6. CRC (4 bytes): CRC-32. Sirve para detectar errores de transmisi’on.

15 Tamaño m’aximo y m’inimo de frame

16 Ethernet 10Base2

16.1 El cable Ethernet coaxial

16.2 El protocolo CSMA/CD en Ethernet

16.3 Eficiencia

16.4 Puentes

16.5 Las tablas de conmutaci’on

16.6 Flooding (inundaci’on)

16.7 Encaminamiento multicast

17 Network redundancy implies error resilience

Link and node (switch) redundancy is a way to create a fault-resistant networks. For this reason, physical loops are common because if there is a failure in one of the paths, there is other one to transmmit the data.

Due to a switch floods a frame when the destionation MAC address of the frame is unknown, the same frame can return to the switch through a loop. This can result in duplicate frames arriving at the destination device.

Moreover, when broadcast frames are used, a loop causes a broadcast strorm because each switch floods the frame that returns to the switches through the loop. Thus, in each iteration of the loop, switches floods an extra frame (the frame that has been by error because the loop), consumming all the available bandwidth.

17.1 El ’arbol de expansi’on (spanning tree)

17.2 The Spanning Tree Protocol (STP, IEEE 203.1D)

18 Brigde ID (BID)

The STP defines that each bridge has a 64-bit Bridge Identificator (BID). The 16 MSBs are specified by the bridge administrator and, by default, it is set to 0x8000. The rest of bits are specified by the manufactorer of the bridge (like in the Ethernet NICs).

The 16 MSBs is composed of 4 MSBs which represent the bridge priority and 12 LSBs with the extended system ID. This ID is the ID of the VLAN with shiwh the BPDU is associated.

19 BPDU frames

The STP determines a root bridge for the spanning-tree instance by exchanging BPDUs.

Field Bytes Meaning
Protocol ID 2 Always 0
Version 1 Always 0
Message type 1 Always 0
Flags 1 Topology change and topology change ACK
Root ID 8 2-byte priority + 6-byte MAC address of the root
Cost of path 4 Cost of the path from the bridge to the root
Bridge ID 8 2-byte priority + 6-byte MAC address of the bridge
Port ID 2 Port number from which the BPDU was sent
Message age 2 Elapsed time from the root sent the BPDU
Max age 2 Instant of time the BPDU should be not forwarded
Hello time 2 Interval used by root to send BPDUs
Forward delay 2 Time that that bridge waits before anunce a change in the topology

20 Algorithm for the selection of the root bridge

21 Port cost

Costes recomentados por la norma IEEE 802.1 para el STP.

Tasa de bits Coste


4 Mbps 250
10 Mbps 100
16 Mbps 62
100 Mbps 19
1 Gbps 4
10 Gbps 2

22 The Spanning Tree Algorithm (STA)

Determines which ports of the bridges on a broadcast domain need to be configured for blocking to prevent loops from ocurring.

  1. Determine the root bridge: The root bridge is the one with the lowest BID. Each bridge sends out BPDU frames containing the BID and the root ID15 every 2 seconds. When a bridge receives a BPDU, computes the minimun of the actual root IP it has and the received in the BPDU, updates its root ID and replaces the root IP by the minimun on the flooded BPDU.
  2. Each bridge determines the best path to the root bridge: The path information if determined by summing up the indivial port costs along the path from the destination to the root bridge. The port with the lowest cost path to the root is selected to belongs to the spanning-tree. If a bridge has two paths with the same cost, the bridge with lower BID is selected to be in the spanning tree. In any case, when a port is designed for beeing in the spanning tree, there is a forward delay (15 seconds by default) in which the bridge waits to use that port. This prevents from oscillations in the learned topology.

23 Port clasification

  1. Root ports: Only exists on non-root bridges and only one per bridge. It is the port with the lowest path cost to the root bridge.
  2. Designated ports: For the root bridge, all ports are designated ports. For non-root bridges, only exist one per bridge and is the port. A port is a designated port if in the other extreme of the link, the bridge has classified his port as root.
  3. Non-designated ports: The rest of ports.

24 Largest network diameter

A seven-bridge diameter is the largest diameter that STP permits because of convergence times (time that it takes to recalculate the spanning tree if a bridge or a link fails). This time is, in average, of 14 seconds. A link is considered broken if has not transmited 10 consecutive BPDUs (no BPDU nothing received in 20 seconds). When this happens, the bridge send a message to the root bridge which broadcast the change to the rest of bridges which re-run the SPA.

25 The Rapid STP (RTSP, IEEE 802.1w)

A newer and much faster version of the STP (from up to 50 seconds to uo to 6 seconds). The key is to define alternate or backup ports that can be inmediately used in case of network change.

It is backward compatible witn 802.1D.

26 Multiple STP (MSTP

Allow to use VLANs in the same spanning-tree instance.

27 Ethernet conmutada

27.1 Concentradores (hubs)

27.2 Conmutadores (switches)

27.3 El cable usado en Ethernet conmutada

27.4 Encaminamiento usando conmutadores

27.5 Ethernet 10BaseT y Ethernet 100BaseT

27.6 El cable Ethernet 10BaseT y Ethernet 100BaseT

27.7 Ethernet 100Base{T—F}X

27.8 Ethernet Gigabit Ethernet (1000BaseT) y Ethernet 10 Gigabit

27.9 El cable Ethernet Gigabit (1000BaseT) y Ethernet 10 Gigabit

27.10 El cable 1000BaseSX y 1000BaseLX

28 Resumen

Ojo, hay verbatim oculto!

29 Encaminamiento entre BSSs

30 Mobilidad entre BSSs

References

[1]   The abcs of spanning tree protocol. Contemporary Controls, 2006.

[2]   James F. Kurose and Keith W. Ross. Computer Networking: A Top-Down Approach Featuring the Internet (2nd Edition). Addison Wesley, 2003.

[3]   William Stallings. Comunicaciones y Redes de Computadores (7a Edici’on). Prentice Hall, 2004.