6.3 KiB
Documentation: Ocore and Oggui
Scenario
We want to register a computer in the system and configure it so it can boot via PXE on a new subnet. This is the scenario:
-
Computer:
- MAC Address:
00:50:56:1e:9f:11
- Name:
pc11
- IP Address:
192.168.3.11
- MAC Address:
-
Subnet:
- Address:
192.168.3.0
- Netmask:
255.255.255.0
- Address:
-
Boot Server:
next-server
:172.17.8.37
(ogboot component hosting the boot files)- Boot File:
undionly.kpxe
The objective is to create the subnet 192.168.2.0/24
, add the computer pc11
to this subnet with IP 192.168.3.11
, and generate the custom boot file for pc11
from the ogLive
PXE template.
Register a Computer
Create an Organizational Unit (Classroom)
- On the Manage Groups screen, click New Organizational Unit.
- In the form:
- Select Type as
Classroom
. - Assign a Name to the classroom, such as
Test Classroom
. - Choose a Parent Organizational Unit, for example,
Classroom Groups 1
.
- Select Type as
- Click the Next button.
- In the next step of the Organizational Unit form, configure the network parameters. These parameters will later be used as kernel parameters when we create the boot files for the PCs in that classroom:
- Netmask: Set the subnet mask, for example,
255.255.255.0
. - Router: Specify the default gateway for the subnet (e.g.,
192.168.2.1
).
- Netmask: Set the subnet mask, for example,
- Click Add to create the organizational unit.
Add a New Computer
- On the Manage Groups screen, click New Client.
- Fill in the following fields:
- Parent: Select the Organizational Unit created earlier (e.g.,
Test Classroom
). - Name: The computer name
pc11
. - MAC: The client's MAC address
00:50:56:1e:8f:11
. - IP Address: The IP within the configured subnet
192.168.2.11
. - PXE Template: Select the associated PXE template
ogLive
for Oglive boot. - Network Interface: The client's network interface (e.g.,
Eth0
). - Network Driver: e.g.,
Generic
.
- Parent: Select the Organizational Unit created earlier (e.g.,
- Click Add to save the computer.
Create a New Subnet
The goal is to create a subnet in the system and synchronize it with the ogdhcp component, which uses Kea DHCP to manage network configurations.
Create the Subnet
- Go to the Manage Subnets section.
- Click the Add Subnet button.
- In the subnet creation form, complete the following fields:
- Name: Assign an identifier, e.g.,
Test Subnet
. - Netmask: Specify the subnet mask
255.255.255.0
. - IP Address: Set the base address of the subnet
192.168.3.0
. - Next Server: Enter the boot server IP
172.17.8.37
. - Boot File Name: Set the PXE boot file name
undionly.kpxe
.
- Name: Assign an identifier, e.g.,
- Click Save to create the subnet in the system database.
Once created, the subnet will appear in the list with the status Not Synchronized. This indicates the subnet is registered in the database but has not yet been applied to the Kea DHCP service.
Synchronize the Subnet with Kea DHCP
- In the subnet list, locate the newly created subnet.
- Click the actions button (menu icon) and select Create in og-dhcp.
- This will send the subnet configuration to the
ogdhcp
component, which will update the Kea DHCP service.
Subnet Synchronized
Once synchronized, the subnet will appear with the status Synchronized in the list (with a ✔️ icon). This indicates the configuration has been successfully applied to the Kea DHCP service.
You can view the configuration created in Kea DHCP by clicking Information on ogDHCP server (at the top) and then View information.
Add a Client to a Subnet
The goal is to add a PC to a specific subnet that is already registered and synchronized with the ogdhcp component.
Add Client to the Subnet
- In the subnet list, find the subnet to which you want to add the client, e.g.,
192.168.3.0
. - Ensure the subnet is Synchronized (status icon with a ✔️). If it is not synchronized, perform the synchronization process first.
- Click the actions button (menu icon) for the selected subnet.
- In the dropdown menu, select Add Client.
- In the form:
- Search for the client name
pc11
. - Ensure the client appears in the Selected Clients list.
- Search for the client name
- Click the Add button.
- You can view the updated Kea configuration with the new client by clicking Information on ogDHCP server (at the top) and then View information.
Create a PXE Boot File
The goal is to generate a custom boot file for the client pc11
, using the ogLive
PXE template so it boots via Oglive.
Create the Boot File
- Go to the PXE Templates section under the Boot menu.
- Locate the
ogLive
template that was previously assigned when creating the pc11 client. - Click the computer icon button.
- Find the client pc11.
- Click the sync data button (the two circular arrows).
- You will see that the pc11 computer icon turns green. This means the boot file has been created in ogboot successfully.