# Network & Wi-Fi

This guide explains how to set up the local network in your classroom. The goal is to create a stable network where one computer acts as a **server** to provide Wi-Fi for all other **client** machines.

> [!WARNING] **CRITICAL SETUP RULES**
>
> 1. **ONE SERVER ONLY:** You can only have **one** computer set as a `server` on the network. Multiple servers will cause the network to fail.
> 2. **SERVER USES CABLE:** The server machine **must not** use Wi-Fi. It must connect to the router using a {{< term "Ethernet Cable" >}}.

---

### Phase 1: Setting up Cables & Hardware

This part involves connecting the server and routers together.

{{% steps %}}

### 1. Choose and Connect the Server

Select one computer to be the **server**. This should be your fastest machine with an Ethernet port. Connect this server directly to your main router using a {{< term "Ethernet Cable" >}}.

### 2. Place and Connect Routers

- **One Router:** Place it in the middle of the room for best Wi-Fi signal.
- **Two Routers:** If you have a second router, connect it to the first one with a cable. Place them as far apart as possible.

### 3. Connect Other Computers with Cables (Best)

Whenever possible, connect clients computers to a router using a {{< term "Ethernet Cable" >}}. This is much faster and more reliable than Wi-Fi.

{{% /steps %}}

---

### Phase 2: Software Setup

This part involves setting up the {{< term "Role" >}} on each computer using the `tl-sys-configure` tool.

{{% steps %}}

### 1. Set up the Server

On the main server machine, run `tl-sys-configure` and set its {{< term "Role" >}} to `server`.

> [!CAUTION]
> Double-check that no other computer is set as a `server`.

### 2. Set up the Clients

On each client machine, run `tl-sys-configure` and do the following:

1. **Set the Role**: Set the {{< term "Role" >}} to `client`.
2. **Set the Wi-Fi Name**: Set the {{< term "SSID" >}} (Wi-Fi name) to match the network you want clients to use.

{{% details title="Tip: Spreading the Load" %}}
If you have multiple routers, try to spread clients across them.

- **One Router:** All clients connect to the same Wi-Fi name ({{< term "SSID" >}}).
- **Two Routers:** Set half the clients to the first Wi-Fi name, and half to the second Wi-Fi name.
  {{% /details %}}

### 3. Turn off Wi-Fi on Wired Machines

On any computer connected with a cable (including the server), turn off the Wi-Fi. You can use the network icon at the bottom of the screen to do this.

> [!IMPORTANT]
> Always make sure the server has Wi-Fi turned off.

{{% /steps %}}

