6.1

6.1a.

What is a switch? What is a router? Describe the differences between these two device types and the services they can provide.

A switch build a local area network. It has MAC address table of each device connect to it. When it receive a packet, it will look up the MAC address table and forward the packet to the real device.

A router connect different network. It looks up the routing table or communicates with other router to find the path from to the destination. It helps the packet to travel to different network base on IP address.

For example, a router connect WAN to a switch. Then the switch shared LAN to multiple devices in the network. (Router → Switch → Device, inbound)

6.1b.

You can find the documentation of VyOS here: https://docs.vyos.io/en/latest/. Please give a short overview, how configuring a VyOS device works in general and what the difference is between the save and commit commands.

It use set and delete to add a configuration, such as set interfaces ethernet eth0 address dhcp.

Commit is used when you finish editing and want to apply the change to the server. If things works as your expectation. Save the configuration to permanently use it when reboot.

6.1c.

What is a submask? What means submask 255.255.255.0? How many addresses are in a /24 network?

Submask is used for dividing a network in to several subnetworks.

Submask 255.255.255.0 means when applying bitwise AND 11111111.11111111.11111111.00000000 operation to any address in the network it will yield the routing prefix, such as fromxxx.xxx.xxx.0 to xxx.xxx.xxx.254

There are 254 addresses are in a /24 network.

6.1d.

Describe what a VLAN is and what it is used for. On which layer operates VLAN? What are untagged (access) and tagged (trunk) VLAN Ports and what is the difference?

VLAN is used for creating a virtual LAN that allow us to manage the network using software. For example, VLAN can separate physically connected devices in to different LAN or group physically separate devices into same LAN.

VLAN operate on link layer.