:::success
# INR Lab 3 Assignment: STP, VLAN, and Fault Tolerance
### Name: Daniil Sinelnik
:::
## VLANS
At the packet level, VLANs function by appending an extra header to Ethernet frames, referred to as a VLAN tag, which encompasses a VLAN ID. This tag facilitates switches in segregating traffic logically across distinct VLANs. Upon receiving a frame, a switch inspects the VLAN tag to ascertain the VLAN membership of the frame. Subsequently, based on this information, the switch exclusively forwards the frame to ports designated as members of the pertinent VLAN.
The primary protocols utilized for VLAN management at the packet level encompass IEEE 802.1Q and ISL (Inter-Switch Link). Among these, IEEE 802.1Q stands as the predominant choice, recognized as the standard for VLAN trunking. This protocol integrates a VLAN tag into Ethernet frames, ensuring precise identification and management of VLAN traffic by switches. Conversely, ISL, a Cisco proprietary protocol, also incorporates a VLAN tag into frames, delivering akin functionality to IEEE 802.1Q. However, ISL employment has dwindled in recent times, with IEEE 802.1Q emerging as the prevailing industry norm.
The Native VLAN, or default VLAN, designates a VLAN assigned to switch ports carrying untagged traffic. In a customary VLAN configuration, frames acquire a VLAN ID tag during transit between switches. Nevertheless, frames reaching a switch port configured for the Native VLAN remain untagged, prompting the switch to assume their membership in the Native VLAN.
Cisco switches are configured to establish connections by default; simply plugging in an Ethernet cable to the interface ensures operational functionality.
The switches are configured using the following commands for trunk ports:
```
interface gi1/3
switchport trunk encapsulation dot1q
switchport mode trunk
switchport trunk allowed vlan 10,20
switchport nonegotiate
exit
```
For access ports:
```
interface gi0/0
switchport mode access
switchport access vlan 10(20)
exit
```
On the router, I established VLAN interfaces with corresponding IP addresses, serving as the default gateways for VPCS within their respective VLANs. Trunk ports were designated for transmitting packets, while access ports were allocated for end-point devices.
Following the configuration, I attempted to ping VPCS from various VLANs, yet no response ensued. However, successful pings were observed within the same VLAN (refer to Figure 1.2-3).
Analysis of the packets revealed the presence of VLAN IDs, indicating that the packets were indeed tagged by VLANs (refer to Figure 1.4-5).
<center>

ping VLANs
</center>
<center>

ping exactly the same VLAN
</center>
<center>

packet info
</center>
<center>

packet info
</center>
To have `Inter-VLAN` routing we have to install `VLANS` on the same interface.
<center>

</center>
## Fault Tolerance
Link Aggregation, also referred to as Port Aggregation or Link Bundling, is a method utilized to merge multiple physical network links into a unified logical link. This technique leverages the simultaneous utilization of multiple links to deliver enhanced bandwidth, improved redundancy, and heightened resilience in network connections.
The operation of Link Aggregation involves the dispersion of traffic across the aggregated links, thereby amplifying overall bandwidth and throughput. It incorporates load balancing mechanisms, enabling the equitable distribution of traffic across links based on diverse algorithms. Moreover, Link Aggregation bolsters fault tolerance by ensuring uninterrupted traffic flow even in the event of link failures.
Two primary configuration modes exist for Link Aggregation:
Static Link Aggregation: In this mode, the links engaged in aggregation are manually configured to form a cohesive logical group. These links are bundled together and treated as a unified, high-bandwidth connection. Static Link Aggregation suits environments where network infrastructure remains relatively unchanged, necessitating manual configuration.
Dynamic Link Aggregation: Dynamic Link Aggregation presents a more adaptable and automated approach. It employs LACP (Link Aggregation Control Protocol), a standardized protocol, to negotiate the establishment and upkeep of Link Aggregation groups. LACP enables switches and network interfaces to autonomously detect and form aggregates without manual intervention. It ensures uniform configuration of all links within the aggregation, maintaining consistent parameters.
Both static and dynamic Link Aggregation modes offer advantages such as heightened bandwidth, load balancing, and fault tolerance. The selection between these modes hinges on factors including the network environment, requisite control level, and support for dynamic negotiation with LACP by the involved devices.
To implement LACP, the following commands were employed in router configuration:
```
interface bonding add slaves=ether1,ether4
ip address add address=192.168.1.242/28 interface=bond1
```
<center>

</center>
Reconfigured netplan:
<center>

</center>
Disconnect all of the connections:
<center>

</center>