# Enroll SDRs

A software-defined radio at ExPECA is a networked device with 2 data ports, one SFP and one rj45, all assigned static IPs. These ports are connected to the tenants switch and configured with an static IP in the `10.30.1.0/24` subnet for the RJ45 ports, and `10.30.10.0/24` for the SFP ports. Our approach is to map each port to a network segment (a VLAN on the tenants switch). We register them as network segments in blazar in the following format:

Register the RJ45 port:

```
openstack reservation network create \
--network-type "vlan" \
--physical-network "physnet1" \
--segment "102" \
--extra segment_subnet="10.30.1.0/24" \
--extra segment_gateway="10.30.1.100" \
--extra vlan_id="102" \
--extra baremetal_ports='[{"name":"sdr_02_rj45","ip-address":"10.30.1.4","binding-profile":{"local_link_information":[{"switch_id":"a0:f8:49:f7:89:d1","port_id":"te1/0/29","switch_info":"tenant-switch"}]}}]'
```

Register the SFP port:

```
openstack reservation network create \
--network-type "vlan" \
--physical-network "physnet1" \
--segment "103" \
--extra segment_subnet="10.30.10.0/24" \
--extra segment_gateway="10.30.10.100" \
--extra vlan_id="103" \
--extra baremetal_ports='[{"name":"sdr_02_sfp","ip-address":"10.30.10.4","binding-profile":{"local_link_information":[{"switch_id":"a0:f8:49:f7:89:d1","port_id":"te2/0/14","switch_info":"tenant-switch"}]}}]'
```

NOTE: It is very important that in `local_link_information` the `switch_info` value be set to the tenant switch name in "defaults.yaml".

Check the ports:

```console
(venv) expeca@controller-01:/opt/chi-in-a-box$ openstack reservation network list
+------------------+--------------------------------------+--------------+------------+
| physical_network | id                                   | network_type | segment_id |
+------------------+--------------------------------------+--------------+------------+
| physnet1         | 6f533bfd-5205-4e3f-914b-b1172aa4e50b | vlan         |        102 |
| physnet1         | e4fa3e7c-4cf1-424c-abca-a21982bc3782 | vlan         |        103 |
+------------------+--------------------------------------+--------------+------------+
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kth-expeca.gitbook.io/testbedconfig/enroll/enroll-network-segments/sdrs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
