---
# System prepended metadata

title: ACIT 2620 Ethernet notes
tags: ['2620']

---

---
type: slide
slideOptions:
  display: block
---

# ACIT 2620

## Week 3

---

<!-- .slide: data-transition="zoom convex-out"-->
# Ethernet

---

<!-- .slide: data-transition="zoom convex-out"-->
<div>
    <img src="https://hackmd.io/_uploads/SJaa6kTtT.png"
         alt="layer 2" style="width: 70%; " />
</div>


---

<!-- .slide: data-transition="zoom convex-out" style="text-align: left"-->
## Data Link Layer Sublayers

<dl>
    <dt>Logical Link Control (LLC)</dt>
    <dd>Used to facilitate multiple upper layer (i.e. network ) protocols</dd>
    <dd>Provides common interface to upper layers</dd>
    <dd>Supplies multiplexing and flow control services</dd>
    <dd>Provides error checking</dd>
</dl>   

----

<dl>
    <dt>Media Access Control (MAC)</dt>
    <dd>Provides addressing and channel access control mechanisms (i.e. CSMA CD, CSMA CA)</dd>
    <dd>Appends physical address of destination computer onto the frame</dd>
</dl>

---

<!-- .slide: data-transition="zoom convex-out" style="text-align: left"-->
## Frames

![image](https://hackmd.io/_uploads/r1Z01epF6.png)

- Preamble
    - Marks beginning of entire frame
- Start of Frame Delimiter (SFD)
    - Indicates beginning of addressing fields
- Destination Address
    - Contains destination node address

----

- Source Address
    - contains address of sender node
- Length (LEN)
    - indicates length of data/payload
- Data (payload)
    - contains data, or segmented part of data, transmitted from originating node


----


- Pad
    - Used to increase size of the frame to its minimum size requirement of 46 bytes
- Frame Check Sequence
    - provides algorithm to determine whether data were correctly received
    - most commonly used algorithm is Cyclic Redundancy Check (CRC)


---

<!-- .slide: data-transition="zoom convex-out" style="text-align: left"-->
## Ethernet Addressing

- MAC address: Media Access Control (MAC) sub-layer
- 48 Bits
- Number uniquely defining a network node
- Generally rendered as Hex: __`00:1e:33:ba:87:c1`__
- Doesn't contain any data regarding network location –just an ID

----

<div>
    <img src="https://hackmd.io/_uploads/Syypbl6Kp.png"
         alt="mac address" style="width: 80%; " />
</div>


----

- first three bytes
    - Either Manufacturer hard coded
    - Or Reserved Addresses (common ones)
        - Broadcast Address __`FF:FF:FF:FF:FF:FF`__
        - Spanning Tree Multicast: __`01:80:C2:00:00:00`__
        - IANA reserves all address starting with __`00:00:5E`__ see Ethernet Numbers(this includes IPv4 multicast -and inserts the low 23 Bits of the multicast IPv4 Address into the Ethernet Address)
        - __`33:33:XX`__ is reserved for IPv6 Multicast


---

<!-- .slide: data-transition="zoom convex-out"-->
## Switching

- Making Forwarding decisions
    - Transparent bridging

<div>
    <img src="https://hackmd.io/_uploads/HJhTGe6Y6.png"
         alt="transparent bridging" style="width: 70%; " />
</div>


---

<!-- .slide: data-transition="zoom convex-out"-->
## Broadcast Loop and STP

<div>
    <img src="https://hackmd.io/_uploads/HJ8x7epYT.png"
         alt="broadcast loop" style="width: 80%; "/>
</div>


----

### Spanning Tree Protocol

<div>
    <img src="https://hackmd.io/_uploads/BytG7xpKa.png"
         alt="spanning tree protocol" style="width: 80%; "/>
</div>


---

<!-- .slide: data-transition="zoom convex-out" style="text-align: left"-->
## VLANs

- Virtual Local Area Networks
- A logical network within a physical network
- Achieved by grouping some of the switch ethernet ports into a logical broadcast domain
- Can span multiple switches

----

<div>
    <img src="https://hackmd.io/_uploads/S1Zg4e6Kp.png"
         alt="vlans" style="width: 80%;"/>
</div>


----

### VLAN port types

- Access ports
    - assigned VLAN ID
    - for connecting end hosts/nodes
    - nodes connected to ports with same VLAN ID are in the same broadcast domain

----

- Trunk ports
    - typically for switch to switch or switch to router connection
    - carry "tagged" frames, i.e modified ethernet frames with VLAN markers

----

### Tagged frames

<div style="height: 200px; margin-bottom: 1em;">
    <img src="https://hackmd.io/_uploads/BJd8Hx6Ka.png"
         alt="tagged frame" style="height: 100%;"/>
</div>

- 4-byte tag header inserted between Source MAC and EtherType fields
    - 2-byte tag protocol identifier (TPID) 
        - a fixed value of 0x8100 that indicates the frame carries tag information.


----

- 2-byte tag control information (TCI)
    - Three-bit user priority (used to prioritize traffic
    - Drop Eligible Indicator (DEI) (in congestion is frame “dropable”
    - Twelve-bit VLAN identifier (VID)-Uniquely identifies the VLAN to which the frame belongs

---

<!-- .slide: data-transition="zoom convex-out" style="text-align: left"-->
## Link Access Methods

- Manage shared medium access contention (collision)
- Two methods:
    - CSMA/CD: for wired Ethernet
    - CSMA/CA: for wireless Ethernet

----

### CSMA/CD

![image](https://hackmd.io/_uploads/SJ5eDg6ta.png)


----

### CSMA/CA

<div style="height: 600px; text-align: center;">
    <img src="https://hackmd.io/_uploads/rJZoPxaFp.png" 
         alt="CSMA-CA" />
<div>
    
   
---

<!-- .slide: data-transition="zoom convex-out" style="text-align: left"-->
## Reading List

- [IPv4 Addressing (video)](https://www.linkedin.com/learning/networking-foundations-ip-addressing/introducing-ipv4-and-the-ipv4-addressing-structure?u=2097252)
- [Internet Protocol Version 4](http://intronetworks.cs.luc.edu/current2/html/ipv4.html)

