<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.sternwarte.uni-erlangen.de/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Weber</id>
	<title>Remeis-Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.sternwarte.uni-erlangen.de/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Weber"/>
	<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php/Special:Contributions/Weber"/>
	<updated>2026-05-18T04:58:19Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.7</generator>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=4022</id>
		<title>New Network</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=4022"/>
		<updated>2026-03-06T13:40:27Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
We're creating our own network inside a DMZ.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
* &amp;lt;s&amp;gt;Check whether the router is set to switch on after power failure in the BIOS&amp;lt;/s&amp;gt;&lt;br /&gt;
* Enable RSTP on all switches and set a high spanning tree priority on the root bridge&lt;br /&gt;
* Check whether/how we can use only one domain, instead of two (internal.sternwarte ...)&lt;br /&gt;
* When all hosts are in the private network&lt;br /&gt;
* Set IP address of 10G switch via DHCP (doesn't work statically)&lt;br /&gt;
** Adjust DHCP settings&lt;br /&gt;
*** Make the private network the default one (remove internal tags from config)&lt;br /&gt;
*** Adjust DHC relay direction&lt;br /&gt;
*** Remove classless static route from public to private network&lt;br /&gt;
&lt;br /&gt;
== Subnets ==&lt;br /&gt;
=== Public ===&lt;br /&gt;
The public subnet is a part of the internet as organized through the [https://de.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority IANA]. &amp;quot;Our&amp;quot; subnet is &amp;lt;code&amp;gt;131.188.151.0/24&amp;lt;/code&amp;gt;. At least one of the IPs in this subnet is used by the RRZE to provide a gateway. It's a [https://www.cisco.com/site/de/de/index.html Cisco] router in the basement with the IP &amp;lt;code&amp;gt;131.188.151.1&amp;lt;/code&amp;gt; and FQDN &amp;lt;code&amp;gt;astro.gate.uni-erlangen.de&amp;lt;/code&amp;gt;. We need to use this gateway to access the WAN.&lt;br /&gt;
&lt;br /&gt;
=== Private ===&lt;br /&gt;
We need to use a private network as defined in [https://www.rfc-editor.org/rfc/rfc1918.html RFC1918] for our own subnet. Because it's easy to remember and short to write we pick the class A network from RFC1918 which is &amp;lt;code&amp;gt;10.0.0.0/8&amp;lt;/code&amp;gt;. We can allocate a &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; network from this block. Since it sounds nice we can choose the second octet to also be 10. This gives us more than 65000 IP addresses to work with in &amp;lt;code&amp;gt;10.10.0.0/16&amp;lt;/code&amp;gt;. Because it makes sense we use the first address for our own gateway: &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Address blocks ====&lt;br /&gt;
Using the &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; doesn't only provide more than enough addresses, probably forever, it also enables the grouping into blocks of addresses which denote different classes of devices. This makes it easier to identify the devices and find their IP address. Note that these are not separate subnets, it's only nomenclature. These blocks are used in the DHCP server of [https://thekelleys.org.uk/dnsmasq/doc.html dnsmasq] and defined in the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet/-/blob/master/modules/remeis/files/dnsmasq/internal-dhcp.conf internal-dhcp.conf] file of the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet puppet] gitlab repository.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Address blocks&lt;br /&gt;
|-&lt;br /&gt;
! Block !! Device class&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.1.*   || Switches&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.2.*   || Management interfaces (iLO, iDRAC, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.10.*  || Servers&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.20.*  || VMs&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.30.*  || Meggie cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.40.*  || Blade center&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.50.*  || Messier cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.90.*  || Functional hosts (Raspbbery Pis, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.100.* || Office computers main building&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.200.* || Testing (Installation testing, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.250.* || Private notebooks&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Router ==&lt;br /&gt;
&lt;br /&gt;
The uplink to the WAN is realized with a server (Dell Poweredge 1950) which runs [https://opnsense.org OPNSense], a FreeBSD based routing and firewall distribution which is very easy to set up and highly reliable. The server has two 1G interfaces. One is connected to the public network managed by the RRZE (WAN) and has a public IP, the other one is connected to our own switches and has a private ip (LAN). Both interfaces are labelled in the back of the server. The router routes traffic between these two networks to make our computers talk to each other.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
The router can be configure through the web gui. It's accessible directly over the ''internal'' IP address, but the port is changed to 8443: https://10.10.0.1:8443. The user for the login is &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and the password is the same as the LDAP admin passwort (as of writing). A lot of information is provided in the [https://docs.opnsense.org/ OPNSense documentation]. One of the interfaces has a public IP, at the time of writing the public IP is &amp;lt;code&amp;gt;131.188.151.92&amp;lt;/code&amp;gt;. The other interface has the private used as the gateway, &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;. Its public IP might be changed depending on how we proceed with mechansim for remote access. SSH is is disabled, but the port is changed to 12345.&lt;br /&gt;
&lt;br /&gt;
==== 10G Interfaces ====&lt;br /&gt;
There is a PCIe card with dual 10G interfaces installed, a Mellanox ConnectX-3. It has two 10G SFP+ ports. OPNsense, which is based on FreeBSD, by default does not load the driver for this card, so it has to be told to load it on boot. This can be done in the boot settings as described in the [https://www.thomas-krenn.com/de/wiki/OPNsense_Chelsio_Mellanox_Broadcom_Netzwerkkarten-Treiber_aktivieren Thomas Krenn Wiki].&lt;br /&gt;
&lt;br /&gt;
==== Gateway ====&lt;br /&gt;
The router uses the RRZE gateway as its own upstream gateway. By default the firmware always sends packets destined to the WAN network to this gateway. At the time of writing this is problematic because the upstream gateway drops packets arriving from a private network (according to RFC1918) which makes it impossible for hosts in our private network to directly communicate with hosts in our public network. This option is therefore disabled in the configuration of the router. See the &amp;quot;Disable force gateway&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
==== Private and bogon networks ====&lt;br /&gt;
According to RFC1918 packets with source or destination IP addresses in private networks must not be routed through the internet. It often happens that such packets are generated and end up at edge routers (keep the private notebooks connected to our network in mind). Therefore such routers usually drop these packets on purpose. At the time of writing we actually want to route such packets from our private to our public network and vice versa. Therefore the option to drop packets from or to private networks is disabled on both interfaces. When we have all our hosts behind the router we should re enable this option for the WAN interface to avoid trouble with the RRZE. On the LAN interface this option should obviously stay disabled.&lt;br /&gt;
&lt;br /&gt;
There are addresses in the public IPv4 space which are not assigned to anything or do not make sense. These are called [https://de.wikipedia.org/wiki/Bogon &amp;quot;Bogon&amp;quot; networks]. The router is configured to drop these packets if they arrive on the WAN interface.&lt;br /&gt;
&lt;br /&gt;
==== NAT ====&lt;br /&gt;
Hosts within the private network can not directly talk to the internet (see the previous section), they need an intermidiary to do this. This is accomplished by using [https://en.wikipedia.org/wiki/Network_address_translation Network address translation (NAT)]. When a client wants to talk to the internet (except our own public network, see the following section), the router replaces the source address of the packet with its own public address and sends it of to the WAN. From the WAN it looks as if the router is making requests, instead of the client. When the reply arrives on the WAN interface the router changes the destination address of the packet from its own public address to the private address of the client and sends if off into the LAN.&lt;br /&gt;
&lt;br /&gt;
We need this mechanism for all clients behind the router to talk to the internet, except our own public network. This option is available as outbound NAT in the routers firmware and enabled by default.&lt;br /&gt;
&lt;br /&gt;
There is an important exception: Traffic from our private network which has a destination in our own public network should be routed directly, without any NAT, such that these two computers can talk directly to each other. Therefore there is a rule in the outbound NAT section which identifies such traffic and disables NAT for it. It can then be routed normally (see the following section). Note that this should be disabled as soon as all our computers are in the private network and can talk to each other directly.&lt;br /&gt;
&lt;br /&gt;
==== Routing between public and private network ====&lt;br /&gt;
At the time of writing our computers are distributed in a private and a public network. Both need to be reachable by each other. Therefore the router allows traffic to pass between these exact two networks without any restrictions. The rules for this can be found in the LAN and WAN sections of the firewall rules of the router. Especially the rule allowing any traffic originating from the public network to pass directly into the private network should be disabled as soon as all computers are in the private network.&lt;br /&gt;
&lt;br /&gt;
==== DHCP relay ====&lt;br /&gt;
At the time of writing we have DHCP (and DNS etc.) servers in the public network. Replicating these services behind the router can be avoided by allowing the router to forward DHCP requests from the private to the public network. This is done in the DHC relay section in the Services menu. With this service and the working routing and NAT there is no need to replicate these services in the private network for now. Everything seems to work, including PXE boot to install clients within the private network. As soon as all computers are in the private network the DHC relay should be disabled.&lt;br /&gt;
&lt;br /&gt;
==== Backup ====&lt;br /&gt;
The configuration can be backed up simply by downloading it in the GUI. It's recommended to do this once in a while just in case the router dies. This configuration can then be very easily applied after a new installation.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
Updates of the route can simply be done through the GUI. For security reasons this is recommended on a regular basis, but since we have the firewall of the RRZE in front of it it's probably not critical. Often the updates ca be done even without restarting the firmware.&lt;br /&gt;
&lt;br /&gt;
== Layer 2 ==&lt;br /&gt;
With the router working we can use our own ethernet switches behind it without interfering with the RRZE switches.&lt;br /&gt;
&lt;br /&gt;
=== MDI ===&lt;br /&gt;
Ethernet on RJ45 ports consists of a pair of transmitting and receiving wires on both ends. Obviously the receiving pair on one end must be attached to the transmitting pair on the other end. In the old days it was important to consider this property when connecting devices via RJ45 twisted pairs, and in the appropriate case a [https://en.wikipedia.org/wiki/Ethernet_crossover_cable crossover cable] needed to be used. Nowadays ethernet iterfaces can automatically make sure to select the correct twisted pairs to transmit and receive data. This mechanism is called [https://en.wikipedia.org/wiki/Medium-dependent_interface#Automatic_MDI-X automatic MDI-X (automdix)]. It should be enabled on all ports of all switches, and probably is so by default.&lt;br /&gt;
&lt;br /&gt;
=== VLAN ===&lt;br /&gt;
[https://en.wikipedia.org/wiki/VLAN Local Area Networks (VLAN)] are logical layer 2 networks which can spread across multiple switches. They can be used to separate different broadcast domains (ethernet networks) and usually only contain a single IP subnet. Under certain scenarios VLANs can offer performance, flexibility and security advantages. We don't want to segment our network, therefore performance and flexibility enhancements are not possible. Security is also of no concern. We therefore do not use VLANs.&lt;br /&gt;
&lt;br /&gt;
However, from a technical perspective this is impossible with layer 3 switches. By default all interfaces of a switch are assigned to the so called default VLAN. For most switch manufacturers this is VLAN 1, but it doesn't have to be. Most manufacturers also use VLAN 1 as the native VLAN. This means that all frames in VLAN 1 are sent untagged (without VLAN information) also to other switches, even over tagged ports (trunk ports). This ensures interoperability without changing settings.&lt;br /&gt;
&lt;br /&gt;
We are good as long as all switches we buy have default VLAN 1 (which can not be changed) and native VLAN 1 (which can be changed). In case we get a switch which does not have the default VLAN 1 we need to set the native VLAN of this switch also to the same VLAN, making all frames in this VLAN untagged, enabling communication with other switches.&lt;br /&gt;
&lt;br /&gt;
=== Spanning tree ===&lt;br /&gt;
We know for a fact that sometimes people plug ethernet cables into random ports, even both ends of it, causing potential loops (see mail on 22 August 2023). To avoid such loops the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol spanning tree protocol (STP)] defined in [https://en.wikipedia.org/wiki/IEEE_802.1D IEEE 802.1d]. When this protocol is enabled on a switch it exchanges [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Bridge_protocol_data_units bridge protocol data units (BPDUs)] with its neighbouring switches, containing some information about the network topology. This information is used to elect the so called [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Root_bridge_and_the_bridge_ID root bridge]. This switch can be thought of as the top of the spanning tree. All other switches then determine one port they use as a path towards this root bridge, even if it goes through another switch. All other ports which also provide a path towards the root bridge are disabled (set to the blocking [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Port_states state]). The election of the root bridge also enters an individual priority for each switch which can be set by the administrator. We should make sure to set a high priority on our central switch.&lt;br /&gt;
&lt;br /&gt;
When a change in the network topology is detected via the BPDUs 802.1d causes the entire spanning tree to be newly established with a new election of a root bridge. This can take somewhere around a minute, which is too long. Therefore the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Rapid_Spanning_Tree_Protocol rapid STP (RSTP)] was defined in IEEE 802.1w. It is fully backwards compatible with 802.1d and uses additional information to define port based rules such as alternate and backup ports for the path to the root bridge such that a topology change can be acted on in just a few seconds. It has the nice benefit that a link to a computer which is plugged into an access port on a given switch becomes ready in just a few seconds. We therefore enable RSTP on all our switches. Usually this is done by enabling STP and forcing the STP mode to RSTP. No further configuration is needed, except the priority of the root bridge.&lt;br /&gt;
&lt;br /&gt;
=== NTP ===&lt;br /&gt;
All switches are configured to use the RRZE NTP servers directly via their IP addresses because they can't do DNS. &lt;br /&gt;
&lt;br /&gt;
=== Current switches ===&lt;br /&gt;
Here is a list of the currently installed switches, their configuration, uplink, and some notes. All passwords are the LDAP password.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Switches&lt;br /&gt;
|-&lt;br /&gt;
! name !! IP !! Usecase !! Model !! Connectivity !! Administration !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| switch1 || 10.10.1.1 || 1G RJ45 distribution racks || HP ProCurve J4904A 2848 || 44x1G RJ45, 4x1G RJ45/SFP || telnet, D-Sub 9 + RS232-USB, webgui (defunct) ||&lt;br /&gt;
* Kind of old&lt;br /&gt;
* No username required for login&lt;br /&gt;
* Ports 45-48 are dual personality ports, either RJ45 or SFP can be used, not both.&lt;br /&gt;
|-&lt;br /&gt;
| switch2 || 10.10.1.2 || server management (iLO, iDRAC, ...) || HP J9781A 2530-48 || 48x100M RJ45, 2x1G RJ45/SFP || telnet, micro-USB B, RJ45 + RS232-USB, webgui ||&lt;br /&gt;
* Username: manager&lt;br /&gt;
* Ports 49-50 (or 49-52) are dual personality ports, either RJ45 or SFP can be used, not both&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Ubiquity switch administration ===&lt;br /&gt;
The Ubiquiti switches can not really be configured directly. They can only have an &amp;quot;inform url&amp;quot;, which is a http address where they pull their configuration from. At this address a server is running which is used to centrally administrate all the switches, called UniFi OS Server. At the time of writing this software is running on libra, reachable via https://libra.sternwarte.uni-erlangen.de:11443/. The password is the current ldap password and the current admin passwort, directly after another.&lt;br /&gt;
&lt;br /&gt;
=== HP switch administration ===&lt;br /&gt;
==== Accessing via CLI ====&lt;br /&gt;
Accessing the switches via browser is problematic for older switches since they use stuff like Java in the browser or flash. The CLI always works, if basic connectivity is ensured.&lt;br /&gt;
&lt;br /&gt;
===== telnet =====&lt;br /&gt;
If the switch is up, ethernet is connected, IP address is assigned, subnets are configured correctly, and a computer is in the same VLAN (which should be the case), &amp;lt;code&amp;gt;telnet&amp;lt;/code&amp;gt; can be used to access the switches. Just do &amp;lt;code&amp;gt;telnet {IP of switch}&amp;lt;/code&amp;gt; and the you should reach the login of the CLI.&lt;br /&gt;
&lt;br /&gt;
===== serial =====&lt;br /&gt;
Alternatively, and especially if the ethernet connection itself doesn't work (yet), the switches can be accessed directly by plugging a computer into the management port(s). Usually those are some kind of serial connection. Older models have a [https://en.wikipedia.org/wiki/D-subminiature D-Sub 9] connector for this purpose, newer models use a RJ45 port. In the latter case RJ45 is only the physical connector. It does not carry ethernet, only a [https://en.wikipedia.org/wiki/RS-232 RS-232] serial connection. Unless the computer itself has a serial port (unlikely these days), in both cases a serial to USB converter is required. Newer switches offer a USB port which internally has a USB to serial converter integrated and shows up in the connecting computer as a serial port. Regardless of the route choosen, if a serial to USB converter is attached the kernel log of the connecting computer should look something like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[  +0,042064] usbcore: registered new interface driver usbserial_generic&lt;br /&gt;
[  +0,000009] usbserial: USB Serial support registered for generic&lt;br /&gt;
[  +0,001588] usbcore: registered new interface driver ftdi_sio&lt;br /&gt;
[  +0,000008] usbserial: USB Serial support registered for FTDI USB Serial Device&lt;br /&gt;
[  +0,000101] ftdi_sio 1-4:1.0: FTDI USB Serial Device converter detected&lt;br /&gt;
[  +0,000023] usb 1-4: Detected FT232RL&lt;br /&gt;
[  +0,006308] usb 1-4: FTDI USB Serial Device converter now attached to ttyUSB0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This means the serial port is available under &amp;lt;code&amp;gt;/dev/ttyUSB0&amp;lt;/code&amp;gt;. Of course ne number in the end can change, depending on how many serial ports are present. Some devices show up as &amp;lt;code&amp;gt;/dev/ttyACM0&amp;lt;/code&amp;gt; instead. These ports can be used with &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt; to talk to the switch, for example &amp;lt;code&amp;gt;screen /dev/ttyUSB0&amp;lt;/code&amp;gt;. If everything goes well a message like &amp;lt;code&amp;gt;Connected with baud rate 9600&amp;lt;/code&amp;gt; should show up.&lt;br /&gt;
&lt;br /&gt;
===== Authentication =====&lt;br /&gt;
Depending on the model a username must be entered to access the switch. The &amp;quot;root&amp;quot; user for HP switches is usually called &amp;quot;manager&amp;quot;. A password is required to log in in a mode which allows configuration changes. It should be set to our current LDAP admin password. If the password is not or incorrectly entered on the serial console the switches usually drops back to an unpriviledged user which can only look around.&lt;br /&gt;
&lt;br /&gt;
===== Entering configuration =====&lt;br /&gt;
Before anything can be changed in the switch the configuration submenu must be entered. This can be done using the &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
switch1# config&lt;br /&gt;
switch1(config)# &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Tab completion should work in all circumstances and is often very informative. An ad-hoc set of suggestions and help messages can also be triggered by putting a &amp;quot;?&amp;quot; in the terminal. Note that no &amp;quot;enter&amp;quot; is required in this case. As soon as the &amp;quot;?&amp;quot; is sent the terminal shows the suggestions.&lt;br /&gt;
&lt;br /&gt;
===== Saving the configuration =====&lt;br /&gt;
Note that when changing the configuration of a switch only the running configuration is modified. Changes are not persistent over a reboot of the device. To make the changes persistent the configuration needs to be written to the flash memory of the device. This can be done by &amp;lt;code&amp;gt;write memory&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Interestingly, &amp;lt;code&amp;gt;write terminal&amp;lt;/code&amp;gt; shows all commands necessary to achieve the currently running configuration of the switch.&lt;br /&gt;
&lt;br /&gt;
===== Basic setup =====&lt;br /&gt;
The basic switch setup can be accessed even from outside the &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; menu using the &amp;lt;code&amp;gt;setup&amp;lt;/code&amp;gt; command. It's an interactive menu which is rather intuitive. Among other things, it can be used to set&lt;br /&gt;
* The hostname of the switch&lt;br /&gt;
* The password for the &amp;lt;code&amp;gt;manager&amp;lt;/code&amp;gt; user&lt;br /&gt;
* The default gateway&lt;br /&gt;
* The IP of the switch in the [[#VLAN|default VLAN]]&lt;br /&gt;
&lt;br /&gt;
===== Port information =====&lt;br /&gt;
Information about the interfaces of the switch can be retrieven by the &amp;lt;code&amp;gt;show interfaces&amp;lt;/code&amp;gt; command which lists all interfaces and their information in a table. It can be followed by another option to determine the type of information in the table. These are the options:&lt;br /&gt;
* (no option): Sent/received traffic, errors, drops, [https://en.wikipedia.org/wiki/Ethernet_flow_control flow control], broadcast limit&lt;br /&gt;
* &amp;lt;code&amp;gt;brief&amp;lt;/code&amp;gt; Port type, intrusion alert, enabled/disabled, port status (up/down), mode (speed, duplex), flow control, broadcast limit&lt;br /&gt;
* &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; Port type, enabled/disabled, mode, flow control, [https://en.wikipedia.org/wiki/Medium-dependent_interface MDI] mode&lt;br /&gt;
* &amp;lt;code&amp;gt;port-utilization&amp;lt;/code&amp;gt; mode (speed, duplex), Rx data, Tx data&lt;br /&gt;
Much more detailed ethernet information about specific ports can be obtained by &amp;lt;code&amp;gt;show interfaces ethernet {PORTS}&amp;lt;/code&amp;gt;. The ports can be referred to as single ports, a separated list by commas, or ranges separated by &amp;quot;-&amp;quot;, or combinations of all. &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; can be used to refer to all ports at once.&lt;br /&gt;
&lt;br /&gt;
===== VLAN =====&lt;br /&gt;
Information about the configure VLANs can be obtained by the &amp;lt;code&amp;gt;show vlans&amp;lt;/code&amp;gt; command. In our case this should only list the default VLAN. VLANs can be configure by entering the context of a specific VLAN, for example &amp;lt;code&amp;gt;vlan 10&amp;lt;/code&amp;gt;. In this submenu ports can be assigned to this VLAN as untagged access ports by issuing &amp;lt;code&amp;gt;untagged {PORTS}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== Spanning tree =====&lt;br /&gt;
STP can be enabled from the config menu via &amp;lt;code&amp;gt;spanning-tree enable&amp;lt;/code&amp;gt;. RSTP can be enforced as the protocol to use via &amp;lt;code&amp;gt;spanning-tree force-version rstp-operation&amp;lt;/code&amp;gt;. Port based information about the established tree can be retrieved via &amp;lt;code&amp;gt;show spanning-tree&amp;lt;/code&amp;gt;. This gives information about the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Path_cost path cost], [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Configuration port priority], [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Port_states port state], and designated bridge.&lt;br /&gt;
&lt;br /&gt;
===== Time =====&lt;br /&gt;
The timezones in the HP world are odd. They are given in offsets in minutes. So the timezone of the observatory is +60. It can be set via &amp;lt;code&amp;gt;time timezone 60&amp;lt;/code&amp;gt;. The switches can also accept different daylight saving rules. The correct one can be set via &amp;lt;code&amp;gt;time daylight-time-rule Middle-Europe-and-Portugal&amp;lt;/code&amp;gt;. The switches are configured to retrieve their time via SNTP, by setting &amp;lt;code&amp;gt;timesync sntp&amp;lt;/code&amp;gt;. It utilizes the normal [https://en.wikipedia.org/wiki/Network_Time_Protocol NTP] but has a much simpler implementation on the client side. The switches are configured to use the RRZE NTP servers directly via their IP. This is discouraged, but since the switches don't do DNS not otherwise possible. Information about the current SNTP settings can be retrieved via &amp;lt;code&amp;gt;show sntp&amp;lt;/code&amp;gt;. SNTP servers can be set via &amp;lt;code&amp;gt;sntp server {IP}&amp;lt;/code&amp;gt; on older models, and &amp;lt;code&amp;gt;sntp server priority 1 {IP}&amp;lt;/code&amp;gt; on newer models. The current time can be displayed via &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== MDI Mode =====&lt;br /&gt;
The MDI mode can be set via &amp;lt;code&amp;gt;interface {PORT} mdix-mode {MODE}&amp;lt;/code&amp;gt; where PORT is a list of ports and MODE is &amp;lt;code&amp;gt;mdi&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mdix&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;automdix&amp;lt;/code&amp;gt;. Obviously we want the latter on all interfaces. To set all ports to auto MDI-X: &amp;lt;code&amp;gt;interface all mdix-mode automdix&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Accessing via a browser ====&lt;br /&gt;
Some of the switches come with an integrated webserver which can be used to access information and perform configuration. While this seems convenient at first, in reality these servers rely on stuff like [https://en.wikipedia.org/wiki/Java_(programming_language) Java] or sometimes even [https://en.wikipedia.org/wiki/Adobe_Flash Adobe Flash] in the browser which is discontinued and simply does not work at all. Therefore using the CLI is the more reliable way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== DNS ==&lt;br /&gt;
=== Domains ===&lt;br /&gt;
Our public domain is &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt;. For the internal domain we don't need to register a domain, it doesn't make sense. Currently it is configure to &amp;lt;code&amp;gt;internal.sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; which is clunky but accurate. It is configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; which has the nice sideeffect of &amp;lt;code&amp;gt;bla.internal&amp;lt;/code&amp;gt; being correctly resolved from computers in the public network to the computer in the private network. The other way round it does not work, but &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; is therefore configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; as a search domain for all hosts in the private network. If we make sure to not duplicate computer names in the private and public network DNS enables the reference of another computer directly by its hostname.&lt;br /&gt;
&lt;br /&gt;
Maybe it's possible to somehow only use one domain spreading over two subnets, but since some are then public with public DNS records and some are not this might be difficult.&lt;br /&gt;
&lt;br /&gt;
=== /etc/hosts ===&lt;br /&gt;
With all the hostnames available via the &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; configuration there is no need to out them all in &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; as well. &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; knows the IP associated with a hostname from its dhcp configuration file and uses it to resolve the names if a DNS query is made. We could therefore only put aliases (such as &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt;) in the &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; file and save the work of always trying to keep &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; up to date.&lt;br /&gt;
&lt;br /&gt;
== Exposed services ==&lt;br /&gt;
Some services need to be exposed to the internet under a specific address. Most importantly the webserver (www.stern....de). This needs to have a public IP resolving to a specific host. Therefore such services need to run on a server which has two interfaces. One for the LAN and one for the WAN. The weak end system model of Linux ''might'' become a problem here.&lt;br /&gt;
&lt;br /&gt;
We could try just using NAT and port forward the necessary traffic. The webserver would be in our private network only, the router has the public IP and therefore FQDN of the webserver, and ports 80 and 443 are forwarded from the router to the webserver. This way no fiddling with virtualbox, mutliple IPs, etc. is necessary.&lt;br /&gt;
&lt;br /&gt;
When doing it this way access via SSH is also very easy. Forward port 22 to a server behind the router which acts as the login node. Then all SSH logins are done directly through &amp;lt;code&amp;gt;user@www.stern...&amp;lt;/code&amp;gt;. No two ethernet connections required. &lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Desired uplink speeds for individual hardware&lt;br /&gt;
* NFS servers: At least 10G, some maybe with 2x10G.&lt;br /&gt;
* Bladecenter: 10G&lt;br /&gt;
* Meggie nodes: 80x1G&lt;br /&gt;
* Other clients: 1G&lt;br /&gt;
&lt;br /&gt;
All switches should support RSTP (IEEE 802.1w).&lt;br /&gt;
&lt;br /&gt;
=== Main Building ===&lt;br /&gt;
In the main building we can create our own layer 2 network fairly straightforwardly.&lt;br /&gt;
&lt;br /&gt;
Let's ''please'' mount the switches in reverse in the server racks.&lt;br /&gt;
&lt;br /&gt;
==== Root Bridge ====&lt;br /&gt;
The root bridge will be the core of the network. Needs to have the capability to attach the NFS servers as well as other fast enough uplinks to switches, so at least several 10G SFP+ ports.&lt;br /&gt;
&lt;br /&gt;
Omada: SX3032F, 32x10G SFP+, ~900€&lt;br /&gt;
&lt;br /&gt;
Ubiquity (same as above): USW-Pro-Aggregation, 28x10G SFP+, 4x25G SFP28, ~900€&lt;br /&gt;
&lt;br /&gt;
==== Meggie Switches ====&lt;br /&gt;
Each Meggie node provides a 1G uplink (apart from Intel OP). With 80 nodes we need 2 48 port switches.&lt;br /&gt;
&lt;br /&gt;
Omada: SG3452X, 48x1G RJ45, 4x10G SFP+, ~400€&lt;br /&gt;
&lt;br /&gt;
Ubiquity: USW-Pro-48, 48x1G RJ45, 4x10G SFP+, ~600€&lt;br /&gt;
&lt;br /&gt;
==== Peripheral Switches ====&lt;br /&gt;
If we decommission the Messiers we can make due with 3 peripheral switches for the main building. If the RRZE lets us use the currently installed 3 switches with the 10G uplink we do not need new hardware for this.&lt;br /&gt;
&lt;br /&gt;
==== Shopping List ====&lt;br /&gt;
* 10G root bridge: ~900 Euros&lt;br /&gt;
* 2x 48x1G + 10G uplink meggie switches: 2x~400 Euros&lt;br /&gt;
* Lots of Cat 6 (or 5e) cables for the meggies&lt;br /&gt;
* We might need new DAC cables&lt;br /&gt;
* Total: 1700 Euros&lt;br /&gt;
&lt;br /&gt;
== Integrating Meridian building and Bundschuhhaus ==&lt;br /&gt;
&lt;br /&gt;
=== Layer 2 ===&lt;br /&gt;
There are two fibers going to the Meridian building. One is patched through to the Bundschuhhaus.&lt;br /&gt;
For the Meridian building it is technically possible to use one of the fibers to directly integrate an additional switch in the Clock room via layer 2. But the RRZE needs to play ball for this because they need to switch the other pair through to Bundschuhhause. If this route is taken there is still no option to integrate Bundschuhhause on layer 2.&lt;br /&gt;
&lt;br /&gt;
=== Layer 3 ===&lt;br /&gt;
A VPN would be an option to incorporate the other buildings over layer 3 without interaction with the RRZE (fingers crossed). Each building needs to have a separate OPNsense box establishing a VPN directly to the main gateway over the WAN and an attached switch for the computers.&lt;br /&gt;
&lt;br /&gt;
NFS etc. might be a bit wonky in this scenarion. Performance will certainly be limited. Strong CPU hardware of the OPNSense boxes is required for this to work with low latency.&lt;br /&gt;
&lt;br /&gt;
==== IPSec ====&lt;br /&gt;
According to the documentation this is the preferred solution for a site-to-site setup such as in our case. It's a bit complicated to set up compared to the other options. It requires an open port on the main gateway (similar to port forwarding). The computers on the other sites then also need to be in a separate subnet, necessitating a separate DHCP (possibly DNS etc.) server (TBC).&lt;br /&gt;
&lt;br /&gt;
==== Wireguard ====&lt;br /&gt;
Much easier to set up compared to IPSec, but might be less reliable. Unclear about the different subnet. Might not require an open port on the main gateway.&lt;br /&gt;
&lt;br /&gt;
==== OpenVPN ====&lt;br /&gt;
Fairly simple to set up, running via SSL, can mimick HTTPS traffic. Requires an open port.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Settings/Optimizations ==&lt;br /&gt;
* Enable jumbo frames for better NFS/iSCSI performance&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=4002</id>
		<title>Meggie Cluster</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=4002"/>
		<updated>2026-01-20T14:19:25Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
&lt;br /&gt;
The meggies are diskless nodes inherited from the RRZE used from computing only. We would like to boot them from the network. NFS and iSCSI are two options to accomplish this. Since iSCSI is directly supported by the UEFI of the nodes this is the option which is by far the easiest to implement.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
The main boards are S2600KPR from Intel. Four of those are in a 2U chassis, called H2000G. The rails for the installation are called AXXELVRAIL.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
&lt;br /&gt;
=== OS setup ===&lt;br /&gt;
* &amp;lt;s&amp;gt;Make the installer recognize the iSCSI LUN as a block device before searching for those&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;Supply LUN information directly to the UEFI via DHCP&amp;lt;/s&amp;gt;&lt;br /&gt;
* Test what happens on iSCSI connection problems&lt;br /&gt;
** Switch malfunction&lt;br /&gt;
** iSCSI server reboot&lt;br /&gt;
** It doesn't take long until the kernel gives up on the iSCSI target. We need to increase this timeout somehow&lt;br /&gt;
* &amp;lt;s&amp;gt;Make a list of UEFI settings&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;Prepare LUNs&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Use ZFS zvols as storage backend&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Find out which backend type is the best (file, block, SCSI passthrough)&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Create a separate dataset for easier zfs setting propagation&amp;lt;/s&amp;gt;&lt;br /&gt;
** Leave a README file in the dataset directory for other people to know that it shouldn't be deleted&lt;br /&gt;
** Optimize dataset settings for iSCSI targets&lt;br /&gt;
*** Compression lz4&lt;br /&gt;
*** Larger &amp;lt;code&amp;gt;recordsize&amp;lt;/code&amp;gt; (1M or something)&lt;br /&gt;
** &amp;lt;s&amp;gt;Name the zvols &amp;lt;code&amp;gt;zvol-MM-m&amp;lt;/code&amp;gt; where MM is the chassis number from 01 to 20 and m the node number from 1 to 4&amp;lt;/s&amp;gt;&lt;br /&gt;
* Remove the stupid /swap.img file. This is a general point affecting all computers&lt;br /&gt;
* Adjust puppet&lt;br /&gt;
** &amp;lt;s&amp;gt;Make no scratch available&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Make /tmp and friends a tmpfs&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Restrict sizes of all tmpfs&amp;lt;/s&amp;gt;&lt;br /&gt;
** Remove unnecessary user stuff? (e.g. x2go, firefox, etc.)&lt;br /&gt;
* Reinstall to Ubuntu 24.0&lt;br /&gt;
&lt;br /&gt;
=== Hardware setup ===&lt;br /&gt;
* Install nodes in a rack&lt;br /&gt;
* Buy and set up up switches&lt;br /&gt;
* Lots of cabling&lt;br /&gt;
* Power requirements?&lt;br /&gt;
** Ca. 250W per node, 1kW per chassis&lt;br /&gt;
* Change batteries in all nodes&lt;br /&gt;
* Intel Hyper Threading often goes back to Enabled (double check that it is Disabled) &lt;br /&gt;
&lt;br /&gt;
== The Boot Process ==&lt;br /&gt;
&lt;br /&gt;
=== General layout ===&lt;br /&gt;
The boot process works like this:&lt;br /&gt;
# UEFI stage&lt;br /&gt;
## The UEFI starts up&lt;br /&gt;
## Establishes a connection to the network&lt;br /&gt;
## Runs a DHCP client&lt;br /&gt;
## Gets an IP as well as the iSCSI LUN information directly from our DHCP server&lt;br /&gt;
## Accesses the GPT on the LUN and loads grub&lt;br /&gt;
# grub stage&lt;br /&gt;
## Grub starts&lt;br /&gt;
## Loads the kernel and initrd from the LUN&lt;br /&gt;
## Jumbs into the kernel&lt;br /&gt;
# ramdisk stage&lt;br /&gt;
## The kernel runs&lt;br /&gt;
## Mounts the initrd&lt;br /&gt;
## Inside the initrd our custom iSCSI hook is called&lt;br /&gt;
### Loads the iSCSI kernel module&lt;br /&gt;
### Loads the iSCSI iBFT kernel module&lt;br /&gt;
### Runs &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; which makes the iSCSI LUN available as a block device&lt;br /&gt;
# Normal boot continues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Further explanations ===&lt;br /&gt;
==== UEFI DHCP ====&lt;br /&gt;
The UEFI can talk to the DHCP server and get an IP. We use DHCP option 17 (root-path) to supply the iSCSI information to the nodes.&lt;br /&gt;
&lt;br /&gt;
==== grub ====&lt;br /&gt;
As of now we don't know why grub even works. It's installed on the efi partition on the LUN, just like a normal computer. The UEFI uses the information on this EFI partition to find grub and run it, and grub then sees the partitions of the installed OS. Either the UEFI somehow emulates a blockdevice for grub such that it can see these partitions and load the kernel and initrd, or grub somehow also does iSCSI by using the iBFT. Anyway, it loads the kernel and initrd, which is the most important part.&lt;br /&gt;
&lt;br /&gt;
==== iBFT ====&lt;br /&gt;
This is really cool. When the UEFI launches and gets iSCSI information from the DHCP server it puts this information into the EFI system table, the Boot Firmware Table (iBFT). Linux can use this information to connect to the same LUN used for the boot process and set up the block device before trying to mount the root partition. The necessary kernel module is called &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt;. After the module is loaded its only a matter of calling the &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; program to set up the block device. All this needs to happen before root is mounted, therefore modifications to the initrd are necessary.&lt;br /&gt;
&lt;br /&gt;
==== initrd modifications ====&lt;br /&gt;
During the boot, when the kernel is running and mounted the initrd, the &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;iscsi_tcp&amp;lt;/code&amp;gt; modules need to be loaded, after which the block device can be created. To do this a hook needs to be installed in the initramfs. On ubuntu this can be done by putting files into the &amp;lt;code&amp;gt;/etc/initramfs-tools/scripts&amp;lt;/code&amp;gt; directory (or rather subdirectories). The hook for the iSCSI setup need to happen after the network is available, which means the hook needs to be put in the &amp;lt;code&amp;gt;local-top&amp;lt;/code&amp;gt; directory and made executable. The content is:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# iSCSI init script&lt;br /&gt;
PREREQ=&amp;quot;&amp;quot;&lt;br /&gt;
prereqs()&lt;br /&gt;
{&lt;br /&gt;
     echo &amp;quot;$PREREQ&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
prereqs)&lt;br /&gt;
     prereqs&lt;br /&gt;
     exit 0&lt;br /&gt;
     ;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
. /scripts/functions&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Begin iSCSI init&amp;quot;&lt;br /&gt;
&lt;br /&gt;
modprobe iscsi_tcp&lt;br /&gt;
modprobe iscsi_ibft&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Network configuration based on iBFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
iscsistart -N || panic &amp;quot;Could not initialize iSCSI&amp;quot;&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Waiting to finish iscsistart&amp;quot;&lt;br /&gt;
until iscsistart -b ; do&lt;br /&gt;
    sleep 1&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Of course the script needs to be made executable. After that the initial ramdisk(s) need to be regenerated by calling &amp;lt;code&amp;gt;update-initramfs -u&amp;lt;/code&amp;gt;. When the script is called during the boot process the block device exists for the kernel to mount the root filesystem and continue the boot process as normal.&lt;br /&gt;
&lt;br /&gt;
=== Installing ===&lt;br /&gt;
Unfortunately we can't completely rely on the normal installation process because Ubuntu by default doesn't use the iBFT to set up an iSCSI LUN before the installer searches for block devices to install on. We could get around this by simply switching to a TTY, running &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; and relaunching the installer, which then identified the block device and proceeded as normal. Since this entire stuff runs off LUNs on the network we can potentially completely get around the installation by just preparing enough LUNS with the appropriate data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== iSCSI targets ===&lt;br /&gt;
In the home directory of the ubuntuamdin are in the folder iscsi/ scripts for generating the images in the zfs subvolume &amp;lt;code&amp;gt; pool/iscsi &amp;lt;/code&amp;gt; (called: &amp;lt;code&amp;gt;generate_zfs_images.sh&amp;lt;/code&amp;gt;). Then the iscsi targets are being created with: &amp;lt;code&amp;gt;create_iscsi_targets.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
With &amp;lt;code&amp;gt;destroy_all_zfs_images.sh&amp;lt;/code&amp;gt; everything can be reverted.&lt;br /&gt;
The root filesystem size for each node is 80.8GB.&lt;br /&gt;
Once created, they shouldn't be touched unless nodes are failing and we want to delete unnecessary images.&lt;br /&gt;
&lt;br /&gt;
== UEFI settings ==&lt;br /&gt;
Settings applied after resetting the UEFI to default settings:&lt;br /&gt;
&lt;br /&gt;
Enter the BIOS menu by pressing F2.&lt;br /&gt;
&lt;br /&gt;
In the settings, first RESET everything to default.&lt;br /&gt;
Then those changes should be made:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Main&lt;br /&gt;
  --&amp;gt; Quiet Boot: Disabled&lt;br /&gt;
Advanced&lt;br /&gt;
  --&amp;gt; Processor Configuration&lt;br /&gt;
    --&amp;gt; Intel Hyper Threading: Disabled&lt;br /&gt;
  --&amp;gt; Power &amp;amp; Performance&lt;br /&gt;
    --&amp;gt; CPU Power &amp;amp; Performance: Performance&lt;br /&gt;
    --&amp;gt; CPU HWPM State Control&lt;br /&gt;
      --&amp;gt; Enable CPU HWPM: HWPM Native Mode&lt;br /&gt;
  --&amp;gt; PCI Configuration&lt;br /&gt;
    --&amp;gt; NIC Configuration&lt;br /&gt;
      --&amp;gt; NIC Port 2: Disabled&lt;br /&gt;
Server Management&lt;br /&gt;
  --&amp;gt; Clear System Event Log: Clear it here&lt;br /&gt;
Advanced Boot Options&lt;br /&gt;
  --&amp;gt; System Boot Timeout: 10&lt;br /&gt;
  --&amp;gt; Bood Mode: UEFI&lt;br /&gt;
  --&amp;gt; Boot Option Retry: Enabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
REBOOT the system (with e.g. ALT + CMD + DEL)&lt;br /&gt;
Then change again in the BIOS settings:&lt;br /&gt;
&lt;br /&gt;
Intel Hyper Threading  often goes back to Enabled (double check that it is Disabled)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
Advanced&lt;br /&gt;
  --&amp;gt; PCI Configuration&lt;br /&gt;
    --&amp;gt; UEFI Network Stack&lt;br /&gt;
      --&amp;gt;IPv6 PXE Support: Disabled&lt;br /&gt;
    --&amp;gt; UEFI Option ROM Control&lt;br /&gt;
      --&amp;gt; IPv4 Network Configuration&lt;br /&gt;
        --&amp;gt; Configured: [x]&lt;br /&gt;
        --&amp;gt; Enable DHCP: [x]&lt;br /&gt;
    --&amp;gt; iSCSI Configuration&lt;br /&gt;
      --&amp;gt; iSCSI Initiator Name: Format is: iqn.1886.de.sternwarte.iscsi:meggie-x-y &lt;br /&gt;
                                where x: rack number (01 is top, 20 is the lowest rack); &lt;br /&gt;
                                      y: |-----|-----| for one rack are 4 nodes.&lt;br /&gt;
                                         |  1  |  2  |&lt;br /&gt;
                                         |-----|-----|&lt;br /&gt;
                                         |  3  |  4  |&lt;br /&gt;
                                         |-----|-----|&lt;br /&gt;
                                         eg: iqn.1886.de.sternwarte.iscsi:meggie-11-1 for node in rack 11 and place 1&lt;br /&gt;
    --&amp;gt; Add an Attempt&lt;br /&gt;
      --&amp;gt; MAC-address&lt;br /&gt;
        --&amp;gt; iSCSI Mode: Enabled&lt;br /&gt;
        --&amp;gt; Connection Retry Count: 2&lt;br /&gt;
        --&amp;gt; Connection Establishing Timeout: 5000&lt;br /&gt;
        --&amp;gt; Enable DHCP: [x]&lt;br /&gt;
        --&amp;gt; Get target info via DHCP: [x]&lt;br /&gt;
        --&amp;gt; Authentication Type: None&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
REBOOT and press F6 to enter the boot menu:&lt;br /&gt;
&lt;br /&gt;
Go to IP based booting option (should be the last of the three) &lt;br /&gt;
Select partition:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
Ubuntu 20.4 puppet iSCSI autopartition --DO NOT USE IF NO IDEA--&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful, because there exist also other versions like blank.&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=4001</id>
		<title>Meggie Cluster</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=4001"/>
		<updated>2026-01-20T14:18:50Z</updated>

		<summary type="html">&lt;p&gt;Weber: /* Hardware setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
&lt;br /&gt;
The meggies are diskless nodes inherited from the RRZE used from computing only. We would like to boot them from the network. NFS and iSCSI are two options to accomplish this. Since iSCSI is directly supported by the UEFI of the nodes this is the option which is by far the easiest to implement.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
The main boards are S2600KPR from Intel. Four of those are in a 2U chassis, called H2000G. The rails for the installation are called AXXELVRAIL.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
&lt;br /&gt;
=== OS setup ===&lt;br /&gt;
* &amp;lt;s&amp;gt;Make the installer recognize the iSCSI LUN as a block device before searching for those&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;Supply LUN information directly to the UEFI via DHCP&amp;lt;/s&amp;gt;&lt;br /&gt;
* Test what happens on iSCSI connection problems&lt;br /&gt;
** Switch malfunction&lt;br /&gt;
** iSCSI server reboot&lt;br /&gt;
** It doesn't take long until the kernel gives up on the iSCSI target. We need to increase this timeout somehow&lt;br /&gt;
* &amp;lt;s&amp;gt;Make a list of UEFI settings&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;Prepare LUNs&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Use ZFS zvols as storage backend&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Find out which backend type is the best (file, block, SCSI passthrough)&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Create a separate dataset for easier zfs setting propagation&amp;lt;/s&amp;gt;&lt;br /&gt;
** Leave a README file in the dataset directory for other people to know that it shouldn't be deleted&lt;br /&gt;
** Optimize dataset settings for iSCSI targets&lt;br /&gt;
*** Compression lz4&lt;br /&gt;
*** Larger &amp;lt;code&amp;gt;recordsize&amp;lt;/code&amp;gt; (1M or something)&lt;br /&gt;
** &amp;lt;s&amp;gt;Name the zvols &amp;lt;code&amp;gt;zvol-MM-m&amp;lt;/code&amp;gt; where MM is the chassis number from 01 to 20 and m the node number from 1 to 4&amp;lt;/s&amp;gt;&lt;br /&gt;
* Remove the stupid /swap.img file. This is a general point affecting all computers&lt;br /&gt;
* Adjust puppet&lt;br /&gt;
** &amp;lt;s&amp;gt;Make no scratch available&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Make /tmp and friends a tmpfs&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Restrict sizes of all tmpfs&amp;lt;/s&amp;gt;&lt;br /&gt;
** Remove unnecessary user stuff? (e.g. x2go, firefox, etc.)&lt;br /&gt;
* Reinstall to Ubuntu 24.0&lt;br /&gt;
&lt;br /&gt;
=== Hardware setup ===&lt;br /&gt;
* Install nodes in a rack&lt;br /&gt;
* Buy and set up up switches&lt;br /&gt;
* Lots of cabling&lt;br /&gt;
* Power requirements?&lt;br /&gt;
** Ca. 250W per node, 1kW per chassis&lt;br /&gt;
* Change batteries in all nodes&lt;br /&gt;
&lt;br /&gt;
== The Boot Process ==&lt;br /&gt;
&lt;br /&gt;
=== General layout ===&lt;br /&gt;
The boot process works like this:&lt;br /&gt;
# UEFI stage&lt;br /&gt;
## The UEFI starts up&lt;br /&gt;
## Establishes a connection to the network&lt;br /&gt;
## Runs a DHCP client&lt;br /&gt;
## Gets an IP as well as the iSCSI LUN information directly from our DHCP server&lt;br /&gt;
## Accesses the GPT on the LUN and loads grub&lt;br /&gt;
# grub stage&lt;br /&gt;
## Grub starts&lt;br /&gt;
## Loads the kernel and initrd from the LUN&lt;br /&gt;
## Jumbs into the kernel&lt;br /&gt;
# ramdisk stage&lt;br /&gt;
## The kernel runs&lt;br /&gt;
## Mounts the initrd&lt;br /&gt;
## Inside the initrd our custom iSCSI hook is called&lt;br /&gt;
### Loads the iSCSI kernel module&lt;br /&gt;
### Loads the iSCSI iBFT kernel module&lt;br /&gt;
### Runs &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; which makes the iSCSI LUN available as a block device&lt;br /&gt;
# Normal boot continues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Further explanations ===&lt;br /&gt;
==== UEFI DHCP ====&lt;br /&gt;
The UEFI can talk to the DHCP server and get an IP. We use DHCP option 17 (root-path) to supply the iSCSI information to the nodes.&lt;br /&gt;
&lt;br /&gt;
==== grub ====&lt;br /&gt;
As of now we don't know why grub even works. It's installed on the efi partition on the LUN, just like a normal computer. The UEFI uses the information on this EFI partition to find grub and run it, and grub then sees the partitions of the installed OS. Either the UEFI somehow emulates a blockdevice for grub such that it can see these partitions and load the kernel and initrd, or grub somehow also does iSCSI by using the iBFT. Anyway, it loads the kernel and initrd, which is the most important part.&lt;br /&gt;
&lt;br /&gt;
==== iBFT ====&lt;br /&gt;
This is really cool. When the UEFI launches and gets iSCSI information from the DHCP server it puts this information into the EFI system table, the Boot Firmware Table (iBFT). Linux can use this information to connect to the same LUN used for the boot process and set up the block device before trying to mount the root partition. The necessary kernel module is called &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt;. After the module is loaded its only a matter of calling the &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; program to set up the block device. All this needs to happen before root is mounted, therefore modifications to the initrd are necessary.&lt;br /&gt;
&lt;br /&gt;
==== initrd modifications ====&lt;br /&gt;
During the boot, when the kernel is running and mounted the initrd, the &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;iscsi_tcp&amp;lt;/code&amp;gt; modules need to be loaded, after which the block device can be created. To do this a hook needs to be installed in the initramfs. On ubuntu this can be done by putting files into the &amp;lt;code&amp;gt;/etc/initramfs-tools/scripts&amp;lt;/code&amp;gt; directory (or rather subdirectories). The hook for the iSCSI setup need to happen after the network is available, which means the hook needs to be put in the &amp;lt;code&amp;gt;local-top&amp;lt;/code&amp;gt; directory and made executable. The content is:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# iSCSI init script&lt;br /&gt;
PREREQ=&amp;quot;&amp;quot;&lt;br /&gt;
prereqs()&lt;br /&gt;
{&lt;br /&gt;
     echo &amp;quot;$PREREQ&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
prereqs)&lt;br /&gt;
     prereqs&lt;br /&gt;
     exit 0&lt;br /&gt;
     ;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
. /scripts/functions&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Begin iSCSI init&amp;quot;&lt;br /&gt;
&lt;br /&gt;
modprobe iscsi_tcp&lt;br /&gt;
modprobe iscsi_ibft&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Network configuration based on iBFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
iscsistart -N || panic &amp;quot;Could not initialize iSCSI&amp;quot;&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Waiting to finish iscsistart&amp;quot;&lt;br /&gt;
until iscsistart -b ; do&lt;br /&gt;
    sleep 1&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Of course the script needs to be made executable. After that the initial ramdisk(s) need to be regenerated by calling &amp;lt;code&amp;gt;update-initramfs -u&amp;lt;/code&amp;gt;. When the script is called during the boot process the block device exists for the kernel to mount the root filesystem and continue the boot process as normal.&lt;br /&gt;
&lt;br /&gt;
=== Installing ===&lt;br /&gt;
Unfortunately we can't completely rely on the normal installation process because Ubuntu by default doesn't use the iBFT to set up an iSCSI LUN before the installer searches for block devices to install on. We could get around this by simply switching to a TTY, running &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; and relaunching the installer, which then identified the block device and proceeded as normal. Since this entire stuff runs off LUNs on the network we can potentially completely get around the installation by just preparing enough LUNS with the appropriate data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== iSCSI targets ===&lt;br /&gt;
In the home directory of the ubuntuamdin are in the folder iscsi/ scripts for generating the images in the zfs subvolume &amp;lt;code&amp;gt; pool/iscsi &amp;lt;/code&amp;gt; (called: &amp;lt;code&amp;gt;generate_zfs_images.sh&amp;lt;/code&amp;gt;). Then the iscsi targets are being created with: &amp;lt;code&amp;gt;create_iscsi_targets.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
With &amp;lt;code&amp;gt;destroy_all_zfs_images.sh&amp;lt;/code&amp;gt; everything can be reverted.&lt;br /&gt;
The root filesystem size for each node is 80.8GB.&lt;br /&gt;
Once created, they shouldn't be touched unless nodes are failing and we want to delete unnecessary images.&lt;br /&gt;
&lt;br /&gt;
== UEFI settings ==&lt;br /&gt;
Settings applied after resetting the UEFI to default settings:&lt;br /&gt;
&lt;br /&gt;
Enter the BIOS menu by pressing F2.&lt;br /&gt;
&lt;br /&gt;
In the settings, first RESET everything to default.&lt;br /&gt;
Then those changes should be made:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Main&lt;br /&gt;
  --&amp;gt; Quiet Boot: Disabled&lt;br /&gt;
Advanced&lt;br /&gt;
  --&amp;gt; Processor Configuration&lt;br /&gt;
    --&amp;gt; Intel Hyper Threading: Disabled&lt;br /&gt;
  --&amp;gt; Power &amp;amp; Performance&lt;br /&gt;
    --&amp;gt; CPU Power &amp;amp; Performance: Performance&lt;br /&gt;
    --&amp;gt; CPU HWPM State Control&lt;br /&gt;
      --&amp;gt; Enable CPU HWPM: HWPM Native Mode&lt;br /&gt;
  --&amp;gt; PCI Configuration&lt;br /&gt;
    --&amp;gt; NIC Configuration&lt;br /&gt;
      --&amp;gt; NIC Port 2: Disabled&lt;br /&gt;
Server Management&lt;br /&gt;
  --&amp;gt; Clear System Event Log: Clear it here&lt;br /&gt;
Advanced Boot Options&lt;br /&gt;
  --&amp;gt; System Boot Timeout: 10&lt;br /&gt;
  --&amp;gt; Bood Mode: UEFI&lt;br /&gt;
  --&amp;gt; Boot Option Retry: Enabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
REBOOT the system (with e.g. ALT + CMD + DEL)&lt;br /&gt;
Then change again in the BIOS settings:&lt;br /&gt;
&lt;br /&gt;
Intel Hyper Threading  often goes back to Enabled (double check that it is Disabled)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
Advanced&lt;br /&gt;
  --&amp;gt; PCI Configuration&lt;br /&gt;
    --&amp;gt; UEFI Network Stack&lt;br /&gt;
      --&amp;gt;IPv6 PXE Support: Disabled&lt;br /&gt;
    --&amp;gt; UEFI Option ROM Control&lt;br /&gt;
      --&amp;gt; IPv4 Network Configuration&lt;br /&gt;
        --&amp;gt; Configured: [x]&lt;br /&gt;
        --&amp;gt; Enable DHCP: [x]&lt;br /&gt;
    --&amp;gt; iSCSI Configuration&lt;br /&gt;
      --&amp;gt; iSCSI Initiator Name: Format is: iqn.1886.de.sternwarte.iscsi:meggie-x-y &lt;br /&gt;
                                where x: rack number (01 is top, 20 is the lowest rack); &lt;br /&gt;
                                      y: |-----|-----| for one rack are 4 nodes.&lt;br /&gt;
                                         |  1  |  2  |&lt;br /&gt;
                                         |-----|-----|&lt;br /&gt;
                                         |  3  |  4  |&lt;br /&gt;
                                         |-----|-----|&lt;br /&gt;
                                         eg: iqn.1886.de.sternwarte.iscsi:meggie-11-1 for node in rack 11 and place 1&lt;br /&gt;
    --&amp;gt; Add an Attempt&lt;br /&gt;
      --&amp;gt; MAC-address&lt;br /&gt;
        --&amp;gt; iSCSI Mode: Enabled&lt;br /&gt;
        --&amp;gt; Connection Retry Count: 2&lt;br /&gt;
        --&amp;gt; Connection Establishing Timeout: 5000&lt;br /&gt;
        --&amp;gt; Enable DHCP: [x]&lt;br /&gt;
        --&amp;gt; Get target info via DHCP: [x]&lt;br /&gt;
        --&amp;gt; Authentication Type: None&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
REBOOT and press F6 to enter the boot menu:&lt;br /&gt;
&lt;br /&gt;
Go to IP based booting option (should be the last of the three) &lt;br /&gt;
Select partition:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
Ubuntu 20.4 puppet iSCSI autopartition --DO NOT USE IF NO IDEA--&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful, because there exist also other versions like blank.&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3765</id>
		<title>New Network</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3765"/>
		<updated>2025-06-26T14:46:16Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
We're creating our own network inside a DMZ.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
* &amp;lt;s&amp;gt;Check whether the router is set to switch on after power failure in the BIOS&amp;lt;/s&amp;gt;&lt;br /&gt;
* Enable RSTP on all switches and set a high spanning tree priority on the root bridge&lt;br /&gt;
* Check whether/how we can use only one domain, instead of two (internal.sternwarte ...)&lt;br /&gt;
* When all hosts are in the private network&lt;br /&gt;
* Set IP address of 10G switch via DHCP (doesn't work statically)&lt;br /&gt;
** Adjust DHCP settings&lt;br /&gt;
*** Make the private network the default one (remove internal tags from config)&lt;br /&gt;
*** Adjust DHC relay direction&lt;br /&gt;
*** Remove classless static route from public to private network&lt;br /&gt;
&lt;br /&gt;
== Subnets ==&lt;br /&gt;
=== Public ===&lt;br /&gt;
The public subnet is a part of the internet as organized through the [https://de.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority IANA]. &amp;quot;Our&amp;quot; subnet is &amp;lt;code&amp;gt;131.188.151.0/24&amp;lt;/code&amp;gt;. At least one of the IPs in this subnet is used by the RRZE to provide a gateway. It's a [https://www.cisco.com/site/de/de/index.html Cisco] router in the basement with the IP &amp;lt;code&amp;gt;131.188.151.1&amp;lt;/code&amp;gt; and FQDN &amp;lt;code&amp;gt;astro.gate.uni-erlangen.de&amp;lt;/code&amp;gt;. We need to use this gateway to access the WAN.&lt;br /&gt;
&lt;br /&gt;
=== Private ===&lt;br /&gt;
We need to use a private network as defined in [https://www.rfc-editor.org/rfc/rfc1918.html RFC1918] for our own subnet. Because it's easy to remember and short to write we pick the class A network from RFC1918 which is &amp;lt;code&amp;gt;10.0.0.0/8&amp;lt;/code&amp;gt;. We can allocate a &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; network from this block. Since it sounds nice we can choose the second octet to also be 10. This gives us more than 65000 IP addresses to work with in &amp;lt;code&amp;gt;10.10.0.0/16&amp;lt;/code&amp;gt;. Because it makes sense we use the first address for our own gateway: &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Address blocks ====&lt;br /&gt;
Using the &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; doesn't only provide more than enough addresses, probably forever, it also enables the grouping into blocks of addresses which denote different classes of devices. This makes it easier to identify the devices and find their IP address. Note that these are not separate subnets, it's only nomenclature. These blocks are used in the DHCP server of [https://thekelleys.org.uk/dnsmasq/doc.html dnsmasq] and defined in the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet/-/blob/master/modules/remeis/files/dnsmasq/internal-dhcp.conf internal-dhcp.conf] file of the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet puppet] gitlab repository.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Address blocks&lt;br /&gt;
|-&lt;br /&gt;
! Block !! Device class&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.1.*   || Switches&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.2.*   || Management interfaces (iLO, iDRAC, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.10.*  || Servers&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.20.*  || VMs&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.30.*  || Meggie cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.40.*  || Blade center&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.50.*  || Messier cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.90.*  || Functional hosts (Raspbbery Pis, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.100.* || Office computers main building&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.200.* || Testing (Installation testing, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.250.* || Private notebooks&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Router ==&lt;br /&gt;
&lt;br /&gt;
The uplink to the WAN is realized with a server (Dell Poweredge 1950) which runs [https://opnsense.org OPNSense], a FreeBSD based routing and firewall distribution which is very easy to set up and highly reliable. The server has two 1G interfaces. One is connected to the public network managed by the RRZE (WAN) and has a public IP, the other one is connected to our own switches and has a private ip (LAN). Both interfaces are labelled in the back of the server. The router routes traffic between these two networks to make our computers talk to each other.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
The router can be configure through the web gui. It's accessible directly over the ''internal'' IP address, but the port is changed to 8443: https://10.10.0.1:8443. The user for the login is &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and the password is the same as the LDAP admin passwort (as of writing). A lot of information is provided in the [https://docs.opnsense.org/ OPNSense documentation]. One of the interfaces has a public IP, at the time of writing the public IP is &amp;lt;code&amp;gt;131.188.151.92&amp;lt;/code&amp;gt;. The other interface has the private used as the gateway, &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;. Its public IP might be changed depending on how we proceed with mechansim for remote access. SSH is is disabled, but the port is changed to 12345.&lt;br /&gt;
&lt;br /&gt;
==== 10G Interfaces ====&lt;br /&gt;
There is a PCIe card with dual 10G interfaces installed, a Mellanox ConnectX-3. It has two 10G SFP+ ports. OPNsense, which is based on FreeBSD, by default does not load the driver for this card, so it has to be told to load it on boot. This can be done in the boot settings as described in the [https://www.thomas-krenn.com/de/wiki/OPNsense_Chelsio_Mellanox_Broadcom_Netzwerkkarten-Treiber_aktivieren Thomas Krenn Wiki].&lt;br /&gt;
&lt;br /&gt;
==== Gateway ====&lt;br /&gt;
The router uses the RRZE gateway as its own upstream gateway. By default the firmware always sends packets destined to the WAN network to this gateway. At the time of writing this is problematic because the upstream gateway drops packets arriving from a private network (according to RFC1918) which makes it impossible for hosts in our private network to directly communicate with hosts in our public network. This option is therefore disabled in the configuration of the router. See the &amp;quot;Disable force gateway&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
==== Private and bogon networks ====&lt;br /&gt;
According to RFC1918 packets with source or destination IP addresses in private networks must not be routed through the internet. It often happens that such packets are generated and end up at edge routers (keep the private notebooks connected to our network in mind). Therefore such routers usually drop these packets on purpose. At the time of writing we actually want to route such packets from our private to our public network and vice versa. Therefore the option to drop packets from or to private networks is disabled on both interfaces. When we have all our hosts behind the router we should re enable this option for the WAN interface to avoid trouble with the RRZE. On the LAN interface this option should obviously stay disabled.&lt;br /&gt;
&lt;br /&gt;
There are addresses in the public IPv4 space which are not assigned to anything or do not make sense. These are called [https://de.wikipedia.org/wiki/Bogon &amp;quot;Bogon&amp;quot; networks]. The router is configured to drop these packets if they arrive on the WAN interface.&lt;br /&gt;
&lt;br /&gt;
==== NAT ====&lt;br /&gt;
Hosts within the private network can not directly talk to the internet (see the previous section), they need an intermidiary to do this. This is accomplished by using [https://en.wikipedia.org/wiki/Network_address_translation Network address translation (NAT)]. When a client wants to talk to the internet (except our own public network, see the following section), the router replaces the source address of the packet with its own public address and sends it of to the WAN. From the WAN it looks as if the router is making requests, instead of the client. When the reply arrives on the WAN interface the router changes the destination address of the packet from its own public address to the private address of the client and sends if off into the LAN.&lt;br /&gt;
&lt;br /&gt;
We need this mechanism for all clients behind the router to talk to the internet, except our own public network. This option is available as outbound NAT in the routers firmware and enabled by default.&lt;br /&gt;
&lt;br /&gt;
There is an important exception: Traffic from our private network which has a destination in our own public network should be routed directly, without any NAT, such that these two computers can talk directly to each other. Therefore there is a rule in the outbound NAT section which identifies such traffic and disables NAT for it. It can then be routed normally (see the following section). Note that this should be disabled as soon as all our computers are in the private network and can talk to each other directly.&lt;br /&gt;
&lt;br /&gt;
==== Routing between public and private network ====&lt;br /&gt;
At the time of writing our computers are distributed in a private and a public network. Both need to be reachable by each other. Therefore the router allows traffic to pass between these exact two networks without any restrictions. The rules for this can be found in the LAN and WAN sections of the firewall rules of the router. Especially the rule allowing any traffic originating from the public network to pass directly into the private network should be disabled as soon as all computers are in the private network.&lt;br /&gt;
&lt;br /&gt;
==== DHCP relay ====&lt;br /&gt;
At the time of writing we have DHCP (and DNS etc.) servers in the public network. Replicating these services behind the router can be avoided by allowing the router to forward DHCP requests from the private to the public network. This is done in the DHC relay section in the Services menu. With this service and the working routing and NAT there is no need to replicate these services in the private network for now. Everything seems to work, including PXE boot to install clients within the private network. As soon as all computers are in the private network the DHC relay should be disabled.&lt;br /&gt;
&lt;br /&gt;
==== Backup ====&lt;br /&gt;
The configuration can be backed up simply by downloading it in the GUI. It's recommended to do this once in a while just in case the router dies. This configuration can then be very easily applied after a new installation.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
Updates of the route can simply be done through the GUI. For security reasons this is recommended on a regular basis, but since we have the firewall of the RRZE in front of it it's probably not critical. Often the updates ca be done even without restarting the firmware.&lt;br /&gt;
&lt;br /&gt;
== Layer 2 ==&lt;br /&gt;
With the router working we can use our own ethernet switches behind it without interfering with the RRZE switches.&lt;br /&gt;
&lt;br /&gt;
=== MDI ===&lt;br /&gt;
Ethernet on RJ45 ports consists of a pair of transmitting and receiving wires on both ends. Obviously the receiving pair on one end must be attached to the transmitting pair on the other end. In the old days it was important to consider this property when connecting devices via RJ45 twisted pairs, and in the appropriate case a [https://en.wikipedia.org/wiki/Ethernet_crossover_cable crossover cable] needed to be used. Nowadays ethernet iterfaces can automatically make sure to select the correct twisted pairs to transmit and receive data. This mechanism is called [https://en.wikipedia.org/wiki/Medium-dependent_interface#Automatic_MDI-X automatic MDI-X (automdix)]. It should be enabled on all ports of all switches, and probably is so by default.&lt;br /&gt;
&lt;br /&gt;
=== VLAN ===&lt;br /&gt;
[https://en.wikipedia.org/wiki/VLAN Local Area Networks (VLAN)] are logical layer 2 networks which can spread across multiple switches. They can be used to separate different broadcast domains (ethernet networks) and usually only contain a single IP subnet. Under certain scenarios VLANs can offer performance, flexibility and security advantages. We don't want to segment our network, therefore performance and flexibility enhancements are not possible. Security is also of no concern. We therefore do not use VLANs.&lt;br /&gt;
&lt;br /&gt;
However, from a technical perspective this is impossible with layer 3 switches. By default all interfaces of a switch are assigned to the so called default VLAN. For most switch manufacturers this is VLAN 1, but it doesn't have to be. Most manufacturers also use VLAN 1 as the native VLAN. This means that all frames in VLAN 1 are sent untagged (without VLAN information) also to other switches, even over tagged ports (trunk ports). This ensures interoperability without changing settings.&lt;br /&gt;
&lt;br /&gt;
We are good as long as all switches we buy have default VLAN 1 (which can not be changed) and native VLAN 1 (which can be changed). In case we get a switch which does not have the default VLAN 1 we need to set the native VLAN of this switch also to the same VLAN, making all frames in this VLAN untagged, enabling communication with other switches.&lt;br /&gt;
&lt;br /&gt;
=== Spanning tree ===&lt;br /&gt;
We know for a fact that sometimes people plug ethernet cables into random ports, even both ends of it, causing potential loops (see mail on 22 August 2023). To avoid such loops the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol spanning tree protocol (STP)] defined in [https://en.wikipedia.org/wiki/IEEE_802.1D IEEE 802.1d]. When this protocol is enabled on a switch it exchanges [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Bridge_protocol_data_units bridge protocol data units (BPDUs)] with its neighbouring switches, containing some information about the network topology. This information is used to elect the so called [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Root_bridge_and_the_bridge_ID root bridge]. This switch can be thought of as the top of the spanning tree. All other switches then determine one port they use as a path towards this root bridge, even if it goes through another switch. All other ports which also provide a path towards the root bridge are disabled (set to the blocking [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Port_states state]). The election of the root bridge also enters an individual priority for each switch which can be set by the administrator. We should make sure to set a high priority on our central switch.&lt;br /&gt;
&lt;br /&gt;
When a change in the network topology is detected via the BPDUs 802.1d causes the entire spanning tree to be newly established with a new election of a root bridge. This can take somewhere around a minute, which is too long. Therefore the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Rapid_Spanning_Tree_Protocol rapid STP (RSTP)] was defined in IEEE 802.1w. It is fully backwards compatible with 802.1d and uses additional information to define port based rules such as alternate and backup ports for the path to the root bridge such that a topology change can be acted on in just a few seconds. It has the nice benefit that a link to a computer which is plugged into an access port on a given switch becomes ready in just a few seconds. We therefore enable RSTP on all our switches. Usually this is done by enabling STP and forcing the STP mode to RSTP. No further configuration is needed, except the priority of the root bridge.&lt;br /&gt;
&lt;br /&gt;
=== NTP ===&lt;br /&gt;
All switches are configured to use the RRZE NTP servers directly via their IP addresses because they can't do DNS. &lt;br /&gt;
&lt;br /&gt;
=== Current switches ===&lt;br /&gt;
Here is a list of the currently installed switches, their configuration, uplink, and some notes. All passwords are the LDAP password.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Switches&lt;br /&gt;
|-&lt;br /&gt;
! name !! IP !! Usecase !! Model !! Connectivity !! Administration !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| switch1 || 10.10.1.1 || 1G RJ45 distribution racks || HP ProCurve J4904A 2848 || 44x1G RJ45, 4x1G RJ45/SFP || telnet, D-Sub 9 + RS232-USB, webgui (defunct) ||&lt;br /&gt;
* Kind of old&lt;br /&gt;
* No username required for login&lt;br /&gt;
* Ports 45-48 are dual personality ports, either RJ45 or SFP can be used, not both.&lt;br /&gt;
|-&lt;br /&gt;
| switch2 || 10.10.1.2 || server management (iLO, iDRAC, ...) || HP J9781A 2530-48 || 48x100M RJ45, 2x1G RJ45/SFP || telnet, micro-USB B, RJ45 + RS232-USB, webgui ||&lt;br /&gt;
* Username: manager&lt;br /&gt;
* Ports 49-50 (or 49-52) are dual personality ports, either RJ45 or SFP can be used, not both&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== HP switch administration ===&lt;br /&gt;
==== Accessing via CLI ====&lt;br /&gt;
Accessing the switches via browser is problematic for older switches since they use stuff like Java in the browser or flash. The CLI always works, if basic connectivity is ensured.&lt;br /&gt;
&lt;br /&gt;
===== telnet =====&lt;br /&gt;
If the switch is up, ethernet is connected, IP address is assigned, subnets are configured correctly, and a computer is in the same VLAN (which should be the case), &amp;lt;code&amp;gt;telnet&amp;lt;/code&amp;gt; can be used to access the switches. Just do &amp;lt;code&amp;gt;telnet {IP of switch}&amp;lt;/code&amp;gt; and the you should reach the login of the CLI.&lt;br /&gt;
&lt;br /&gt;
===== serial =====&lt;br /&gt;
Alternatively, and especially if the ethernet connection itself doesn't work (yet), the switches can be accessed directly by plugging a computer into the management port(s). Usually those are some kind of serial connection. Older models have a [https://en.wikipedia.org/wiki/D-subminiature D-Sub 9] connector for this purpose, newer models use a RJ45 port. In the latter case RJ45 is only the physical connector. It does not carry ethernet, only a [https://en.wikipedia.org/wiki/RS-232 RS-232] serial connection. Unless the computer itself has a serial port (unlikely these days), in both cases a serial to USB converter is required. Newer switches offer a USB port which internally has a USB to serial converter integrated and shows up in the connecting computer as a serial port. Regardless of the route choosen, if a serial to USB converter is attached the kernel log of the connecting computer should look something like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[  +0,042064] usbcore: registered new interface driver usbserial_generic&lt;br /&gt;
[  +0,000009] usbserial: USB Serial support registered for generic&lt;br /&gt;
[  +0,001588] usbcore: registered new interface driver ftdi_sio&lt;br /&gt;
[  +0,000008] usbserial: USB Serial support registered for FTDI USB Serial Device&lt;br /&gt;
[  +0,000101] ftdi_sio 1-4:1.0: FTDI USB Serial Device converter detected&lt;br /&gt;
[  +0,000023] usb 1-4: Detected FT232RL&lt;br /&gt;
[  +0,006308] usb 1-4: FTDI USB Serial Device converter now attached to ttyUSB0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This means the serial port is available under &amp;lt;code&amp;gt;/dev/ttyUSB0&amp;lt;/code&amp;gt;. Of course ne number in the end can change, depending on how many serial ports are present. Some devices show up as &amp;lt;code&amp;gt;/dev/ttyACM0&amp;lt;/code&amp;gt; instead. These ports can be used with &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt; to talk to the switch, for example &amp;lt;code&amp;gt;screen /dev/ttyUSB0&amp;lt;/code&amp;gt;. If everything goes well a message like &amp;lt;code&amp;gt;Connected with baud rate 9600&amp;lt;/code&amp;gt; should show up.&lt;br /&gt;
&lt;br /&gt;
===== Authentication =====&lt;br /&gt;
Depending on the model a username must be entered to access the switch. The &amp;quot;root&amp;quot; user for HP switches is usually called &amp;quot;manager&amp;quot;. A password is required to log in in a mode which allows configuration changes. It should be set to our current LDAP admin password. If the password is not or incorrectly entered on the serial console the switches usually drops back to an unpriviledged user which can only look around.&lt;br /&gt;
&lt;br /&gt;
===== Entering configuration =====&lt;br /&gt;
Before anything can be changed in the switch the configuration submenu must be entered. This can be done using the &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
switch1# config&lt;br /&gt;
switch1(config)# &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Tab completion should work in all circumstances and is often very informative. An ad-hoc set of suggestions and help messages can also be triggered by putting a &amp;quot;?&amp;quot; in the terminal. Note that no &amp;quot;enter&amp;quot; is required in this case. As soon as the &amp;quot;?&amp;quot; is sent the terminal shows the suggestions.&lt;br /&gt;
&lt;br /&gt;
===== Saving the configuration =====&lt;br /&gt;
Note that when changing the configuration of a switch only the running configuration is modified. Changes are not persistent over a reboot of the device. To make the changes persistent the configuration needs to be written to the flash memory of the device. This can be done by &amp;lt;code&amp;gt;write memory&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Interestingly, &amp;lt;code&amp;gt;write terminal&amp;lt;/code&amp;gt; shows all commands necessary to achieve the currently running configuration of the switch.&lt;br /&gt;
&lt;br /&gt;
===== Basic setup =====&lt;br /&gt;
The basic switch setup can be accessed even from outside the &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; menu using the &amp;lt;code&amp;gt;setup&amp;lt;/code&amp;gt; command. It's an interactive menu which is rather intuitive. Among other things, it can be used to set&lt;br /&gt;
* The hostname of the switch&lt;br /&gt;
* The password for the &amp;lt;code&amp;gt;manager&amp;lt;/code&amp;gt; user&lt;br /&gt;
* The default gateway&lt;br /&gt;
* The IP of the switch in the [[#VLAN|default VLAN]]&lt;br /&gt;
&lt;br /&gt;
===== Port information =====&lt;br /&gt;
Information about the interfaces of the switch can be retrieven by the &amp;lt;code&amp;gt;show interfaces&amp;lt;/code&amp;gt; command which lists all interfaces and their information in a table. It can be followed by another option to determine the type of information in the table. These are the options:&lt;br /&gt;
* (no option): Sent/received traffic, errors, drops, [https://en.wikipedia.org/wiki/Ethernet_flow_control flow control], broadcast limit&lt;br /&gt;
* &amp;lt;code&amp;gt;brief&amp;lt;/code&amp;gt; Port type, intrusion alert, enabled/disabled, port status (up/down), mode (speed, duplex), flow control, broadcast limit&lt;br /&gt;
* &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; Port type, enabled/disabled, mode, flow control, [https://en.wikipedia.org/wiki/Medium-dependent_interface MDI] mode&lt;br /&gt;
* &amp;lt;code&amp;gt;port-utilization&amp;lt;/code&amp;gt; mode (speed, duplex), Rx data, Tx data&lt;br /&gt;
Much more detailed ethernet information about specific ports can be obtained by &amp;lt;code&amp;gt;show interfaces ethernet {PORTS}&amp;lt;/code&amp;gt;. The ports can be referred to as single ports, a separated list by commas, or ranges separated by &amp;quot;-&amp;quot;, or combinations of all. &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; can be used to refer to all ports at once.&lt;br /&gt;
&lt;br /&gt;
===== VLAN =====&lt;br /&gt;
Information about the configure VLANs can be obtained by the &amp;lt;code&amp;gt;show vlans&amp;lt;/code&amp;gt; command. In our case this should only list the default VLAN. VLANs can be configure by entering the context of a specific VLAN, for example &amp;lt;code&amp;gt;vlan 10&amp;lt;/code&amp;gt;. In this submenu ports can be assigned to this VLAN as untagged access ports by issuing &amp;lt;code&amp;gt;untagged {PORTS}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== Spanning tree =====&lt;br /&gt;
STP can be enabled from the config menu via &amp;lt;code&amp;gt;spanning-tree enable&amp;lt;/code&amp;gt;. RSTP can be enforced as the protocol to use via &amp;lt;code&amp;gt;spanning-tree force-version rstp-operation&amp;lt;/code&amp;gt;. Port based information about the established tree can be retrieved via &amp;lt;code&amp;gt;show spanning-tree&amp;lt;/code&amp;gt;. This gives information about the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Path_cost path cost], [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Configuration port priority], [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Port_states port state], and designated bridge.&lt;br /&gt;
&lt;br /&gt;
===== Time =====&lt;br /&gt;
The timezones in the HP world are odd. They are given in offsets in minutes. So the timezone of the observatory is +60. It can be set via &amp;lt;code&amp;gt;time timezone 60&amp;lt;/code&amp;gt;. The switches can also accept different daylight saving rules. The correct one can be set via &amp;lt;code&amp;gt;time daylight-time-rule Middle-Europe-and-Portugal&amp;lt;/code&amp;gt;. The switches are configured to retrieve their time via SNTP, by setting &amp;lt;code&amp;gt;timesync sntp&amp;lt;/code&amp;gt;. It utilizes the normal [https://en.wikipedia.org/wiki/Network_Time_Protocol NTP] but has a much simpler implementation on the client side. The switches are configured to use the RRZE NTP servers directly via their IP. This is discouraged, but since the switches don't do DNS not otherwise possible. Information about the current SNTP settings can be retrieved via &amp;lt;code&amp;gt;show sntp&amp;lt;/code&amp;gt;. SNTP servers can be set via &amp;lt;code&amp;gt;sntp server {IP}&amp;lt;/code&amp;gt; on older models, and &amp;lt;code&amp;gt;sntp server priority 1 {IP}&amp;lt;/code&amp;gt; on newer models. The current time can be displayed via &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== MDI Mode =====&lt;br /&gt;
The MDI mode can be set via &amp;lt;code&amp;gt;interface {PORT} mdix-mode {MODE}&amp;lt;/code&amp;gt; where PORT is a list of ports and MODE is &amp;lt;code&amp;gt;mdi&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mdix&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;automdix&amp;lt;/code&amp;gt;. Obviously we want the latter on all interfaces. To set all ports to auto MDI-X: &amp;lt;code&amp;gt;interface all mdix-mode automdix&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Accessing via a browser ====&lt;br /&gt;
Some of the switches come with an integrated webserver which can be used to access information and perform configuration. While this seems convenient at first, in reality these servers rely on stuff like [https://en.wikipedia.org/wiki/Java_(programming_language) Java] or sometimes even [https://en.wikipedia.org/wiki/Adobe_Flash Adobe Flash] in the browser which is discontinued and simply does not work at all. Therefore using the CLI is the more reliable way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== DNS ==&lt;br /&gt;
=== Domains ===&lt;br /&gt;
Our public domain is &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt;. For the internal domain we don't need to register a domain, it doesn't make sense. Currently it is configure to &amp;lt;code&amp;gt;internal.sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; which is clunky but accurate. It is configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; which has the nice sideeffect of &amp;lt;code&amp;gt;bla.internal&amp;lt;/code&amp;gt; being correctly resolved from computers in the public network to the computer in the private network. The other way round it does not work, but &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; is therefore configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; as a search domain for all hosts in the private network. If we make sure to not duplicate computer names in the private and public network DNS enables the reference of another computer directly by its hostname.&lt;br /&gt;
&lt;br /&gt;
Maybe it's possible to somehow only use one domain spreading over two subnets, but since some are then public with public DNS records and some are not this might be difficult.&lt;br /&gt;
&lt;br /&gt;
=== /etc/hosts ===&lt;br /&gt;
With all the hostnames available via the &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; configuration there is no need to out them all in &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; as well. &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; knows the IP associated with a hostname from its dhcp configuration file and uses it to resolve the names if a DNS query is made. We could therefore only put aliases (such as &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt;) in the &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; file and save the work of always trying to keep &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; up to date.&lt;br /&gt;
&lt;br /&gt;
== Exposed services ==&lt;br /&gt;
Some services need to be exposed to the internet under a specific address. Most importantly the webserver (www.stern....de). This needs to have a public IP resolving to a specific host. Therefore such services need to run on a server which has two interfaces. One for the LAN and one for the WAN. The weak end system model of Linux ''might'' become a problem here.&lt;br /&gt;
&lt;br /&gt;
We could try just using NAT and port forward the necessary traffic. The webserver would be in our private network only, the router has the public IP and therefore FQDN of the webserver, and ports 80 and 443 are forwarded from the router to the webserver. This way no fiddling with virtualbox, mutliple IPs, etc. is necessary.&lt;br /&gt;
&lt;br /&gt;
When doing it this way access via SSH is also very easy. Forward port 22 to a server behind the router which acts as the login node. Then all SSH logins are done directly through &amp;lt;code&amp;gt;user@www.stern...&amp;lt;/code&amp;gt;. No two ethernet connections required. &lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Desired uplink speeds for individual hardware&lt;br /&gt;
* NFS servers: At least 10G, some maybe with 2x10G.&lt;br /&gt;
* Bladecenter: 10G&lt;br /&gt;
* Meggie nodes: 80x1G&lt;br /&gt;
* Other clients: 1G&lt;br /&gt;
&lt;br /&gt;
All switches should support RSTP (IEEE 802.1w).&lt;br /&gt;
&lt;br /&gt;
=== Main Building ===&lt;br /&gt;
In the main building we can create our own layer 2 network fairly straightforwardly.&lt;br /&gt;
&lt;br /&gt;
Let's ''please'' mount the switches in reverse in the server racks.&lt;br /&gt;
&lt;br /&gt;
==== Root Bridge ====&lt;br /&gt;
The root bridge will be the core of the network. Needs to have the capability to attach the NFS servers as well as other fast enough uplinks to switches, so at least several 10G SFP+ ports.&lt;br /&gt;
&lt;br /&gt;
Omada: SX3032F, 32x10G SFP+, ~900€&lt;br /&gt;
&lt;br /&gt;
Ubiquity (same as above): USW-Pro-Aggregation, 28x10G SFP+, 4x25G SFP28, ~900€&lt;br /&gt;
&lt;br /&gt;
==== Meggie Switches ====&lt;br /&gt;
Each Meggie node provides a 1G uplink (apart from Intel OP). With 80 nodes we need 2 48 port switches.&lt;br /&gt;
&lt;br /&gt;
Omada: SG3452X, 48x1G RJ45, 4x10G SFP+, ~400€&lt;br /&gt;
&lt;br /&gt;
Ubiquity: USW-Pro-48, 48x1G RJ45, 4x10G SFP+, ~600€&lt;br /&gt;
&lt;br /&gt;
==== Peripheral Switches ====&lt;br /&gt;
If we decommission the Messiers we can make due with 3 peripheral switches for the main building. If the RRZE lets us use the currently installed 3 switches with the 10G uplink we do not need new hardware for this.&lt;br /&gt;
&lt;br /&gt;
==== Shopping List ====&lt;br /&gt;
* 10G root bridge: ~900 Euros&lt;br /&gt;
* 2x 48x1G + 10G uplink meggie switches: 2x~400 Euros&lt;br /&gt;
* Lots of Cat 6 (or 5e) cables for the meggies&lt;br /&gt;
* We might need new DAC cables&lt;br /&gt;
* Total: 1700 Euros&lt;br /&gt;
&lt;br /&gt;
== Integrating Meridian building and Bundschuhhaus ==&lt;br /&gt;
&lt;br /&gt;
=== Layer 2 ===&lt;br /&gt;
There are two fibers going to the Meridian building. One is patched through to the Bundschuhhaus.&lt;br /&gt;
For the Meridian building it is technically possible to use one of the fibers to directly integrate an additional switch in the Clock room via layer 2. But the RRZE needs to play ball for this because they need to switch the other pair through to Bundschuhhause. If this route is taken there is still no option to integrate Bundschuhhause on layer 2.&lt;br /&gt;
&lt;br /&gt;
=== Layer 3 ===&lt;br /&gt;
A VPN would be an option to incorporate the other buildings over layer 3 without interaction with the RRZE (fingers crossed). Each building needs to have a separate OPNsense box establishing a VPN directly to the main gateway over the WAN and an attached switch for the computers.&lt;br /&gt;
&lt;br /&gt;
NFS etc. might be a bit wonky in this scenarion. Performance will certainly be limited. Strong CPU hardware of the OPNSense boxes is required for this to work with low latency.&lt;br /&gt;
&lt;br /&gt;
==== IPSec ====&lt;br /&gt;
According to the documentation this is the preferred solution for a site-to-site setup such as in our case. It's a bit complicated to set up compared to the other options. It requires an open port on the main gateway (similar to port forwarding). The computers on the other sites then also need to be in a separate subnet, necessitating a separate DHCP (possibly DNS etc.) server (TBC).&lt;br /&gt;
&lt;br /&gt;
==== Wireguard ====&lt;br /&gt;
Much easier to set up compared to IPSec, but might be less reliable. Unclear about the different subnet. Might not require an open port on the main gateway.&lt;br /&gt;
&lt;br /&gt;
==== OpenVPN ====&lt;br /&gt;
Fairly simple to set up, running via SSL, can mimick HTTPS traffic. Requires an open port.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Settings/Optimizations ==&lt;br /&gt;
* Enable jumbo frames for better NFS/iSCSI performance&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3756</id>
		<title>New Network</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3756"/>
		<updated>2025-06-03T10:50:17Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
We're creating our own network inside a DMZ.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
* &amp;lt;s&amp;gt;Check whether the router is set to switch on after power failure in the BIOS&amp;lt;/s&amp;gt;&lt;br /&gt;
* Enable RSTP on all switches and set a high spanning tree priority on the root bridge&lt;br /&gt;
* Check whether/how we can use only one domain, instead of two (internal.sternwarte ...)&lt;br /&gt;
* When all hosts are in the private network&lt;br /&gt;
** Adjust DHCP settings&lt;br /&gt;
*** Make the private network the default one (remove internal tags from config)&lt;br /&gt;
*** Adjust DHC relay direction&lt;br /&gt;
*** Remove classless static route from public to private network&lt;br /&gt;
&lt;br /&gt;
== Subnets ==&lt;br /&gt;
=== Public ===&lt;br /&gt;
The public subnet is a part of the internet as organized through the [https://de.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority IANA]. &amp;quot;Our&amp;quot; subnet is &amp;lt;code&amp;gt;131.188.151.0/24&amp;lt;/code&amp;gt;. At least one of the IPs in this subnet is used by the RRZE to provide a gateway. It's a [https://www.cisco.com/site/de/de/index.html Cisco] router in the basement with the IP &amp;lt;code&amp;gt;131.188.151.1&amp;lt;/code&amp;gt; and FQDN &amp;lt;code&amp;gt;astro.gate.uni-erlangen.de&amp;lt;/code&amp;gt;. We need to use this gateway to access the WAN.&lt;br /&gt;
&lt;br /&gt;
=== Private ===&lt;br /&gt;
We need to use a private network as defined in [https://www.rfc-editor.org/rfc/rfc1918.html RFC1918] for our own subnet. Because it's easy to remember and short to write we pick the class A network from RFC1918 which is &amp;lt;code&amp;gt;10.0.0.0/8&amp;lt;/code&amp;gt;. We can allocate a &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; network from this block. Since it sounds nice we can choose the second octet to also be 10. This gives us more than 65000 IP addresses to work with in &amp;lt;code&amp;gt;10.10.0.0/16&amp;lt;/code&amp;gt;. Because it makes sense we use the first address for our own gateway: &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Address blocks ====&lt;br /&gt;
Using the &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; doesn't only provide more than enough addresses, probably forever, it also enables the grouping into blocks of addresses which denote different classes of devices. This makes it easier to identify the devices and find their IP address. Note that these are not separate subnets, it's only nomenclature. These blocks are used in the DHCP server of [https://thekelleys.org.uk/dnsmasq/doc.html dnsmasq] and defined in the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet/-/blob/master/modules/remeis/files/dnsmasq/internal-dhcp.conf internal-dhcp.conf] file of the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet puppet] gitlab repository.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Address blocks&lt;br /&gt;
|-&lt;br /&gt;
! Block !! Device class&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.1.*   || Switches&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.2.*   || Management interfaces (iLO, iDRAC, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.10.*  || Servers&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.20.*  || VMs&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.30.*  || Meggie cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.40.*  || Blade center&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.50.*  || Messier cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.90.*  || Functional hosts (Raspbbery Pis, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.100.* || Office computers main building&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.200.* || Testing (Installation testing, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.250.* || Private notebooks&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Router ==&lt;br /&gt;
&lt;br /&gt;
The uplink to the WAN is realized with a server (Dell Poweredge 1950) which runs [https://opnsense.org OPNSense], a FreeBSD based routing and firewall distribution which is very easy to set up and highly reliable. The server has two 1G interfaces. One is connected to the public network managed by the RRZE (WAN) and has a public IP, the other one is connected to our own switches and has a private ip (LAN). Both interfaces are labelled in the back of the server. The router routes traffic between these two networks to make our computers talk to each other.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
The router can be configure through the web gui. It's accessible directly over the ''internal'' IP address, but the port is changed to 8443: https://10.10.0.1:8443. The user for the login is &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and the password is the same as the LDAP admin passwort (as of writing). A lot of information is provided in the [https://docs.opnsense.org/ OPNSense documentation]. One of the interfaces has a public IP, at the time of writing the public IP is &amp;lt;code&amp;gt;131.188.151.92&amp;lt;/code&amp;gt;. The other interface has the private used as the gateway, &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;. Its public IP might be changed depending on how we proceed with mechansim for remote access. SSH is is disabled, but the port is changed to 12345.&lt;br /&gt;
&lt;br /&gt;
==== 10G Interfaces ====&lt;br /&gt;
There is a PCIe card with dual 10G interfaces installed, a Mellanox ConnectX-3. It has two 10G SFP+ ports. OPNsense, which is based on FreeBSD, by default does not load the driver for this card, so it has to be told to load it on boot. This can be done in the boot settings as described in the [https://www.thomas-krenn.com/de/wiki/OPNsense_Chelsio_Mellanox_Broadcom_Netzwerkkarten-Treiber_aktivieren Thomas Krenn Wiki].&lt;br /&gt;
&lt;br /&gt;
==== Gateway ====&lt;br /&gt;
The router uses the RRZE gateway as its own upstream gateway. By default the firmware always sends packets destined to the WAN network to this gateway. At the time of writing this is problematic because the upstream gateway drops packets arriving from a private network (according to RFC1918) which makes it impossible for hosts in our private network to directly communicate with hosts in our public network. This option is therefore disabled in the configuration of the router. See the &amp;quot;Disable force gateway&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
==== Private and bogon networks ====&lt;br /&gt;
According to RFC1918 packets with source or destination IP addresses in private networks must not be routed through the internet. It often happens that such packets are generated and end up at edge routers (keep the private notebooks connected to our network in mind). Therefore such routers usually drop these packets on purpose. At the time of writing we actually want to route such packets from our private to our public network and vice versa. Therefore the option to drop packets from or to private networks is disabled on both interfaces. When we have all our hosts behind the router we should re enable this option for the WAN interface to avoid trouble with the RRZE. On the LAN interface this option should obviously stay disabled.&lt;br /&gt;
&lt;br /&gt;
There are addresses in the public IPv4 space which are not assigned to anything or do not make sense. These are called [https://de.wikipedia.org/wiki/Bogon &amp;quot;Bogon&amp;quot; networks]. The router is configured to drop these packets if they arrive on the WAN interface.&lt;br /&gt;
&lt;br /&gt;
==== NAT ====&lt;br /&gt;
Hosts within the private network can not directly talk to the internet (see the previous section), they need an intermidiary to do this. This is accomplished by using [https://en.wikipedia.org/wiki/Network_address_translation Network address translation (NAT)]. When a client wants to talk to the internet (except our own public network, see the following section), the router replaces the source address of the packet with its own public address and sends it of to the WAN. From the WAN it looks as if the router is making requests, instead of the client. When the reply arrives on the WAN interface the router changes the destination address of the packet from its own public address to the private address of the client and sends if off into the LAN.&lt;br /&gt;
&lt;br /&gt;
We need this mechanism for all clients behind the router to talk to the internet, except our own public network. This option is available as outbound NAT in the routers firmware and enabled by default.&lt;br /&gt;
&lt;br /&gt;
There is an important exception: Traffic from our private network which has a destination in our own public network should be routed directly, without any NAT, such that these two computers can talk directly to each other. Therefore there is a rule in the outbound NAT section which identifies such traffic and disables NAT for it. It can then be routed normally (see the following section). Note that this should be disabled as soon as all our computers are in the private network and can talk to each other directly.&lt;br /&gt;
&lt;br /&gt;
==== Routing between public and private network ====&lt;br /&gt;
At the time of writing our computers are distributed in a private and a public network. Both need to be reachable by each other. Therefore the router allows traffic to pass between these exact two networks without any restrictions. The rules for this can be found in the LAN and WAN sections of the firewall rules of the router. Especially the rule allowing any traffic originating from the public network to pass directly into the private network should be disabled as soon as all computers are in the private network.&lt;br /&gt;
&lt;br /&gt;
==== DHCP relay ====&lt;br /&gt;
At the time of writing we have DHCP (and DNS etc.) servers in the public network. Replicating these services behind the router can be avoided by allowing the router to forward DHCP requests from the private to the public network. This is done in the DHC relay section in the Services menu. With this service and the working routing and NAT there is no need to replicate these services in the private network for now. Everything seems to work, including PXE boot to install clients within the private network. As soon as all computers are in the private network the DHC relay should be disabled.&lt;br /&gt;
&lt;br /&gt;
==== Backup ====&lt;br /&gt;
The configuration can be backed up simply by downloading it in the GUI. It's recommended to do this once in a while just in case the router dies. This configuration can then be very easily applied after a new installation.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
Updates of the route can simply be done through the GUI. For security reasons this is recommended on a regular basis, but since we have the firewall of the RRZE in front of it it's probably not critical. Often the updates ca be done even without restarting the firmware.&lt;br /&gt;
&lt;br /&gt;
== Layer 2 ==&lt;br /&gt;
With the router working we can use our own ethernet switches behind it without interfering with the RRZE switches.&lt;br /&gt;
&lt;br /&gt;
=== MDI ===&lt;br /&gt;
Ethernet on RJ45 ports consists of a pair of transmitting and receiving wires on both ends. Obviously the receiving pair on one end must be attached to the transmitting pair on the other end. In the old days it was important to consider this property when connecting devices via RJ45 twisted pairs, and in the appropriate case a [https://en.wikipedia.org/wiki/Ethernet_crossover_cable crossover cable] needed to be used. Nowadays ethernet iterfaces can automatically make sure to select the correct twisted pairs to transmit and receive data. This mechanism is called [https://en.wikipedia.org/wiki/Medium-dependent_interface#Automatic_MDI-X automatic MDI-X (automdix)]. It should be enabled on all ports of all switches, and probably is so by default.&lt;br /&gt;
&lt;br /&gt;
=== VLAN ===&lt;br /&gt;
[https://en.wikipedia.org/wiki/VLAN Local Area Networks (VLAN)] are logical layer 2 networks which can spread across multiple switches. They can be used to separate different broadcast domains (ethernet networks) and usually only contain a single IP subnet. Under certain scenarios VLANs can offer performance, flexibility and security advantages. We don't want to segment our network, therefore performance and flexibility enhancements are not possible. Security is also of no concern. We therefore do not use VLANs.&lt;br /&gt;
&lt;br /&gt;
However, from a technical perspective this is impossible with layer 3 switches. By default all interfaces of a switch are assigned to the so called default VLAN. For most switch manufacturers this is VLAN 1, but it doesn't have to be. Most manufacturers also use VLAN 1 as the native VLAN. This means that all frames in VLAN 1 are sent untagged (without VLAN information) also to other switches, even over tagged ports (trunk ports). This ensures interoperability without changing settings.&lt;br /&gt;
&lt;br /&gt;
We are good as long as all switches we buy have default VLAN 1 (which can not be changed) and native VLAN 1 (which can be changed). In case we get a switch which does not have the default VLAN 1 we need to set the native VLAN of this switch also to the same VLAN, making all frames in this VLAN untagged, enabling communication with other switches.&lt;br /&gt;
&lt;br /&gt;
=== Spanning tree ===&lt;br /&gt;
We know for a fact that sometimes people plug ethernet cables into random ports, even both ends of it, causing potential loops (see mail on 22 August 2023). To avoid such loops the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol spanning tree protocol (STP)] defined in [https://en.wikipedia.org/wiki/IEEE_802.1D IEEE 802.1d]. When this protocol is enabled on a switch it exchanges [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Bridge_protocol_data_units bridge protocol data units (BPDUs)] with its neighbouring switches, containing some information about the network topology. This information is used to elect the so called [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Root_bridge_and_the_bridge_ID root bridge]. This switch can be thought of as the top of the spanning tree. All other switches then determine one port they use as a path towards this root bridge, even if it goes through another switch. All other ports which also provide a path towards the root bridge are disabled (set to the blocking [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Port_states state]). The election of the root bridge also enters an individual priority for each switch which can be set by the administrator. We should make sure to set a high priority on our central switch.&lt;br /&gt;
&lt;br /&gt;
When a change in the network topology is detected via the BPDUs 802.1d causes the entire spanning tree to be newly established with a new election of a root bridge. This can take somewhere around a minute, which is too long. Therefore the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Rapid_Spanning_Tree_Protocol rapid STP (RSTP)] was defined in IEEE 802.1w. It is fully backwards compatible with 802.1d and uses additional information to define port based rules such as alternate and backup ports for the path to the root bridge such that a topology change can be acted on in just a few seconds. It has the nice benefit that a link to a computer which is plugged into an access port on a given switch becomes ready in just a few seconds. We therefore enable RSTP on all our switches. Usually this is done by enabling STP and forcing the STP mode to RSTP. No further configuration is needed, except the priority of the root bridge.&lt;br /&gt;
&lt;br /&gt;
=== NTP ===&lt;br /&gt;
All switches are configured to use the RRZE NTP servers directly via their IP addresses because they can't do DNS. &lt;br /&gt;
&lt;br /&gt;
=== Current switches ===&lt;br /&gt;
Here is a list of the currently installed switches, their configuration, uplink, and some notes. All passwords are the LDAP password.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Switches&lt;br /&gt;
|-&lt;br /&gt;
! name !! IP !! Usecase !! Model !! Connectivity !! Administration !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| switch1 || 10.10.1.1 || 1G RJ45 distribution racks || HP ProCurve J4904A 2848 || 44x1G RJ45, 4x1G RJ45/SFP || telnet, D-Sub 9 + RS232-USB, webgui (defunct) ||&lt;br /&gt;
* Kind of old&lt;br /&gt;
* No username required for login&lt;br /&gt;
* Ports 45-48 are dual personality ports, either RJ45 or SFP can be used, not both.&lt;br /&gt;
|-&lt;br /&gt;
| switch2 || 10.10.1.2 || server management (iLO, iDRAC, ...) || HP J9781A 2530-48 || 48x100M RJ45, 2x1G RJ45/SFP || telnet, micro-USB B, RJ45 + RS232-USB, webgui ||&lt;br /&gt;
* Username: manager&lt;br /&gt;
* Ports 49-50 (or 49-52) are dual personality ports, either RJ45 or SFP can be used, not both&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== HP switch administration ===&lt;br /&gt;
==== Accessing via CLI ====&lt;br /&gt;
Accessing the switches via browser is problematic for older switches since they use stuff like Java in the browser or flash. The CLI always works, if basic connectivity is ensured.&lt;br /&gt;
&lt;br /&gt;
===== telnet =====&lt;br /&gt;
If the switch is up, ethernet is connected, IP address is assigned, subnets are configured correctly, and a computer is in the same VLAN (which should be the case), &amp;lt;code&amp;gt;telnet&amp;lt;/code&amp;gt; can be used to access the switches. Just do &amp;lt;code&amp;gt;telnet {IP of switch}&amp;lt;/code&amp;gt; and the you should reach the login of the CLI.&lt;br /&gt;
&lt;br /&gt;
===== serial =====&lt;br /&gt;
Alternatively, and especially if the ethernet connection itself doesn't work (yet), the switches can be accessed directly by plugging a computer into the management port(s). Usually those are some kind of serial connection. Older models have a [https://en.wikipedia.org/wiki/D-subminiature D-Sub 9] connector for this purpose, newer models use a RJ45 port. In the latter case RJ45 is only the physical connector. It does not carry ethernet, only a [https://en.wikipedia.org/wiki/RS-232 RS-232] serial connection. Unless the computer itself has a serial port (unlikely these days), in both cases a serial to USB converter is required. Newer switches offer a USB port which internally has a USB to serial converter integrated and shows up in the connecting computer as a serial port. Regardless of the route choosen, if a serial to USB converter is attached the kernel log of the connecting computer should look something like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[  +0,042064] usbcore: registered new interface driver usbserial_generic&lt;br /&gt;
[  +0,000009] usbserial: USB Serial support registered for generic&lt;br /&gt;
[  +0,001588] usbcore: registered new interface driver ftdi_sio&lt;br /&gt;
[  +0,000008] usbserial: USB Serial support registered for FTDI USB Serial Device&lt;br /&gt;
[  +0,000101] ftdi_sio 1-4:1.0: FTDI USB Serial Device converter detected&lt;br /&gt;
[  +0,000023] usb 1-4: Detected FT232RL&lt;br /&gt;
[  +0,006308] usb 1-4: FTDI USB Serial Device converter now attached to ttyUSB0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This means the serial port is available under &amp;lt;code&amp;gt;/dev/ttyUSB0&amp;lt;/code&amp;gt;. Of course ne number in the end can change, depending on how many serial ports are present. Some devices show up as &amp;lt;code&amp;gt;/dev/ttyACM0&amp;lt;/code&amp;gt; instead. These ports can be used with &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt; to talk to the switch, for example &amp;lt;code&amp;gt;screen /dev/ttyUSB0&amp;lt;/code&amp;gt;. If everything goes well a message like &amp;lt;code&amp;gt;Connected with baud rate 9600&amp;lt;/code&amp;gt; should show up.&lt;br /&gt;
&lt;br /&gt;
===== Authentication =====&lt;br /&gt;
Depending on the model a username must be entered to access the switch. The &amp;quot;root&amp;quot; user for HP switches is usually called &amp;quot;manager&amp;quot;. A password is required to log in in a mode which allows configuration changes. It should be set to our current LDAP admin password. If the password is not or incorrectly entered on the serial console the switches usually drops back to an unpriviledged user which can only look around.&lt;br /&gt;
&lt;br /&gt;
===== Entering configuration =====&lt;br /&gt;
Before anything can be changed in the switch the configuration submenu must be entered. This can be done using the &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
switch1# config&lt;br /&gt;
switch1(config)# &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Tab completion should work in all circumstances and is often very informative. An ad-hoc set of suggestions and help messages can also be triggered by putting a &amp;quot;?&amp;quot; in the terminal. Note that no &amp;quot;enter&amp;quot; is required in this case. As soon as the &amp;quot;?&amp;quot; is sent the terminal shows the suggestions.&lt;br /&gt;
&lt;br /&gt;
===== Saving the configuration =====&lt;br /&gt;
Note that when changing the configuration of a switch only the running configuration is modified. Changes are not persistent over a reboot of the device. To make the changes persistent the configuration needs to be written to the flash memory of the device. This can be done by &amp;lt;code&amp;gt;write memory&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Interestingly, &amp;lt;code&amp;gt;write terminal&amp;lt;/code&amp;gt; shows all commands necessary to achieve the currently running configuration of the switch.&lt;br /&gt;
&lt;br /&gt;
===== Basic setup =====&lt;br /&gt;
The basic switch setup can be accessed even from outside the &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; menu using the &amp;lt;code&amp;gt;setup&amp;lt;/code&amp;gt; command. It's an interactive menu which is rather intuitive. Among other things, it can be used to set&lt;br /&gt;
* The hostname of the switch&lt;br /&gt;
* The password for the &amp;lt;code&amp;gt;manager&amp;lt;/code&amp;gt; user&lt;br /&gt;
* The default gateway&lt;br /&gt;
* The IP of the switch in the [[#VLAN|default VLAN]]&lt;br /&gt;
&lt;br /&gt;
===== Port information =====&lt;br /&gt;
Information about the interfaces of the switch can be retrieven by the &amp;lt;code&amp;gt;show interfaces&amp;lt;/code&amp;gt; command which lists all interfaces and their information in a table. It can be followed by another option to determine the type of information in the table. These are the options:&lt;br /&gt;
* (no option): Sent/received traffic, errors, drops, [https://en.wikipedia.org/wiki/Ethernet_flow_control flow control], broadcast limit&lt;br /&gt;
* &amp;lt;code&amp;gt;brief&amp;lt;/code&amp;gt; Port type, intrusion alert, enabled/disabled, port status (up/down), mode (speed, duplex), flow control, broadcast limit&lt;br /&gt;
* &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; Port type, enabled/disabled, mode, flow control, [https://en.wikipedia.org/wiki/Medium-dependent_interface MDI] mode&lt;br /&gt;
* &amp;lt;code&amp;gt;port-utilization&amp;lt;/code&amp;gt; mode (speed, duplex), Rx data, Tx data&lt;br /&gt;
Much more detailed ethernet information about specific ports can be obtained by &amp;lt;code&amp;gt;show interfaces ethernet {PORTS}&amp;lt;/code&amp;gt;. The ports can be referred to as single ports, a separated list by commas, or ranges separated by &amp;quot;-&amp;quot;, or combinations of all. &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; can be used to refer to all ports at once.&lt;br /&gt;
&lt;br /&gt;
===== VLAN =====&lt;br /&gt;
Information about the configure VLANs can be obtained by the &amp;lt;code&amp;gt;show vlans&amp;lt;/code&amp;gt; command. In our case this should only list the default VLAN. VLANs can be configure by entering the context of a specific VLAN, for example &amp;lt;code&amp;gt;vlan 10&amp;lt;/code&amp;gt;. In this submenu ports can be assigned to this VLAN as untagged access ports by issuing &amp;lt;code&amp;gt;untagged {PORTS}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== Spanning tree =====&lt;br /&gt;
STP can be enabled from the config menu via &amp;lt;code&amp;gt;spanning-tree enable&amp;lt;/code&amp;gt;. RSTP can be enforced as the protocol to use via &amp;lt;code&amp;gt;spanning-tree force-version rstp-operation&amp;lt;/code&amp;gt;. Port based information about the established tree can be retrieved via &amp;lt;code&amp;gt;show spanning-tree&amp;lt;/code&amp;gt;. This gives information about the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Path_cost path cost], [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Configuration port priority], [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Port_states port state], and designated bridge.&lt;br /&gt;
&lt;br /&gt;
===== Time =====&lt;br /&gt;
The timezones in the HP world are odd. They are given in offsets in minutes. So the timezone of the observatory is +60. It can be set via &amp;lt;code&amp;gt;time timezone 60&amp;lt;/code&amp;gt;. The switches can also accept different daylight saving rules. The correct one can be set via &amp;lt;code&amp;gt;time daylight-time-rule Middle-Europe-and-Portugal&amp;lt;/code&amp;gt;. The switches are configured to retrieve their time via SNTP, by setting &amp;lt;code&amp;gt;timesync sntp&amp;lt;/code&amp;gt;. It utilizes the normal [https://en.wikipedia.org/wiki/Network_Time_Protocol NTP] but has a much simpler implementation on the client side. The switches are configured to use the RRZE NTP servers directly via their IP. This is discouraged, but since the switches don't do DNS not otherwise possible. Information about the current SNTP settings can be retrieved via &amp;lt;code&amp;gt;show sntp&amp;lt;/code&amp;gt;. SNTP servers can be set via &amp;lt;code&amp;gt;sntp server {IP}&amp;lt;/code&amp;gt; on older models, and &amp;lt;code&amp;gt;sntp server priority 1 {IP}&amp;lt;/code&amp;gt; on newer models. The current time can be displayed via &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== MDI Mode =====&lt;br /&gt;
The MDI mode can be set via &amp;lt;code&amp;gt;interface {PORT} mdix-mode {MODE}&amp;lt;/code&amp;gt; where PORT is a list of ports and MODE is &amp;lt;code&amp;gt;mdi&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mdix&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;automdix&amp;lt;/code&amp;gt;. Obviously we want the latter on all interfaces. To set all ports to auto MDI-X: &amp;lt;code&amp;gt;interface all mdix-mode automdix&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Accessing via a browser ====&lt;br /&gt;
Some of the switches come with an integrated webserver which can be used to access information and perform configuration. While this seems convenient at first, in reality these servers rely on stuff like [https://en.wikipedia.org/wiki/Java_(programming_language) Java] or sometimes even [https://en.wikipedia.org/wiki/Adobe_Flash Adobe Flash] in the browser which is discontinued and simply does not work at all. Therefore using the CLI is the more reliable way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== DNS ==&lt;br /&gt;
=== Domains ===&lt;br /&gt;
Our public domain is &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt;. For the internal domain we don't need to register a domain, it doesn't make sense. Currently it is configure to &amp;lt;code&amp;gt;internal.sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; which is clunky but accurate. It is configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; which has the nice sideeffect of &amp;lt;code&amp;gt;bla.internal&amp;lt;/code&amp;gt; being correctly resolved from computers in the public network to the computer in the private network. The other way round it does not work, but &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; is therefore configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; as a search domain for all hosts in the private network. If we make sure to not duplicate computer names in the private and public network DNS enables the reference of another computer directly by its hostname.&lt;br /&gt;
&lt;br /&gt;
Maybe it's possible to somehow only use one domain spreading over two subnets, but since some are then public with public DNS records and some are not this might be difficult.&lt;br /&gt;
&lt;br /&gt;
=== /etc/hosts ===&lt;br /&gt;
With all the hostnames available via the &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; configuration there is no need to out them all in &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; as well. &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; knows the IP associated with a hostname from its dhcp configuration file and uses it to resolve the names if a DNS query is made. We could therefore only put aliases (such as &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt;) in the &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; file and save the work of always trying to keep &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; up to date.&lt;br /&gt;
&lt;br /&gt;
== Exposed services ==&lt;br /&gt;
Some services need to be exposed to the internet under a specific address. Most importantly the webserver (www.stern....de). This needs to have a public IP resolving to a specific host. Therefore such services need to run on a server which has two interfaces. One for the LAN and one for the WAN. The weak end system model of Linux ''might'' become a problem here.&lt;br /&gt;
&lt;br /&gt;
We could try just using NAT and port forward the necessary traffic. The webserver would be in our private network only, the router has the public IP and therefore FQDN of the webserver, and ports 80 and 443 are forwarded from the router to the webserver. This way no fiddling with virtualbox, mutliple IPs, etc. is necessary.&lt;br /&gt;
&lt;br /&gt;
When doing it this way access via SSH is also very easy. Forward port 22 to a server behind the router which acts as the login node. Then all SSH logins are done directly through &amp;lt;code&amp;gt;user@www.stern...&amp;lt;/code&amp;gt;. No two ethernet connections required. &lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Desired uplink speeds for individual hardware&lt;br /&gt;
* NFS servers: At least 10G, some maybe with 2x10G.&lt;br /&gt;
* Bladecenter: 10G&lt;br /&gt;
* Meggie nodes: 80x1G&lt;br /&gt;
* Other clients: 1G&lt;br /&gt;
&lt;br /&gt;
All switches should support RSTP (IEEE 802.1w).&lt;br /&gt;
&lt;br /&gt;
=== Main Building ===&lt;br /&gt;
In the main building we can create our own layer 2 network fairly straightforwardly.&lt;br /&gt;
&lt;br /&gt;
Let's ''please'' mount the switches in reverse in the server racks.&lt;br /&gt;
&lt;br /&gt;
==== Root Bridge ====&lt;br /&gt;
The root bridge will be the core of the network. Needs to have the capability to attach the NFS servers as well as other fast enough uplinks to switches, so at least several 10G SFP+ ports.&lt;br /&gt;
&lt;br /&gt;
Omada: SX3032F, 32x10G SFP+, ~900€&lt;br /&gt;
&lt;br /&gt;
Ubiquity (same as above): USW-Pro-Aggregation, 28x10G SFP+, 4x25G SFP28, ~900€&lt;br /&gt;
&lt;br /&gt;
==== Meggie Switches ====&lt;br /&gt;
Each Meggie node provides a 1G uplink (apart from Intel OP). With 80 nodes we need 2 48 port switches.&lt;br /&gt;
&lt;br /&gt;
Omada: SG3452X, 48x1G RJ45, 4x10G SFP+, ~400€&lt;br /&gt;
&lt;br /&gt;
Ubiquity: USW-Pro-48, 48x1G RJ45, 4x10G SFP+, ~600€&lt;br /&gt;
&lt;br /&gt;
==== Peripheral Switches ====&lt;br /&gt;
If we decommission the Messiers we can make due with 3 peripheral switches for the main building. If the RRZE lets us use the currently installed 3 switches with the 10G uplink we do not need new hardware for this.&lt;br /&gt;
&lt;br /&gt;
==== Shopping List ====&lt;br /&gt;
* 10G root bridge: ~900 Euros&lt;br /&gt;
* 2x 48x1G + 10G uplink meggie switches: 2x~400 Euros&lt;br /&gt;
* Lots of Cat 6 (or 5e) cables for the meggies&lt;br /&gt;
* We might need new DAC cables&lt;br /&gt;
* Total: 1700 Euros&lt;br /&gt;
&lt;br /&gt;
== Integrating Meridian building and Bundschuhhaus ==&lt;br /&gt;
&lt;br /&gt;
=== Layer 2 ===&lt;br /&gt;
There are two fibers going to the Meridian building. One is patched through to the Bundschuhhaus.&lt;br /&gt;
For the Meridian building it is technically possible to use one of the fibers to directly integrate an additional switch in the Clock room via layer 2. But the RRZE needs to play ball for this because they need to switch the other pair through to Bundschuhhause. If this route is taken there is still no option to integrate Bundschuhhause on layer 2.&lt;br /&gt;
&lt;br /&gt;
=== Layer 3 ===&lt;br /&gt;
A VPN would be an option to incorporate the other buildings over layer 3 without interaction with the RRZE (fingers crossed). Each building needs to have a separate OPNsense box establishing a VPN directly to the main gateway over the WAN and an attached switch for the computers.&lt;br /&gt;
&lt;br /&gt;
NFS etc. might be a bit wonky in this scenarion. Performance will certainly be limited. Strong CPU hardware of the OPNSense boxes is required for this to work with low latency.&lt;br /&gt;
&lt;br /&gt;
==== IPSec ====&lt;br /&gt;
According to the documentation this is the preferred solution for a site-to-site setup such as in our case. It's a bit complicated to set up compared to the other options. It requires an open port on the main gateway (similar to port forwarding). The computers on the other sites then also need to be in a separate subnet, necessitating a separate DHCP (possibly DNS etc.) server (TBC).&lt;br /&gt;
&lt;br /&gt;
==== Wireguard ====&lt;br /&gt;
Much easier to set up compared to IPSec, but might be less reliable. Unclear about the different subnet. Might not require an open port on the main gateway.&lt;br /&gt;
&lt;br /&gt;
==== OpenVPN ====&lt;br /&gt;
Fairly simple to set up, running via SSL, can mimick HTTPS traffic. Requires an open port.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Settings/Optimizations ==&lt;br /&gt;
* Enable jumbo frames for better NFS/iSCSI performance&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Ubuntu_24&amp;diff=3730</id>
		<title>Ubuntu 24</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Ubuntu_24&amp;diff=3730"/>
		<updated>2025-05-13T08:18:42Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
&lt;br /&gt;
Collecting things to consider/do for the upgrade Ubuntu 24.&lt;br /&gt;
&lt;br /&gt;
Distinction: System servers and &amp;quot;normal&amp;quot; computers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Plan ==&lt;br /&gt;
&lt;br /&gt;
# Block&lt;br /&gt;
## Get new central switch&lt;br /&gt;
## 10G for router&lt;br /&gt;
## Puppet server movement to cygnus&lt;br /&gt;
## Test: Configure dnsmasq and ldap on any Ubuntu 24 system (VM)&lt;br /&gt;
## Move /data somewhere else&lt;br /&gt;
## Get puppet snap management working&lt;br /&gt;
# Block&lt;br /&gt;
## Setup Ubuntu 24 on vela&lt;br /&gt;
## Setup dnsmasq and ldap to vela&lt;br /&gt;
## Move puppet server back to vela&lt;br /&gt;
# Block&lt;br /&gt;
## Setup Ubuntu 24 on libra&lt;br /&gt;
## Setup dnsmasq and ldap on libra&lt;br /&gt;
# Block&lt;br /&gt;
## All other computers&lt;br /&gt;
## Slurm&lt;br /&gt;
&lt;br /&gt;
== Open points ==&lt;br /&gt;
* Manage snaps via puppet&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3726</id>
		<title>New Network</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3726"/>
		<updated>2025-05-09T10:41:11Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
We're creating our own network inside a DMZ.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
* &amp;lt;s&amp;gt;Check whether the router is set to switch on after power failure in the BIOS&amp;lt;/s&amp;gt;&lt;br /&gt;
* Enable RSTP on all switches and set a high spanning tree priority on the root bridge&lt;br /&gt;
* Check whether/how we can use only one domain, instead of two (internal.sternwarte ...)&lt;br /&gt;
* When all hosts are in the private network&lt;br /&gt;
** Adjust DHCP settings&lt;br /&gt;
*** Make the private network the default one (remove internal tags from config)&lt;br /&gt;
*** Adjust DHC relay direction&lt;br /&gt;
*** Remove classless static route from public to private network&lt;br /&gt;
&lt;br /&gt;
== Subnets ==&lt;br /&gt;
=== Public ===&lt;br /&gt;
The public subnet is a part of the internet as organized through the [https://de.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority IANA]. &amp;quot;Our&amp;quot; subnet is &amp;lt;code&amp;gt;131.188.151.0/24&amp;lt;/code&amp;gt;. At least one of the IPs in this subnet is used by the RRZE to provide a gateway. It's a [https://www.cisco.com/site/de/de/index.html Cisco] router in the basement with the IP &amp;lt;code&amp;gt;131.188.151.1&amp;lt;/code&amp;gt; and FQDN &amp;lt;code&amp;gt;astro.gate.uni-erlangen.de&amp;lt;/code&amp;gt;. We need to use this gateway to access the WAN.&lt;br /&gt;
&lt;br /&gt;
=== Private ===&lt;br /&gt;
We need to use a private network as defined in [https://www.rfc-editor.org/rfc/rfc1918.html RFC1918] for our own subnet. Because it's easy to remember and short to write we pick the class A network from RFC1918 which is &amp;lt;code&amp;gt;10.0.0.0/8&amp;lt;/code&amp;gt;. We can allocate a &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; network from this block. Since it sounds nice we can choose the second octet to also be 10. This gives us more than 65000 IP addresses to work with in &amp;lt;code&amp;gt;10.10.0.0/16&amp;lt;/code&amp;gt;. Because it makes sense we use the first address for our own gateway: &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Address blocks ====&lt;br /&gt;
Using the &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; doesn't only provide more than enough addresses, probably forever, it also enables the grouping into blocks of addresses which denote different classes of devices. This makes it easier to identify the devices and find their IP address. Note that these are not separate subnets, it's only nomenclature. These blocks are used in the DHCP server of [https://thekelleys.org.uk/dnsmasq/doc.html dnsmasq] and defined in the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet/-/blob/master/modules/remeis/files/dnsmasq/internal-dhcp.conf internal-dhcp.conf] file of the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet puppet] gitlab repository.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Address blocks&lt;br /&gt;
|-&lt;br /&gt;
! Block !! Device class&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.1.*   || Switches&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.2.*   || Management interfaces (iLO, iDRAC, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.10.*  || Servers&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.20.*  || VMs&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.30.*  || Meggie cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.40.*  || Blade center&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.50.*  || Messier cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.90.*  || Functional hosts (Raspbbery Pis, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.100.* || Office computers main building&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.200.* || Testing (Installation testing, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.250.* || Private notebooks&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Router ==&lt;br /&gt;
&lt;br /&gt;
The uplink to the WAN is realized with a server (Dell Poweredge 1950) which runs [https://opnsense.org OPNSense], a FreeBSD based routing and firewall distribution which is very easy to set up and highly reliable. The server has two 1G interfaces. One is connected to the public network managed by the RRZE (WAN) and has a public IP, the other one is connected to our own switches and has a private ip (LAN). Both interfaces are labelled in the back of the server. The router routes traffic between these two networks to make our computers talk to each other.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
The router can be configure through the web gui. It's accessible directly over the ''internal'' IP address, but the port is changed to 8443: https://10.10.0.1:8443. The user for the login is &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and the password is the same as the LDAP admin passwort (as of writing). A lot of information is provided in the [https://docs.opnsense.org/ OPNSense documentation]. One of the interfaces has a public IP, at the time of writing the public IP is &amp;lt;code&amp;gt;131.188.151.92&amp;lt;/code&amp;gt;. The other interface has the private used as the gateway, &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;. Its public IP might be changed depending on how we proceed with mechansim for remote access. SSH is is disabled, but the port is changed to 12345.&lt;br /&gt;
&lt;br /&gt;
==== Gateway ====&lt;br /&gt;
The router uses the RRZE gateway as its own upstream gateway. By default the firmware always sends packets destined to the WAN network to this gateway. At the time of writing this is problematic because the upstream gateway drops packets arriving from a private network (according to RFC1918) which makes it impossible for hosts in our private network to directly communicate with hosts in our public network. This option is therefore disabled in the configuration of the router. See the &amp;quot;Disable force gateway&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
==== Private and bogon networks ====&lt;br /&gt;
According to RFC1918 packets with source or destination IP addresses in private networks must not be routed through the internet. It often happens that such packets are generated and end up at edge routers (keep the private notebooks connected to our network in mind). Therefore such routers usually drop these packets on purpose. At the time of writing we actually want to route such packets from our private to our public network and vice versa. Therefore the option to drop packets from or to private networks is disabled on both interfaces. When we have all our hosts behind the router we should re enable this option for the WAN interface to avoid trouble with the RRZE. On the LAN interface this option should obviously stay disabled.&lt;br /&gt;
&lt;br /&gt;
There are addresses in the public IPv4 space which are not assigned to anything or do not make sense. These are called [https://de.wikipedia.org/wiki/Bogon &amp;quot;Bogon&amp;quot; networks]. The router is configured to drop these packets if they arrive on the WAN interface.&lt;br /&gt;
&lt;br /&gt;
==== NAT ====&lt;br /&gt;
Hosts within the private network can not directly talk to the internet (see the previous section), they need an intermidiary to do this. This is accomplished by using [https://en.wikipedia.org/wiki/Network_address_translation Network address translation (NAT)]. When a client wants to talk to the internet (except our own public network, see the following section), the router replaces the source address of the packet with its own public address and sends it of to the WAN. From the WAN it looks as if the router is making requests, instead of the client. When the reply arrives on the WAN interface the router changes the destination address of the packet from its own public address to the private address of the client and sends if off into the LAN.&lt;br /&gt;
&lt;br /&gt;
We need this mechanism for all clients behind the router to talk to the internet, except our own public network. This option is available as outbound NAT in the routers firmware and enabled by default.&lt;br /&gt;
&lt;br /&gt;
There is an important exception: Traffic from our private network which has a destination in our own public network should be routed directly, without any NAT, such that these two computers can talk directly to each other. Therefore there is a rule in the outbound NAT section which identifies such traffic and disables NAT for it. It can then be routed normally (see the following section). Note that this should be disabled as soon as all our computers are in the private network and can talk to each other directly.&lt;br /&gt;
&lt;br /&gt;
==== Routing between public and private network ====&lt;br /&gt;
At the time of writing our computers are distributed in a private and a public network. Both need to be reachable by each other. Therefore the router allows traffic to pass between these exact two networks without any restrictions. The rules for this can be found in the LAN and WAN sections of the firewall rules of the router. Especially the rule allowing any traffic originating from the public network to pass directly into the private network should be disabled as soon as all computers are in the private network.&lt;br /&gt;
&lt;br /&gt;
==== DHCP relay ====&lt;br /&gt;
At the time of writing we have DHCP (and DNS etc.) servers in the public network. Replicating these services behind the router can be avoided by allowing the router to forward DHCP requests from the private to the public network. This is done in the DHC relay section in the Services menu. With this service and the working routing and NAT there is no need to replicate these services in the private network for now. Everything seems to work, including PXE boot to install clients within the private network. As soon as all computers are in the private network the DHC relay should be disabled.&lt;br /&gt;
&lt;br /&gt;
==== Backup ====&lt;br /&gt;
The configuration can be backed up simply by downloading it in the GUI. It's recommended to do this once in a while just in case the router dies. This configuration can then be very easily applied after a new installation.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
Updates of the route can simply be done through the GUI. For security reasons this is recommended on a regular basis, but since we have the firewall of the RRZE in front of it it's probably not critical. Often the updates ca be done even without restarting the firmware.&lt;br /&gt;
&lt;br /&gt;
== Layer 2 ==&lt;br /&gt;
With the router working we can use our own ethernet switches behind it without interfering with the RRZE switches.&lt;br /&gt;
&lt;br /&gt;
=== MDI ===&lt;br /&gt;
Ethernet on RJ45 ports consists of a pair of transmitting and receiving wires on both ends. Obviously the receiving pair on one end must be attached to the transmitting pair on the other end. In the old days it was important to consider this property when connecting devices via RJ45 twisted pairs, and in the appropriate case a [https://en.wikipedia.org/wiki/Ethernet_crossover_cable crossover cable] needed to be used. Nowadays ethernet iterfaces can automatically make sure to select the correct twisted pairs to transmit and receive data. This mechanism is called [https://en.wikipedia.org/wiki/Medium-dependent_interface#Automatic_MDI-X automatic MDI-X (automdix)]. It should be enabled on all ports of all switches, and probably is so by default.&lt;br /&gt;
&lt;br /&gt;
=== VLAN ===&lt;br /&gt;
[https://en.wikipedia.org/wiki/VLAN Local Area Networks (VLAN)] are logical layer 2 networks which can spread across multiple switches. They can be used to separate different broadcast domains (ethernet networks) and usually only contain a single IP subnet. Under certain scenarios VLANs can offer performance, flexibility and security advantages. We don't want to segment our network, therefore performance and flexibility enhancements are not possible. Security is also of no concern. We therefore do not use VLANs.&lt;br /&gt;
&lt;br /&gt;
However, from a technical perspective this is impossible with layer 3 switches. By default all interfaces of a switch are assigned to the so called default VLAN. For most switch manufacturers this is VLAN 1, but it doesn't have to be. Most manufacturers also use VLAN 1 as the native VLAN. This means that all frames in VLAN 1 are sent untagged (without VLAN information) also to other switches, even over tagged ports (trunk ports). This ensures interoperability without changing settings.&lt;br /&gt;
&lt;br /&gt;
We are good as long as all switches we buy have default VLAN 1 (which can not be changed) and native VLAN 1 (which can be changed). In case we get a switch which does not have the default VLAN 1 we need to set the native VLAN of this switch also to the same VLAN, making all frames in this VLAN untagged, enabling communication with other switches.&lt;br /&gt;
&lt;br /&gt;
=== Spanning tree ===&lt;br /&gt;
We know for a fact that sometimes people plug ethernet cables into random ports, even both ends of it, causing potential loops (see mail on 22 August 2023). To avoid such loops the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol spanning tree protocol (STP)] defined in [https://en.wikipedia.org/wiki/IEEE_802.1D IEEE 802.1d]. When this protocol is enabled on a switch it exchanges [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Bridge_protocol_data_units bridge protocol data units (BPDUs)] with its neighbouring switches, containing some information about the network topology. This information is used to elect the so called [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Root_bridge_and_the_bridge_ID root bridge]. This switch can be thought of as the top of the spanning tree. All other switches then determine one port they use as a path towards this root bridge, even if it goes through another switch. All other ports which also provide a path towards the root bridge are disabled (set to the blocking [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Port_states state]). The election of the root bridge also enters an individual priority for each switch which can be set by the administrator. We should make sure to set a high priority on our central switch.&lt;br /&gt;
&lt;br /&gt;
When a change in the network topology is detected via the BPDUs 802.1d causes the entire spanning tree to be newly established with a new election of a root bridge. This can take somewhere around a minute, which is too long. Therefore the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Rapid_Spanning_Tree_Protocol rapid STP (RSTP)] was defined in IEEE 802.1w. It is fully backwards compatible with 802.1d and uses additional information to define port based rules such as alternate and backup ports for the path to the root bridge such that a topology change can be acted on in just a few seconds. It has the nice benefit that a link to a computer which is plugged into an access port on a given switch becomes ready in just a few seconds. We therefore enable RSTP on all our switches. Usually this is done by enabling STP and forcing the STP mode to RSTP. No further configuration is needed, except the priority of the root bridge.&lt;br /&gt;
&lt;br /&gt;
=== NTP ===&lt;br /&gt;
All switches are configured to use the RRZE NTP servers directly via their IP addresses because they can't do DNS. &lt;br /&gt;
&lt;br /&gt;
=== Current switches ===&lt;br /&gt;
Here is a list of the currently installed switches, their configuration, uplink, and some notes. All passwords are the LDAP password.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Switches&lt;br /&gt;
|-&lt;br /&gt;
! name !! IP !! Usecase !! Model !! Connectivity !! Administration !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| switch1 || 10.10.1.1 || 1G RJ45 distribution racks || HP ProCurve J4904A 2848 || 44x1G RJ45, 4x1G RJ45/SFP || telnet, D-Sub 9 + RS232-USB, webgui (defunct) ||&lt;br /&gt;
* Kind of old&lt;br /&gt;
* No username required for login&lt;br /&gt;
* Ports 45-48 are dual personality ports, either RJ45 or SFP can be used, not both.&lt;br /&gt;
|-&lt;br /&gt;
| switch2 || 10.10.1.2 || server management (iLO, iDRAC, ...) || HP J9781A 2530-48 || 48x100M RJ45, 2x1G RJ45/SFP || telnet, micro-USB B, RJ45 + RS232-USB, webgui ||&lt;br /&gt;
* Username: manager&lt;br /&gt;
* Ports 49-50 (or 49-52) are dual personality ports, either RJ45 or SFP can be used, not both&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== HP switch administration ===&lt;br /&gt;
==== Accessing via CLI ====&lt;br /&gt;
Accessing the switches via browser is problematic for older switches since they use stuff like Java in the browser or flash. The CLI always works, if basic connectivity is ensured.&lt;br /&gt;
&lt;br /&gt;
===== telnet =====&lt;br /&gt;
If the switch is up, ethernet is connected, IP address is assigned, subnets are configured correctly, and a computer is in the same VLAN (which should be the case), &amp;lt;code&amp;gt;telnet&amp;lt;/code&amp;gt; can be used to access the switches. Just do &amp;lt;code&amp;gt;telnet {IP of switch}&amp;lt;/code&amp;gt; and the you should reach the login of the CLI.&lt;br /&gt;
&lt;br /&gt;
===== serial =====&lt;br /&gt;
Alternatively, and especially if the ethernet connection itself doesn't work (yet), the switches can be accessed directly by plugging a computer into the management port(s). Usually those are some kind of serial connection. Older models have a [https://en.wikipedia.org/wiki/D-subminiature D-Sub 9] connector for this purpose, newer models use a RJ45 port. In the latter case RJ45 is only the physical connector. It does not carry ethernet, only a [https://en.wikipedia.org/wiki/RS-232 RS-232] serial connection. Unless the computer itself has a serial port (unlikely these days), in both cases a serial to USB converter is required. Newer switches offer a USB port which internally has a USB to serial converter integrated and shows up in the connecting computer as a serial port. Regardless of the route choosen, if a serial to USB converter is attached the kernel log of the connecting computer should look something like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[  +0,042064] usbcore: registered new interface driver usbserial_generic&lt;br /&gt;
[  +0,000009] usbserial: USB Serial support registered for generic&lt;br /&gt;
[  +0,001588] usbcore: registered new interface driver ftdi_sio&lt;br /&gt;
[  +0,000008] usbserial: USB Serial support registered for FTDI USB Serial Device&lt;br /&gt;
[  +0,000101] ftdi_sio 1-4:1.0: FTDI USB Serial Device converter detected&lt;br /&gt;
[  +0,000023] usb 1-4: Detected FT232RL&lt;br /&gt;
[  +0,006308] usb 1-4: FTDI USB Serial Device converter now attached to ttyUSB0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This means the serial port is available under &amp;lt;code&amp;gt;/dev/ttyUSB0&amp;lt;/code&amp;gt;. Of course ne number in the end can change, depending on how many serial ports are present. Some devices show up as &amp;lt;code&amp;gt;/dev/ttyACM0&amp;lt;/code&amp;gt; instead. These ports can be used with &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt; to talk to the switch, for example &amp;lt;code&amp;gt;screen /dev/ttyUSB0&amp;lt;/code&amp;gt;. If everything goes well a message like &amp;lt;code&amp;gt;Connected with baud rate 9600&amp;lt;/code&amp;gt; should show up.&lt;br /&gt;
&lt;br /&gt;
===== Authentication =====&lt;br /&gt;
Depending on the model a username must be entered to access the switch. The &amp;quot;root&amp;quot; user for HP switches is usually called &amp;quot;manager&amp;quot;. A password is required to log in in a mode which allows configuration changes. It should be set to our current LDAP admin password. If the password is not or incorrectly entered on the serial console the switches usually drops back to an unpriviledged user which can only look around.&lt;br /&gt;
&lt;br /&gt;
===== Entering configuration =====&lt;br /&gt;
Before anything can be changed in the switch the configuration submenu must be entered. This can be done using the &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
switch1# config&lt;br /&gt;
switch1(config)# &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Tab completion should work in all circumstances and is often very informative. An ad-hoc set of suggestions and help messages can also be triggered by putting a &amp;quot;?&amp;quot; in the terminal. Note that no &amp;quot;enter&amp;quot; is required in this case. As soon as the &amp;quot;?&amp;quot; is sent the terminal shows the suggestions.&lt;br /&gt;
&lt;br /&gt;
===== Saving the configuration =====&lt;br /&gt;
Note that when changing the configuration of a switch only the running configuration is modified. Changes are not persistent over a reboot of the device. To make the changes persistent the configuration needs to be written to the flash memory of the device. This can be done by &amp;lt;code&amp;gt;write memory&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Interestingly, &amp;lt;code&amp;gt;write terminal&amp;lt;/code&amp;gt; shows all commands necessary to achieve the currently running configuration of the switch.&lt;br /&gt;
&lt;br /&gt;
===== Basic setup =====&lt;br /&gt;
The basic switch setup can be accessed even from outside the &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; menu using the &amp;lt;code&amp;gt;setup&amp;lt;/code&amp;gt; command. It's an interactive menu which is rather intuitive. Among other things, it can be used to set&lt;br /&gt;
* The hostname of the switch&lt;br /&gt;
* The password for the &amp;lt;code&amp;gt;manager&amp;lt;/code&amp;gt; user&lt;br /&gt;
* The default gateway&lt;br /&gt;
* The IP of the switch in the [[#VLAN|default VLAN]]&lt;br /&gt;
&lt;br /&gt;
===== Port information =====&lt;br /&gt;
Information about the interfaces of the switch can be retrieven by the &amp;lt;code&amp;gt;show interfaces&amp;lt;/code&amp;gt; command which lists all interfaces and their information in a table. It can be followed by another option to determine the type of information in the table. These are the options:&lt;br /&gt;
* (no option): Sent/received traffic, errors, drops, [https://en.wikipedia.org/wiki/Ethernet_flow_control flow control], broadcast limit&lt;br /&gt;
* &amp;lt;code&amp;gt;brief&amp;lt;/code&amp;gt; Port type, intrusion alert, enabled/disabled, port status (up/down), mode (speed, duplex), flow control, broadcast limit&lt;br /&gt;
* &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; Port type, enabled/disabled, mode, flow control, [https://en.wikipedia.org/wiki/Medium-dependent_interface MDI] mode&lt;br /&gt;
* &amp;lt;code&amp;gt;port-utilization&amp;lt;/code&amp;gt; mode (speed, duplex), Rx data, Tx data&lt;br /&gt;
Much more detailed ethernet information about specific ports can be obtained by &amp;lt;code&amp;gt;show interfaces ethernet {PORTS}&amp;lt;/code&amp;gt;. The ports can be referred to as single ports, a separated list by commas, or ranges separated by &amp;quot;-&amp;quot;, or combinations of all. &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; can be used to refer to all ports at once.&lt;br /&gt;
&lt;br /&gt;
===== VLAN =====&lt;br /&gt;
Information about the configure VLANs can be obtained by the &amp;lt;code&amp;gt;show vlans&amp;lt;/code&amp;gt; command. In our case this should only list the default VLAN. VLANs can be configure by entering the context of a specific VLAN, for example &amp;lt;code&amp;gt;vlan 10&amp;lt;/code&amp;gt;. In this submenu ports can be assigned to this VLAN as untagged access ports by issuing &amp;lt;code&amp;gt;untagged {PORTS}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== Spanning tree =====&lt;br /&gt;
STP can be enabled from the config menu via &amp;lt;code&amp;gt;spanning-tree enable&amp;lt;/code&amp;gt;. RSTP can be enforced as the protocol to use via &amp;lt;code&amp;gt;spanning-tree force-version rstp-operation&amp;lt;/code&amp;gt;. Port based information about the established tree can be retrieved via &amp;lt;code&amp;gt;show spanning-tree&amp;lt;/code&amp;gt;. This gives information about the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Path_cost path cost], [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Configuration port priority], [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Port_states port state], and designated bridge.&lt;br /&gt;
&lt;br /&gt;
===== Time =====&lt;br /&gt;
The timezones in the HP world are odd. They are given in offsets in minutes. So the timezone of the observatory is +60. It can be set via &amp;lt;code&amp;gt;time timezone 60&amp;lt;/code&amp;gt;. The switches can also accept different daylight saving rules. The correct one can be set via &amp;lt;code&amp;gt;time daylight-time-rule Middle-Europe-and-Portugal&amp;lt;/code&amp;gt;. The switches are configured to retrieve their time via SNTP, by setting &amp;lt;code&amp;gt;timesync sntp&amp;lt;/code&amp;gt;. It utilizes the normal [https://en.wikipedia.org/wiki/Network_Time_Protocol NTP] but has a much simpler implementation on the client side. The switches are configured to use the RRZE NTP servers directly via their IP. This is discouraged, but since the switches don't do DNS not otherwise possible. Information about the current SNTP settings can be retrieved via &amp;lt;code&amp;gt;show sntp&amp;lt;/code&amp;gt;. SNTP servers can be set via &amp;lt;code&amp;gt;sntp server {IP}&amp;lt;/code&amp;gt; on older models, and &amp;lt;code&amp;gt;sntp server priority 1 {IP}&amp;lt;/code&amp;gt; on newer models. The current time can be displayed via &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== MDI Mode =====&lt;br /&gt;
The MDI mode can be set via &amp;lt;code&amp;gt;interface {PORT} mdix-mode {MODE}&amp;lt;/code&amp;gt; where PORT is a list of ports and MODE is &amp;lt;code&amp;gt;mdi&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mdix&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;automdix&amp;lt;/code&amp;gt;. Obviously we want the latter on all interfaces. To set all ports to auto MDI-X: &amp;lt;code&amp;gt;interface all mdix-mode automdix&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Accessing via a browser ====&lt;br /&gt;
Some of the switches come with an integrated webserver which can be used to access information and perform configuration. While this seems convenient at first, in reality these servers rely on stuff like [https://en.wikipedia.org/wiki/Java_(programming_language) Java] or sometimes even [https://en.wikipedia.org/wiki/Adobe_Flash Adobe Flash] in the browser which is discontinued and simply does not work at all. Therefore using the CLI is the more reliable way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== DNS ==&lt;br /&gt;
=== Domains ===&lt;br /&gt;
Our public domain is &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt;. For the internal domain we don't need to register a domain, it doesn't make sense. Currently it is configure to &amp;lt;code&amp;gt;internal.sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; which is clunky but accurate. It is configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; which has the nice sideeffect of &amp;lt;code&amp;gt;bla.internal&amp;lt;/code&amp;gt; being correctly resolved from computers in the public network to the computer in the private network. The other way round it does not work, but &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; is therefore configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; as a search domain for all hosts in the private network. If we make sure to not duplicate computer names in the private and public network DNS enables the reference of another computer directly by its hostname.&lt;br /&gt;
&lt;br /&gt;
Maybe it's possible to somehow only use one domain spreading over two subnets, but since some are then public with public DNS records and some are not this might be difficult.&lt;br /&gt;
&lt;br /&gt;
=== /etc/hosts ===&lt;br /&gt;
With all the hostnames available via the &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; configuration there is no need to out them all in &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; as well. &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; knows the IP associated with a hostname from its dhcp configuration file and uses it to resolve the names if a DNS query is made. We could therefore only put aliases (such as &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt;) in the &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; file and save the work of always trying to keep &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; up to date.&lt;br /&gt;
&lt;br /&gt;
== Exposed services ==&lt;br /&gt;
Some services need to be exposed to the internet under a specific address. Most importantly the webserver (www.stern....de). This needs to have a public IP resolving to a specific host. Therefore such services need to run on a server which has two interfaces. One for the LAN and one for the WAN. The weak end system model of Linux ''might'' become a problem here.&lt;br /&gt;
&lt;br /&gt;
We could try just using NAT and port forward the necessary traffic. The webserver would be in our private network only, the router has the public IP and therefore FQDN of the webserver, and ports 80 and 443 are forwarded from the router to the webserver. This way no fiddling with virtualbox, mutliple IPs, etc. is necessary.&lt;br /&gt;
&lt;br /&gt;
When doing it this way access via SSH is also very easy. Forward port 22 to a server behind the router which acts as the login node. Then all SSH logins are done directly through &amp;lt;code&amp;gt;user@www.stern...&amp;lt;/code&amp;gt;. No two ethernet connections required. &lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Desired uplink speeds for individual hardware&lt;br /&gt;
* NFS servers: At least 10G, some maybe with 2x10G.&lt;br /&gt;
* Bladecenter: 10G&lt;br /&gt;
* Meggie nodes: 80x1G&lt;br /&gt;
* Other clients: 1G&lt;br /&gt;
&lt;br /&gt;
All switches should support RSTP (IEEE 802.1w).&lt;br /&gt;
&lt;br /&gt;
=== Main Building ===&lt;br /&gt;
In the main building we can create our own layer 2 network fairly straightforwardly.&lt;br /&gt;
&lt;br /&gt;
Let's ''please'' mount the switches in reverse in the server racks.&lt;br /&gt;
&lt;br /&gt;
==== Root Bridge ====&lt;br /&gt;
The root bridge will be the core of the network. Needs to have the capability to attach the NFS servers as well as other fast enough uplinks to switches, so at least several 10G SFP+ ports.&lt;br /&gt;
&lt;br /&gt;
Omada: SX3032F, 32x10G SFP+, ~900€&lt;br /&gt;
&lt;br /&gt;
Ubiquity (same as above): USW-Pro-Aggregation, 28x10G SFP+, 4x25G SFP28, ~900€&lt;br /&gt;
&lt;br /&gt;
==== Meggie Switches ====&lt;br /&gt;
Each Meggie node provides a 1G uplink (apart from Intel OP). With 80 nodes we need 2 48 port switches.&lt;br /&gt;
&lt;br /&gt;
Omada: SG3452X, 48x1G RJ45, 4x10G SFP+, ~400€&lt;br /&gt;
&lt;br /&gt;
Ubiquity: USW-Pro-48, 48x1G RJ45, 4x10G SFP+, ~600€&lt;br /&gt;
&lt;br /&gt;
==== Peripheral Switches ====&lt;br /&gt;
If we decommission the Messiers we can make due with 3 peripheral switches for the main building. If the RRZE lets us use the currently installed 3 switches with the 10G uplink we do not need new hardware for this.&lt;br /&gt;
&lt;br /&gt;
==== Shopping List ====&lt;br /&gt;
* 10G root bridge: ~900 Euros&lt;br /&gt;
* 2x 48x1G + 10G uplink meggie switches: 2x~400 Euros&lt;br /&gt;
* Lots of Cat 6 (or 5e) cables for the meggies&lt;br /&gt;
* We might need new DAC cables&lt;br /&gt;
* Total: 1700 Euros&lt;br /&gt;
&lt;br /&gt;
== Integrating Meridian building and Bundschuhhaus ==&lt;br /&gt;
&lt;br /&gt;
=== Layer 2 ===&lt;br /&gt;
There are two fibers going to the Meridian building. One is patched through to the Bundschuhhaus.&lt;br /&gt;
For the Meridian building it is technically possible to use one of the fibers to directly integrate an additional switch in the Clock room via layer 2. But the RRZE needs to play ball for this because they need to switch the other pair through to Bundschuhhause. If this route is taken there is still no option to integrate Bundschuhhause on layer 2.&lt;br /&gt;
&lt;br /&gt;
=== Layer 3 ===&lt;br /&gt;
A VPN would be an option to incorporate the other buildings over layer 3 without interaction with the RRZE (fingers crossed). Each building needs to have a separate OPNsense box establishing a VPN directly to the main gateway over the WAN and an attached switch for the computers.&lt;br /&gt;
&lt;br /&gt;
NFS etc. might be a bit wonky in this scenarion. Performance will certainly be limited. Strong CPU hardware of the OPNSense boxes is required for this to work with low latency.&lt;br /&gt;
&lt;br /&gt;
==== IPSec ====&lt;br /&gt;
According to the documentation this is the preferred solution for a site-to-site setup such as in our case. It's a bit complicated to set up compared to the other options. It requires an open port on the main gateway (similar to port forwarding). The computers on the other sites then also need to be in a separate subnet, necessitating a separate DHCP (possibly DNS etc.) server (TBC).&lt;br /&gt;
&lt;br /&gt;
==== Wireguard ====&lt;br /&gt;
Much easier to set up compared to IPSec, but might be less reliable. Unclear about the different subnet. Might not require an open port on the main gateway.&lt;br /&gt;
&lt;br /&gt;
==== OpenVPN ====&lt;br /&gt;
Fairly simple to set up, running via SSL, can mimick HTTPS traffic. Requires an open port.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Settings/Optimizations ==&lt;br /&gt;
* Enable jumbo frames for better NFS/iSCSI performance&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Ubuntu_24&amp;diff=3712</id>
		<title>Ubuntu 24</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Ubuntu_24&amp;diff=3712"/>
		<updated>2025-05-06T11:47:55Z</updated>

		<summary type="html">&lt;p&gt;Weber: Created page with &amp;quot;Category:Admin  Collecting things to consider/do for the upgrade Ubuntu 24.  Distinction: System servers and &amp;quot;normal&amp;quot; computers.   == Plan ==  # Block ## Get new central s...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
&lt;br /&gt;
Collecting things to consider/do for the upgrade Ubuntu 24.&lt;br /&gt;
&lt;br /&gt;
Distinction: System servers and &amp;quot;normal&amp;quot; computers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Plan ==&lt;br /&gt;
&lt;br /&gt;
# Block&lt;br /&gt;
## Get new central switch&lt;br /&gt;
## 10G for router&lt;br /&gt;
## Puppet server movement to cygnus&lt;br /&gt;
## Test: Configure dnsmasq and ldap on any Ubuntu 24 system (VM)&lt;br /&gt;
## Move /data somewhere else&lt;br /&gt;
# Block&lt;br /&gt;
## Setup Ubuntu 24 on vela&lt;br /&gt;
## Setup dnsmasq and ldap to vela&lt;br /&gt;
## Move puppet server back to vela&lt;br /&gt;
# Block&lt;br /&gt;
## Setup Ubuntu 24 on libra&lt;br /&gt;
## Setup dnsmasq and ldap on libra&lt;br /&gt;
# Block&lt;br /&gt;
## All other computers&lt;br /&gt;
## Slurm&lt;br /&gt;
&lt;br /&gt;
== Open points ==&lt;br /&gt;
* Manage snaps via puppet&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3707</id>
		<title>Meggie Cluster</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3707"/>
		<updated>2025-05-05T13:49:35Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
&lt;br /&gt;
The meggies are diskless nodes inherited from the RRZE used from computing only. We would like to boot them from the network. NFS and iSCSI are two options to accomplish this. Since iSCSI is directly supported by the UEFI of the nodes this is the option which is by far the easiest to implement.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
The main boards are S2600KPR from Intel. Four of those are in a 2U chassis, called H2000G. The rails for the installation are called AXXELVRAIL.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
&lt;br /&gt;
=== OS setup ===&lt;br /&gt;
* &amp;lt;s&amp;gt;Make the installer recognize the iSCSI LUN as a block device before searching for those&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;Supply LUN information directly to the UEFI via DHCP&amp;lt;/s&amp;gt;&lt;br /&gt;
* Test what happens on iSCSI connection problems&lt;br /&gt;
** Switch malfunction&lt;br /&gt;
** iSCSI server reboot&lt;br /&gt;
** It doesn't take long until the kernel gives up on the iSCSI target. We need to increase this timeout somehow&lt;br /&gt;
* Make a list of UEFI settings&lt;br /&gt;
* Prepare LUNs&lt;br /&gt;
** Use ZFS zvols as storage backend&lt;br /&gt;
** Find out which backend type is the best (file, block, SCSI passthrough)&lt;br /&gt;
** Create a separate dataset for easier zfs setting propagation&lt;br /&gt;
** Leave a README file in the dataset directory for other people to know that it shouldn't be deleted&lt;br /&gt;
** Optimize dataset settings for iSCSI targets&lt;br /&gt;
*** Compression lz4&lt;br /&gt;
*** Larger &amp;lt;code&amp;gt;recordsize&amp;lt;/code&amp;gt; (1M or something)&lt;br /&gt;
** Name the zvols &amp;lt;code&amp;gt;zvol-MM-m&amp;lt;/code&amp;gt; where MM is the chassis number from 01 to 20 and m the node number from 1 to 4&lt;br /&gt;
* Remove the stupid /swap.img file. This is a general point affecting all computers&lt;br /&gt;
* Adjust puppet&lt;br /&gt;
** &amp;lt;s&amp;gt;Make no scratch available&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Make /tmp and friends a tmpfs&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Restrict sizes of all tmpfs&amp;lt;/s&amp;gt;&lt;br /&gt;
** Remove unnecessary user stuff? (e.g. x2go, firefox, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Hardware setup ===&lt;br /&gt;
* Install nodes in a rack&lt;br /&gt;
* Buy and set up up switches&lt;br /&gt;
* Lots of cabling&lt;br /&gt;
* Power requirements?&lt;br /&gt;
** Ca. 250W per node, 1kW per chassis&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Boot Process ==&lt;br /&gt;
&lt;br /&gt;
=== General layout ===&lt;br /&gt;
The boot process works like this:&lt;br /&gt;
# UEFI stage&lt;br /&gt;
## The UEFI starts up&lt;br /&gt;
## Establishes a connection to the network&lt;br /&gt;
## Runs a DHCP client&lt;br /&gt;
## Gets an IP as well as the iSCSI LUN information directly from our DHCP server&lt;br /&gt;
## Accesses the GPT on the LUN and loads grub&lt;br /&gt;
# grub stage&lt;br /&gt;
## Grub starts&lt;br /&gt;
## Loads the kernel and initrd from the LUN&lt;br /&gt;
## Jumbs into the kernel&lt;br /&gt;
# ramdisk stage&lt;br /&gt;
## The kernel runs&lt;br /&gt;
## Mounts the initrd&lt;br /&gt;
## Inside the initrd our custom iSCSI hook is called&lt;br /&gt;
### Loads the iSCSI kernel module&lt;br /&gt;
### Loads the iSCSI iBFT kernel module&lt;br /&gt;
### Runs &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; which makes the iSCSI LUN available as a block device&lt;br /&gt;
# Normal boot continues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Further explanations ===&lt;br /&gt;
==== UEFI DHCP ====&lt;br /&gt;
The UEFI can talk to the DHCP server and get an IP. We use DHCP option 17 (root-path) to supply the iSCSI information to the nodes.&lt;br /&gt;
&lt;br /&gt;
==== grub ====&lt;br /&gt;
As of now we don't know why grub even works. It's installed on the efi partition on the LUN, just like a normal computer. The UEFI uses the information on this EFI partition to find grub and run it, and grub then sees the partitions of the installed OS. Either the UEFI somehow emulates a blockdevice for grub such that it can see these partitions and load the kernel and initrd, or grub somehow also does iSCSI by using the iBFT. Anyway, it loads the kernel and initrd, which is the most important part.&lt;br /&gt;
&lt;br /&gt;
==== iBFT ====&lt;br /&gt;
This is really cool. When the UEFI launches and gets iSCSI information from the DHCP server it puts this information into the EFI system table, the Boot Firmware Table (iBFT). Linux can use this information to connect to the same LUN used for the boot process and set up the block device before trying to mount the root partition. The necessary kernel module is called &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt;. After the module is loaded its only a matter of calling the &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; program to set up the block device. All this needs to happen before root is mounted, therefore modifications to the initrd are necessary.&lt;br /&gt;
&lt;br /&gt;
==== initrd modifications ====&lt;br /&gt;
During the boot, when the kernel is running and mounted the initrd, the &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;iscsi_tcp&amp;lt;/code&amp;gt; modules need to be loaded, after which the block device can be created. To do this a hook needs to be installed in the initramfs. On ubuntu this can be done by putting files into the &amp;lt;code&amp;gt;/etc/initramfs-tools/scripts&amp;lt;/code&amp;gt; directory (or rather subdirectories). The hook for the iSCSI setup need to happen after the network is available, which means the hook needs to be put in the &amp;lt;code&amp;gt;local-top&amp;lt;/code&amp;gt; directory and made executable. The content is:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# iSCSI init script&lt;br /&gt;
PREREQ=&amp;quot;&amp;quot;&lt;br /&gt;
prereqs()&lt;br /&gt;
{&lt;br /&gt;
     echo &amp;quot;$PREREQ&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
prereqs)&lt;br /&gt;
     prereqs&lt;br /&gt;
     exit 0&lt;br /&gt;
     ;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
. /scripts/functions&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Begin iSCSI init&amp;quot;&lt;br /&gt;
&lt;br /&gt;
modprobe iscsi_tcp&lt;br /&gt;
modprobe iscsi_ibft&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Network configuration based on iBFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
iscsistart -N || panic &amp;quot;Could not initialize iSCSI&amp;quot;&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Waiting to finish iscsistart&amp;quot;&lt;br /&gt;
until iscsistart -b ; do&lt;br /&gt;
    sleep 1&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Of course the script needs to be made executable. After that the initial ramdisk(s) need to be regenerated by calling &amp;lt;code&amp;gt;update-initramfs -u&amp;lt;/code&amp;gt;. When the script is called during the boot process the block device exists for the kernel to mount the root filesystem and continue the boot process as normal.&lt;br /&gt;
&lt;br /&gt;
=== Installing ===&lt;br /&gt;
Unfortunately we can't completely rely on the normal installation process because Ubuntu by default doesn't use the iBFT to set up an iSCSI LUN before the installer searches for block devices to install on. We could get around this by simply switching to a TTY, running &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; and relaunching the installer, which then identified the block device and proceeded as normal. Since this entire stuff runs off LUNs on the network we can potentially completely get around the installation by just preparing enough LUNS with the appropriate data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== iSCSI targets ===&lt;br /&gt;
We need to put the iSCSI Luns somewhere. We have 80 computers. The root filesystem size for each node will be around 40GB. In total around 3TB of data will be used for these LUNs, minus compression by ZFS. The new virgo is maybe a good choice for that, but it's still in testing mode. This needs to be clarified.&lt;br /&gt;
&lt;br /&gt;
== UEFI settings ==&lt;br /&gt;
Settings applied after resetting the UEFI to default settings:&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Admin&amp;diff=3688</id>
		<title>Admin</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Admin&amp;diff=3688"/>
		<updated>2025-04-25T06:23:40Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Remeis Admin-Page =====&lt;br /&gt;
&lt;br /&gt;
This page is only internally visible to the Admins.&lt;br /&gt;
&lt;br /&gt;
Things which need to be documented:&lt;br /&gt;
* Ansible&lt;br /&gt;
* Updates (using unattended-upgrades)&lt;br /&gt;
* Puppet&lt;br /&gt;
* Storage volumes (raids, filesystems, oddities, etc.)&lt;br /&gt;
&lt;br /&gt;
==== Lab Course ====&lt;br /&gt;
&lt;br /&gt;
* Before the lab course: &lt;br /&gt;
** check the PCs in the Meridian building:&lt;br /&gt;
*** they should all be functional, broken ones should be replaced&lt;br /&gt;
*** in total we should have about 10 computers available for the students&lt;br /&gt;
** [[setup prakti|Setup the prakti accounts]]&lt;br /&gt;
* [[Computer_Introduction|Introduction to Computers/Linux for Lab Students ]]&lt;br /&gt;
&lt;br /&gt;
==== Serendipitous Issues ====&lt;br /&gt;
&lt;br /&gt;
* [[Login Problems|Typical login problems]]&lt;br /&gt;
* [[Unmet Dependencies|''unmet dependencies'' issue in apt-get]]&lt;br /&gt;
* [[Overflow Filesystem|overflow file system]]&lt;br /&gt;
&lt;br /&gt;
==== Add new Users ====&lt;br /&gt;
* Go to the remeis internal homepage -&amp;gt; admin -&amp;gt; LDAP&lt;br /&gt;
* Fill out the necessary fields, including a valid email address. If possible, also fill out the fields for room and telephone number.&lt;br /&gt;
* Log into LDAP ( https://www.sternwarte.uni-erlangen.de/phpldapadmin/), go to import and copy the text of the previous step. '''Important''': if the user is external, &amp;quot;current&amp;quot; in the first line has to be changed to &amp;quot;external&amp;quot;&lt;br /&gt;
* set the password of the user: Use the LDAP query &amp;lt;code&amp;gt;ldappasswd -H ldap://vela -x -D &amp;quot;cn=admin,dc=sternwarte,dc=uni-erlangen,dc=de&amp;quot; -W -S &amp;quot;uid={USERNAME},ou=current,ou=People,dc=sternwarte,dc=uni-erlangen,dc=de&amp;quot;&amp;lt;/code&amp;gt; while obviously adjusting the LDAP dn.&lt;br /&gt;
* log in as ubuntuadmin on libra and create the home directory like that: &amp;lt;code&amp;gt;sudo mkdir /exports/disk1/{USERNAME} &amp;amp;&amp;amp; sudo chown {USERNAME}:remeis /exports/disk1/{USERNAME}&amp;lt;/code&amp;gt;&lt;br /&gt;
* Set the quota (on libra), using a prototype which has normal quota &amp;lt;code&amp;gt;sudo edquota -p [prototype] [username]&amp;lt;/code&amp;gt;  (normal Quota is 8GB softlimit and 12GB hardlimit; it can be manually edited/shown with edquota -u user)&lt;br /&gt;
* Add the default cshrc to /home/username/.cshrc &lt;br /&gt;
* If desired (in most cases), create a folder for the user at ''/userdata/data/username'' and adjust the permissions with &amp;lt;code&amp;gt;sudo chown username:remeis /userdata/data/username&amp;lt;/code&amp;gt;&lt;br /&gt;
* Send Email to admin about the new user&lt;br /&gt;
&lt;br /&gt;
==== Running Software / Updates / Setups ====&lt;br /&gt;
&lt;br /&gt;
In this section a selection of services and their current configuration is described. &lt;br /&gt;
&lt;br /&gt;
* [[CUPS| CUPS]] (Printing Service)&lt;br /&gt;
* [[Virtual Boxes| Virtual Boxes]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Admin]]&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Admin&amp;diff=3686</id>
		<title>Admin</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Admin&amp;diff=3686"/>
		<updated>2025-04-24T12:31:03Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Remeis Admin-Page =====&lt;br /&gt;
&lt;br /&gt;
This page is only internally visible to the Admins.&lt;br /&gt;
&lt;br /&gt;
Things which need to be documented:&lt;br /&gt;
* Ansible&lt;br /&gt;
* Updates (using unattended-upgrades)&lt;br /&gt;
* Puppet&lt;br /&gt;
&lt;br /&gt;
==== Lab Course ====&lt;br /&gt;
&lt;br /&gt;
* Before the lab course: &lt;br /&gt;
** check the PCs in the Meridian building:&lt;br /&gt;
*** they should all be functional, broken ones should be replaced&lt;br /&gt;
*** in total we should have about 10 computers available for the students&lt;br /&gt;
** [[setup prakti|Setup the prakti accounts]]&lt;br /&gt;
* [[Computer_Introduction|Introduction to Computers/Linux for Lab Students ]]&lt;br /&gt;
&lt;br /&gt;
==== Serendipitous Issues ====&lt;br /&gt;
&lt;br /&gt;
* [[Login Problems|Typical login problems]]&lt;br /&gt;
* [[Unmet Dependencies|''unmet dependencies'' issue in apt-get]]&lt;br /&gt;
* [[Overflow Filesystem|overflow file system]]&lt;br /&gt;
&lt;br /&gt;
==== Add new Users ====&lt;br /&gt;
* Go to the remeis internal homepage -&amp;gt; admin -&amp;gt; LDAP&lt;br /&gt;
* Fill out the necessary fields, including a valid email address. If possible, also fill out the fields for room and telephone number.&lt;br /&gt;
* Log into LDAP ( https://www.sternwarte.uni-erlangen.de/phpldapadmin/), go to import and copy the text of the previous step. '''Important''': if the user is external, &amp;quot;current&amp;quot; in the first line has to be changed to &amp;quot;external&amp;quot;&lt;br /&gt;
* set the password of the user: Use the LDAP query &amp;lt;code&amp;gt;ldappasswd -H ldap://vela -x -D &amp;quot;cn=admin,dc=sternwarte,dc=uni-erlangen,dc=de&amp;quot; -W -S &amp;quot;uid={USERNAME},ou=current,ou=People,dc=sternwarte,dc=uni-erlangen,dc=de&amp;quot;&amp;lt;/code&amp;gt; while obviously adjusting the LDAP dn.&lt;br /&gt;
* log in as ubuntuadmin on libra and create the home directory like that: &amp;lt;code&amp;gt;sudo mkdir /exports/disk1/{USERNAME} &amp;amp;&amp;amp; sudo chown {USERNAME}:remeis /exports/disk1/{USERNAME}&amp;lt;/code&amp;gt;&lt;br /&gt;
* Set the quota (on libra), using a prototype which has normal quota &amp;lt;code&amp;gt;sudo edquota -p [prototype] [username]&amp;lt;/code&amp;gt;  (normal Quota is 8GB softlimit and 12GB hardlimit; it can be manually edited/shown with edquota -u user)&lt;br /&gt;
* Add the default cshrc to /home/username/.cshrc &lt;br /&gt;
* If desired (in most cases), create a folder for the user at ''/userdata/data/username'' and adjust the permissions with &amp;lt;code&amp;gt;sudo chown username:remeis /userdata/data/username&amp;lt;/code&amp;gt;&lt;br /&gt;
* Send Email to admin about the new user&lt;br /&gt;
&lt;br /&gt;
==== Running Software / Updates / Setups ====&lt;br /&gt;
&lt;br /&gt;
In this section a selection of services and their current configuration is described. &lt;br /&gt;
&lt;br /&gt;
* [[CUPS| CUPS]] (Printing Service)&lt;br /&gt;
* [[Virtual Boxes| Virtual Boxes]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Admin]]&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3685</id>
		<title>Meggie Cluster</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3685"/>
		<updated>2025-04-24T12:26:10Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
&lt;br /&gt;
The meggies are diskless nodes inherited from the RRZE used from computing only. We would like to boot them from the network. NFS and iSCSI are two options to accomplish this. Since iSCSI is directly supported by the UEFI of the nodes this is the option which is by far the easiest to implement.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
&lt;br /&gt;
=== OS setup ===&lt;br /&gt;
* &amp;lt;s&amp;gt;Make the installer recognize the iSCSI LUN as a block device before searching for those&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;Supply LUN information directly to the UEFI via DHCP&amp;lt;/s&amp;gt;&lt;br /&gt;
* Test what happens on iSCSI connection problems&lt;br /&gt;
** Switch malfunction&lt;br /&gt;
** iSCSI server reboot&lt;br /&gt;
** It doesn't take long until the kernel gives up on the iSCSI target. We need to increase this timeout somehow&lt;br /&gt;
* Make a list of UEFI settings&lt;br /&gt;
* Prepare LUNs&lt;br /&gt;
** Use ZFS zvols as storage backend&lt;br /&gt;
** Find out which backend type is the best (file, block, SCSI passthrough)&lt;br /&gt;
** Create a separate dataset for easier zfs setting propagation&lt;br /&gt;
** Leave a README file in the dataset directory for other people to know that it shouldn't be deleted&lt;br /&gt;
** Optimize dataset settings for iSCSI targets&lt;br /&gt;
*** Compression lz4&lt;br /&gt;
*** Larger &amp;lt;code&amp;gt;recordsize&amp;lt;/code&amp;gt; (1M or something)&lt;br /&gt;
** Name the zvols &amp;lt;code&amp;gt;zvol-MM-m&amp;lt;/code&amp;gt; where MM is the chassis number from 01 to 20 and m the node number from 1 to 4&lt;br /&gt;
* Remove the stupid /swap.img file. This is a general point affecting all computers&lt;br /&gt;
* Adjust puppet&lt;br /&gt;
** &amp;lt;s&amp;gt;Make no scratch available&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Make /tmp and friends a tmpfs&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Restrict sizes of all tmpfs&amp;lt;/s&amp;gt;&lt;br /&gt;
** Remove unnecessary user stuff? (e.g. x2go, firefox, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Hardware setup ===&lt;br /&gt;
* Install nodes in a rack&lt;br /&gt;
* Buy and set up up switches&lt;br /&gt;
* Lots of cabling&lt;br /&gt;
* Power requirements?&lt;br /&gt;
** Ca. 250W per node, 1kW per chassis&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Boot Process ==&lt;br /&gt;
&lt;br /&gt;
=== General layout ===&lt;br /&gt;
The boot process works like this:&lt;br /&gt;
# UEFI stage&lt;br /&gt;
## The UEFI starts up&lt;br /&gt;
## Establishes a connection to the network&lt;br /&gt;
## Runs a DHCP client&lt;br /&gt;
## Gets an IP as well as the iSCSI LUN information directly from our DHCP server&lt;br /&gt;
## Accesses the GPT on the LUN and loads grub&lt;br /&gt;
# grub stage&lt;br /&gt;
## Grub starts&lt;br /&gt;
## Loads the kernel and initrd from the LUN&lt;br /&gt;
## Jumbs into the kernel&lt;br /&gt;
# ramdisk stage&lt;br /&gt;
## The kernel runs&lt;br /&gt;
## Mounts the initrd&lt;br /&gt;
## Inside the initrd our custom iSCSI hook is called&lt;br /&gt;
### Loads the iSCSI kernel module&lt;br /&gt;
### Loads the iSCSI iBFT kernel module&lt;br /&gt;
### Runs &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; which makes the iSCSI LUN available as a block device&lt;br /&gt;
# Normal boot continues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Further explanations ===&lt;br /&gt;
==== UEFI DHCP ====&lt;br /&gt;
The UEFI can talk to the DHCP server and get an IP. We use DHCP option 17 (root-path) to supply the iSCSI information to the nodes.&lt;br /&gt;
&lt;br /&gt;
==== grub ====&lt;br /&gt;
As of now we don't know why grub even works. It's installed on the efi partition on the LUN, just like a normal computer. The UEFI uses the information on this EFI partition to find grub and run it, and grub then sees the partitions of the installed OS. Either the UEFI somehow emulates a blockdevice for grub such that it can see these partitions and load the kernel and initrd, or grub somehow also does iSCSI by using the iBFT. Anyway, it loads the kernel and initrd, which is the most important part.&lt;br /&gt;
&lt;br /&gt;
==== iBFT ====&lt;br /&gt;
This is really cool. When the UEFI launches and gets iSCSI information from the DHCP server it puts this information into the EFI system table, the Boot Firmware Table (iBFT). Linux can use this information to connect to the same LUN used for the boot process and set up the block device before trying to mount the root partition. The necessary kernel module is called &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt;. After the module is loaded its only a matter of calling the &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; program to set up the block device. All this needs to happen before root is mounted, therefore modifications to the initrd are necessary.&lt;br /&gt;
&lt;br /&gt;
==== initrd modifications ====&lt;br /&gt;
During the boot, when the kernel is running and mounted the initrd, the &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;iscsi_tcp&amp;lt;/code&amp;gt; modules need to be loaded, after which the block device can be created. To do this a hook needs to be installed in the initramfs. On ubuntu this can be done by putting files into the &amp;lt;code&amp;gt;/etc/initramfs-tools/scripts&amp;lt;/code&amp;gt; directory (or rather subdirectories). The hook for the iSCSI setup need to happen after the network is available, which means the hook needs to be put in the &amp;lt;code&amp;gt;local-top&amp;lt;/code&amp;gt; directory and made executable. The content is:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# iSCSI init script&lt;br /&gt;
PREREQ=&amp;quot;&amp;quot;&lt;br /&gt;
prereqs()&lt;br /&gt;
{&lt;br /&gt;
     echo &amp;quot;$PREREQ&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
prereqs)&lt;br /&gt;
     prereqs&lt;br /&gt;
     exit 0&lt;br /&gt;
     ;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
. /scripts/functions&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Begin iSCSI init&amp;quot;&lt;br /&gt;
&lt;br /&gt;
modprobe iscsi_tcp&lt;br /&gt;
modprobe iscsi_ibft&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Network configuration based on iBFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
iscsistart -N || panic &amp;quot;Could not initialize iSCSI&amp;quot;&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Waiting to finish iscsistart&amp;quot;&lt;br /&gt;
until iscsistart -b ; do&lt;br /&gt;
    sleep 1&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Of course the script needs to be made executable. After that the initial ramdisk(s) need to be regenerated by calling &amp;lt;code&amp;gt;update-initramfs -u&amp;lt;/code&amp;gt;. When the script is called during the boot process the block device exists for the kernel to mount the root filesystem and continue the boot process as normal.&lt;br /&gt;
&lt;br /&gt;
=== Installing ===&lt;br /&gt;
Unfortunately we can't completely rely on the normal installation process because Ubuntu by default doesn't use the iBFT to set up an iSCSI LUN before the installer searches for block devices to install on. We could get around this by simply switching to a TTY, running &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; and relaunching the installer, which then identified the block device and proceeded as normal. Since this entire stuff runs off LUNs on the network we can potentially completely get around the installation by just preparing enough LUNS with the appropriate data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== iSCSI targets ===&lt;br /&gt;
We need to put the iSCSI Luns somewhere. We have 80 computers. The root filesystem size for each node will be around 40GB. In total around 3TB of data will be used for these LUNs, minus compression by ZFS. The new virgo is maybe a good choice for that, but it's still in testing mode. This needs to be clarified.&lt;br /&gt;
&lt;br /&gt;
== UEFI settings ==&lt;br /&gt;
Settings applied after resetting the UEFI to default settings:&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=List_of_servers_in_the_Remeis_Cluster&amp;diff=3680</id>
		<title>List of servers in the Remeis Cluster</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=List_of_servers_in_the_Remeis_Cluster&amp;diff=3680"/>
		<updated>2025-04-14T14:19:25Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''This page is very outdated!'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here you can find an overview of our servers and what pieces of software and services are running on each of them.&lt;br /&gt;
&lt;br /&gt;
'''crux'''&lt;br /&gt;
* LDAP&lt;br /&gt;
* Web&lt;br /&gt;
* DNS&lt;br /&gt;
* DHCP&lt;br /&gt;
* NTP&lt;br /&gt;
* /data&lt;br /&gt;
* git&lt;br /&gt;
* Mail&lt;br /&gt;
* Backup (von /data)&lt;br /&gt;
* Ubuntu-Mirror&lt;br /&gt;
* MySQL&lt;br /&gt;
&lt;br /&gt;
'''leo'''&lt;br /&gt;
* /userdata&lt;br /&gt;
* 2 Vboxes: auriga: print &amp;amp; hydrus: web&lt;br /&gt;
* cronjobs&lt;br /&gt;
* torque server + client&lt;br /&gt;
* Randomnumber-Server&lt;br /&gt;
&lt;br /&gt;
'''phoenix'''&lt;br /&gt;
* /home&lt;br /&gt;
* Backup (von /home)&lt;br /&gt;
* /ixo&lt;br /&gt;
* cronjobs&lt;br /&gt;
* quota&lt;br /&gt;
&lt;br /&gt;
'''grus'''&lt;br /&gt;
* /eu&lt;br /&gt;
* cronjobs&lt;br /&gt;
&lt;br /&gt;
'''draco'''&lt;br /&gt;
* /loft&lt;br /&gt;
* VBox: openproject&lt;br /&gt;
* MySQL&lt;br /&gt;
* cronjob&lt;br /&gt;
&lt;br /&gt;
'''virgo'''&lt;br /&gt;
* /virgoabc&lt;br /&gt;
&lt;br /&gt;
'''serpens'''&lt;br /&gt;
* usage only for erosita project&lt;br /&gt;
* web (erosita)&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal]]&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=How_to_use_the_Remeis_cluster&amp;diff=3679</id>
		<title>How to use the Remeis cluster</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=How_to_use_the_Remeis_cluster&amp;diff=3679"/>
		<updated>2025-04-14T14:17:41Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How To use the Remeis Cluster ==&lt;br /&gt;
&lt;br /&gt;
The Cluster of the Remeis observatory is designed to make all resources available for easy usage. Nevertheless, there are a few important things one has to know in order to use the cluster properly. In the following the most important information will be listed. Other questions or problems with the system or software sould be directed to [mailto:admin@sternwarte.uni-erlangen.de admin@sternwarte.uni-erlangen.de].&lt;br /&gt;
&lt;br /&gt;
=== Performing Computations  ===&lt;br /&gt;
&lt;br /&gt;
* You should never log in on servers directly and especially not run any computations on servers without using slurm.&lt;br /&gt;
* Computations and extractions on the Cluster should be submitted via '''slurm'''. Information on how to use it can be found [[Slurm|here]].&lt;br /&gt;
* Also interactive sessions can be started via '''slurm'''.&lt;br /&gt;
&lt;br /&gt;
===  The Data-Storage System ===&lt;br /&gt;
&lt;br /&gt;
* '''/userdata:''' Extracted data like images or spectra or other space consuming stuff or stuff which can re recreated/downloaded again should be put there. /userdata is a RAID6 system, i.e. two disks can fail simultaneously w/o data loss --&amp;gt; your data is safe on /userdata! However, there is NO backup of userdata, as /userdata is too big to be backed up simply. And there is no quota on /userdata.&lt;br /&gt;
&lt;br /&gt;
* '''/home:''' This is the place for self-developed software, scripts, documents, TeX files, diploma/phd/... theses, papers, spreadsheets, etc. /home is also a RAID system, i.e. more than one disk may fail w/o data loss. Furthermore, /home is backed up every night to TWO different disks (in two machines) AND once a week on an external disk that is stored outside the observatory  for the worst case (e.g., fire). It therefore does not make sense to create your own private backups on local scratch disks etc. /home, however, is quite small (5 TB for all the institute); we therefore have a quota of about 10GB per user. It is no problem to get more space, if you can't move stuff around anymore, just drop an Email to the admins. On the other hand, you don't have to fill your quota completely! To check your quota you can use the ''quota'' command on libra, like &lt;br /&gt;
  ssh libra quota -s -f /exports/disk1&lt;br /&gt;
&lt;br /&gt;
* '''/scratch:''' For temporary or otherwise not very important data. You should not store anything important on /scratch!! The scratch disks are NOT backedup and the scratch disks are not fail safe, i.e. if a scratch disk is broken (which happens regularly), your data is GONE. scratch might be emptied at any time without warning.&lt;br /&gt;
&lt;br /&gt;
* '''Satellite Data:''' We already have archives for most satellite raw data (applies mostly to the X-ray people). So please do not download any raw data yourself, but talk to Ingo.&lt;br /&gt;
&lt;br /&gt;
===  Logging into Remeis ===&lt;br /&gt;
&lt;br /&gt;
====  Remote Login ====&lt;br /&gt;
&lt;br /&gt;
===== Using ssh =====&lt;br /&gt;
You can log-in via ssh simply by &lt;br /&gt;
  ssh -X &amp;lt;username&amp;gt;@&amp;lt;host&amp;gt;.sternwarte.uni-erlangen.de&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Using x2go =====&lt;br /&gt;
&lt;br /&gt;
For remote login with a graphical interface you can use [[X2Go Remote Desktop]]&lt;br /&gt;
&lt;br /&gt;
===== Hosts =====&lt;br /&gt;
Host names are generally the constellation names, e.g., &amp;lt;code&amp;gt;norma&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;mensa&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Connecting without password and short hostnames ====&lt;br /&gt;
&lt;br /&gt;
Sick of always typing &amp;lt;code&amp;gt;user@myfavouritehost.sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; and always having to enter your password when switching machines inside inside the Remeis Cluster? The follwing setup will make your life easier.&lt;br /&gt;
&lt;br /&gt;
===== Config-File =====&lt;br /&gt;
&lt;br /&gt;
In the file &amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt; you can set up the configuration for ssh. A few things are really useful.&lt;br /&gt;
   # activate compression, might lead to a faster connection&lt;br /&gt;
   Compression yes&lt;br /&gt;
   # do X11 forwarding by default, i.e., the option &amp;quot;-X&amp;quot; is &lt;br /&gt;
   # always set when using &amp;quot;ssh&amp;quot;&lt;br /&gt;
   forwardX11 yes&lt;br /&gt;
   &lt;br /&gt;
In order to define a short-cut for a host, you have to add the following information to the ''~/.ssh/config''&lt;br /&gt;
   # the short-name you want to call the  host (most useful is the general name of the machine&lt;br /&gt;
   Host=norma&lt;br /&gt;
   # now define user and host such that ''&amp;lt;User&amp;gt;@&amp;lt;Hostname&amp;gt;'' is the correct adress&lt;br /&gt;
   Hostname=norma.sternwarte.uni-erlangen.de&lt;br /&gt;
   User=YourUsername&lt;br /&gt;
   &lt;br /&gt;
===== ssh-keys =====&lt;br /&gt;
   &lt;br /&gt;
If you setup the ssh-keys properly, you can login via ssh without entering a password (although you should definitely protect your ssh key with a password). A detailed description can be found [[SSH-Keys|here]].&lt;br /&gt;
&lt;br /&gt;
=== Setting the Default Options/Software ===&lt;br /&gt;
&lt;br /&gt;
Each new account is equipped with a sample file at ''~/.cshrc'', which is loaded on every start of the terminal. Hence, this defines your options, i.e., the software available, short-cuts, your favourite editor, and so on. Commonly useful options are activated by default. In addition, there are a few additional features, which are commented out by default but still very useful for most users.&lt;br /&gt;
&lt;br /&gt;
   # set your favourite text editor to be used by default; important, e.g., if you want to use GIT&lt;br /&gt;
   setenv EDITOR jed &lt;br /&gt;
   &lt;br /&gt;
   # activate the X-ray software (HEADAS, satellite extraction scripts, ...)&lt;br /&gt;
   source /data/software/cshrc.in &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More information on the TC shell and how to configure it can be found [[TcShell|here]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Current Members]][[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Login&amp;diff=3678</id>
		<title>Login</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Login&amp;diff=3678"/>
		<updated>2025-04-14T08:13:39Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Ubuntu 20.04 Issues ==&lt;br /&gt;
&lt;br /&gt;
For some reason it can happen that for a particular user on a particular machine lightdm (login manager) decides to load the gnome session (albeit it should load xfce per default). It does so despite no full gnome desktop environment is installed. It seems that somehow the d-bus is wrongly configured (?) or started (?), not sure. Anyway, the effect is that even logout or restart does not fix this. The user is greeted with a pretty blank gnome desktop environment running on top of xfce (the later is therefore inaccessible).&lt;br /&gt;
&lt;br /&gt;
This seems to fix this:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.Accounts /org/freedesktop/Accounts/User&amp;lt;UID&amp;gt; org.freedesktop.Accounts.User.SetXSession string:xfce&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
make sure to replace &amp;lt;code&amp;gt;&amp;lt;UID&amp;gt;&amp;lt;/code&amp;gt; with the affected users id.&lt;br /&gt;
&lt;br /&gt;
== Issuses during update to 16.04 ==&lt;br /&gt;
&lt;br /&gt;
Especially in the course of the update of 14.04 to 16.04 the following issues have turned out to happen quite often. The text was copied from Ingo's mail to the admin list.&lt;br /&gt;
&lt;br /&gt;
* the .dmrc problem: if something else than &amp;quot;plasma&amp;quot; is specified in&lt;br /&gt;
this file in the home directory of the user, you'll get a &amp;quot;can not load&lt;br /&gt;
session&amp;quot; (or similar) error message. Since lightdm sort of &amp;quot;caches&amp;quot; the&lt;br /&gt;
value of this file in a file of its own, this can be very annoying to&lt;br /&gt;
sort out.&lt;br /&gt;
&lt;br /&gt;
* the .Xauthority problem: can happen if a machine is newly installed&lt;br /&gt;
and the user has worked on that machine before the update, i.e. a wrong&lt;br /&gt;
key is stored in .Xauthority&lt;br /&gt;
&lt;br /&gt;
* akonadi / baloo crap: if enabled, these daemons cause heavy IO load&lt;br /&gt;
and potentially slow down / inhibit login or make the machine barely&lt;br /&gt;
usable while creating the databases&lt;br /&gt;
&lt;br /&gt;
* useless KDE animations: on older or weaker machines, enabling (or not&lt;br /&gt;
disabling) tons of KDE animations can make the machine very slow, or&lt;br /&gt;
might even crash the graphics driver&lt;br /&gt;
&lt;br /&gt;
* reboot necessary: as it turned out in Marias case, the machine needed&lt;br /&gt;
a reboot. It seems that the new KDE is new more touchy w.r.t. a&lt;br /&gt;
necessary reboot. I.e. if KDE components have been updated by the&lt;br /&gt;
nightly cron jobs, the KDE/Ubuntu 16 system services (dbus et al)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
apparantly do not get along very well any more causing these frozen&lt;br /&gt;
logins and a reboot is needed.&lt;br /&gt;
==&amp;gt; if this happens more often, we have to think about whether we can&lt;br /&gt;
continue with the nightly updates, or whether we do them only once a&lt;br /&gt;
week and have reboots afterwards (something like &amp;quot;reboot Monday&amp;quot; or&lt;br /&gt;
similar).&lt;br /&gt;
&lt;br /&gt;
* ''possibly'' some other cron job may interfere with the new KDE causing&lt;br /&gt;
these frozen logins.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Admin]]&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=LDAP&amp;diff=3677</id>
		<title>LDAP</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=LDAP&amp;diff=3677"/>
		<updated>2025-04-14T08:13:07Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Admin]]&lt;br /&gt;
= LDAP =&lt;br /&gt;
The LDAP server at Remeis is running on vela. The service itself is called ''slapd''. A backup LDAP server is running on libra.&lt;br /&gt;
&lt;br /&gt;
Every interaction with the ''slapd'' requires root access.&lt;br /&gt;
&lt;br /&gt;
== Where LDAP is used ==&lt;br /&gt;
LDAP is not only used for the authentication to login into the variety of machines at Remeis. Also a lot of other services/scripts use ldap:&lt;br /&gt;
&lt;br /&gt;
* This wiki&lt;br /&gt;
* The internal webpage&lt;br /&gt;
* [[GitLab]]&lt;br /&gt;
* [[#phpLDAPadmin|phpLDAPadmin]]&lt;br /&gt;
* The &amp;lt;code&amp;gt;who_takes_the_minutes.pl&amp;lt;/code&amp;gt; script of the X-ray group&lt;br /&gt;
* The ''cgnotifier'' for the [[cgroups]]&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Config files ===&lt;br /&gt;
The main LDAP configuration file is &amp;lt;code&amp;gt;/etc/ldap.conf&amp;lt;/code&amp;gt;. Note that this is not the default location for the configuration file. Therefore the defaults for the slapd are changed in &amp;lt;code&amp;gt;/etc/default/slapd&amp;lt;/code&amp;gt;, see the entry &amp;lt;code&amp;gt;SLAPD_CONF&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;/etc/ldap.conf&amp;lt;/code&amp;gt; is also present on all the clients and specifies via IP-Address which LDAP server to contact for authentication. The LDAP requests are then handled on taurus by the ''slapd'' which is configured via &amp;lt;code&amp;gt;/etc/ldap/slapd.conf&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== phpLDAPadmin ===&lt;br /&gt;
phpLDAPadmin is a web interface based on [https://de.wikipedia.org/wiki/PHP PHP] which allows simple modifications to the directory for example to [[:Category:Admin#Add new Users|add new users]] or change group memberships. It is accessible via the [https://www.sternwarte.uni-erlangen.de/intern/phpldapadmin/ internal webpages] and only out of the network at the Remeis observatory.&lt;br /&gt;
&lt;br /&gt;
==== Configuration of phpLADPadmin ====&lt;br /&gt;
The configuration files for phpLDAPadmin are located in &amp;lt;code&amp;gt;/etc/phpldapadmin/&amp;lt;/code&amp;gt; on the webserver, in this case [[cetus]]. The important file is &amp;lt;code&amp;gt;config.php&amp;lt;/code&amp;gt; which holds information about which LDAP servers can be queried, in this case [[taurus]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Starting/Stopping the service ==&lt;br /&gt;
The slapd can be stopped via [https://de.wikipedia.org/wiki/Systemd systemd]:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
systemctl stop slapd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Important:''' If you do so no authentication on the whole cluster is possible anymore. You can not open a new shell on any host until you start the service again!&lt;br /&gt;
&lt;br /&gt;
Starting the ''slapd'':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
systemctl start slapd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You also can have a look at the output produced by the running service via&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
systemctl status slapd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
The [https://en.wikipedia.org/wiki/Berkeley_DB Berkeley DB] containing all the active directory information is located at &amp;lt;code&amp;gt;/var/lib/ldap&amp;lt;/code&amp;gt;. Files in this directory must not be touched manually in any way. The only secure way to see the content of the database is by using ''slapcat''. For example&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
slapcat -f /etc/ldap/slapd.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
will show all entries of the database.&lt;br /&gt;
&lt;br /&gt;
== Backup ==&lt;br /&gt;
Each night the database is dumped to &amp;lt;code&amp;gt;/data/system/backup/ldap/&amp;lt;/code&amp;gt; via a cronjob in &amp;lt;code&amp;gt;/etc/cron.d/ldap_backup&amp;lt;/code&amp;gt;. Also a tarball of the ''slapd'' and &amp;lt;code&amp;gt;ldap.conf&amp;lt;/code&amp;gt; is created there. All backups older than 14 days are deleted.&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Install_and_manage_software&amp;diff=3676</id>
		<title>Install and manage software</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Install_and_manage_software&amp;diff=3676"/>
		<updated>2025-04-14T08:12:11Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''This page does not refer to the installation of packages using the package manager of the operating system'''&lt;br /&gt;
&lt;br /&gt;
The software locally compiled on the cluster is structured within a folder and&lt;br /&gt;
provided by a single mount point containing the compiled software, shell&lt;br /&gt;
scripts which define the installation procedure and the defined module files&lt;br /&gt;
for lmod.&lt;br /&gt;
&lt;br /&gt;
== Structure of the local software ==&lt;br /&gt;
&lt;br /&gt;
Lmod allows three principal levels of hierarchy to separate the software a user&lt;br /&gt;
can access (we will generally use '''module''' for a piece of software, no&lt;br /&gt;
matter if it is a binary, library, script or something else). This hierarchy&lt;br /&gt;
allows to hide modules from the user in case certain requirements are not&lt;br /&gt;
fulfilled.&lt;br /&gt;
&lt;br /&gt;
=== Visible but category separated ===&lt;br /&gt;
&lt;br /&gt;
The most simple hierarchy is by assigning each module to a category. This is&lt;br /&gt;
done by the placing the module in a sub-directory of the software mount point.&lt;br /&gt;
The category can be any string that is allowed as directory name but should&lt;br /&gt;
be concise and meaningful (e.g., Development, Computing, Science, ...).&lt;br /&gt;
This categorization does not give any restrictions on the load-ability of the&lt;br /&gt;
module and any user can see all modules in this categories.&lt;br /&gt;
&lt;br /&gt;
=== Not visible until requirements are met ===&lt;br /&gt;
&lt;br /&gt;
For each module there must be a definition file for lmod written as a lua&lt;br /&gt;
script which defines the access to the module. Lmods principle working&lt;br /&gt;
scheme is to change the user environment on the fly depending on how it is&lt;br /&gt;
defined in the definition file. The definition files are searched in paths&lt;br /&gt;
given by environment variables and in this combination modules can change the&lt;br /&gt;
search path for modules! Using this one can define modules that are only&lt;br /&gt;
visible once certain other modules are loaded. Before that the user has no clue&lt;br /&gt;
that these modules exist.&lt;br /&gt;
&lt;br /&gt;
This sort of hierarchy is very useful when hiding modules that are in a general&lt;br /&gt;
way not usable by the user and a user would be very surprised if he/she could&lt;br /&gt;
see that a certain module exist but can not be used. For the remeis cluster&lt;br /&gt;
we use this hierarchy to separate modules build for different OS systems. In&lt;br /&gt;
this way a user can not accidentally load a module that is defined for OS 1 but&lt;br /&gt;
is logged in on a machine with OS 2. Further, if there are modules only&lt;br /&gt;
available for one OS the user is not confused because the module is in&lt;br /&gt;
principle listed but marked as unusable.&lt;br /&gt;
&lt;br /&gt;
Currently we have no other needs to hide software from the user such that&lt;br /&gt;
there are additional directory's in the software mount with the name of the OS&lt;br /&gt;
they are working on. In these directories there is again the category structure&lt;br /&gt;
as described above.&lt;br /&gt;
&lt;br /&gt;
=== Extensions to a module ===&lt;br /&gt;
&lt;br /&gt;
Similar to the above hierarchy is an '''extension''' a mechanism provided by&lt;br /&gt;
lmod which allows to mark a module as having extension modules. These modules&lt;br /&gt;
are only loadable if the ''base''module (i.e, the one that is to be extended)&lt;br /&gt;
is loaded. This is particularly useful if, for example, a binary depends on&lt;br /&gt;
other locally compiled software and is strongly version bound to that library&lt;br /&gt;
(e.g., isis and heasoft).&lt;br /&gt;
&lt;br /&gt;
The extensions are in general visible but loading them tells the user that the&lt;br /&gt;
modules can only be loaded when other modules are loaded first. This is useful&lt;br /&gt;
for modules a user should have access to but need this level of hierarchy such&lt;br /&gt;
that no user is confronted with a loadable but not working module.&lt;br /&gt;
&lt;br /&gt;
While for the other two hierarchies the modules and module definition files have&lt;br /&gt;
the same structure of organization (if a module is in a category folder, the&lt;br /&gt;
definition file is in a category folder with the same name) the extension&lt;br /&gt;
definition files are in a separate ''category'' in the mount point called&lt;br /&gt;
'''Extensions''' (again containing category directories) while the modules are&lt;br /&gt;
in the category directories in the mount point itself.&lt;br /&gt;
&lt;br /&gt;
(The similar structure for the modules and the definition files is by no means&lt;br /&gt;
necessary but for better maintainability it should be kept whenever possible.)&lt;br /&gt;
&lt;br /&gt;
== Installation of new modules ==&lt;br /&gt;
&lt;br /&gt;
We made the experience that often old software is used/required by certain&lt;br /&gt;
users and re-installing them required tremendous amount of work. To overcome&lt;br /&gt;
this issue the install process for any module should be defined by a bash&lt;br /&gt;
script which performs the installation.&lt;br /&gt;
&lt;br /&gt;
Each module should have its own install script (also for each version a&lt;br /&gt;
separate one). The contents of this script are arbitrary but it should take one&lt;br /&gt;
argument which is either ''install'' or ''uninstall'' and then do the&lt;br /&gt;
appropriate tasks.&lt;br /&gt;
&lt;br /&gt;
A skeleton for such a script is given in the software mount as skel-0.0.0.sh.&lt;br /&gt;
The naming of this file is not arbitrary and allows to check consistency of the&lt;br /&gt;
installed modules, the definition files and the scripts that do the&lt;br /&gt;
installation. The convention for the file naming is given below. The scripts&lt;br /&gt;
handling the installation process together with the definition files (and the&lt;br /&gt;
basic directory structure) are version controlled via git in&lt;br /&gt;
  www.sternwarte.uni-erlangen.de:Admins/remeis-software.git&lt;br /&gt;
to have better documentation.&lt;br /&gt;
&lt;br /&gt;
=== Naming conventions ===&lt;br /&gt;
&lt;br /&gt;
The modules are installed in a directory that is '''only'' the version of the&lt;br /&gt;
module, this directory is place in a directory with '''only''' the module name,&lt;br /&gt;
e.g.,&lt;br /&gt;
  &amp;lt;Category/path&amp;gt;/module-name/version/{bin,lib,...}&lt;br /&gt;
The install script should reside in the module-name/ directory and be named as&lt;br /&gt;
  module-name-version.sh&lt;br /&gt;
or&lt;br /&gt;
  module-name-version+E-extends-version.sh&lt;br /&gt;
The &amp;lt;nowiki&amp;gt;+E-...&amp;lt;/nowiki&amp;gt; part marks that this script installs a module that&lt;br /&gt;
extends the named module with the given version. For examples check the&lt;br /&gt;
structure in the git repository.&lt;br /&gt;
&lt;br /&gt;
Module names should be all lowercase to separate it from the categories (with&lt;br /&gt;
first letter in upper case).&lt;br /&gt;
&lt;br /&gt;
== Writing definition files ==&lt;br /&gt;
&lt;br /&gt;
The general process of writing definition files should not be discussed here as&lt;br /&gt;
the documentation of lmod is very exhaustive (https://lmod.readthedocs.io/en/latest/).&lt;br /&gt;
&lt;br /&gt;
Only as a general remark: Definition files are written in lua and the naming of&lt;br /&gt;
the files must be the modules version (and determines which module is&lt;br /&gt;
loaded when). Additionally, there are convenience functions defined in a file&lt;br /&gt;
called SitePackage.lua which is respected by lmod (see docs). In case&lt;br /&gt;
definition files share more complicated functions it is best to place them in&lt;br /&gt;
there.&lt;br /&gt;
&lt;br /&gt;
== How modules are accessed ==&lt;br /&gt;
&lt;br /&gt;
Lmod is provided by a set of environment variables which have to be defined in&lt;br /&gt;
each users environment. The best way to do this is the global login scripts in&lt;br /&gt;
/etc/.... A script that sets all relevant variables is given is profile.in and&lt;br /&gt;
cshrc.in in the software mount point.&lt;br /&gt;
&lt;br /&gt;
The lua interpreter necessary to use the module files is itself installed in&lt;br /&gt;
the software mount just like any other module and as such a relocation of the&lt;br /&gt;
whole structure should be easy. All module definition files and install scripts&lt;br /&gt;
should respect the variable SOFTWARE which must be set to the mount point.&lt;br /&gt;
&lt;br /&gt;
[[Category:Admin]]&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Grafana&amp;diff=3675</id>
		<title>Grafana</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Grafana&amp;diff=3675"/>
		<updated>2025-04-14T08:11:20Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What is it for =&lt;br /&gt;
Grafana can be used to visualize any kind of data. In this case it is mainly used to visualize monitoring data captured by [[Prometheus]] (and other datasources).&lt;br /&gt;
&lt;br /&gt;
= Access =&lt;br /&gt;
The Grafana server can be accessed via [https://www.sternwarte.uni-erlangen.de/grafana www.sternwarte.uni-erlangen.de/grafana].&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
Grafana has a very intuitive graphical interface running directly in the browser. The different kind of data is organized in so called '''dashboards'''. The active dashboard can be changed using the four squares in the upper right-hand corner. In the upper left-hand corner the time range can be adjusted. For further help please consult the official grafana [http://grafana.com website] .&lt;br /&gt;
&lt;br /&gt;
[[Category:Admin]]&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=DHCP&amp;diff=3674</id>
		<title>DHCP</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=DHCP&amp;diff=3674"/>
		<updated>2025-04-14T08:10:58Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Admin]]&lt;br /&gt;
= DHCP server =&lt;br /&gt;
The main DHCP server at Remeis is running on [[vela]], a secondory one is running on [[libra]].&lt;br /&gt;
&lt;br /&gt;
= Configuration of the DHCP Server =&lt;br /&gt;
[[puppet]] is used to automatically configure the dhcp server for which we chose [https://en.wikipedia.org/wiki/Dnsmasq dnsmasq], thus it also provides the [[DNS]] service.&lt;br /&gt;
If you want to change the configuration of the DHCP server, clone the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet puppet repository], do your changes in the config files and templates there &amp;lt;code&amp;gt;modules/remeis/manifest/dnsmasq.pp&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;modules/remeis/files/dnsmasq/&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;modules/remeis/templates/&amp;lt;/code&amp;gt; respectively.&lt;br /&gt;
When you push, some checking is done on the new configuration and if it is fine puppet will apply it in the defined time interval.&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=CUPS&amp;diff=3673</id>
		<title>CUPS</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=CUPS&amp;diff=3673"/>
		<updated>2025-04-14T08:08:04Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
==== Printing Service CUPS ====&lt;br /&gt;
&lt;br /&gt;
Printing at the observatory is handled by [https://www.cups.org/index.html CUPS].&lt;br /&gt;
CUPS is installed in the virtual box auriga (which lives on taurus) and can be administered through a web interface running on port 631: http://auriga:631/ (accessible only from within the institute).&lt;br /&gt;
&lt;br /&gt;
Through this web interface, printers can be added or modified, queues can be stopped, jobs canceled, and other other maintenance jobs can be performed. To perform such tasks, CUPS requires you to login: use '''ubuntuadmin''' and the corresponding password.&lt;br /&gt;
&lt;br /&gt;
When addong new printers, do forget to enable '''sharing''' to make the printer visible in the entire cluster.&lt;br /&gt;
&lt;br /&gt;
Check out the [https://www.cups.org/documentation.html CUPS documentation] how to work with CUPS.&lt;br /&gt;
&lt;br /&gt;
=== Trouble shooting ===&lt;br /&gt;
&lt;br /&gt;
If a printer is not responding/not accessible: &lt;br /&gt;
* make sure that the printer is online (also check the network cable!), working properly, and not just busy. &lt;br /&gt;
* check the web interface of that printer, try to print a test page from the web interface.&lt;br /&gt;
* check the web interface for jobs in that queue. Remove failed jobs.&lt;br /&gt;
&lt;br /&gt;
If no printers are availble (or just a generic printer), CUPS is probably down:&lt;br /&gt;
* login to auriga as ubuntuadmin&lt;br /&gt;
* restart the CUPS service:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo systemctl restart cups&lt;br /&gt;
sudo systemctl restart cups&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* sometimes it might be necessary to reboot the entire virtual box (CUPS will automatically be started after the reboot):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo shutdown -r now&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List of Printers on the Cluster ===&lt;br /&gt;
&lt;br /&gt;
[[Category:Admin]]&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Overflow_Filesystem&amp;diff=3672</id>
		<title>Overflow Filesystem</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Overflow_Filesystem&amp;diff=3672"/>
		<updated>2025-04-14T08:06:16Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''This page is obsolete as of Ubuntu 16.04'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== overflow file system ====&lt;br /&gt;
If the root file system is 100% full for some time, but the kernel or other system related jobs urgently need some space on the root file system, e.g., to create temp files in /tmp, the kernel creates a small '''overflow''' file system which is then mounted on /tmp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Filesystem      Size  Used Avail Use% Mounted on&lt;br /&gt;
overflow        1.0M   20K 1004K   2% /tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
which resides in memory. Usually these overflow file systems are really tiny (1MB) - just large enough for urgent needs of the system.&lt;br /&gt;
&lt;br /&gt;
First of all you need to make space on the actual root file system, see the article on the [[Unmet Dependencies#completely_full_root_partition|completely full root file system]].&lt;br /&gt;
&lt;br /&gt;
Once you have freed enough space on the root file system, this overflow file system is no longer needed. However, since it usually contains several files in use by the system you can '''not''' simply unmount the file system. Instead of trying to figure out which files are open and trying to close them, it is in general much more straightforward to simple reboot the machine, once you have made sure that no important jobs are running on the machine:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
shutdown -r now&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Admin]]&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3670</id>
		<title>Meggie Cluster</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3670"/>
		<updated>2025-04-09T13:10:12Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
&lt;br /&gt;
The meggies are diskless nodes inherited from the RRZE used from computing only. We would like to boot them from the network. NFS and iSCSI are two options to accomplish this. Since iSCSI is directly supported by the UEFI of the nodes this is the option which is by far the easiest to implement.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
&lt;br /&gt;
=== OS setup ===&lt;br /&gt;
* &amp;lt;s&amp;gt;Make the installer recognize the iSCSI LUN as a block device before searching for those&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;Supply LUN information directly to the UEFI via DHCP&amp;lt;/s&amp;gt;&lt;br /&gt;
* Test what happens on iSCSI connection problems&lt;br /&gt;
** Switch malfunction&lt;br /&gt;
** iSCSI server reboot&lt;br /&gt;
* Make a list of UEFI settings&lt;br /&gt;
* Prepare LUNs&lt;br /&gt;
** Use ZFS zvols as storage backend&lt;br /&gt;
** Find out which backend type is the best (file, block, SCSI passthrough)&lt;br /&gt;
** Create a separate dataset for easier zfs setting propagation&lt;br /&gt;
** Leave a README file in the dataset directory for other people to know that it shouldn't be deleted&lt;br /&gt;
** Optimize dataset settings for iSCSI targets&lt;br /&gt;
*** Compression lz4&lt;br /&gt;
*** Larger &amp;lt;code&amp;gt;recordsize&amp;lt;/code&amp;gt; (1M or something)&lt;br /&gt;
** Name the zvols &amp;lt;code&amp;gt;zvol-MM-m&amp;lt;/code&amp;gt; where MM is the chassis number from 01 to 20 and m the node number from 1 to 4&lt;br /&gt;
* Remove the stupid /swap.img file. This is a general point affecting all computers&lt;br /&gt;
* Adjust puppet&lt;br /&gt;
** &amp;lt;s&amp;gt;Make no scratch available&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Make /tmp and friends a tmpfs&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Restrict sizes of all tmpfs&amp;lt;/s&amp;gt;&lt;br /&gt;
** Remove unnecessary user stuff? (e.g. x2go, firefox, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Hardware setup ===&lt;br /&gt;
* Install nodes in a rack&lt;br /&gt;
* Buy and set up up switches&lt;br /&gt;
* Lots of cabling&lt;br /&gt;
* Power requirements?&lt;br /&gt;
** Ca. 250W per node, 1kW per chassis&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Boot Process ==&lt;br /&gt;
&lt;br /&gt;
=== General layout ===&lt;br /&gt;
The boot process works like this:&lt;br /&gt;
# UEFI stage&lt;br /&gt;
## The UEFI starts up&lt;br /&gt;
## Establishes a connection to the network&lt;br /&gt;
## Runs a DHCP client&lt;br /&gt;
## Gets an IP as well as the iSCSI LUN information directly from our DHCP server&lt;br /&gt;
## Accesses the GPT on the LUN and loads grub&lt;br /&gt;
# grub stage&lt;br /&gt;
## Grub starts&lt;br /&gt;
## Loads the kernel and initrd from the LUN&lt;br /&gt;
## Jumbs into the kernel&lt;br /&gt;
# ramdisk stage&lt;br /&gt;
## The kernel runs&lt;br /&gt;
## Mounts the initrd&lt;br /&gt;
## Inside the initrd our custom iSCSI hook is called&lt;br /&gt;
### Loads the iSCSI kernel module&lt;br /&gt;
### Loads the iSCSI iBFT kernel module&lt;br /&gt;
### Runs &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; which makes the iSCSI LUN available as a block device&lt;br /&gt;
# Normal boot continues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Further explanations ===&lt;br /&gt;
==== UEFI DHCP ====&lt;br /&gt;
The UEFI can talk to the DHCP server and get an IP. We use DHCP option 17 (root-path) to supply the iSCSI information to the nodes.&lt;br /&gt;
&lt;br /&gt;
==== grub ====&lt;br /&gt;
As of now we don't know why grub even works. It's installed on the efi partition on the LUN, just like a normal computer. The UEFI uses the information on this EFI partition to find grub and run it, and grub then sees the partitions of the installed OS. Either the UEFI somehow emulates a blockdevice for grub such that it can see these partitions and load the kernel and initrd, or grub somehow also does iSCSI by using the iBFT. Anyway, it loads the kernel and initrd, which is the most important part.&lt;br /&gt;
&lt;br /&gt;
==== iBFT ====&lt;br /&gt;
This is really cool. When the UEFI launches and gets iSCSI information from the DHCP server it puts this information into the EFI system table, the Boot Firmware Table (iBFT). Linux can use this information to connect to the same LUN used for the boot process and set up the block device before trying to mount the root partition. The necessary kernel module is called &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt;. After the module is loaded its only a matter of calling the &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; program to set up the block device. All this needs to happen before root is mounted, therefore modifications to the initrd are necessary.&lt;br /&gt;
&lt;br /&gt;
==== initrd modifications ====&lt;br /&gt;
During the boot, when the kernel is running and mounted the initrd, the &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;iscsi_tcp&amp;lt;/code&amp;gt; modules need to be loaded, after which the block device can be created. To do this a hook needs to be installed in the initramfs. On ubuntu this can be done by putting files into the &amp;lt;code&amp;gt;/etc/initramfs-tools/scripts&amp;lt;/code&amp;gt; directory (or rather subdirectories). The hook for the iSCSI setup need to happen after the network is available, which means the hook needs to be put in the &amp;lt;code&amp;gt;local-top&amp;lt;/code&amp;gt; directory and made executable. The content is:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# iSCSI init script&lt;br /&gt;
PREREQ=&amp;quot;&amp;quot;&lt;br /&gt;
prereqs()&lt;br /&gt;
{&lt;br /&gt;
     echo &amp;quot;$PREREQ&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
prereqs)&lt;br /&gt;
     prereqs&lt;br /&gt;
     exit 0&lt;br /&gt;
     ;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
. /scripts/functions&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Begin iSCSI init&amp;quot;&lt;br /&gt;
&lt;br /&gt;
modprobe iscsi_tcp&lt;br /&gt;
modprobe iscsi_ibft&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Network configuration based on iBFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
iscsistart -N || panic &amp;quot;Could not initialize iSCSI&amp;quot;&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Waiting to finish iscsistart&amp;quot;&lt;br /&gt;
until iscsistart -b ; do&lt;br /&gt;
    sleep 1&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Of course the script needs to be made executable. After that the initial ramdisk(s) need to be regenerated by calling &amp;lt;code&amp;gt;update-initramfs -u&amp;lt;/code&amp;gt;. When the script is called during the boot process the block device exists for the kernel to mount the root filesystem and continue the boot process as normal.&lt;br /&gt;
&lt;br /&gt;
=== Installing ===&lt;br /&gt;
Unfortunately we can't completely rely on the normal installation process because Ubuntu by default doesn't use the iBFT to set up an iSCSI LUN before the installer searches for block devices to install on. We could get around this by simply switching to a TTY, running &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; and relaunching the installer, which then identified the block device and proceeded as normal. Since this entire stuff runs off LUNs on the network we can potentially completely get around the installation by just preparing enough LUNS with the appropriate data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== iSCSI targets ===&lt;br /&gt;
We need to put the iSCSI Luns somewhere. We have 80 computers. The root filesystem size for each node will be around 40GB. In total around 3TB of data will be used for these LUNs, minus compression by ZFS. The new virgo is maybe a good choice for that, but it's still in testing mode. This needs to be clarified.&lt;br /&gt;
&lt;br /&gt;
== UEFI settings ==&lt;br /&gt;
Settings applied after resetting the UEFI to default settings:&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3669</id>
		<title>Meggie Cluster</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3669"/>
		<updated>2025-04-07T16:50:47Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
&lt;br /&gt;
The meggies are diskless nodes inherited from the RRZE used from computing only. We would like to boot them from the network. NFS and iSCSI are two options to accomplish this. Since iSCSI is directly supported by the UEFI of the nodes this is the option which is by far the easiest to implement.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
&lt;br /&gt;
=== OS setup ===&lt;br /&gt;
* &amp;lt;s&amp;gt;Make the installer recognize the iSCSI LUN as a block device before searching for those&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;Supply LUN information directly to the UEFI via DHCP&amp;lt;/s&amp;gt;&lt;br /&gt;
* Test what happens on iSCSI connection problems&lt;br /&gt;
** Switch malfunction&lt;br /&gt;
** iSCSI server reboot&lt;br /&gt;
* Make a list of UEFI settings&lt;br /&gt;
* Prepare LUNs&lt;br /&gt;
** Use ZFS zvols as storage backend&lt;br /&gt;
** Create a separate dataset for easier zfs setting propagation&lt;br /&gt;
** Leave a README file in the dataset directory for other people to know that it shouldn't be deleted&lt;br /&gt;
** Optimize dataset settings for iSCSI targets&lt;br /&gt;
*** Compression lz4&lt;br /&gt;
*** Larger &amp;lt;code&amp;gt;recordsize&amp;lt;/code&amp;gt; (1M or something)&lt;br /&gt;
** Name the zvols &amp;lt;code&amp;gt;zvol-MM-m&amp;lt;/code&amp;gt; where MM is the chassis number from 01 to 20 and m the node number from 1 to 4&lt;br /&gt;
* Remove the stupid /swap.img file. This is a general point affecting all computers&lt;br /&gt;
* Adjust puppet&lt;br /&gt;
** &amp;lt;s&amp;gt;Make no scratch available&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Make /tmp and friends a tmpfs&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Restrict sizes of all tmpfs&amp;lt;/s&amp;gt;&lt;br /&gt;
** Remove unnecessary user stuff? (e.g. x2go, firefox, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Hardware setup ===&lt;br /&gt;
* Install nodes in a rack&lt;br /&gt;
* Buy and set up up switches&lt;br /&gt;
* Lots of cabling&lt;br /&gt;
* Power requirements?&lt;br /&gt;
** Ca. 250W per node, 1kW per chassis&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Boot Process ==&lt;br /&gt;
&lt;br /&gt;
=== General layout ===&lt;br /&gt;
The boot process works like this:&lt;br /&gt;
# UEFI stage&lt;br /&gt;
## The UEFI starts up&lt;br /&gt;
## Establishes a connection to the network&lt;br /&gt;
## Runs a DHCP client&lt;br /&gt;
## Gets an IP as well as the iSCSI LUN information directly from our DHCP server&lt;br /&gt;
## Accesses the GPT on the LUN and loads grub&lt;br /&gt;
# grub stage&lt;br /&gt;
## Grub starts&lt;br /&gt;
## Loads the kernel and initrd from the LUN&lt;br /&gt;
## Jumbs into the kernel&lt;br /&gt;
# ramdisk stage&lt;br /&gt;
## The kernel runs&lt;br /&gt;
## Mounts the initrd&lt;br /&gt;
## Inside the initrd our custom iSCSI hook is called&lt;br /&gt;
### Loads the iSCSI kernel module&lt;br /&gt;
### Loads the iSCSI iBFT kernel module&lt;br /&gt;
### Runs &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; which makes the iSCSI LUN available as a block device&lt;br /&gt;
# Normal boot continues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Further explanations ===&lt;br /&gt;
==== UEFI DHCP ====&lt;br /&gt;
The UEFI can talk to the DHCP server and get an IP. We use DHCP option 17 (root-path) to supply the iSCSI information to the nodes.&lt;br /&gt;
&lt;br /&gt;
==== grub ====&lt;br /&gt;
As of now we don't know why grub even works. It's installed on the efi partition on the LUN, just like a normal computer. The UEFI uses the information on this EFI partition to find grub and run it, and grub then sees the partitions of the installed OS. Either the UEFI somehow emulates a blockdevice for grub such that it can see these partitions and load the kernel and initrd, or grub somehow also does iSCSI by using the iBFT. Anyway, it loads the kernel and initrd, which is the most important part.&lt;br /&gt;
&lt;br /&gt;
==== iBFT ====&lt;br /&gt;
This is really cool. When the UEFI launches and gets iSCSI information from the DHCP server it puts this information into the EFI system table, the Boot Firmware Table (iBFT). Linux can use this information to connect to the same LUN used for the boot process and set up the block device before trying to mount the root partition. The necessary kernel module is called &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt;. After the module is loaded its only a matter of calling the &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; program to set up the block device. All this needs to happen before root is mounted, therefore modifications to the initrd are necessary.&lt;br /&gt;
&lt;br /&gt;
==== initrd modifications ====&lt;br /&gt;
During the boot, when the kernel is running and mounted the initrd, the &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;iscsi_tcp&amp;lt;/code&amp;gt; modules need to be loaded, after which the block device can be created. To do this a hook needs to be installed in the initramfs. On ubuntu this can be done by putting files into the &amp;lt;code&amp;gt;/etc/initramfs-tools/scripts&amp;lt;/code&amp;gt; directory (or rather subdirectories). The hook for the iSCSI setup need to happen after the network is available, which means the hook needs to be put in the &amp;lt;code&amp;gt;local-top&amp;lt;/code&amp;gt; directory and made executable. The content is:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# iSCSI init script&lt;br /&gt;
PREREQ=&amp;quot;&amp;quot;&lt;br /&gt;
prereqs()&lt;br /&gt;
{&lt;br /&gt;
     echo &amp;quot;$PREREQ&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
prereqs)&lt;br /&gt;
     prereqs&lt;br /&gt;
     exit 0&lt;br /&gt;
     ;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
. /scripts/functions&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Begin iSCSI init&amp;quot;&lt;br /&gt;
&lt;br /&gt;
modprobe iscsi_tcp&lt;br /&gt;
modprobe iscsi_ibft&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Network configuration based on iBFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
iscsistart -N || panic &amp;quot;Could not initialize iSCSI&amp;quot;&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Waiting to finish iscsistart&amp;quot;&lt;br /&gt;
until iscsistart -b ; do&lt;br /&gt;
    sleep 1&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Of course the script needs to be made executable. After that the initial ramdisk(s) need to be regenerated by calling &amp;lt;code&amp;gt;update-initramfs -u&amp;lt;/code&amp;gt;. When the script is called during the boot process the block device exists for the kernel to mount the root filesystem and continue the boot process as normal.&lt;br /&gt;
&lt;br /&gt;
=== Installing ===&lt;br /&gt;
Unfortunately we can't completely rely on the normal installation process because Ubuntu by default doesn't use the iBFT to set up an iSCSI LUN before the installer searches for block devices to install on. We could get around this by simply switching to a TTY, running &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; and relaunching the installer, which then identified the block device and proceeded as normal. Since this entire stuff runs off LUNs on the network we can potentially completely get around the installation by just preparing enough LUNS with the appropriate data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== iSCSI targets ===&lt;br /&gt;
We need to put the iSCSI Luns somewhere. We have 80 computers. The root filesystem size for each node will be around 40GB. In total around 3TB of data will be used for these LUNs, minus compression by ZFS. The new virgo is maybe a good choice for that, but it's still in testing mode. This needs to be clarified.&lt;br /&gt;
&lt;br /&gt;
== UEFI settings ==&lt;br /&gt;
Settings applied after resetting the UEFI to default settings:&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3668</id>
		<title>Meggie Cluster</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3668"/>
		<updated>2025-04-07T13:42:03Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
&lt;br /&gt;
The meggies are diskless nodes inherited from the RRZE used from computing only. We would like to boot them from the network. NFS and iSCSI are two options to accomplish this. Since iSCSI is directly supported by the UEFI of the nodes this is the option which is by far the easiest to implement.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
&lt;br /&gt;
=== OS setup ===&lt;br /&gt;
* &amp;lt;s&amp;gt;Make the installer recognize the iSCSI LUN as a block device before searching for those&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;Supply LUN information directly to the UEFI via DHCP&amp;lt;/s&amp;gt;&lt;br /&gt;
* Test what happens on iSCSI connection problems&lt;br /&gt;
** Switch malfunction&lt;br /&gt;
** iSCSI server reboot&lt;br /&gt;
* Make a list of UEFI settings&lt;br /&gt;
* Prepare LUNs&lt;br /&gt;
** Use ZFS zvols as storage backend&lt;br /&gt;
** Create a separate dataset for easier zfs setting propagation&lt;br /&gt;
** Leave a README file in the dataset directory for other people to know that it shouldn't be deleted&lt;br /&gt;
** Optimize dataset settings for iSCSI targets&lt;br /&gt;
*** Compression lz4&lt;br /&gt;
*** Larger &amp;lt;code&amp;gt;recordsize&amp;lt;/code&amp;gt; (1M or something)&lt;br /&gt;
** Name the zvols &amp;lt;code&amp;gt;zvol-MM-m&amp;lt;/code&amp;gt; where MM is the chassis number from 01 to 20 and m the node number from 1 to 4&lt;br /&gt;
* Remove the stupid /swap.img file. This is a general point affecting all computers&lt;br /&gt;
* Adjust puppet&lt;br /&gt;
** &amp;lt;s&amp;gt;Make no scratch available&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Make /tmp and friends a tmpfs&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Restrict sizes of all tmpfs&amp;lt;/s&amp;gt;&lt;br /&gt;
** Remove unnecessary user stuff? (e.g. x2go, firefox, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Hardware setup ===&lt;br /&gt;
* Install nodes in a rack&lt;br /&gt;
* Buy and set up up switches&lt;br /&gt;
* Lots of cabling&lt;br /&gt;
* Power requirements?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Boot Process ==&lt;br /&gt;
&lt;br /&gt;
=== General layout ===&lt;br /&gt;
The boot process works like this:&lt;br /&gt;
# UEFI stage&lt;br /&gt;
## The UEFI starts up&lt;br /&gt;
## Establishes a connection to the network&lt;br /&gt;
## Runs a DHCP client&lt;br /&gt;
## Gets an IP as well as the iSCSI LUN information directly from our DHCP server&lt;br /&gt;
## Accesses the GPT on the LUN and loads grub&lt;br /&gt;
# grub stage&lt;br /&gt;
## Grub starts&lt;br /&gt;
## Loads the kernel and initrd from the LUN&lt;br /&gt;
## Jumbs into the kernel&lt;br /&gt;
# ramdisk stage&lt;br /&gt;
## The kernel runs&lt;br /&gt;
## Mounts the initrd&lt;br /&gt;
## Inside the initrd our custom iSCSI hook is called&lt;br /&gt;
### Loads the iSCSI kernel module&lt;br /&gt;
### Loads the iSCSI iBFT kernel module&lt;br /&gt;
### Runs &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; which makes the iSCSI LUN available as a block device&lt;br /&gt;
# Normal boot continues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Further explanations ===&lt;br /&gt;
==== UEFI DHCP ====&lt;br /&gt;
The UEFI can talk to the DHCP server and get an IP. We use DHCP option 17 (root-path) to supply the iSCSI information to the nodes.&lt;br /&gt;
&lt;br /&gt;
==== grub ====&lt;br /&gt;
As of now we don't know why grub even works. It's installed on the efi partition on the LUN, just like a normal computer. The UEFI uses the information on this EFI partition to find grub and run it, and grub then sees the partitions of the installed OS. Either the UEFI somehow emulates a blockdevice for grub such that it can see these partitions and load the kernel and initrd, or grub somehow also does iSCSI by using the iBFT. Anyway, it loads the kernel and initrd, which is the most important part.&lt;br /&gt;
&lt;br /&gt;
==== iBFT ====&lt;br /&gt;
This is really cool. When the UEFI launches and gets iSCSI information from the DHCP server it puts this information into the EFI system table, the Boot Firmware Table (iBFT). Linux can use this information to connect to the same LUN used for the boot process and set up the block device before trying to mount the root partition. The necessary kernel module is called &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt;. After the module is loaded its only a matter of calling the &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; program to set up the block device. All this needs to happen before root is mounted, therefore modifications to the initrd are necessary.&lt;br /&gt;
&lt;br /&gt;
==== initrd modifications ====&lt;br /&gt;
During the boot, when the kernel is running and mounted the initrd, the &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;iscsi_tcp&amp;lt;/code&amp;gt; modules need to be loaded, after which the block device can be created. To do this a hook needs to be installed in the initramfs. On ubuntu this can be done by putting files into the &amp;lt;code&amp;gt;/etc/initramfs-tools/scripts&amp;lt;/code&amp;gt; directory (or rather subdirectories). The hook for the iSCSI setup need to happen after the network is available, which means the hook needs to be put in the &amp;lt;code&amp;gt;local-top&amp;lt;/code&amp;gt; directory and made executable. The content is:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# iSCSI init script&lt;br /&gt;
PREREQ=&amp;quot;&amp;quot;&lt;br /&gt;
prereqs()&lt;br /&gt;
{&lt;br /&gt;
     echo &amp;quot;$PREREQ&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
prereqs)&lt;br /&gt;
     prereqs&lt;br /&gt;
     exit 0&lt;br /&gt;
     ;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
. /scripts/functions&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Begin iSCSI init&amp;quot;&lt;br /&gt;
&lt;br /&gt;
modprobe iscsi_tcp&lt;br /&gt;
modprobe iscsi_ibft&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Network configuration based on iBFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
iscsistart -N || panic &amp;quot;Could not initialize iSCSI&amp;quot;&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Waiting to finish iscsistart&amp;quot;&lt;br /&gt;
until iscsistart -b ; do&lt;br /&gt;
    sleep 1&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Of course the script needs to be made executable. After that the initial ramdisk(s) need to be regenerated by calling &amp;lt;code&amp;gt;update-initramfs -u&amp;lt;/code&amp;gt;. When the script is called during the boot process the block device exists for the kernel to mount the root filesystem and continue the boot process as normal.&lt;br /&gt;
&lt;br /&gt;
=== Installing ===&lt;br /&gt;
Unfortunately we can't completely rely on the normal installation process because Ubuntu by default doesn't use the iBFT to set up an iSCSI LUN before the installer searches for block devices to install on. We could get around this by simply switching to a TTY, running &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; and relaunching the installer, which then identified the block device and proceeded as normal. Since this entire stuff runs off LUNs on the network we can potentially completely get around the installation by just preparing enough LUNS with the appropriate data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== iSCSI targets ===&lt;br /&gt;
We need to put the iSCSI Luns somewhere. We have 80 computers. The root filesystem size for each node will be around 40GB. In total around 3TB of data will be used for these LUNs, minus compression by ZFS. The new virgo is maybe a good choice for that, but it's still in testing mode. This needs to be clarified.&lt;br /&gt;
&lt;br /&gt;
== UEFI settings ==&lt;br /&gt;
Settings applied after resetting the UEFI to default settings:&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3667</id>
		<title>New Network</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3667"/>
		<updated>2025-04-06T15:47:48Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
We're creating our own network inside a DMZ.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
* Check whether the router is set to switch on after power failure in the BIOS&lt;br /&gt;
* Enable RSTP on all switches and set a high spanning tree priority on the root bridge&lt;br /&gt;
* Check whether/how we can use only one domain, instead of two (internal.sternwarte ...)&lt;br /&gt;
* When all hosts are in the private network&lt;br /&gt;
** Adjust router settings&lt;br /&gt;
*** Block private and bogon networks on WAN interface&lt;br /&gt;
*** Remove routes between public and private network&lt;br /&gt;
*** Disable gui login from public network&lt;br /&gt;
*** Disable DHC relay&lt;br /&gt;
** Adjust DHCP settings&lt;br /&gt;
*** Make the private network the default one (remove internal tags from config)&lt;br /&gt;
*** Remove classless static route from public to private network&lt;br /&gt;
&lt;br /&gt;
== Subnets ==&lt;br /&gt;
=== Public ===&lt;br /&gt;
The public subnet is a part of the internet as organized through the [https://de.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority IANA]. &amp;quot;Our&amp;quot; subnet is &amp;lt;code&amp;gt;131.188.151.0/24&amp;lt;/code&amp;gt;. At least one of the IPs in this subnet is used by the RRZE to provide a gateway. It's a [https://www.cisco.com/site/de/de/index.html Cisco] router in the basement with the IP &amp;lt;code&amp;gt;131.188.151.1&amp;lt;/code&amp;gt; and FQDN &amp;lt;code&amp;gt;astro.gate.uni-erlangen.de&amp;lt;/code&amp;gt;. We need to use this gateway to access the WAN.&lt;br /&gt;
&lt;br /&gt;
=== Private ===&lt;br /&gt;
We need to use a private network as defined in [https://www.rfc-editor.org/rfc/rfc1918.html RFC1918] for our own subnet. Because it's easy to remember and short to write we pick the class A network from RFC1918 which is &amp;lt;code&amp;gt;10.0.0.0/8&amp;lt;/code&amp;gt;. We can allocate a &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; network from this block. Since it sounds nice we can choose the second octet to also be 10. This gives us more than 65000 IP addresses to work with in &amp;lt;code&amp;gt;10.10.0.0/16&amp;lt;/code&amp;gt;. Because it makes sense we use the first address for our own gateway: &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Address blocks ====&lt;br /&gt;
Using the &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; doesn't only provide more than enough addresses, probably forever, it also enables the grouping into blocks of addresses which denote different classes of devices. This makes it easier to identify the devices and find their IP address. Note that these are not separate subnets, it's only nomenclature. These blocks are used in the DHCP server of [https://thekelleys.org.uk/dnsmasq/doc.html dnsmasq] and defined in the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet/-/blob/master/modules/remeis/files/dnsmasq/internal-dhcp.conf internal-dhcp.conf] file of the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet puppet] gitlab repository.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Address blocks&lt;br /&gt;
|-&lt;br /&gt;
! Block !! Device class&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.1.*   || Switches&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.2.*   || Management interfaces (iLO, iDRAC, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.10.*  || Servers&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.20.*  || VMs&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.30.*  || Meggie cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.40.*  || Blade center&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.50.*  || Messier cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.90.*  || Functional hosts (Raspbbery Pis, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.100.* || Office computers main building&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.200.* || Testing (Installation testing, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.250.* || Private notebooks&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Router ==&lt;br /&gt;
&lt;br /&gt;
The uplink to the WAN is realized with a server (Dell Poweredge 1950) which runs [https://opnsense.org OPNSense], a FreeBSD based routing and firewall distribution which is very easy to set up and highly reliable. The server has two 1G interfaces. One is connected to the public network managed by the RRZE (WAN) and has a public IP, the other one is connected to our own switches and has a private ip (LAN). Both interfaces are labelled in the back of the server. The router routes traffic between these two networks to make our computers talk to each other.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
The router can be configure through the web gui. It's accessible directly over the ''internal'' IP address, but the port is changed to 8443: https://10.10.0.1:8443. The user for the login is &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and the password is the same as the LDAP admin passwort (as of writing). A lot of information is provided in the [https://docs.opnsense.org/ OPNSense documentation]. One of the interfaces has a public IP, at the time of writing the public IP is &amp;lt;code&amp;gt;131.188.151.92&amp;lt;/code&amp;gt;. The other interface has the private used as the gateway, &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;. Its public IP might be changed depending on how we proceed with mechansim for remote access. SSH is is disabled, but the port is changed to 12345.&lt;br /&gt;
&lt;br /&gt;
==== Gateway ====&lt;br /&gt;
The router uses the RRZE gateway as its own upstream gateway. By default the firmware always sends packets destined to the WAN network to this gateway. At the time of writing this is problematic because the upstream gateway drops packets arriving from a private network (according to RFC1918) which makes it impossible for hosts in our private network to directly communicate with hosts in our public network. This option is therefore disabled in the configuration of the router. See the &amp;quot;Disable force gateway&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
==== Private and bogon networks ====&lt;br /&gt;
According to RFC1918 packets with source or destination IP addresses in private networks must not be routed through the internet. It often happens that such packets are generated and end up at edge routers (keep the private notebooks connected to our network in mind). Therefore such routers usually drop these packets on purpose. At the time of writing we actually want to route such packets from our private to our public network and vice versa. Therefore the option to drop packets from or to private networks is disabled on both interfaces. When we have all our hosts behind the router we should re enable this option for the WAN interface to avoid trouble with the RRZE. On the LAN interface this option should obviously stay disabled.&lt;br /&gt;
&lt;br /&gt;
There are addresses in the public IPv4 space which are not assigned to anything or do not make sense. These are called [https://de.wikipedia.org/wiki/Bogon &amp;quot;Bogon&amp;quot; networks]. The router is configured to drop these packets if they arrive on the WAN interface.&lt;br /&gt;
&lt;br /&gt;
==== NAT ====&lt;br /&gt;
Hosts within the private network can not directly talk to the internet (see the previous section), they need an intermidiary to do this. This is accomplished by using [https://en.wikipedia.org/wiki/Network_address_translation Network address translation (NAT)]. When a client wants to talk to the internet (except our own public network, see the following section), the router replaces the source address of the packet with its own public address and sends it of to the WAN. From the WAN it looks as if the router is making requests, instead of the client. When the reply arrives on the WAN interface the router changes the destination address of the packet from its own public address to the private address of the client and sends if off into the LAN.&lt;br /&gt;
&lt;br /&gt;
We need this mechanism for all clients behind the router to talk to the internet, except our own public network. This option is available as outbound NAT in the routers firmware and enabled by default.&lt;br /&gt;
&lt;br /&gt;
There is an important exception: Traffic from our private network which has a destination in our own public network should be routed directly, without any NAT, such that these two computers can talk directly to each other. Therefore there is a rule in the outbound NAT section which identifies such traffic and disables NAT for it. It can then be routed normally (see the following section). Note that this should be disabled as soon as all our computers are in the private network and can talk to each other directly.&lt;br /&gt;
&lt;br /&gt;
==== Routing between public and private network ====&lt;br /&gt;
At the time of writing our computers are distributed in a private and a public network. Both need to be reachable by each other. Therefore the router allows traffic to pass between these exact two networks without any restrictions. The rules for this can be found in the LAN and WAN sections of the firewall rules of the router. Especially the rule allowing any traffic originating from the public network to pass directly into the private network should be disabled as soon as all computers are in the private network.&lt;br /&gt;
&lt;br /&gt;
==== DHCP relay ====&lt;br /&gt;
At the time of writing we have DHCP (and DNS etc.) servers in the public network. Replicating these services behind the router can be avoided by allowing the router to forward DHCP requests from the private to the public network. This is done in the DHC relay section in the Services menu. With this service and the working routing and NAT there is no need to replicate these services in the private network for now. Everything seems to work, including PXE boot to install clients within the private network. As soon as all computers are in the private network the DHC relay should be disabled.&lt;br /&gt;
&lt;br /&gt;
==== Backup ====&lt;br /&gt;
The configuration can be backed up simply by downloading it in the GUI. It's recommended to do this once in a while just in case the router dies. This configuration can then be very easily applied after a new installation.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
Updates of the route can simply be done through the GUI. For security reasons this is recommended on a regular basis, but since we have the firewall of the RRZE in front of it it's probably not critical. Often the updates ca be done even without restarting the firmware.&lt;br /&gt;
&lt;br /&gt;
== Layer 2 ==&lt;br /&gt;
With the router working we can use our own ethernet switches behind it without interfering with the RRZE switches.&lt;br /&gt;
&lt;br /&gt;
=== MDI ===&lt;br /&gt;
Ethernet on RJ45 ports consists of a pair of transmitting and receiving wires on both ends. Obviously the receiving pair on one end must be attached to the transmitting pair on the other end. In the old days it was important to consider this property when connecting devices via RJ45 twisted pairs, and in the appropriate case a [https://en.wikipedia.org/wiki/Ethernet_crossover_cable crossover cable] needed to be used. Nowadays ethernet iterfaces can automatically make sure to select the correct twisted pairs to transmit and receive data. This mechanism is called [https://en.wikipedia.org/wiki/Medium-dependent_interface#Automatic_MDI-X automatic MDI-X (automdix)]. It should be enabled on all ports of all switches, and probably is so by default.&lt;br /&gt;
&lt;br /&gt;
=== VLAN ===&lt;br /&gt;
[https://en.wikipedia.org/wiki/VLAN Local Area Networks (VLAN)] are logical layer 2 networks which can spread across multiple switches. They can be used to separate different broadcast domains (ethernet networks) and usually only contain a single IP subnet. Under certain scenarios VLANs can offer performance, flexibility and security advantages. We don't want to segment our network, therefore performance and flexibility enhancements are not possible. Security is also of no concern. We therefore do not use VLANs.&lt;br /&gt;
&lt;br /&gt;
However, from a technical perspective this is impossible with layer 3 switches. By default all interfaces of a switch are assigned to the so called default VLAN. For most switch manufacturers this is VLAN 1, but it doesn't have to be. Most manufacturers also use VLAN 1 as the native VLAN. This means that all frames in VLAN 1 are sent untagged (without VLAN information) also to other switches, even over tagged ports (trunk ports). This ensures interoperability without changing settings.&lt;br /&gt;
&lt;br /&gt;
We are good as long as all switches we buy have default VLAN 1 (which can not be changed) and native VLAN 1 (which can be changed). In case we get a switch which does not have the default VLAN 1 we need to set the native VLAN of this switch also to the same VLAN, making all frames in this VLAN untagged, enabling communication with other switches.&lt;br /&gt;
&lt;br /&gt;
=== Spanning tree ===&lt;br /&gt;
We know for a fact that sometimes people plug ethernet cables into random ports, even both ends of it, causing potential loops (see mail on 22 August 2023). To avoid such loops the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol spanning tree protocol (STP)] defined in [https://en.wikipedia.org/wiki/IEEE_802.1D IEEE 802.1d]. When this protocol is enabled on a switch it exchanges [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Bridge_protocol_data_units bridge protocol data units (BPDUs)] with its neighbouring switches, containing some information about the network topology. This information is used to elect the so called [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Root_bridge_and_the_bridge_ID root bridge]. This switch can be thought of as the top of the spanning tree. All other switches then determine one port they use as a path towards this root bridge, even if it goes through another switch. All other ports which also provide a path towards the root bridge are disabled (set to the blocking [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Port_states state]). The election of the root bridge also enters an individual priority for each switch which can be set by the administrator. We should make sure to set a high priority on our central switch.&lt;br /&gt;
&lt;br /&gt;
When a change in the network topology is detected via the BPDUs 802.1d causes the entire spanning tree to be newly established with a new election of a root bridge. This can take somewhere around a minute, which is too long. Therefore the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Rapid_Spanning_Tree_Protocol rapid STP (RSTP)] was defined in IEEE 802.1w. It is fully backwards compatible with 802.1d and uses additional information to define port based rules such as alternate and backup ports for the path to the root bridge such that a topology change can be acted on in just a few seconds. It has the nice benefit that a link to a computer which is plugged into an access port on a given switch becomes ready in just a few seconds. We therefore enable RSTP on all our switches. Usually this is done by enabling STP and forcing the STP mode to RSTP. No further configuration is needed, except the priority of the root bridge.&lt;br /&gt;
&lt;br /&gt;
=== NTP ===&lt;br /&gt;
All switches are configured to use the RRZE NTP servers directly via their IP addresses because they can't do DNS. &lt;br /&gt;
&lt;br /&gt;
=== Current switches ===&lt;br /&gt;
Here is a list of the currently installed switches, their configuration, uplink, and some notes. All passwords are the LDAP password.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Switches&lt;br /&gt;
|-&lt;br /&gt;
! name !! IP !! Usecase !! Model !! Connectivity !! Administration !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| switch1 || 10.10.1.1 || 1G RJ45 distribution racks || HP ProCurve J4904A 2848 || 44x1G RJ45, 4x1G RJ45/SFP || telnet, D-Sub 9 + RS232-USB, webgui (defunct) ||&lt;br /&gt;
* Kind of old&lt;br /&gt;
* No username required for login&lt;br /&gt;
* Ports 45-48 are dual personality ports, either RJ45 or SFP can be used, not both.&lt;br /&gt;
|-&lt;br /&gt;
| switch2 || 10.10.1.2 || server management (iLO, iDRAC, ...) || HP J9781A 2530-48 || 48x100M RJ45, 2x1G RJ45/SFP || telnet, micro-USB B, RJ45 + RS232-USB, webgui ||&lt;br /&gt;
* Username: manager&lt;br /&gt;
* Ports 49-50 (or 49-52) are dual personality ports, either RJ45 or SFP can be used, not both&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== HP switch administration ===&lt;br /&gt;
==== Accessing via CLI ====&lt;br /&gt;
Accessing the switches via browser is problematic for older switches since they use stuff like Java in the browser or flash. The CLI always works, if basic connectivity is ensured.&lt;br /&gt;
&lt;br /&gt;
===== telnet =====&lt;br /&gt;
If the switch is up, ethernet is connected, IP address is assigned, subnets are configured correctly, and a computer is in the same VLAN (which should be the case), &amp;lt;code&amp;gt;telnet&amp;lt;/code&amp;gt; can be used to access the switches. Just do &amp;lt;code&amp;gt;telnet {IP of switch}&amp;lt;/code&amp;gt; and the you should reach the login of the CLI.&lt;br /&gt;
&lt;br /&gt;
===== serial =====&lt;br /&gt;
Alternatively, and especially if the ethernet connection itself doesn't work (yet), the switches can be accessed directly by plugging a computer into the management port(s). Usually those are some kind of serial connection. Older models have a [https://en.wikipedia.org/wiki/D-subminiature D-Sub 9] connector for this purpose, newer models use a RJ45 port. In the latter case RJ45 is only the physical connector. It does not carry ethernet, only a [https://en.wikipedia.org/wiki/RS-232 RS-232] serial connection. Unless the computer itself has a serial port (unlikely these days), in both cases a serial to USB converter is required. Newer switches offer a USB port which internally has a USB to serial converter integrated and shows up in the connecting computer as a serial port. Regardless of the route choosen, if a serial to USB converter is attached the kernel log of the connecting computer should look something like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[  +0,042064] usbcore: registered new interface driver usbserial_generic&lt;br /&gt;
[  +0,000009] usbserial: USB Serial support registered for generic&lt;br /&gt;
[  +0,001588] usbcore: registered new interface driver ftdi_sio&lt;br /&gt;
[  +0,000008] usbserial: USB Serial support registered for FTDI USB Serial Device&lt;br /&gt;
[  +0,000101] ftdi_sio 1-4:1.0: FTDI USB Serial Device converter detected&lt;br /&gt;
[  +0,000023] usb 1-4: Detected FT232RL&lt;br /&gt;
[  +0,006308] usb 1-4: FTDI USB Serial Device converter now attached to ttyUSB0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This means the serial port is available under &amp;lt;code&amp;gt;/dev/ttyUSB0&amp;lt;/code&amp;gt;. Of course ne number in the end can change, depending on how many serial ports are present. Some devices show up as &amp;lt;code&amp;gt;/dev/ttyACM0&amp;lt;/code&amp;gt; instead. These ports can be used with &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt; to talk to the switch, for example &amp;lt;code&amp;gt;screen /dev/ttyUSB0&amp;lt;/code&amp;gt;. If everything goes well a message like &amp;lt;code&amp;gt;Connected with baud rate 9600&amp;lt;/code&amp;gt; should show up.&lt;br /&gt;
&lt;br /&gt;
===== Authentication =====&lt;br /&gt;
Depending on the model a username must be entered to access the switch. The &amp;quot;root&amp;quot; user for HP switches is usually called &amp;quot;manager&amp;quot;. A password is required to log in in a mode which allows configuration changes. It should be set to our current LDAP admin password. If the password is not or incorrectly entered on the serial console the switches usually drops back to an unpriviledged user which can only look around.&lt;br /&gt;
&lt;br /&gt;
===== Entering configuration =====&lt;br /&gt;
Before anything can be changed in the switch the configuration submenu must be entered. This can be done using the &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
switch1# config&lt;br /&gt;
switch1(config)# &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Tab completion should work in all circumstances and is often very informative. An ad-hoc set of suggestions and help messages can also be triggered by putting a &amp;quot;?&amp;quot; in the terminal. Note that no &amp;quot;enter&amp;quot; is required in this case. As soon as the &amp;quot;?&amp;quot; is sent the terminal shows the suggestions.&lt;br /&gt;
&lt;br /&gt;
===== Saving the configuration =====&lt;br /&gt;
Note that when changing the configuration of a switch only the running configuration is modified. Changes are not persistent over a reboot of the device. To make the changes persistent the configuration needs to be written to the flash memory of the device. This can be done by &amp;lt;code&amp;gt;write memory&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Interestingly, &amp;lt;code&amp;gt;write terminal&amp;lt;/code&amp;gt; shows all commands necessary to achieve the currently running configuration of the switch.&lt;br /&gt;
&lt;br /&gt;
===== Basic setup =====&lt;br /&gt;
The basic switch setup can be accessed even from outside the &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; menu using the &amp;lt;code&amp;gt;setup&amp;lt;/code&amp;gt; command. It's an interactive menu which is rather intuitive. Among other things, it can be used to set&lt;br /&gt;
* The hostname of the switch&lt;br /&gt;
* The password for the &amp;lt;code&amp;gt;manager&amp;lt;/code&amp;gt; user&lt;br /&gt;
* The default gateway&lt;br /&gt;
* The IP of the switch in the [[#VLAN|default VLAN]]&lt;br /&gt;
&lt;br /&gt;
===== Port information =====&lt;br /&gt;
Information about the interfaces of the switch can be retrieven by the &amp;lt;code&amp;gt;show interfaces&amp;lt;/code&amp;gt; command which lists all interfaces and their information in a table. It can be followed by another option to determine the type of information in the table. These are the options:&lt;br /&gt;
* (no option): Sent/received traffic, errors, drops, [https://en.wikipedia.org/wiki/Ethernet_flow_control flow control], broadcast limit&lt;br /&gt;
* &amp;lt;code&amp;gt;brief&amp;lt;/code&amp;gt; Port type, intrusion alert, enabled/disabled, port status (up/down), mode (speed, duplex), flow control, broadcast limit&lt;br /&gt;
* &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; Port type, enabled/disabled, mode, flow control, [https://en.wikipedia.org/wiki/Medium-dependent_interface MDI] mode&lt;br /&gt;
* &amp;lt;code&amp;gt;port-utilization&amp;lt;/code&amp;gt; mode (speed, duplex), Rx data, Tx data&lt;br /&gt;
Much more detailed ethernet information about specific ports can be obtained by &amp;lt;code&amp;gt;show interfaces ethernet {PORTS}&amp;lt;/code&amp;gt;. The ports can be referred to as single ports, a separated list by commas, or ranges separated by &amp;quot;-&amp;quot;, or combinations of all. &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; can be used to refer to all ports at once.&lt;br /&gt;
&lt;br /&gt;
===== VLAN =====&lt;br /&gt;
Information about the configure VLANs can be obtained by the &amp;lt;code&amp;gt;show vlans&amp;lt;/code&amp;gt; command. In our case this should only list the default VLAN. VLANs can be configure by entering the context of a specific VLAN, for example &amp;lt;code&amp;gt;vlan 10&amp;lt;/code&amp;gt;. In this submenu ports can be assigned to this VLAN as untagged access ports by issuing &amp;lt;code&amp;gt;untagged {PORTS}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== Spanning tree =====&lt;br /&gt;
STP can be enabled from the config menu via &amp;lt;code&amp;gt;spanning-tree enable&amp;lt;/code&amp;gt;. RSTP can be enforced as the protocol to use via &amp;lt;code&amp;gt;spanning-tree force-version rstp-operation&amp;lt;/code&amp;gt;. Port based information about the established tree can be retrieved via &amp;lt;code&amp;gt;show spanning-tree&amp;lt;/code&amp;gt;. This gives information about the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Path_cost path cost], [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Configuration port priority], [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Port_states port state], and designated bridge.&lt;br /&gt;
&lt;br /&gt;
===== Time =====&lt;br /&gt;
The timezones in the HP world are odd. They are given in offsets in minutes. So the timezone of the observatory is +60. It can be set via &amp;lt;code&amp;gt;time timezone 60&amp;lt;/code&amp;gt;. The switches can also accept different daylight saving rules. The correct one can be set via &amp;lt;code&amp;gt;time daylight-time-rule Middle-Europe-and-Portugal&amp;lt;/code&amp;gt;. The switches are configured to retrieve their time via SNTP, by setting &amp;lt;code&amp;gt;timesync sntp&amp;lt;/code&amp;gt;. It utilizes the normal [https://en.wikipedia.org/wiki/Network_Time_Protocol NTP] but has a much simpler implementation on the client side. The switches are configured to use the RRZE NTP servers directly via their IP. This is discouraged, but since the switches don't do DNS not otherwise possible. Information about the current SNTP settings can be retrieved via &amp;lt;code&amp;gt;show sntp&amp;lt;/code&amp;gt;. SNTP servers can be set via &amp;lt;code&amp;gt;sntp server {IP}&amp;lt;/code&amp;gt; on older models, and &amp;lt;code&amp;gt;sntp server priority 1 {IP}&amp;lt;/code&amp;gt; on newer models. The current time can be displayed via &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== MDI Mode =====&lt;br /&gt;
The MDI mode can be set via &amp;lt;code&amp;gt;interface {PORT} mdix-mode {MODE}&amp;lt;/code&amp;gt; where PORT is a list of ports and MODE is &amp;lt;code&amp;gt;mdi&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mdix&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;automdix&amp;lt;/code&amp;gt;. Obviously we want the latter on all interfaces. To set all ports to auto MDI-X: &amp;lt;code&amp;gt;interface all mdix-mode automdix&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Accessing via a browser ====&lt;br /&gt;
Some of the switches come with an integrated webserver which can be used to access information and perform configuration. While this seems convenient at first, in reality these servers rely on stuff like [https://en.wikipedia.org/wiki/Java_(programming_language) Java] or sometimes even [https://en.wikipedia.org/wiki/Adobe_Flash Adobe Flash] in the browser which is discontinued and simply does not work at all. Therefore using the CLI is the more reliable way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== DNS ==&lt;br /&gt;
=== Domains ===&lt;br /&gt;
Our public domain is &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt;. For the internal domain we don't need to register a domain, it doesn't make sense. Currently it is configure to &amp;lt;code&amp;gt;internal.sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; which is clunky but accurate. It is configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; which has the nice sideeffect of &amp;lt;code&amp;gt;bla.internal&amp;lt;/code&amp;gt; being correctly resolved from computers in the public network to the computer in the private network. The other way round it does not work, but &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; is therefore configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; as a search domain for all hosts in the private network. If we make sure to not duplicate computer names in the private and public network DNS enables the reference of another computer directly by its hostname.&lt;br /&gt;
&lt;br /&gt;
Maybe it's possible to somehow only use one domain spreading over two subnets, but since some are then public with public DNS records and some are not this might be difficult.&lt;br /&gt;
&lt;br /&gt;
=== /etc/hosts ===&lt;br /&gt;
With all the hostnames available via the &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; configuration there is no need to out them all in &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; as well. &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; knows the IP associated with a hostname from its dhcp configuration file and uses it to resolve the names if a DNS query is made. We could therefore only put aliases (such as &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt;) in the &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; file and save the work of always trying to keep &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; up to date.&lt;br /&gt;
&lt;br /&gt;
== Exposed services ==&lt;br /&gt;
Some services need to be exposed to the internet under a specific address. Most importantly the webserver (www.stern....de). This needs to have a public IP resolving to a specific host. Therefore such services need to run on a server which has two interfaces. One for the LAN and one for the WAN. The weak end system model of Linux ''might'' become a problem here.&lt;br /&gt;
&lt;br /&gt;
We could try just using NAT and port forward the necessary traffic. The webserver would be in our private network only, the router has the public IP and therefore FQDN of the webserver, and ports 80 and 443 are forwarded from the router to the webserver. This way no fiddling with virtualbox, mutliple IPs, etc. is necessary.&lt;br /&gt;
&lt;br /&gt;
When doing it this way access via SSH is also very easy. Forward port 22 to a server behind the router which acts as the login node. Then all SSH logins are done directly through &amp;lt;code&amp;gt;user@www.stern...&amp;lt;/code&amp;gt;. No two ethernet connections required. &lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Desired uplink speeds for individual hardware&lt;br /&gt;
* NFS servers: At least 10G, some maybe with 2x10G.&lt;br /&gt;
* Bladecenter: 10G&lt;br /&gt;
* Meggie nodes: 80x1G&lt;br /&gt;
* Other clients: 1G&lt;br /&gt;
&lt;br /&gt;
All switches should support RSTP (IEEE 802.1w).&lt;br /&gt;
&lt;br /&gt;
=== Main Building ===&lt;br /&gt;
In the main building we can create our own layer 2 network fairly straightforwardly.&lt;br /&gt;
&lt;br /&gt;
Let's ''please'' mount the switches in reverse in the server racks.&lt;br /&gt;
&lt;br /&gt;
==== Root Bridge ====&lt;br /&gt;
The root bridge will be the core of the network. Needs to have the capability to attach the NFS servers as well as other fast enough uplinks to switches, so at least several 10G SFP+ ports.&lt;br /&gt;
&lt;br /&gt;
Omada: SX3032F, 32x10G SFP+, ~900€&lt;br /&gt;
&lt;br /&gt;
Ubiquity (same as above): USW-Pro-Aggregation, 28x10G SFP+, 4x25G SFP28, ~900€&lt;br /&gt;
&lt;br /&gt;
==== Meggie Switches ====&lt;br /&gt;
Each Meggie node provides a 1G uplink (apart from Intel OP). With 80 nodes we need 2 48 port switches.&lt;br /&gt;
&lt;br /&gt;
Omada: SG3452X, 48x1G RJ45, 4x10G SFP+, ~400€&lt;br /&gt;
&lt;br /&gt;
Ubiquity: USW-Pro-48, 48x1G RJ45, 4x10G SFP+, ~600€&lt;br /&gt;
&lt;br /&gt;
==== Peripheral Switches ====&lt;br /&gt;
If we decommission the Messiers we can make due with 3 peripheral switches for the main building. If the RRZE lets us use the currently installed 3 switches with the 10G uplink we do not need new hardware for this.&lt;br /&gt;
&lt;br /&gt;
==== Shopping List ====&lt;br /&gt;
* 10G root bridge: ~900 Euros&lt;br /&gt;
* 2x 48x1G + 10G uplink meggie switches: 2x~400 Euros&lt;br /&gt;
* Lots of Cat 6 (or 5e) cables for the meggies&lt;br /&gt;
* We might need new DAC cables&lt;br /&gt;
* Total: 1700 Euros&lt;br /&gt;
&lt;br /&gt;
== Integrating Meridian building and Bundschuhhaus ==&lt;br /&gt;
&lt;br /&gt;
=== Layer 2 ===&lt;br /&gt;
There are two fibers going to the Meridian building. One is patched through to the Bundschuhhaus.&lt;br /&gt;
For the Meridian building it is technically possible to use one of the fibers to directly integrate an additional switch in the Clock room via layer 2. But the RRZE needs to play ball for this because they need to switch the other pair through to Bundschuhhause. If this route is taken there is still no option to integrate Bundschuhhause on layer 2.&lt;br /&gt;
&lt;br /&gt;
=== Layer 3 ===&lt;br /&gt;
A VPN would be an option to incorporate the other buildings over layer 3 without interaction with the RRZE (fingers crossed). Each building needs to have a separate OPNsense box establishing a VPN directly to the main gateway over the WAN and an attached switch for the computers.&lt;br /&gt;
&lt;br /&gt;
NFS etc. might be a bit wonky in this scenarion. Performance will certainly be limited. Strong CPU hardware of the OPNSense boxes is required for this to work with low latency.&lt;br /&gt;
&lt;br /&gt;
==== IPSec ====&lt;br /&gt;
According to the documentation this is the preferred solution for a site-to-site setup such as in our case. It's a bit complicated to set up compared to the other options. It requires an open port on the main gateway (similar to port forwarding). The computers on the other sites then also need to be in a separate subnet, necessitating a separate DHCP (possibly DNS etc.) server (TBC).&lt;br /&gt;
&lt;br /&gt;
==== Wireguard ====&lt;br /&gt;
Much easier to set up compared to IPSec, but might be less reliable. Unclear about the different subnet. Might not require an open port on the main gateway.&lt;br /&gt;
&lt;br /&gt;
==== OpenVPN ====&lt;br /&gt;
Fairly simple to set up, running via SSL, can mimick HTTPS traffic. Requires an open port.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Settings/Optimizations ==&lt;br /&gt;
* Enable jumbo frames for better NFS/iSCSI performance&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3666</id>
		<title>New Network</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3666"/>
		<updated>2025-04-06T14:35:20Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
We're creating our own network inside a DMZ.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
* Check whether the router is set to switch on after power failure in the BIOS&lt;br /&gt;
* Enable RSTP on all switches and set a high spanning tree priority on the root bridge&lt;br /&gt;
* Check whether/how we can use only one domain, instead of two (internal.sternwarte ...)&lt;br /&gt;
* When all hosts are in the private network&lt;br /&gt;
** Adjust router settings&lt;br /&gt;
*** Block private and bogon networks on WAN interface&lt;br /&gt;
*** Remove routes between public and private network&lt;br /&gt;
*** Disable gui login from public network&lt;br /&gt;
*** Disable DHC relay&lt;br /&gt;
** Adjust DHCP settings&lt;br /&gt;
*** Make the private network the default one (remove internal tags from config)&lt;br /&gt;
*** Remove classless static route from public to private network&lt;br /&gt;
&lt;br /&gt;
== Subnets ==&lt;br /&gt;
=== Public ===&lt;br /&gt;
The public subnet is a part of the internet as organized through the [https://de.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority IANA]. &amp;quot;Our&amp;quot; subnet is &amp;lt;code&amp;gt;131.188.151.0/24&amp;lt;/code&amp;gt;. At least one of the IPs in this subnet is used by the RRZE to provide a gateway. It's a [https://www.cisco.com/site/de/de/index.html Cisco] router in the basement with the IP &amp;lt;code&amp;gt;131.188.151.1&amp;lt;/code&amp;gt; and FQDN &amp;lt;code&amp;gt;astro.gate.uni-erlangen.de&amp;lt;/code&amp;gt;. We need to use this gateway to access the WAN.&lt;br /&gt;
&lt;br /&gt;
=== Private ===&lt;br /&gt;
We need to use a private network as defined in [https://www.rfc-editor.org/rfc/rfc1918.html RFC1918] for our own subnet. Because it's easy to remember and short to write we pick the class A network from RFC1918 which is &amp;lt;code&amp;gt;10.0.0.0/8&amp;lt;/code&amp;gt;. We can allocate a &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; network from this block. Since it sounds nice we can choose the second octet to also be 10. This gives us more than 65000 IP addresses to work with in &amp;lt;code&amp;gt;10.10.0.0/16&amp;lt;/code&amp;gt;. Because it makes sense we use the first address for our own gateway: &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Address blocks ====&lt;br /&gt;
Using the &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; doesn't only provide more than enough addresses, probably forever, it also enables the grouping into blocks of addresses which denote different classes of devices. This makes it easier to identify the devices and find their IP address. Note that these are not separate subnets, it's only nomenclature. These blocks are used in the DHCP server of [https://thekelleys.org.uk/dnsmasq/doc.html dnsmasq] and defined in the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet/-/blob/master/modules/remeis/files/dnsmasq/internal-dhcp.conf internal-dhcp.conf] file of the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet puppet] gitlab repository.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Address blocks&lt;br /&gt;
|-&lt;br /&gt;
! Block !! Device class&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.1.*   || Switches&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.2.*   || Management interfaces (iLO, iDRAC, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.10.*  || Servers&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.20.*  || VMs&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.30.*  || Meggie cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.40.*  || Blade center&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.50.*  || Messier cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.90.*  || Functional hosts (Raspbbery Pis, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.100.* || Office computers main building&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.200.* || Testing (Installation testing, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.250.* || Private notebooks&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Router ==&lt;br /&gt;
&lt;br /&gt;
The uplink to the WAN is realized with a server (Dell Poweredge 1950) which runs [https://opnsense.org OPNSense], a FreeBSD based routing and firewall distribution which is very easy to set up and highly reliable. The server has two 1G interfaces. One is connected to the public network managed by the RRZE (WAN) and has a public IP, the other one is connected to our own switches and has a private ip (LAN). Both interfaces are labelled in the back of the server. The router routes traffic between these two networks to make our computers talk to each other.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
The router can be configure through the web gui. It's accessible directly over the ''internal'' IP address, but the port is changed to 8443: https://10.10.0.1:8443. The user for the login is &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and the password is the same as the LDAP admin passwort (as of writing). A lot of information is provided in the [https://docs.opnsense.org/ OPNSense documentation]. One of the interfaces has a public IP, at the time of writing the public IP is &amp;lt;code&amp;gt;131.188.151.92&amp;lt;/code&amp;gt;. The other interface has the private used as the gateway, &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;. Its public IP might be changed depending on how we proceed with mechansim for remote access. SSH is is disabled, but the port is changed to 12345.&lt;br /&gt;
&lt;br /&gt;
==== Gateway ====&lt;br /&gt;
The router uses the RRZE gateway as its own upstream gateway. By default the firmware always sends packets destined to the WAN network to this gateway. At the time of writing this is problematic because the upstream gateway drops packets arriving from a private network (according to RFC1918) which makes it impossible for hosts in our private network to directly communicate with hosts in our public network. This option is therefore disabled in the configuration of the router. See the &amp;quot;Disable force gateway&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
==== Private and bogon networks ====&lt;br /&gt;
According to RFC1918 packets with source or destination IP addresses in private networks must not be routed through the internet. It often happens that such packets are generated and end up at edge routers (keep the private notebooks connected to our network in mind). Therefore such routers usually drop these packets on purpose. At the time of writing we actually want to route such packets from our private to our public network and vice versa. Therefore the option to drop packets from or to private networks is disabled on both interfaces. When we have all our hosts behind the router we should re enable this option for the WAN interface to avoid trouble with the RRZE. On the LAN interface this option should obviously stay disabled.&lt;br /&gt;
&lt;br /&gt;
There are addresses in the public IPv4 space which are not assigned to anything or do not make sense. These are called [https://de.wikipedia.org/wiki/Bogon &amp;quot;Bogon&amp;quot; networks]. The router is configured to drop these packets if they arrive on the WAN interface.&lt;br /&gt;
&lt;br /&gt;
==== NAT ====&lt;br /&gt;
Hosts within the private network can not directly talk to the internet (see the previous section), they need an intermidiary to do this. This is accomplished by using [https://en.wikipedia.org/wiki/Network_address_translation Network address translation (NAT)]. When a client wants to talk to the internet (except our own public network, see the following section), the router replaces the source address of the packet with its own public address and sends it of to the WAN. From the WAN it looks as if the router is making requests, instead of the client. When the reply arrives on the WAN interface the router changes the destination address of the packet from its own public address to the private address of the client and sends if off into the LAN.&lt;br /&gt;
&lt;br /&gt;
We need this mechanism for all clients behind the router to talk to the internet, except our own public network. This option is available as outbound NAT in the routers firmware and enabled by default.&lt;br /&gt;
&lt;br /&gt;
There is an important exception: Traffic from our private network which has a destination in our own public network should be routed directly, without any NAT, such that these two computers can talk directly to each other. Therefore there is a rule in the outbound NAT section which identifies such traffic and disables NAT for it. It can then be routed normally (see the following section). Note that this should be disabled as soon as all our computers are in the private network and can talk to each other directly.&lt;br /&gt;
&lt;br /&gt;
==== Routing between public and private network ====&lt;br /&gt;
At the time of writing our computers are distributed in a private and a public network. Both need to be reachable by each other. Therefore the router allows traffic to pass between these exact two networks without any restrictions. The rules for this can be found in the LAN and WAN sections of the firewall rules of the router. Especially the rule allowing any traffic originating from the public network to pass directly into the private network should be disabled as soon as all computers are in the private network.&lt;br /&gt;
&lt;br /&gt;
==== DHCP relay ====&lt;br /&gt;
At the time of writing we have DHCP (and DNS etc.) servers in the public network. Replicating these services behind the router can be avoided by allowing the router to forward DHCP requests from the private to the public network. This is done in the DHC relay section in the Services menu. With this service and the working routing and NAT there is no need to replicate these services in the private network for now. Everything seems to work, including PXE boot to install clients within the private network. As soon as all computers are in the private network the DHC relay should be disabled.&lt;br /&gt;
&lt;br /&gt;
==== Backup ====&lt;br /&gt;
The configuration can be backed up simply by downloading it in the GUI. It's recommended to do this once in a while just in case the router dies. This configuration can then be very easily applied after a new installation.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
Updates of the route can simply be done through the GUI. For security reasons this is recommended on a regular basis, but since we have the firewall of the RRZE in front of it it's probably not critical. Often the updates ca be done even without restarting the firmware.&lt;br /&gt;
&lt;br /&gt;
== Layer 2 ==&lt;br /&gt;
With the router working we can use our own ethernet switches behind it without interfering with the RRZE switches.&lt;br /&gt;
&lt;br /&gt;
=== VLAN ===&lt;br /&gt;
[https://en.wikipedia.org/wiki/VLAN Local Area Networks (VLAN)] are logical layer 2 networks which can spread across multiple switches. They can be used to separate different broadcast domains (ethernet networks) and usually only contain a single IP subnet. Under certain scenarios VLANs can offer performance, flexibility and security advantages. We don't want to segment our network, therefore performance and flexibility enhancements are not possible. Security is also of no concern. We therefore do not use VLANs.&lt;br /&gt;
&lt;br /&gt;
However, from a technical perspective this is impossible with layer 3 switches. By default all interfaces of a switch are assigned to the so called default VLAN. For most switch manufacturers this is VLAN 1, but it doesn't have to be. Most manufacturers also use VLAN 1 as the native VLAN. This means that all frames in VLAN 1 are sent untagged (without VLAN information) also to other switches, even over tagged ports (trunk ports). This ensures interoperability without changing settings.&lt;br /&gt;
&lt;br /&gt;
We are good as long as all switches we buy have default VLAN 1 (which can not be changed) and native VLAN 1 (which can be changed). In case we get a switch which does not have the default VLAN 1 we need to set the native VLAN of this switch also to the same VLAN, making all frames in this VLAN untagged, enabling communication with other switches.&lt;br /&gt;
&lt;br /&gt;
=== Spanning tree ===&lt;br /&gt;
We know for a fact that sometimes people plug ethernet cables into random ports, even both ends of it, causing potential loops (see mail on 22 August 2023). To avoid such loops the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol spanning tree protocol (STP)] defined in [https://en.wikipedia.org/wiki/IEEE_802.1D IEEE 802.1d]. When this protocol is enabled on a switch it exchanges [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Bridge_protocol_data_units bridge protocol data units (BPDUs)] with its neighbouring switches, containing some information about the network topology. This information is used to elect the so called [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Root_bridge_and_the_bridge_ID root bridge]. This switch can be thought of as the top of the spanning tree. All other switches then determine one port they use as a path towards this root bridge, even if it goes through another switch. All other ports which also provide a path towards the root bridge are disabled (set to the blocking [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Port_states state]). The election of the root bridge also enters an individual priority for each switch which can be set by the administrator. We should make sure to set a high priority on our central switch.&lt;br /&gt;
&lt;br /&gt;
When a change in the network topology is detected via the BPDUs 802.1d causes the entire spanning tree to be newly established with a new election of a root bridge. This can take somewhere around a minute, which is too long. Therefore the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Rapid_Spanning_Tree_Protocol rapid STP (RSTP)] was defined in IEEE 802.1w. It is fully backwards compatible with 802.1d and uses additional information to define port based rules such as alternate and backup ports for the path to the root bridge such that a topology change can be acted on in just a few seconds. It has the nice benefit that a link to a computer which is plugged into an access port on a given switch becomes ready in just a few seconds. We therefore enable RSTP on all our switches. Usually this is done by enabling STP and forcing the STP mode to RSTP. No further configuration is needed, except the priority of the root bridge.&lt;br /&gt;
&lt;br /&gt;
=== NTP ===&lt;br /&gt;
All switches are configured to use the RRZE NTP servers directly via their IP addresses because they can't do DNS. &lt;br /&gt;
&lt;br /&gt;
=== Current switches ===&lt;br /&gt;
Here is a list of the currently installed switches, their configuration, uplink, and some notes. All passwords are the LDAP password.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Switches&lt;br /&gt;
|-&lt;br /&gt;
! name !! IP !! Usecase !! Model !! Connectivity !! Administration !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| switch1 || 10.10.1.1 || 1G RJ45 distribution racks || HP ProCurve J4904A 2848 || 44x1G RJ45, 4x1G RJ45/SFP || telnet, D-Sub 9 + RS232-USB, webgui (defunct) ||&lt;br /&gt;
* Kind of old&lt;br /&gt;
* No username required for login&lt;br /&gt;
* Ports 45-48 are dual personality ports, either RJ45 or SFP can be used, not both.&lt;br /&gt;
|-&lt;br /&gt;
| switch2 || 10.10.1.2 || server management (iLO, iDRAC, ...) || HP J9781A 2530-48 || 48x100M RJ45, 2x1G RJ45/SFP || telnet, micro-USB B, RJ45 + RS232-USB, webgui ||&lt;br /&gt;
* Username: manager&lt;br /&gt;
* Ports 49-50 (or 49-52) are dual personality ports, either RJ45 or SFP can be used, not both&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== HP switch administration ===&lt;br /&gt;
==== Accessing via CLI ====&lt;br /&gt;
Accessing the switches via browser is problematic for older switches since they use stuff like Java in the browser or flash. The CLI always works, if basic connectivity is ensured.&lt;br /&gt;
&lt;br /&gt;
===== telnet =====&lt;br /&gt;
If the switch is up, ethernet is connected, IP address is assigned, subnets are configured correctly, and a computer is in the same VLAN (which should be the case), &amp;lt;code&amp;gt;telnet&amp;lt;/code&amp;gt; can be used to access the switches. Just do &amp;lt;code&amp;gt;telnet {IP of switch}&amp;lt;/code&amp;gt; and the you should reach the login of the CLI.&lt;br /&gt;
&lt;br /&gt;
===== serial =====&lt;br /&gt;
Alternatively, and especially if the ethernet connection itself doesn't work (yet), the switches can be accessed directly by plugging a computer into the management port(s). Usually those are some kind of serial connection. Older models have a [https://en.wikipedia.org/wiki/D-subminiature D-Sub 9] connector for this purpose, newer models use a RJ45 port. In the latter case RJ45 is only the physical connector. It does not carry ethernet, only a [https://en.wikipedia.org/wiki/RS-232 RS-232] serial connection. Unless the computer itself has a serial port (unlikely these days), in both cases a serial to USB converter is required. Newer switches offer a USB port which internally has a USB to serial converter integrated and shows up in the connecting computer as a serial port. Regardless of the route choosen, if a serial to USB converter is attached the kernel log of the connecting computer should look something like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[  +0,042064] usbcore: registered new interface driver usbserial_generic&lt;br /&gt;
[  +0,000009] usbserial: USB Serial support registered for generic&lt;br /&gt;
[  +0,001588] usbcore: registered new interface driver ftdi_sio&lt;br /&gt;
[  +0,000008] usbserial: USB Serial support registered for FTDI USB Serial Device&lt;br /&gt;
[  +0,000101] ftdi_sio 1-4:1.0: FTDI USB Serial Device converter detected&lt;br /&gt;
[  +0,000023] usb 1-4: Detected FT232RL&lt;br /&gt;
[  +0,006308] usb 1-4: FTDI USB Serial Device converter now attached to ttyUSB0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This means the serial port is available under &amp;lt;code&amp;gt;/dev/ttyUSB0&amp;lt;/code&amp;gt;. Of course ne number in the end can change, depending on how many serial ports are present. Some devices show up as &amp;lt;code&amp;gt;/dev/ttyACM0&amp;lt;/code&amp;gt; instead. These ports can be used with &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt; to talk to the switch, for example &amp;lt;code&amp;gt;screen /dev/ttyUSB0&amp;lt;/code&amp;gt;. If everything goes well a message like &amp;lt;code&amp;gt;Connected with baud rate 9600&amp;lt;/code&amp;gt; should show up.&lt;br /&gt;
&lt;br /&gt;
===== Authentication =====&lt;br /&gt;
Depending on the model a username must be entered to access the switch. The &amp;quot;root&amp;quot; user for HP switches is usually called &amp;quot;manager&amp;quot;. A password is required to log in in a mode which allows configuration changes. It should be set to our current LDAP admin password. If the password is not or incorrectly entered on the serial console the switches usually drops back to an unpriviledged user which can only look around.&lt;br /&gt;
&lt;br /&gt;
===== Entering configuration =====&lt;br /&gt;
Before anything can be changed in the switch the configuration submenu must be entered. This can be done using the &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
switch1# config&lt;br /&gt;
switch1(config)# &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Tab completion should work in all circumstances and is often very informative. An ad-hoc set of suggestions and help messages can also be triggered by putting a &amp;quot;?&amp;quot; in the terminal. Note that no &amp;quot;enter&amp;quot; is required in this case. As soon as the &amp;quot;?&amp;quot; is sent the terminal shows the suggestions.&lt;br /&gt;
&lt;br /&gt;
===== Saving the configuration =====&lt;br /&gt;
Note that when changing the configuration of a switch only the running configuration is modified. Changes are not persistent over a reboot of the device. To make the changes persistent the configuration needs to be written to the flash memory of the device. This can be done by &amp;lt;code&amp;gt;write memory&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Interestingly, &amp;lt;code&amp;gt;write terminal&amp;lt;/code&amp;gt; shows all commands necessary to achieve the currently running configuration of the switch.&lt;br /&gt;
&lt;br /&gt;
===== Basic setup =====&lt;br /&gt;
The basic switch setup can be accessed even from outside the &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; menu using the &amp;lt;code&amp;gt;setup&amp;lt;/code&amp;gt; command. It's an interactive menu which is rather intuitive. Among other things, it can be used to set&lt;br /&gt;
* The hostname of the switch&lt;br /&gt;
* The password for the &amp;lt;code&amp;gt;manager&amp;lt;/code&amp;gt; user&lt;br /&gt;
* The default gateway&lt;br /&gt;
* The IP of the switch in the [[#VLAN|default VLAN]]&lt;br /&gt;
&lt;br /&gt;
===== Port information =====&lt;br /&gt;
Information about the interfaces of the switch can be retrieven by the &amp;lt;code&amp;gt;show interfaces&amp;lt;/code&amp;gt; command which lists all interfaces and their information in a table. It can be followed by another option to determine the type of information in the table. These are the options:&lt;br /&gt;
* (no option): Sent/received traffic, errors, drops, [https://en.wikipedia.org/wiki/Ethernet_flow_control flow control], broadcast limit&lt;br /&gt;
* &amp;lt;code&amp;gt;brief&amp;lt;/code&amp;gt; Port type, intrusion alert, enabled/disabled, port status (up/down), mode (speed, duplex), flow control, broadcast limit&lt;br /&gt;
* &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; Port type, enabled/disabled, mode, flow control, [https://en.wikipedia.org/wiki/Medium-dependent_interface MDI] mode&lt;br /&gt;
* &amp;lt;code&amp;gt;port-utilization&amp;lt;/code&amp;gt; mode (speed, duplex), Rx data, Tx data&lt;br /&gt;
Much more detailed ethernet information about specific ports can be obtained by &amp;lt;code&amp;gt;show interfaces ethernet {PORTS}&amp;lt;/code&amp;gt;. The ports can be referred to as single ports, a separated list by commas, or ranges separated by &amp;quot;-&amp;quot;, or combinations of all.&lt;br /&gt;
&lt;br /&gt;
===== VLAN =====&lt;br /&gt;
Information about the configure VLANs can be obtained by the &amp;lt;code&amp;gt;show vlans&amp;lt;/code&amp;gt; command. In our case this should only list the default VLAN. VLANs can be configure by entering the context of a specific VLAN, for example &amp;lt;code&amp;gt;vlan 10&amp;lt;/code&amp;gt;. In this submenu ports can be assigned to this VLAN as untagged access ports by issuing &amp;lt;code&amp;gt;untagged {PORTS}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== Spanning tree =====&lt;br /&gt;
STP can be enabled from the config menu via &amp;lt;code&amp;gt;spanning-tree enable&amp;lt;/code&amp;gt;. RSTP can be enforced as the protocol to use via &amp;lt;code&amp;gt;spanning-tree force-version rstp-operation&amp;lt;/code&amp;gt;. Port based information about the established tree can be retrieved via &amp;lt;code&amp;gt;show spanning-tree&amp;lt;/code&amp;gt;. This gives information about the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Path_cost path cost], [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Configuration port priority], [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Port_states port state], and designated bridge.&lt;br /&gt;
&lt;br /&gt;
===== Time =====&lt;br /&gt;
The timezones in the HP world are odd. They are given in offsets in minutes. So the timezone of the observatory is +60. It can be set via &amp;lt;code&amp;gt;time timezone 60&amp;lt;/code&amp;gt;. The switches can also accept different daylight saving rules. The correct one can be set via &amp;lt;code&amp;gt;time daylight-time-rule Middle-Europe-and-Portugal&amp;lt;/code&amp;gt;. The switches are configured to retrieve their time via SNTP, by setting &amp;lt;code&amp;gt;timesync sntp&amp;lt;/code&amp;gt;. It utilizes the normal [https://en.wikipedia.org/wiki/Network_Time_Protocol NTP] but has a much simpler implementation on the client side. The switches are configured to use the RRZE NTP servers directly via their IP. This is discouraged, but since the switches don't do DNS not otherwise possible. Information about the current SNTP settings can be retrieved via &amp;lt;code&amp;gt;show sntp&amp;lt;/code&amp;gt;. SNTP servers can be set via &amp;lt;code&amp;gt;sntp server {IP}&amp;lt;/code&amp;gt; on older models, and &amp;lt;code&amp;gt;sntp server priority 1 {IP}&amp;lt;/code&amp;gt; on newer models. The current time can be displayed via &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Accessing via a browser ====&lt;br /&gt;
Some of the switches come with an integrated webserver which can be used to access information and perform configuration. While this seems convenient at first, in reality these servers rely on stuff like [https://en.wikipedia.org/wiki/Java_(programming_language) Java] or sometimes even [https://en.wikipedia.org/wiki/Adobe_Flash Adobe Flash] in the browser which is discontinued and simply does not work at all. Therefore using the CLI is the more reliable way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== DNS ==&lt;br /&gt;
=== Domains ===&lt;br /&gt;
Our public domain is &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt;. For the internal domain we don't need to register a domain, it doesn't make sense. Currently it is configure to &amp;lt;code&amp;gt;internal.sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; which is clunky but accurate. It is configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; which has the nice sideeffect of &amp;lt;code&amp;gt;bla.internal&amp;lt;/code&amp;gt; being correctly resolved from computers in the public network to the computer in the private network. The other way round it does not work, but &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; is therefore configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; as a search domain for all hosts in the private network. If we make sure to not duplicate computer names in the private and public network DNS enables the reference of another computer directly by its hostname.&lt;br /&gt;
&lt;br /&gt;
Maybe it's possible to somehow only use one domain spreading over two subnets, but since some are then public with public DNS records and some are not this might be difficult.&lt;br /&gt;
&lt;br /&gt;
=== /etc/hosts ===&lt;br /&gt;
With all the hostnames available via the &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; configuration there is no need to out them all in &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; as well. &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; knows the IP associated with a hostname from its dhcp configuration file and uses it to resolve the names if a DNS query is made. We could therefore only put aliases (such as &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt;) in the &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; file and save the work of always trying to keep &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; up to date.&lt;br /&gt;
&lt;br /&gt;
== Exposed services ==&lt;br /&gt;
Some services need to be exposed to the internet under a specific address. Most importantly the webserver (www.stern....de). This needs to have a public IP resolving to a specific host. Therefore such services need to run on a server which has two interfaces. One for the LAN and one for the WAN. The weak end system model of Linux ''might'' become a problem here.&lt;br /&gt;
&lt;br /&gt;
We could try just using NAT and port forward the necessary traffic. The webserver would be in our private network only, the router has the public IP and therefore FQDN of the webserver, and ports 80 and 443 are forwarded from the router to the webserver. This way no fiddling with virtualbox, mutliple IPs, etc. is necessary.&lt;br /&gt;
&lt;br /&gt;
When doing it this way access via SSH is also very easy. Forward port 22 to a server behind the router which acts as the login node. Then all SSH logins are done directly through &amp;lt;code&amp;gt;user@www.stern...&amp;lt;/code&amp;gt;. No two ethernet connections required. &lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Desired uplink speeds for individual hardware&lt;br /&gt;
* NFS servers: At least 10G, some maybe with 2x10G.&lt;br /&gt;
* Bladecenter: 10G&lt;br /&gt;
* Meggie nodes: 80x1G&lt;br /&gt;
* Other clients: 1G&lt;br /&gt;
&lt;br /&gt;
All switches should support RSTP (IEEE 802.1w).&lt;br /&gt;
&lt;br /&gt;
=== Main Building ===&lt;br /&gt;
In the main building we can create our own layer 2 network fairly straightforwardly.&lt;br /&gt;
&lt;br /&gt;
Let's ''please'' mount the switches in reverse in the server racks.&lt;br /&gt;
&lt;br /&gt;
==== Root Bridge ====&lt;br /&gt;
The root bridge will be the core of the network. Needs to have the capability to attach the NFS servers as well as other fast enough uplinks to switches, so at least several 10G SFP+ ports.&lt;br /&gt;
&lt;br /&gt;
Omada: SX3032F, 32x10G SFP+, ~900€&lt;br /&gt;
&lt;br /&gt;
Ubiquity (same as above): USW-Pro-Aggregation, 28x10G SFP+, 4x25G SFP28, ~900€&lt;br /&gt;
&lt;br /&gt;
==== Meggie Switches ====&lt;br /&gt;
Each Meggie node provides a 1G uplink (apart from Intel OP). With 80 nodes we need 2 48 port switches.&lt;br /&gt;
&lt;br /&gt;
Omada: SG3452X, 48x1G RJ45, 4x10G SFP+, ~400€&lt;br /&gt;
&lt;br /&gt;
Ubiquity: USW-Pro-48, 48x1G RJ45, 4x10G SFP+, ~600€&lt;br /&gt;
&lt;br /&gt;
==== Peripheral Switches ====&lt;br /&gt;
If we decommission the Messiers we can make due with 3 peripheral switches for the main building. If the RRZE lets us use the currently installed 3 switches with the 10G uplink we do not need new hardware for this.&lt;br /&gt;
&lt;br /&gt;
==== Shopping List ====&lt;br /&gt;
* 10G root bridge: ~900 Euros&lt;br /&gt;
* 2x 48x1G + 10G uplink meggie switches: 2x~400 Euros&lt;br /&gt;
* Lots of Cat 6 (or 5e) cables for the meggies&lt;br /&gt;
* We might need new DAC cables&lt;br /&gt;
* Total: 1700 Euros&lt;br /&gt;
&lt;br /&gt;
== Integrating Meridian building and Bundschuhhaus ==&lt;br /&gt;
&lt;br /&gt;
=== Layer 2 ===&lt;br /&gt;
There are two fibers going to the Meridian building. One is patched through to the Bundschuhhaus.&lt;br /&gt;
For the Meridian building it is technically possible to use one of the fibers to directly integrate an additional switch in the Clock room via layer 2. But the RRZE needs to play ball for this because they need to switch the other pair through to Bundschuhhause. If this route is taken there is still no option to integrate Bundschuhhause on layer 2.&lt;br /&gt;
&lt;br /&gt;
=== Layer 3 ===&lt;br /&gt;
A VPN would be an option to incorporate the other buildings over layer 3 without interaction with the RRZE (fingers crossed). Each building needs to have a separate OPNsense box establishing a VPN directly to the main gateway over the WAN and an attached switch for the computers.&lt;br /&gt;
&lt;br /&gt;
NFS etc. might be a bit wonky in this scenarion. Performance will certainly be limited. Strong CPU hardware of the OPNSense boxes is required for this to work with low latency.&lt;br /&gt;
&lt;br /&gt;
==== IPSec ====&lt;br /&gt;
According to the documentation this is the preferred solution for a site-to-site setup such as in our case. It's a bit complicated to set up compared to the other options. It requires an open port on the main gateway (similar to port forwarding). The computers on the other sites then also need to be in a separate subnet, necessitating a separate DHCP (possibly DNS etc.) server (TBC).&lt;br /&gt;
&lt;br /&gt;
==== Wireguard ====&lt;br /&gt;
Much easier to set up compared to IPSec, but might be less reliable. Unclear about the different subnet. Might not require an open port on the main gateway.&lt;br /&gt;
&lt;br /&gt;
==== OpenVPN ====&lt;br /&gt;
Fairly simple to set up, running via SSL, can mimick HTTPS traffic. Requires an open port.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Settings/Optimizations ==&lt;br /&gt;
* Enable jumbo frames for better NFS/iSCSI performance&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3665</id>
		<title>New Network</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3665"/>
		<updated>2025-04-06T13:17:26Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
We're creating our own network inside a DMZ.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
* Check whether the router is set to switch on after power failure in the BIOS&lt;br /&gt;
* Enable RSTP on all switches and set a high spanning tree priority on the root bridge&lt;br /&gt;
* Check whether/how we can use only one domain, instead of two (internal.sternwarte ...)&lt;br /&gt;
* When all hosts are in the private network&lt;br /&gt;
** Adjust router settings&lt;br /&gt;
*** Block private and bogon networks on WAN interface&lt;br /&gt;
*** Remove routes between public and private network&lt;br /&gt;
*** Disable gui login from public network&lt;br /&gt;
*** Disable DHC relay&lt;br /&gt;
** Adjust DHCP settings&lt;br /&gt;
*** Make the private network the default one (remove internal tags from config)&lt;br /&gt;
*** Remove classless static route from public to private network&lt;br /&gt;
&lt;br /&gt;
== Subnets ==&lt;br /&gt;
=== Public ===&lt;br /&gt;
The public subnet is a part of the internet as organized through the [https://de.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority IANA]. &amp;quot;Our&amp;quot; subnet is &amp;lt;code&amp;gt;131.188.151.0/24&amp;lt;/code&amp;gt;. At least one of the IPs in this subnet is used by the RRZE to provide a gateway. It's a [https://www.cisco.com/site/de/de/index.html Cisco] router in the basement with the IP &amp;lt;code&amp;gt;131.188.151.1&amp;lt;/code&amp;gt; and FQDN &amp;lt;code&amp;gt;astro.gate.uni-erlangen.de&amp;lt;/code&amp;gt;. We need to use this gateway to access the WAN.&lt;br /&gt;
&lt;br /&gt;
=== Private ===&lt;br /&gt;
We need to use a private network as defined in [https://www.rfc-editor.org/rfc/rfc1918.html RFC1918] for our own subnet. Because it's easy to remember and short to write we pick the class A network from RFC1918 which is &amp;lt;code&amp;gt;10.0.0.0/8&amp;lt;/code&amp;gt;. We can allocate a &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; network from this block. Since it sounds nice we can choose the second octet to also be 10. This gives us more than 65000 IP addresses to work with in &amp;lt;code&amp;gt;10.10.0.0/16&amp;lt;/code&amp;gt;. Because it makes sense we use the first address for our own gateway: &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Address blocks ====&lt;br /&gt;
Using the &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; doesn't only provide more than enough addresses, probably forever, it also enables the grouping into blocks of addresses which denote different classes of devices. This makes it easier to identify the devices and find their IP address. Note that these are not separate subnets, it's only nomenclature. These blocks are used in the DHCP server of [https://thekelleys.org.uk/dnsmasq/doc.html dnsmasq] and defined in the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet/-/blob/master/modules/remeis/files/dnsmasq/internal-dhcp.conf internal-dhcp.conf] file of the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet puppet] gitlab repository.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Address blocks&lt;br /&gt;
|-&lt;br /&gt;
! Block !! Device class&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.1.*   || Switches&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.2.*   || Management interfaces (iLO, iDRAC, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.10.*  || Servers&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.20.*  || VMs&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.30.*  || Meggie cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.40.*  || Blade center&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.50.*  || Messier cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.90.*  || Functional hosts (Raspbbery Pis, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.100.* || Office computers main building&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.200.* || Testing (Installation testing, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.250.* || Private notebooks&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Router ==&lt;br /&gt;
&lt;br /&gt;
The uplink to the WAN is realized with a server (Dell Poweredge 1950) which runs [https://opnsense.org OPNSense], a FreeBSD based routing and firewall distribution which is very easy to set up and highly reliable. The server has two 1G interfaces. One is connected to the public network managed by the RRZE (WAN) and has a public IP, the other one is connected to our own switches and has a private ip (LAN). Both interfaces are labelled in the back of the server. The router routes traffic between these two networks to make our computers talk to each other.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
The router can be configure through the web gui. It's accessible directly over the ''internal'' IP address, but the port is changed to 8443: https://10.10.0.1:8443. The user for the login is &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and the password is the same as the LDAP admin passwort (as of writing). A lot of information is provided in the [https://docs.opnsense.org/ OPNSense documentation]. One of the interfaces has a public IP, at the time of writing the public IP is &amp;lt;code&amp;gt;131.188.151.92&amp;lt;/code&amp;gt;. The other interface has the private used as the gateway, &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;. Its public IP might be changed depending on how we proceed with mechansim for remote access. SSH is is disabled, but the port is changed to 12345.&lt;br /&gt;
&lt;br /&gt;
==== Gateway ====&lt;br /&gt;
The router uses the RRZE gateway as its own upstream gateway. By default the firmware always sends packets destined to the WAN network to this gateway. At the time of writing this is problematic because the upstream gateway drops packets arriving from a private network (according to RFC1918) which makes it impossible for hosts in our private network to directly communicate with hosts in our public network. This option is therefore disabled in the configuration of the router. See the &amp;quot;Disable force gateway&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
==== Private and bogon networks ====&lt;br /&gt;
According to RFC1918 packets with source or destination IP addresses in private networks must not be routed through the internet. It often happens that such packets are generated and end up at edge routers (keep the private notebooks connected to our network in mind). Therefore such routers usually drop these packets on purpose. At the time of writing we actually want to route such packets from our private to our public network and vice versa. Therefore the option to drop packets from or to private networks is disabled on both interfaces. When we have all our hosts behind the router we should re enable this option for the WAN interface to avoid trouble with the RRZE. On the LAN interface this option should obviously stay disabled.&lt;br /&gt;
&lt;br /&gt;
There are addresses in the public IPv4 space which are not assigned to anything or do not make sense. These are called [https://de.wikipedia.org/wiki/Bogon &amp;quot;Bogon&amp;quot; networks]. The router is configured to drop these packets if they arrive on the WAN interface.&lt;br /&gt;
&lt;br /&gt;
==== NAT ====&lt;br /&gt;
Hosts within the private network can not directly talk to the internet (see the previous section), they need an intermidiary to do this. This is accomplished by using [https://en.wikipedia.org/wiki/Network_address_translation Network address translation (NAT)]. When a client wants to talk to the internet (except our own public network, see the following section), the router replaces the source address of the packet with its own public address and sends it of to the WAN. From the WAN it looks as if the router is making requests, instead of the client. When the reply arrives on the WAN interface the router changes the destination address of the packet from its own public address to the private address of the client and sends if off into the LAN.&lt;br /&gt;
&lt;br /&gt;
We need this mechanism for all clients behind the router to talk to the internet, except our own public network. This option is available as outbound NAT in the routers firmware and enabled by default.&lt;br /&gt;
&lt;br /&gt;
There is an important exception: Traffic from our private network which has a destination in our own public network should be routed directly, without any NAT, such that these two computers can talk directly to each other. Therefore there is a rule in the outbound NAT section which identifies such traffic and disables NAT for it. It can then be routed normally (see the following section). Note that this should be disabled as soon as all our computers are in the private network and can talk to each other directly.&lt;br /&gt;
&lt;br /&gt;
==== Routing between public and private network ====&lt;br /&gt;
At the time of writing our computers are distributed in a private and a public network. Both need to be reachable by each other. Therefore the router allows traffic to pass between these exact two networks without any restrictions. The rules for this can be found in the LAN and WAN sections of the firewall rules of the router. Especially the rule allowing any traffic originating from the public network to pass directly into the private network should be disabled as soon as all computers are in the private network.&lt;br /&gt;
&lt;br /&gt;
==== DHCP relay ====&lt;br /&gt;
At the time of writing we have DHCP (and DNS etc.) servers in the public network. Replicating these services behind the router can be avoided by allowing the router to forward DHCP requests from the private to the public network. This is done in the DHC relay section in the Services menu. With this service and the working routing and NAT there is no need to replicate these services in the private network for now. Everything seems to work, including PXE boot to install clients within the private network. As soon as all computers are in the private network the DHC relay should be disabled.&lt;br /&gt;
&lt;br /&gt;
==== Backup ====&lt;br /&gt;
The configuration can be backed up simply by downloading it in the GUI. It's recommended to do this once in a while just in case the router dies. This configuration can then be very easily applied after a new installation.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
Updates of the route can simply be done through the GUI. For security reasons this is recommended on a regular basis, but since we have the firewall of the RRZE in front of it it's probably not critical. Often the updates ca be done even without restarting the firmware.&lt;br /&gt;
&lt;br /&gt;
== Layer 2 ==&lt;br /&gt;
With the router working we can use our own ethernet switches behind it without interfering with the RRZE switches.&lt;br /&gt;
&lt;br /&gt;
=== VLAN ===&lt;br /&gt;
[https://en.wikipedia.org/wiki/VLAN Local Area Networks (VLAN)] are logical layer 2 networks which can spread across multiple switches. They can be used to separate different broadcast domains (ethernet networks) and usually only contain a single IP subnet. Under certain scenarios VLANs can offer performance, flexibility and security advantages. We don't want to segment our network, therefore performance and flexibility enhancements are not possible. Security is also of no concern. We therefore do not use VLANs.&lt;br /&gt;
&lt;br /&gt;
However, from a technical perspective this is impossible with layer 3 switches. By default all interfaces of a switch are assigned to the so called default VLAN. For most switch manufacturers this is VLAN 1, but it doesn't have to be. Most manufacturers also use VLAN 1 as the native VLAN. This means that all frames in VLAN 1 are sent untagged (without VLAN information) also to other switches, even over tagged ports (trunk ports). This ensures interoperability without changing settings.&lt;br /&gt;
&lt;br /&gt;
We are good as long as all switches we buy have default VLAN 1 (which can not be changed) and native VLAN 1 (which can be changed). In case we get a switch which does not have the default VLAN 1 we need to set the native VLAN of this switch also to the same VLAN, making all frames in this VLAN untagged, enabling communication with other switches.&lt;br /&gt;
&lt;br /&gt;
=== Spanning tree ===&lt;br /&gt;
We know for a fact that sometimes people plug ethernet cables into random ports, even both ends of it, causing potential loops (see mail on 22 August 2023). To avoid such loops the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol spanning tree protocol (STP)] defined in [https://en.wikipedia.org/wiki/IEEE_802.1D IEEE 802.1d]. When this protocol is enabled on a switch it exchanges [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Bridge_protocol_data_units bridge protocol data units (BPDUs)] with its neighbouring switches, containing some information about the network topology. This information is used to elect the so called [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Root_bridge_and_the_bridge_ID root bridge]. This switch can be thought of as the top of the spanning tree. All other switches then determine one port they use as a path towards this root bridge, even if it goes through another switch. All other ports which also provide a path towards the root bridge are disabled (set to the blocking [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Port_states state]). The election of the root bridge also enters an individual priority for each switch which can be set by the administrator. We should make sure to set a high priority on our central switch.&lt;br /&gt;
&lt;br /&gt;
When a change in the network topology is detected via the BPDUs 802.1d causes the entire spanning tree to be newly established with a new election of a root bridge. This can take somewhere around a minute, which is too long. Therefore the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Rapid_Spanning_Tree_Protocol rapid STP (RSTP)] was defined in IEEE 802.1w. It is fully backwards compatible with 802.1d and uses additional information to define port based rules such as alternate and backup ports for the path to the root bridge such that a topology change can be acted on in just a few seconds. It has the nice benefit that a link to a computer which is plugged into an access port on a given switch becomes ready in just a few seconds. We therefore enable RSTP on all our switches. Usually this is done by enabling STP and forcing the STP mode to RSTP. No further configuration is needed, except the priority of the root bridge.&lt;br /&gt;
&lt;br /&gt;
=== NTP ===&lt;br /&gt;
All switches are configured to use the RRZE NTP servers directly via their IP addresses because they can't do DNS. &lt;br /&gt;
&lt;br /&gt;
=== Current switches ===&lt;br /&gt;
Here is a list of the currently installed switches, their configuration, uplink, and some notes. All passwords are the LDAP password.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Switches&lt;br /&gt;
|-&lt;br /&gt;
! name !! IP !! Usecase !! Model !! Connectivity !! Administration !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| switch1 || 10.10.1.1 || 1G RJ45 distribution racks || HP ProCurve J4904A 2848 || 44x1G RJ45, 4x1G RJ45/SFP || telnet, D-Sub 9 + RS232-USB ||&lt;br /&gt;
* Kind of old&lt;br /&gt;
* No username required for login&lt;br /&gt;
* Ports 45-48 are dual personality ports, either RJ45 or SFP can be used, not both.&lt;br /&gt;
|-&lt;br /&gt;
| switch2 || 10.10.1.2 || server management (iLO, iDRAC, ...) || HP J9781A 2530-48 || 48x100M RJ45, 2x1G RJ45/SFP || telnet, micro-USB B, RJ45 + RS232-USB ||&lt;br /&gt;
* Username: manager&lt;br /&gt;
* Ports 49-50 (or 49-52) are dual personality ports, either RJ45 or SFP can be used, not both&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== HP switch configuration ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== DNS ==&lt;br /&gt;
=== Domains ===&lt;br /&gt;
Our public domain is &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt;. For the internal domain we don't need to register a domain, it doesn't make sense. Currently it is configure to &amp;lt;code&amp;gt;internal.sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; which is clunky but accurate. It is configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; which has the nice sideeffect of &amp;lt;code&amp;gt;bla.internal&amp;lt;/code&amp;gt; being correctly resolved from computers in the public network to the computer in the private network. The other way round it does not work, but &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; is therefore configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; as a search domain for all hosts in the private network. If we make sure to not duplicate computer names in the private and public network DNS enables the reference of another computer directly by its hostname.&lt;br /&gt;
&lt;br /&gt;
Maybe it's possible to somehow only use one domain spreading over two subnets, but since some are then public with public DNS records and some are not this might be difficult.&lt;br /&gt;
&lt;br /&gt;
=== /etc/hosts ===&lt;br /&gt;
With all the hostnames available via the &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; configuration there is no need to out them all in &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; as well. &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; knows the IP associated with a hostname from its dhcp configuration file and uses it to resolve the names if a DNS query is made. We could therefore only put aliases (such as &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt;) in the &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; file and save the work of always trying to keep &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; up to date.&lt;br /&gt;
&lt;br /&gt;
== Exposed services ==&lt;br /&gt;
Some services need to be exposed to the internet under a specific address. Most importantly the webserver (www.stern....de). This needs to have a public IP resolving to a specific host. Therefore such services need to run on a server which has two interfaces. One for the LAN and one for the WAN. The weak end system model of Linux ''might'' become a problem here.&lt;br /&gt;
&lt;br /&gt;
We could try just using NAT and port forward the necessary traffic. The webserver would be in our private network only, the router has the public IP and therefore FQDN of the webserver, and ports 80 and 443 are forwarded from the router to the webserver. This way no fiddling with virtualbox, mutliple IPs, etc. is necessary.&lt;br /&gt;
&lt;br /&gt;
When doing it this way access via SSH is also very easy. Forward port 22 to a server behind the router which acts as the login node. Then all SSH logins are done directly through &amp;lt;code&amp;gt;user@www.stern...&amp;lt;/code&amp;gt;. No two ethernet connections required. &lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Desired uplink speeds for individual hardware&lt;br /&gt;
* NFS servers: At least 10G, some maybe with 2x10G.&lt;br /&gt;
* Bladecenter: 10G&lt;br /&gt;
* Meggie nodes: 80x1G&lt;br /&gt;
* Other clients: 1G&lt;br /&gt;
&lt;br /&gt;
All switches should support RSTP (IEEE 802.1w).&lt;br /&gt;
&lt;br /&gt;
=== Main Building ===&lt;br /&gt;
In the main building we can create our own layer 2 network fairly straightforwardly.&lt;br /&gt;
&lt;br /&gt;
Let's ''please'' mount the switches in reverse in the server racks.&lt;br /&gt;
&lt;br /&gt;
==== Root Bridge ====&lt;br /&gt;
The root bridge will be the core of the network. Needs to have the capability to attach the NFS servers as well as other fast enough uplinks to switches, so at least several 10G SFP+ ports.&lt;br /&gt;
&lt;br /&gt;
Omada: SX3032F, 32x10G SFP+, ~900€&lt;br /&gt;
&lt;br /&gt;
Ubiquity (same as above): USW-Pro-Aggregation, 28x10G SFP+, 4x25G SFP28, ~900€&lt;br /&gt;
&lt;br /&gt;
==== Meggie Switches ====&lt;br /&gt;
Each Meggie node provides a 1G uplink (apart from Intel OP). With 80 nodes we need 2 48 port switches.&lt;br /&gt;
&lt;br /&gt;
Omada: SG3452X, 48x1G RJ45, 4x10G SFP+, ~400€&lt;br /&gt;
&lt;br /&gt;
Ubiquity: USW-Pro-48, 48x1G RJ45, 4x10G SFP+, ~600€&lt;br /&gt;
&lt;br /&gt;
==== Peripheral Switches ====&lt;br /&gt;
If we decommission the Messiers we can make due with 3 peripheral switches for the main building. If the RRZE lets us use the currently installed 3 switches with the 10G uplink we do not need new hardware for this.&lt;br /&gt;
&lt;br /&gt;
==== Shopping List ====&lt;br /&gt;
* 10G root bridge: ~900 Euros&lt;br /&gt;
* 2x 48x1G + 10G uplink meggie switches: 2x~400 Euros&lt;br /&gt;
* Lots of Cat 6 (or 5e) cables for the meggies&lt;br /&gt;
* We might need new DAC cables&lt;br /&gt;
* Total: 1700 Euros&lt;br /&gt;
&lt;br /&gt;
== Integrating Meridian building and Bundschuhhaus ==&lt;br /&gt;
&lt;br /&gt;
=== Layer 2 ===&lt;br /&gt;
There are two fibers going to the Meridian building. One is patched through to the Bundschuhhaus.&lt;br /&gt;
For the Meridian building it is technically possible to use one of the fibers to directly integrate an additional switch in the Clock room via layer 2. But the RRZE needs to play ball for this because they need to switch the other pair through to Bundschuhhause. If this route is taken there is still no option to integrate Bundschuhhause on layer 2.&lt;br /&gt;
&lt;br /&gt;
=== Layer 3 ===&lt;br /&gt;
A VPN would be an option to incorporate the other buildings over layer 3 without interaction with the RRZE (fingers crossed). Each building needs to have a separate OPNsense box establishing a VPN directly to the main gateway over the WAN and an attached switch for the computers.&lt;br /&gt;
&lt;br /&gt;
NFS etc. might be a bit wonky in this scenarion. Performance will certainly be limited. Strong CPU hardware of the OPNSense boxes is required for this to work with low latency.&lt;br /&gt;
&lt;br /&gt;
==== IPSec ====&lt;br /&gt;
According to the documentation this is the preferred solution for a site-to-site setup such as in our case. It's a bit complicated to set up compared to the other options. It requires an open port on the main gateway (similar to port forwarding). The computers on the other sites then also need to be in a separate subnet, necessitating a separate DHCP (possibly DNS etc.) server (TBC).&lt;br /&gt;
&lt;br /&gt;
==== Wireguard ====&lt;br /&gt;
Much easier to set up compared to IPSec, but might be less reliable. Unclear about the different subnet. Might not require an open port on the main gateway.&lt;br /&gt;
&lt;br /&gt;
==== OpenVPN ====&lt;br /&gt;
Fairly simple to set up, running via SSL, can mimick HTTPS traffic. Requires an open port.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Settings/Optimizations ==&lt;br /&gt;
* Enable jumbo frames for better NFS/iSCSI performance&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3664</id>
		<title>New Network</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3664"/>
		<updated>2025-04-06T11:49:56Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
We're creating our own network inside a DMZ.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
* Check whether the router is set to switch on after power failure in the BIOS&lt;br /&gt;
* Enable RSTP on all switches and set a high spanning tree priority on the root bridge&lt;br /&gt;
* Check whether/how we can use only one domain, instead of two (internal.sternwarte ...)&lt;br /&gt;
* When all hosts are in the private network&lt;br /&gt;
** Adjust router settings&lt;br /&gt;
*** Block private and bogon networks on WAN interface&lt;br /&gt;
*** Remove routes between public and private network&lt;br /&gt;
*** Disable gui login from public network&lt;br /&gt;
*** Disable DHC relay&lt;br /&gt;
** Adjust DHCP settings&lt;br /&gt;
*** Make the private network the default one (remove internal tags from config)&lt;br /&gt;
*** Remove classless static route from public to private network&lt;br /&gt;
&lt;br /&gt;
== Subnets ==&lt;br /&gt;
=== Public ===&lt;br /&gt;
The public subnet is a part of the internet as organized through the [https://de.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority IANA]. &amp;quot;Our&amp;quot; subnet is &amp;lt;code&amp;gt;131.188.151.0/24&amp;lt;/code&amp;gt;. At least one of the IPs in this subnet is used by the RRZE to provide a gateway. It's a [https://www.cisco.com/site/de/de/index.html Cisco] router in the basement with the IP &amp;lt;code&amp;gt;131.188.151.1&amp;lt;/code&amp;gt; and FQDN &amp;lt;code&amp;gt;astro.gate.uni-erlangen.de&amp;lt;/code&amp;gt;. We need to use this gateway to access the WAN.&lt;br /&gt;
&lt;br /&gt;
=== Private ===&lt;br /&gt;
We need to use a private network as defined in [https://www.rfc-editor.org/rfc/rfc1918.html RFC1918] for our own subnet. Because it's easy to remember and short to write we pick the class A network from RFC1918 which is &amp;lt;code&amp;gt;10.0.0.0/8&amp;lt;/code&amp;gt;. We can allocate a &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; network from this block. Since it sounds nice we can choose the second octet to also be 10. This gives us more than 65000 IP addresses to work with in &amp;lt;code&amp;gt;10.10.0.0/16&amp;lt;/code&amp;gt;. Because it makes sense we use the first address for our own gateway: &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Address blocks ====&lt;br /&gt;
Using the &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; doesn't only provide more than enough addresses, probably forever, it also enables the grouping into blocks of addresses which denote different classes of devices. This makes it easier to identify the devices and find their IP address. Note that these are not separate subnets, it's only nomenclature. These blocks are used in the DHCP server of [https://thekelleys.org.uk/dnsmasq/doc.html dnsmasq] and defined in the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet/-/blob/master/modules/remeis/files/dnsmasq/internal-dhcp.conf internal-dhcp.conf] file of the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet puppet] gitlab repository.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Address blocks&lt;br /&gt;
|-&lt;br /&gt;
! Block !! Device class&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.1.*   || Switches&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.2.*   || Management interfaces (iLO, iDRAC, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.10.*  || Servers&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.20.*  || VMs&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.30.*  || Meggie cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.40.*  || Blade center&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.50.*  || Messier cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.90.*  || Functional hosts (Raspbbery Pis, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.100.* || Office computers main building&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.200.* || Testing (Installation testing, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.250.* || Private notebooks&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Router ==&lt;br /&gt;
&lt;br /&gt;
The uplink to the WAN is realized with a server (Dell Poweredge 1950) which runs [https://opnsense.org OPNSense], a FreeBSD based routing and firewall distribution which is very easy to set up and highly reliable. The server has two 1G interfaces. One is connected to the public network managed by the RRZE (WAN) and has a public IP, the other one is connected to our own switches and has a private ip (LAN). Both interfaces are labelled in the back of the server. The router routes traffic between these two networks to make our computers talk to each other.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
The router can be configure through the web gui. It's accessible directly over the ''internal'' IP address, but the port is changed to 8443: https://10.10.0.1:8443. The user for the login is &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and the password is the same as the LDAP admin passwort (as of writing). A lot of information is provided in the [https://docs.opnsense.org/ OPNSense documentation]. One of the interfaces has a public IP, at the time of writing the public IP is &amp;lt;code&amp;gt;131.188.151.92&amp;lt;/code&amp;gt;. The other interface has the private used as the gateway, &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;. Its public IP might be changed depending on how we proceed with mechansim for remote access. SSH is is disabled, but the port is changed to 12345.&lt;br /&gt;
&lt;br /&gt;
==== Gateway ====&lt;br /&gt;
The router uses the RRZE gateway as its own upstream gateway. By default the firmware always sends packets destined to the WAN network to this gateway. At the time of writing this is problematic because the upstream gateway drops packets arriving from a private network (according to RFC1918) which makes it impossible for hosts in our private network to directly communicate with hosts in our public network. This option is therefore disabled in the configuration of the router. See the &amp;quot;Disable force gateway&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
==== Private and bogon networks ====&lt;br /&gt;
According to RFC1918 packets with source or destination IP addresses in private networks must not be routed through the internet. It often happens that such packets are generated and end up at edge routers (keep the private notebooks connected to our network in mind). Therefore such routers usually drop these packets on purpose. At the time of writing we actually want to route such packets from our private to our public network and vice versa. Therefore the option to drop packets from or to private networks is disabled on both interfaces. When we have all our hosts behind the router we should re enable this option for the WAN interface to avoid trouble with the RRZE. On the LAN interface this option should obviously stay disabled.&lt;br /&gt;
&lt;br /&gt;
There are addresses in the public IPv4 space which are not assigned to anything or do not make sense. These are called [https://de.wikipedia.org/wiki/Bogon &amp;quot;Bogon&amp;quot; networks]. The router is configured to drop these packets if they arrive on the WAN interface.&lt;br /&gt;
&lt;br /&gt;
==== NAT ====&lt;br /&gt;
Hosts within the private network can not directly talk to the internet (see the previous section), they need an intermidiary to do this. This is accomplished by using [https://en.wikipedia.org/wiki/Network_address_translation Network address translation (NAT)]. When a client wants to talk to the internet (except our own public network, see the following section), the router replaces the source address of the packet with its own public address and sends it of to the WAN. From the WAN it looks as if the router is making requests, instead of the client. When the reply arrives on the WAN interface the router changes the destination address of the packet from its own public address to the private address of the client and sends if off into the LAN.&lt;br /&gt;
&lt;br /&gt;
We need this mechanism for all clients behind the router to talk to the internet, except our own public network. This option is available as outbound NAT in the routers firmware and enabled by default.&lt;br /&gt;
&lt;br /&gt;
There is an important exception: Traffic from our private network which has a destination in our own public network should be routed directly, without any NAT, such that these two computers can talk directly to each other. Therefore there is a rule in the outbound NAT section which identifies such traffic and disables NAT for it. It can then be routed normally (see the following section). Note that this should be disabled as soon as all our computers are in the private network and can talk to each other directly.&lt;br /&gt;
&lt;br /&gt;
==== Routing between public and private network ====&lt;br /&gt;
At the time of writing our computers are distributed in a private and a public network. Both need to be reachable by each other. Therefore the router allows traffic to pass between these exact two networks without any restrictions. The rules for this can be found in the LAN and WAN sections of the firewall rules of the router. Especially the rule allowing any traffic originating from the public network to pass directly into the private network should be disabled as soon as all computers are in the private network.&lt;br /&gt;
&lt;br /&gt;
==== DHCP relay ====&lt;br /&gt;
At the time of writing we have DHCP (and DNS etc.) servers in the public network. Replicating these services behind the router can be avoided by allowing the router to forward DHCP requests from the private to the public network. This is done in the DHC relay section in the Services menu. With this service and the working routing and NAT there is no need to replicate these services in the private network for now. Everything seems to work, including PXE boot to install clients within the private network. As soon as all computers are in the private network the DHC relay should be disabled.&lt;br /&gt;
&lt;br /&gt;
==== Backup ====&lt;br /&gt;
The configuration can be backed up simply by downloading it in the GUI. It's recommended to do this once in a while just in case the router dies. This configuration can then be very easily applied after a new installation.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
Updates of the route can simply be done through the GUI. For security reasons this is recommended on a regular basis, but since we have the firewall of the RRZE in front of it it's probably not critical. Often the updates ca be done even without restarting the firmware.&lt;br /&gt;
&lt;br /&gt;
== Layer 2 ==&lt;br /&gt;
With the router working we can use our own ethernet switches behind it without interfering with the RRZE switches.&lt;br /&gt;
&lt;br /&gt;
=== VLAN ===&lt;br /&gt;
[https://en.wikipedia.org/wiki/VLAN Local Area Networks (VLAN)] are logical layer 2 networks which can spread across multiple switches. They can be used to separate different broadcast domains (ethernet networks) and usually only contain a single IP subnet. Under certain scenarios VLANs can offer performance, flexibility and security advantages. We don't want to segment our network, therefore performance and flexibility enhancements are not possible. Security is also of no concern. We therefore do not use VLANs.&lt;br /&gt;
&lt;br /&gt;
However, from a technical perspective this is impossible with layer 3 switches. By default all interfaces of a switch are assigned to the so called default VLAN. For most switch manufacturers this is VLAN 1, but it doesn't have to be. Most manufacturers also use VLAN 1 as the native VLAN. This means that all frames in VLAN 1 are sent untagged (without VLAN information) also to other switches, even over tagged ports (trunk ports). This ensures interoperability without changing settings.&lt;br /&gt;
&lt;br /&gt;
We are good as long as all switches we buy have default VLAN 1 (which can not be changed) and native VLAN 1 (which can be changed). In case we get a switch which does not have the default VLAN 1 we need to set the native VLAN of this switch also to the same VLAN, making all frames in this VLAN untagged, enabling communication with other switches.&lt;br /&gt;
&lt;br /&gt;
=== Spanning tree ===&lt;br /&gt;
We know for a fact that sometimes people plug ethernet cables into random ports, even both ends of it, causing potential loops (see mail on 22 August 2023). To avoid such loops the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol spanning tree protocol (STP)] defined in [https://en.wikipedia.org/wiki/IEEE_802.1D IEEE 802.1d]. When this protocol is enabled on a switch it exchanges [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Bridge_protocol_data_units bridge protocol data units (BPDUs)] with its neighbouring switches, containing some information about the network topology. This information is used to elect the so called [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Root_bridge_and_the_bridge_ID root bridge]. This switch can be thought of as the top of the spanning tree. All other switches then determine one port they use as a path towards this root bridge, even if it goes through another switch. All other ports which also provide a path towards the root bridge are disabled (set to the blocking [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Port_states state]). The election of the root bridge also enters an individual priority for each switch which can be set by the administrator. We should make sure to set a high priority on our central switch.&lt;br /&gt;
&lt;br /&gt;
When a change in the network topology is detected via the BPDUs 802.1d causes the entire spanning tree to be newly established with a new election of a root bridge. This can take somewhere around a minute, which is too long. Therefore the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Rapid_Spanning_Tree_Protocol rapid STP (RSTP)] was defined in IEEE 802.1w. It is fully backwards compatible with 802.1d and uses additional information to define port based rules such as alternate and backup ports for the path to the root bridge such that a topology change can be acted on in just a few seconds. It has the nice benefit that a link to a computer which is plugged into an access port on a given switch becomes ready in just a few seconds. We therefore enable RSTP on all our switches. Usually this is done by enabling STP and forcing the STP mode to RSTP. No further configuration is needed, except the priority of the root bridge.&lt;br /&gt;
&lt;br /&gt;
== DNS ==&lt;br /&gt;
=== Domains ===&lt;br /&gt;
Our public domain is &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt;. For the internal domain we don't need to register a domain, it doesn't make sense. Currently it is configure to &amp;lt;code&amp;gt;internal.sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; which is clunky but accurate. It is configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; which has the nice sideeffect of &amp;lt;code&amp;gt;bla.internal&amp;lt;/code&amp;gt; being correctly resolved from computers in the public network to the computer in the private network. The other way round it does not work, but &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; is therefore configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; as a search domain for all hosts in the private network. If we make sure to not duplicate computer names in the private and public network DNS enables the reference of another computer directly by its hostname.&lt;br /&gt;
&lt;br /&gt;
Maybe it's possible to somehow only use one domain spreading over two subnets, but since some are then public with public DNS records and some are not this might be difficult.&lt;br /&gt;
&lt;br /&gt;
=== /etc/hosts ===&lt;br /&gt;
With all the hostnames available via the &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; configuration there is no need to out them all in &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; as well. &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; knows the IP associated with a hostname from its dhcp configuration file and uses it to resolve the names if a DNS query is made. We could therefore only put aliases (such as &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt;) in the &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; file and save the work of always trying to keep &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; up to date.&lt;br /&gt;
&lt;br /&gt;
== Exposed services ==&lt;br /&gt;
Some services need to be exposed to the internet under a specific address. Most importantly the webserver (www.stern....de). This needs to have a public IP resolving to a specific host. Therefore such services need to run on a server which has two interfaces. One for the LAN and one for the WAN. The weak end system model of Linux ''might'' become a problem here.&lt;br /&gt;
&lt;br /&gt;
We could try just using NAT and port forward the necessary traffic. The webserver would be in our private network only, the router has the public IP and therefore FQDN of the webserver, and ports 80 and 443 are forwarded from the router to the webserver. This way no fiddling with virtualbox, mutliple IPs, etc. is necessary.&lt;br /&gt;
&lt;br /&gt;
When doing it this way access via SSH is also very easy. Forward port 22 to a server behind the router which acts as the login node. Then all SSH logins are done directly through &amp;lt;code&amp;gt;user@www.stern...&amp;lt;/code&amp;gt;. No two ethernet connections required. &lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Desired uplink speeds for individual hardware&lt;br /&gt;
* NFS servers: At least 10G, some maybe with 2x10G.&lt;br /&gt;
* Bladecenter: 10G&lt;br /&gt;
* Meggie nodes: 80x1G&lt;br /&gt;
* Other clients: 1G&lt;br /&gt;
&lt;br /&gt;
All switches should support RSTP (IEEE 802.1w).&lt;br /&gt;
&lt;br /&gt;
=== Main Building ===&lt;br /&gt;
In the main building we can create our own layer 2 network fairly straightforwardly.&lt;br /&gt;
&lt;br /&gt;
Let's ''please'' mount the switches in reverse in the server racks.&lt;br /&gt;
&lt;br /&gt;
==== Root Bridge ====&lt;br /&gt;
The root bridge will be the core of the network. Needs to have the capability to attach the NFS servers as well as other fast enough uplinks to switches, so at least several 10G SFP+ ports.&lt;br /&gt;
&lt;br /&gt;
Omada: SX3032F, 32x10G SFP+, ~900€&lt;br /&gt;
&lt;br /&gt;
Ubiquity (same as above): USW-Pro-Aggregation, 28x10G SFP+, 4x25G SFP28, ~900€&lt;br /&gt;
&lt;br /&gt;
==== Meggie Switches ====&lt;br /&gt;
Each Meggie node provides a 1G uplink (apart from Intel OP). With 80 nodes we need 2 48 port switches.&lt;br /&gt;
&lt;br /&gt;
Omada: SG3452X, 48x1G RJ45, 4x10G SFP+, ~400€&lt;br /&gt;
&lt;br /&gt;
Ubiquity: USW-Pro-48, 48x1G RJ45, 4x10G SFP+, ~600€&lt;br /&gt;
&lt;br /&gt;
==== Peripheral Switches ====&lt;br /&gt;
If we decommission the Messiers we can make due with 3 peripheral switches for the main building. If the RRZE lets us use the currently installed 3 switches with the 10G uplink we do not need new hardware for this.&lt;br /&gt;
&lt;br /&gt;
==== Shopping List ====&lt;br /&gt;
* 10G root bridge: ~900 Euros&lt;br /&gt;
* 2x 48x1G + 10G uplink meggie switches: 2x~400 Euros&lt;br /&gt;
* Lots of Cat 6 (or 5e) cables for the meggies&lt;br /&gt;
* We might need new DAC cables&lt;br /&gt;
* Total: 1700 Euros&lt;br /&gt;
&lt;br /&gt;
== Integrating Meridian building and Bundschuhhaus ==&lt;br /&gt;
&lt;br /&gt;
=== Layer 2 ===&lt;br /&gt;
There are two fibers going to the Meridian building. One is patched through to the Bundschuhhaus.&lt;br /&gt;
For the Meridian building it is technically possible to use one of the fibers to directly integrate an additional switch in the Clock room via layer 2. But the RRZE needs to play ball for this because they need to switch the other pair through to Bundschuhhause. If this route is taken there is still no option to integrate Bundschuhhause on layer 2.&lt;br /&gt;
&lt;br /&gt;
=== Layer 3 ===&lt;br /&gt;
A VPN would be an option to incorporate the other buildings over layer 3 without interaction with the RRZE (fingers crossed). Each building needs to have a separate OPNsense box establishing a VPN directly to the main gateway over the WAN and an attached switch for the computers.&lt;br /&gt;
&lt;br /&gt;
NFS etc. might be a bit wonky in this scenarion. Performance will certainly be limited. Strong CPU hardware of the OPNSense boxes is required for this to work with low latency.&lt;br /&gt;
&lt;br /&gt;
==== IPSec ====&lt;br /&gt;
According to the documentation this is the preferred solution for a site-to-site setup such as in our case. It's a bit complicated to set up compared to the other options. It requires an open port on the main gateway (similar to port forwarding). The computers on the other sites then also need to be in a separate subnet, necessitating a separate DHCP (possibly DNS etc.) server (TBC).&lt;br /&gt;
&lt;br /&gt;
==== Wireguard ====&lt;br /&gt;
Much easier to set up compared to IPSec, but might be less reliable. Unclear about the different subnet. Might not require an open port on the main gateway.&lt;br /&gt;
&lt;br /&gt;
==== OpenVPN ====&lt;br /&gt;
Fairly simple to set up, running via SSL, can mimick HTTPS traffic. Requires an open port.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Settings/Optimizations ==&lt;br /&gt;
* Enable jumbo frames for better NFS/iSCSI performance&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3663</id>
		<title>New Network</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3663"/>
		<updated>2025-04-06T11:36:26Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
We're creating our own network inside a DMZ.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
* Check whether the router is set to switch on after power failure in the BIOS&lt;br /&gt;
* Enable RSTP on all switches and set a high spanning tree priority on the root bridge&lt;br /&gt;
* Check whether/how we can use only one domain, instead of two (internal.sternwarte ...)&lt;br /&gt;
* When all hosts are in the private network&lt;br /&gt;
** Adjust router settings&lt;br /&gt;
*** Block private and bogon networks on WAN interface&lt;br /&gt;
*** Remove routes between public and private network&lt;br /&gt;
*** Disable gui login from public network&lt;br /&gt;
*** Disable DHC relay&lt;br /&gt;
** Adjust DHCP settings&lt;br /&gt;
*** Make the private network the default one (remove internal tags from config)&lt;br /&gt;
*** Remove classless static route from public to private network&lt;br /&gt;
&lt;br /&gt;
== Subnets ==&lt;br /&gt;
=== Public ===&lt;br /&gt;
The public subnet is a part of the internet as organized through the [https://de.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority IANA]. &amp;quot;Our&amp;quot; subnet is &amp;lt;code&amp;gt;131.188.151.0/24&amp;lt;/code&amp;gt;. At least one of the IPs in this subnet is used by the RRZE to provide a gateway. It's a [https://www.cisco.com/site/de/de/index.html Cisco] router in the basement with the IP &amp;lt;code&amp;gt;131.188.151.1&amp;lt;/code&amp;gt; and FQDN &amp;lt;code&amp;gt;astro.gate.uni-erlangen.de&amp;lt;/code&amp;gt;. We need to use this gateway to access the WAN.&lt;br /&gt;
&lt;br /&gt;
=== Private ===&lt;br /&gt;
We need to use a private network as defined in [https://www.rfc-editor.org/rfc/rfc1918.html RFC1918] for our own subnet. Because it's easy to remember and short to write we pick the class A network from RFC1918 which is &amp;lt;code&amp;gt;10.0.0.0/8&amp;lt;/code&amp;gt;. We can allocate a &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; network from this block. Since it sounds nice we can choose the second octet to also be 10. This gives us more than 65000 IP addresses to work with in &amp;lt;code&amp;gt;10.10.0.0/16&amp;lt;/code&amp;gt;. Because it makes sense we use the first address for our own gateway: &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Address blocks ====&lt;br /&gt;
Using the &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; doesn't only provide more than enough addresses, probably forever, it also enables the grouping into blocks of addresses which denote different classes of devices. This makes it easier to identify the devices and find their IP address. Note that these are not separate subnets, it's only nomenclature. These blocks are used in the DHCP server of [https://thekelleys.org.uk/dnsmasq/doc.html dnsmasq] and defined in the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet/-/blob/master/modules/remeis/files/dnsmasq/internal-dhcp.conf internal-dhcp.conf] file of the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet puppet] gitlab repository.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Address blocks&lt;br /&gt;
|-&lt;br /&gt;
! Block !! Device class&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.1.*   || Switches&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.2.*   || Management interfaces (iLO, iDRAC, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.10.*  || Servers&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.20.*  || VMs&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.30.*  || Meggie cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.40.*  || Blade center&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.50.*  || Messier cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.90.*  || Functional hosts (Raspbbery Pis, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.100.* || Office computers main building&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.200.* || Testing (Installation testing, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.250.* || Private notebooks&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Router ==&lt;br /&gt;
&lt;br /&gt;
The uplink to the WAN is realized with a server (Dell Poweredge 1950) which runs [https://opnsense.org OPNSense], a FreeBSD based routing and firewall distribution which is very easy to set up and highly reliable. The server has two 1G interfaces. One is connected to the public network managed by the RRZE (WAN) and has a public IP, the other one is connected to our own switches and has a private ip (LAN). Both interfaces are labelled in the back of the server. The router routes traffic between these two networks to make our computers talk to each other.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
The router can be configure through the web gui. It's accessible directly over the IP address. The user for the login is &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and the password is the same as the LDAP admin passwort (as of writing). A lot of information is provided in the [https://docs.opnsense.org/ OPNSense documentation]. One of the interfaces has a public IP, at the time of writing the public IP is &amp;lt;code&amp;gt;131.188.151.92&amp;lt;/code&amp;gt;. The other interface has the private used as the gateway, &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;. Its public IP might be changed depending on how we proceed with mechansim for remote access.&lt;br /&gt;
&lt;br /&gt;
==== Gateway ====&lt;br /&gt;
The router uses the RRZE gateway as its own upstream gateway. By default the firmware always sends packets destined to the WAN network to this gateway. At the time of writing this is problematic because the upstream gateway drops packets arriving from a private network (according to RFC1918) which makes it impossible for hosts in our private network to directly communicate with hosts in our public network. This option is therefore disabled in the configuration of the router. See the &amp;quot;Disable force gateway&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
==== Private and bogon networks ====&lt;br /&gt;
According to RFC1918 packets with source or destination IP addresses in private networks must not be routed through the internet. It often happens that such packets are generated and end up at edge routers (keep the private notebooks connected to our network in mind). Therefore such routers usually drop these packets on purpose. At the time of writing we actually want to route such packets from our private to our public network and vice versa. Therefore the option to drop packets from or to private networks is disabled on both interfaces. When we have all our hosts behind the router we should re enable this option for the WAN interface to avoid trouble with the RRZE. On the LAN interface this option should obviously stay disabled.&lt;br /&gt;
&lt;br /&gt;
There are addresses in the public IPv4 space which are not assigned to anything or do not make sense. These are called [https://de.wikipedia.org/wiki/Bogon &amp;quot;Bogon&amp;quot; networks]. The router is configured to drop these packets if they arrive on the WAN interface.&lt;br /&gt;
&lt;br /&gt;
==== NAT ====&lt;br /&gt;
Hosts within the private network can not directly talk to the internet (see the previous section), they need an intermidiary to do this. This is accomplished by using [https://en.wikipedia.org/wiki/Network_address_translation Network address translation (NAT)]. When a client wants to talk to the internet (except our own public network, see the following section), the router replaces the source address of the packet with its own public address and sends it of to the WAN. From the WAN it looks as if the router is making requests, instead of the client. When the reply arrives on the WAN interface the router changes the destination address of the packet from its own public address to the private address of the client and sends if off into the LAN.&lt;br /&gt;
&lt;br /&gt;
We need this mechanism for all clients behind the router to talk to the internet, except our own public network. This option is available as outbound NAT in the routers firmware and enabled by default.&lt;br /&gt;
&lt;br /&gt;
There is an important exception: Traffic from our private network which has a destination in our own public network should be routed directly, without any NAT, such that these two computers can talk directly to each other. Therefore there is a rule in the outbound NAT section which identifies such traffic and disables NAT for it. It can then be routed normally (see the following section). Note that this should be disabled as soon as all our computers are in the private network and can talk to each other directly.&lt;br /&gt;
&lt;br /&gt;
==== Routing between public and private network ====&lt;br /&gt;
At the time of writing our computers are distributed in a private and a public network. Both need to be reachable by each other. Therefore the router allows traffic to pass between these exact two networks without any restrictions. The rules for this can be found in the LAN and WAN sections of the firewall rules of the router. Especially the rule allowing any traffic originating from the public network to pass directly into the private network should be disabled as soon as all computers are in the private network.&lt;br /&gt;
&lt;br /&gt;
==== DHCP relay ====&lt;br /&gt;
At the time of writing we have DHCP (and DNS etc.) servers in the public network. Replicating these services behind the router can be avoided by allowing the router to forward DHCP requests from the private to the public network. This is done in the DHC relay section in the Services menu. With this service and the working routing and NAT there is no need to replicate these services in the private network for now. Everything seems to work, including PXE boot to install clients within the private network. As soon as all computers are in the private network the DHC relay should be disabled.&lt;br /&gt;
&lt;br /&gt;
==== Backup ====&lt;br /&gt;
The configuration can be backed up simply by downloading it in the GUI. It's recommended to do this once in a while just in case the router dies. This configuration can then be very easily applied after a new installation.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
Updates of the route can simply be done through the GUI. For security reasons this is recommended on a regular basis, but since we have the firewall of the RRZE in front of it it's probably not critical. Often the updates ca be done even without restarting the firmware.&lt;br /&gt;
&lt;br /&gt;
== Layer 2 ==&lt;br /&gt;
With the router working we can use our own ethernet switches behind it without interfering with the RRZE switches.&lt;br /&gt;
&lt;br /&gt;
=== VLAN ===&lt;br /&gt;
[https://en.wikipedia.org/wiki/VLAN Local Area Networks (VLAN)] are logical layer 2 networks which can spread across multiple switches. They can be used to separate different broadcast domains (ethernet networks) and usually only contain a single IP subnet. Under certain scenarios VLANs can offer performance, flexibility and security advantages. We don't want to segment our network, therefore performance and flexibility enhancements are not possible. Security is also of no concern. We therefore do not use VLANs.&lt;br /&gt;
&lt;br /&gt;
However, from a technical perspective this is impossible with layer 3 switches. By default all interfaces of a switch are assigned to the so called default VLAN. For most switch manufacturers this is VLAN 1, but it doesn't have to be. Most manufacturers also use VLAN 1 as the native VLAN. This means that all frames in VLAN 1 are sent untagged (without VLAN information) also to other switches, even over tagged ports (trunk ports). This ensures interoperability without changing settings.&lt;br /&gt;
&lt;br /&gt;
We are good as long as all switches we buy have default VLAN 1 (which can not be changed) and native VLAN 1 (which can be changed). In case we get a switch which does not have the default VLAN 1 we need to set the native VLAN of this switch also to the same VLAN, making all frames in this VLAN untagged, enabling communication with other switches.&lt;br /&gt;
&lt;br /&gt;
=== Spanning tree ===&lt;br /&gt;
We know for a fact that sometimes people plug ethernet cables into random ports, even both ends of it, causing potential loops (see mail on 22 August 2023). To avoid such loops the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol spanning tree protocol (STP)] defined in [https://en.wikipedia.org/wiki/IEEE_802.1D IEEE 802.1d]. When this protocol is enabled on a switch it exchanges [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Bridge_protocol_data_units bridge protocol data units (BPDUs)] with its neighbouring switches, containing some information about the network topology. This information is used to elect the so called [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Root_bridge_and_the_bridge_ID root bridge]. This switch can be thought of as the top of the spanning tree. All other switches then determine one port they use as a path towards this root bridge, even if it goes through another switch. All other ports which also provide a path towards the root bridge are disabled (set to the blocking [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Port_states state]). The election of the root bridge also enters an individual priority for each switch which can be set by the administrator. We should make sure to set a high priority on our central switch.&lt;br /&gt;
&lt;br /&gt;
When a change in the network topology is detected via the BPDUs 802.1d causes the entire spanning tree to be newly established with a new election of a root bridge. This can take somewhere around a minute, which is too long. Therefore the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Rapid_Spanning_Tree_Protocol rapid STP (RSTP)] was defined in IEEE 802.1w. It is fully backwards compatible with 802.1d and uses additional information to define port based rules such as alternate and backup ports for the path to the root bridge such that a topology change can be acted on in just a few seconds. It has the nice benefit that a link to a computer which is plugged into an access port on a given switch becomes ready in just a few seconds. We therefore enable RSTP on all our switches. Usually this is done by enabling STP and forcing the STP mode to RSTP. No further configuration is needed, except the priority of the root bridge.&lt;br /&gt;
&lt;br /&gt;
== DNS ==&lt;br /&gt;
=== Domains ===&lt;br /&gt;
Our public domain is &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt;. For the internal domain we don't need to register a domain, it doesn't make sense. Currently it is configure to &amp;lt;code&amp;gt;internal.sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; which is clunky but accurate. It is configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; which has the nice sideeffect of &amp;lt;code&amp;gt;bla.internal&amp;lt;/code&amp;gt; being correctly resolved from computers in the public network to the computer in the private network. The other way round it does not work, but &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; is therefore configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; as a search domain for all hosts in the private network. If we make sure to not duplicate computer names in the private and public network DNS enables the reference of another computer directly by its hostname.&lt;br /&gt;
&lt;br /&gt;
Maybe it's possible to somehow only use one domain spreading over two subnets, but since some are then public with public DNS records and some are not this might be difficult.&lt;br /&gt;
&lt;br /&gt;
=== /etc/hosts ===&lt;br /&gt;
With all the hostnames available via the &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; configuration there is no need to out them all in &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; as well. &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; knows the IP associated with a hostname from its dhcp configuration file and uses it to resolve the names if a DNS query is made. We could therefore only put aliases (such as &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt;) in the &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; file and save the work of always trying to keep &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; up to date.&lt;br /&gt;
&lt;br /&gt;
== Exposed services ==&lt;br /&gt;
Some services need to be exposed to the internet under a specific address. Most importantly the webserver (www.stern....de). This needs to have a public IP resolving to a specific host. Therefore such services need to run on a server which has two interfaces. One for the LAN and one for the WAN. The weak end system model of Linux ''might'' become a problem here.&lt;br /&gt;
&lt;br /&gt;
We could try just using NAT and port forward the necessary traffic. The webserver would be in our private network only, the router has the public IP and therefore FQDN of the webserver, and ports 80 and 443 are forwarded from the router to the webserver. This way no fiddling with virtualbox, mutliple IPs, etc. is necessary.&lt;br /&gt;
&lt;br /&gt;
When doing it this way access via SSH is also very easy. Forward port 22 to a server behind the router which acts as the login node. Then all SSH logins are done directly through &amp;lt;code&amp;gt;user@www.stern...&amp;lt;/code&amp;gt;. No two ethernet connections required. &lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Desired uplink speeds for individual hardware&lt;br /&gt;
* NFS servers: At least 10G, some maybe with 2x10G.&lt;br /&gt;
* Bladecenter: 10G&lt;br /&gt;
* Meggie nodes: 80x1G&lt;br /&gt;
* Other clients: 1G&lt;br /&gt;
&lt;br /&gt;
All switches should support RSTP (IEEE 802.1w).&lt;br /&gt;
&lt;br /&gt;
=== Main Building ===&lt;br /&gt;
In the main building we can create our own layer 2 network fairly straightforwardly.&lt;br /&gt;
&lt;br /&gt;
Let's ''please'' mount the switches in reverse in the server racks.&lt;br /&gt;
&lt;br /&gt;
==== Root Bridge ====&lt;br /&gt;
The root bridge will be the core of the network. Needs to have the capability to attach the NFS servers as well as other fast enough uplinks to switches, so at least several 10G SFP+ ports.&lt;br /&gt;
&lt;br /&gt;
Omada: SX3032F, 32x10G SFP+, ~900€&lt;br /&gt;
&lt;br /&gt;
Ubiquity (same as above): USW-Pro-Aggregation, 28x10G SFP+, 4x25G SFP28, ~900€&lt;br /&gt;
&lt;br /&gt;
==== Meggie Switches ====&lt;br /&gt;
Each Meggie node provides a 1G uplink (apart from Intel OP). With 80 nodes we need 2 48 port switches.&lt;br /&gt;
&lt;br /&gt;
Omada: SG3452X, 48x1G RJ45, 4x10G SFP+, ~400€&lt;br /&gt;
&lt;br /&gt;
Ubiquity: USW-Pro-48, 48x1G RJ45, 4x10G SFP+, ~600€&lt;br /&gt;
&lt;br /&gt;
==== Peripheral Switches ====&lt;br /&gt;
If we decommission the Messiers we can make due with 3 peripheral switches for the main building. If the RRZE lets us use the currently installed 3 switches with the 10G uplink we do not need new hardware for this.&lt;br /&gt;
&lt;br /&gt;
==== Shopping List ====&lt;br /&gt;
* 10G root bridge: ~900 Euros&lt;br /&gt;
* 2x 48x1G + 10G uplink meggie switches: 2x~400 Euros&lt;br /&gt;
* Lots of Cat 6 (or 5e) cables for the meggies&lt;br /&gt;
* We might need new DAC cables&lt;br /&gt;
* Total: 1700 Euros&lt;br /&gt;
&lt;br /&gt;
== Integrating Meridian building and Bundschuhhaus ==&lt;br /&gt;
&lt;br /&gt;
=== Layer 2 ===&lt;br /&gt;
There are two fibers going to the Meridian building. One is patched through to the Bundschuhhaus.&lt;br /&gt;
For the Meridian building it is technically possible to use one of the fibers to directly integrate an additional switch in the Clock room via layer 2. But the RRZE needs to play ball for this because they need to switch the other pair through to Bundschuhhause. If this route is taken there is still no option to integrate Bundschuhhause on layer 2.&lt;br /&gt;
&lt;br /&gt;
=== Layer 3 ===&lt;br /&gt;
A VPN would be an option to incorporate the other buildings over layer 3 without interaction with the RRZE (fingers crossed). Each building needs to have a separate OPNsense box establishing a VPN directly to the main gateway over the WAN and an attached switch for the computers.&lt;br /&gt;
&lt;br /&gt;
NFS etc. might be a bit wonky in this scenarion. Performance will certainly be limited. Strong CPU hardware of the OPNSense boxes is required for this to work with low latency.&lt;br /&gt;
&lt;br /&gt;
==== IPSec ====&lt;br /&gt;
According to the documentation this is the preferred solution for a site-to-site setup such as in our case. It's a bit complicated to set up compared to the other options. It requires an open port on the main gateway (similar to port forwarding). The computers on the other sites then also need to be in a separate subnet, necessitating a separate DHCP (possibly DNS etc.) server (TBC).&lt;br /&gt;
&lt;br /&gt;
==== Wireguard ====&lt;br /&gt;
Much easier to set up compared to IPSec, but might be less reliable. Unclear about the different subnet. Might not require an open port on the main gateway.&lt;br /&gt;
&lt;br /&gt;
==== OpenVPN ====&lt;br /&gt;
Fairly simple to set up, running via SSL, can mimick HTTPS traffic. Requires an open port.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Settings/Optimizations ==&lt;br /&gt;
* Enable jumbo frames for better NFS/iSCSI performance&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3662</id>
		<title>New Network</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3662"/>
		<updated>2025-04-06T11:26:06Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
We're creating our own network inside a DMZ.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
* Check whether the router is set to switch on after power failure in the BIOS&lt;br /&gt;
* Enable RSTP on all switches and set a high spanning tree priority on the root bridge&lt;br /&gt;
* Check whether/how we can use only one domain, instead of two (internal.sternwarte ...)&lt;br /&gt;
* When all hosts are in the private network&lt;br /&gt;
** Adjust router settings&lt;br /&gt;
*** Block private and bogon networks on WAN interface&lt;br /&gt;
*** Remove routes between public and private network&lt;br /&gt;
*** Disable gui login from public network&lt;br /&gt;
*** Disable DHC relay&lt;br /&gt;
** Adjust DHCP settings&lt;br /&gt;
*** Make the private network the default one (remove internal tags from config)&lt;br /&gt;
*** Remove classless static route from public to private network&lt;br /&gt;
&lt;br /&gt;
== Subnets ==&lt;br /&gt;
=== Public ===&lt;br /&gt;
The public subnet is a part of the internet as organized through the [https://de.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority IANA]. &amp;quot;Our&amp;quot; subnet is &amp;lt;code&amp;gt;131.188.151.0/24&amp;lt;/code&amp;gt;. At least one of the IPs in this subnet is used by the RRZE to provide a gateway. It's a [https://www.cisco.com/site/de/de/index.html Cisco] router in the basement with the IP &amp;lt;code&amp;gt;131.188.151.1&amp;lt;/code&amp;gt; and FQDN &amp;lt;code&amp;gt;astro.gate.uni-erlangen.de&amp;lt;/code&amp;gt;. We need to use this gateway to access the WAN.&lt;br /&gt;
&lt;br /&gt;
=== Private ===&lt;br /&gt;
We need to use a private network as defined in [https://www.rfc-editor.org/rfc/rfc1918.html RFC1918] for our own subnet. Because it's easy to remember and short to write we pick the class A network from RFC1918 which is &amp;lt;code&amp;gt;10.0.0.0/8&amp;lt;/code&amp;gt;. We can allocate a &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; network from this block. Since it sounds nice we can choose the second octet to also be 10. This gives us more than 65000 IP addresses to work with in &amp;lt;code&amp;gt;10.10.0.0/16&amp;lt;/code&amp;gt;. Because it makes sense we use the first address for our own gateway: &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Address blocks ====&lt;br /&gt;
Using the &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; doesn't only provide more than enough addresses, probably forever, it also enables the grouping into blocks of addresses which denote different classes of devices. This makes it easier to identify the devices and find their IP address. Note that these are not separate subnets, it's only nomenclature. These blocks are used in the DHCP server of [https://thekelleys.org.uk/dnsmasq/doc.html dnsmasq] and defined in the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet/-/blob/master/modules/remeis/files/dnsmasq/internal-dhcp.conf internal-dhcp.conf] file of the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet puppet] gitlab repository.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Address blocks&lt;br /&gt;
|-&lt;br /&gt;
! Block !! Device class&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.1.*   || Switches&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.2.*   || Management interfaces (iLO, iDRAC, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.10.*  || Servers&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.20.*  || VMs&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.30.*  || Meggie cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.40.*  || Blade center&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.50.*  || Messier cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.90.*  || Functional hosts (Raspbbery Pis, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.100.* || Office computers main building&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.200.* || Testing (Installation testing, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.250.* || Private notebooks&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Router ==&lt;br /&gt;
&lt;br /&gt;
The uplink to the WAN is realized with a server (Dell Poweredge 1950) which runs [https://opnsense.org OPNSense], a FreeBSD based routing and firewall distribution which is very easy to set up and highly reliable. The server has two 1G interfaces. One is connected to the public network managed by the RRZE (WAN) and has a public IP, the other one is connected to our own switches and has a private ip (LAN). Both interfaces are labelled in the back of the server. The router routes traffic between these two networks to make our computers talk to each other.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
The router can be configure through the web gui. It's accessible directly over the IP address. The user for the login is &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and the password is the same as the LDAP admin passwort (as of writing). A lot of information is provided in the [https://docs.opnsense.org/ OPNSense documentation]. One of the interfaces has a public IP, at the time of writing the public IP is &amp;lt;code&amp;gt;131.188.151.92&amp;lt;/code&amp;gt;. The other interface has the private used as the gateway, &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;. Its public IP might be changed depending on how we proceed with mechansim for remote access.&lt;br /&gt;
&lt;br /&gt;
==== Gateway ====&lt;br /&gt;
The router uses the RRZE gateway as its own upstream gateway. By default the firmware always sends packets destined to the WAN network to this gateway. At the time of writing this is problematic because the upstream gateway drops packets arriving from a private network (according to RFC1918) which makes it impossible for hosts in our private network to directly communicate with hosts in our public network. This option is therefore disabled in the configuration of the router. See the &amp;quot;Disable force gateway&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
==== Private and bogon networks ====&lt;br /&gt;
According to RFC1918 packets with source or destination IP addresses in private networks must not be routed through the internet. It often happens that such packets are generated and end up at edge routers (keep the private notebooks connected to our network in mind). Therefore such routers usually drop these packets on purpose. At the time of writing we actually want to route such packets from our private to our public network and vice versa. Therefore the option to drop packets from or to private networks is disabled on both interfaces. When we have all our hosts behind the router we should re enable this option for the WAN interface to avoid trouble with the RRZE. On the LAN interface this option should obviously stay disabled.&lt;br /&gt;
&lt;br /&gt;
There are addresses in the public IPv4 space which are not assigned to anything or do not make sense. These are called [https://de.wikipedia.org/wiki/Bogon &amp;quot;Bogon&amp;quot; networks]. The router is configured to drop these packets if they arrive on the WAN interface.&lt;br /&gt;
&lt;br /&gt;
==== NAT ====&lt;br /&gt;
Hosts within the private network can not directly talk to the internet (see the previous section), they need an intermidiary to do this. This is accomplished by using [https://en.wikipedia.org/wiki/Network_address_translation Network address translation (NAT)]. When a client wants to talk to the internet (except our own public network, see the following section), the router replaces the source address of the packet with its own public address and sends it of to the WAN. From the WAN it looks as if the router is making requests, instead of the client. When the reply arrives on the WAN interface the router changes the destination address of the packet from its own public address to the private address of the client and sends if off into the LAN.&lt;br /&gt;
&lt;br /&gt;
We need this mechanism for all clients behind the router to talk to the internet, except our own public network. This option is available as outbound NAT in the routers firmware and enabled by default.&lt;br /&gt;
&lt;br /&gt;
There is an important exception: Traffic from our private network which has a destination in our own public network should be routed directly, without any NAT, such that these two computers can talk directly to each other. Therefore there is a rule in the outbound NAT section which identifies such traffic and disables NAT for it. It can then be routed normally (see the following section). Note that this should be disabled as soon as all our computers are in the private network and can talk to each other directly.&lt;br /&gt;
&lt;br /&gt;
==== Routing between public and private network ====&lt;br /&gt;
At the time of writing our computers are distributed in a private and a public network. Both need to be reachable by each other. Therefore the router allows traffic to pass between these exact two networks without any restrictions. The rules for this can be found in the LAN and WAN sections of the firewall rules of the router. Especially the rule allowing any traffic originating from the public network to pass directly into the private network should be disabled as soon as all computers are in the private network.&lt;br /&gt;
&lt;br /&gt;
==== DHCP relay ====&lt;br /&gt;
At the time of writing we have DHCP (and DNS etc.) servers in the public network. Replicating these services behind the router can be avoided by allowing the router to forward DHCP requests from the private to the public network. This is done in the DHC relay section in the Services menu. With this service and the working routing and NAT there is no need to replicate these services in the private network for now. Everything seems to work, including PXE boot to install clients within the private network. As soon as all computers are in the private network the DHC relay should be disabled.&lt;br /&gt;
&lt;br /&gt;
==== Backup ====&lt;br /&gt;
The configuration can be backed up simply by downloading it in the GUI. It's recommended to do this once in a while just in case the router dies. This configuration can then be very easily applied after a new installation.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
Updates of the route can simply be done through the GUI. For security reasons this is recommended on a regular basis, but since we have the firewall of the RRZE in front of it it's probably not critical. Often the updates ca be done even without restarting the firmware.&lt;br /&gt;
&lt;br /&gt;
== Layer 2 ==&lt;br /&gt;
With the router working we can use our own ethernet switches behind it without interfering with the RRZE switches.&lt;br /&gt;
&lt;br /&gt;
=== VLAN ===&lt;br /&gt;
[https://en.wikipedia.org/wiki/VLAN Local Area Networks (VLAN)] are logical layer 2 networks which can spread across multiple switches. They can be used to separate different broadcast domains (ethernet networks) and usually only contain a single IP subnet. Under certain scenarios VLANs can offer performance, flexibility and security advantages. We don't want to segment our network, therefore performance and flexibility enhancements are not possible. Security is also of no concern. We therefore do not use VLANs.&lt;br /&gt;
&lt;br /&gt;
However, from a technical perspective this is impossible with layer 3 switches. By default all interfaces of a switch are assigned to the so called default VLAN. For most switch manufacturers this is VLAN 1, but it doesn't have to be. Most manufacturers also use VLAN 1 as the native VLAN. This means that all frames in VLAN 1 are sent untagged (without VLAN information) also to other switches, even over tagged ports (trunk ports). This ensures interoperability without changing settings.&lt;br /&gt;
&lt;br /&gt;
We are good as long as all switches we buy have default VLAN 1 (which can not be changed) and native VLAN 1 (which can be changed). In case we get a switch which does not have the default VLAN 1 we need to set the native VLAN of this switch also to the same VLAN, making all frames in this VLAN untagged, enabling communication with other switches.&lt;br /&gt;
&lt;br /&gt;
=== Spanning tree ===&lt;br /&gt;
We know for a fact that sometimes people plug ethernet cables into random ports, even both ends of it, causing potential loops (see mail on 22 August 2023). To avoid such loops the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol spanning tree protocol (STP)] defined in [https://en.wikipedia.org/wiki/IEEE_802.1D IEEE 802.1d]. When this protocol is enabled on a switch it exchanges [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Bridge_protocol_data_units bridge protocol data units (BPDUs)] with its neighbouring switches, containing some information about the network topology. This information is used to elect the so called [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Root_bridge_and_the_bridge_ID root bridge]. This switch can be thought of as the top of the spanning tree. All other switches then determine one port they use as a path towards this root bridge, even if it goes through another switch. All other ports which also provide a path towards the root bridge are disabled (set to the blocking [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Port_states state]). The election of the root bridge also enters an individual priority for each switch which can be set by the administrator. We should make sure to set a high priority on our central switch.&lt;br /&gt;
&lt;br /&gt;
When a change in the network topology is detected via the BPDUs 802.1d causes the entire spanning tree to be newly established with a new election of a root bridge. This can take somewhere around a minute, which is too long. Therefore the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Rapid_Spanning_Tree_Protocol rapid STP (RSTP)] was defined in IEEE 802.1w. It is fully backwards compatible with 802.1d and uses additional information to define port based rules such as alternate and backup ports for the path to the root bridge such that a topology change can be acted on in just a few seconds. It has the nice benefit that a link to a computer which is plugged into an access port on a given switch becomes ready in just a few seconds. We therefore enable RSTP on all our switches. Usually this is done by enabling STP and forcing the STP mode to RSTP. No further configuration is needed, except the priority of the root bridge.&lt;br /&gt;
&lt;br /&gt;
== DNS ==&lt;br /&gt;
=== Domains ===&lt;br /&gt;
Our public domain is &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt;. For the internal domain we don't need to register a domain, it doesn't make sense. Currently it is configure to &amp;lt;code&amp;gt;internal.sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; which is clunky but accurate. It is configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; which has the nice sideeffect of &amp;lt;code&amp;gt;bla.internal&amp;lt;/code&amp;gt; being correctly resolved from computers in the public network to the computer in the private network. The other way round it does not work, but &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; is therefore configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; as a search domain for all hosts in the private network. If we make sure to not duplicate computer names in the private and public network DNS enables the reference of another computer directly by its hostname.&lt;br /&gt;
&lt;br /&gt;
Maybe it's possible to somehow only use one domain spreading over two subnets, but since some are then public with public DNS records and some are not this might be difficult.&lt;br /&gt;
&lt;br /&gt;
=== /etc/hosts ===&lt;br /&gt;
With all the hostnames available via the &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; configuration there is no need to out them all in &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; as well. &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; knows the IP associated with a hostname from its dhcp configuration file and uses it to resolve the names if a DNS query is made. We could therefore only put aliases (such as &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt;) in the &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; file and save the work of always trying to keep &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; up to date.&lt;br /&gt;
&lt;br /&gt;
== Remote Access ==&lt;br /&gt;
We need a login node with a separate interface and a dedicated public IP, see the following section.&lt;br /&gt;
&lt;br /&gt;
== Exposed services ==&lt;br /&gt;
Some services need to be exposed to the internet under a specific address. Most importantly the webserver (www.stern....de). This needs to have a public IP resolving to a specific host. Therefore such services need to run on a server which has two interfaces. One for the LAN and one for the WAN. The weak end system model of Linux ''might'' become a problem here.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Desired uplink speeds for individual hardware&lt;br /&gt;
* NFS servers: At least 10G, some maybe with 2x10G.&lt;br /&gt;
* Bladecenter: 10G&lt;br /&gt;
* Meggie nodes: 80x1G&lt;br /&gt;
* Other clients: 1G&lt;br /&gt;
&lt;br /&gt;
All switches should support RSTP (IEEE 802.1w).&lt;br /&gt;
&lt;br /&gt;
=== Main Building ===&lt;br /&gt;
In the main building we can create our own layer 2 network fairly straightforwardly.&lt;br /&gt;
&lt;br /&gt;
Let's ''please'' mount the switches in reverse in the server racks.&lt;br /&gt;
&lt;br /&gt;
==== Root Bridge ====&lt;br /&gt;
The root bridge will be the core of the network. Needs to have the capability to attach the NFS servers as well as other fast enough uplinks to switches, so at least several 10G SFP+ ports.&lt;br /&gt;
&lt;br /&gt;
Omada: SX3032F, 32x10G SFP+, ~900€&lt;br /&gt;
&lt;br /&gt;
Ubiquity (same as above): USW-Pro-Aggregation, 28x10G SFP+, 4x25G SFP28, ~900€&lt;br /&gt;
&lt;br /&gt;
==== Meggie Switches ====&lt;br /&gt;
Each Meggie node provides a 1G uplink (apart from Intel OP). With 80 nodes we need 2 48 port switches.&lt;br /&gt;
&lt;br /&gt;
Omada: SG3452X, 48x1G RJ45, 4x10G SFP+, ~400€&lt;br /&gt;
&lt;br /&gt;
Ubiquity: USW-Pro-48, 48x1G RJ45, 4x10G SFP+, ~600€&lt;br /&gt;
&lt;br /&gt;
==== Peripheral Switches ====&lt;br /&gt;
If we decommission the Messiers we can make due with 3 peripheral switches for the main building. If the RRZE lets us use the currently installed 3 switches with the 10G uplink we do not need new hardware for this.&lt;br /&gt;
&lt;br /&gt;
==== Shopping List ====&lt;br /&gt;
* 10G root bridge: ~900 Euros&lt;br /&gt;
* 2x 48x1G + 10G uplink meggie switches: 2x~400 Euros&lt;br /&gt;
* Lots of Cat 6 (or 5e) cables for the meggies&lt;br /&gt;
* We might need new DAC cables&lt;br /&gt;
* Total: 1700 Euros&lt;br /&gt;
&lt;br /&gt;
== Integrating Meridian building and Bundschuhhaus ==&lt;br /&gt;
&lt;br /&gt;
=== Layer 2 ===&lt;br /&gt;
There are two fibers going to the Meridian building. One is patched through to the Bundschuhhaus.&lt;br /&gt;
For the Meridian building it is technically possible to use one of the fibers to directly integrate an additional switch in the Clock room via layer 2. But the RRZE needs to play ball for this because they need to switch the other pair through to Bundschuhhause. If this route is taken there is still no option to integrate Bundschuhhause on layer 2.&lt;br /&gt;
&lt;br /&gt;
=== Layer 3 ===&lt;br /&gt;
A VPN would be an option to incorporate the other buildings over layer 3 without interaction with the RRZE (fingers crossed). Each building needs to have a separate OPNsense box establishing a VPN directly to the main gateway over the WAN and an attached switch for the computers.&lt;br /&gt;
&lt;br /&gt;
NFS etc. might be a bit wonky in this scenarion. Performance will certainly be limited. Strong CPU hardware of the OPNSense boxes is required for this to work with low latency.&lt;br /&gt;
&lt;br /&gt;
==== IPSec ====&lt;br /&gt;
According to the documentation this is the preferred solution for a site-to-site setup such as in our case. It's a bit complicated to set up compared to the other options. It requires an open port on the main gateway (similar to port forwarding). The computers on the other sites then also need to be in a separate subnet, necessitating a separate DHCP (possibly DNS etc.) server (TBC).&lt;br /&gt;
&lt;br /&gt;
==== Wireguard ====&lt;br /&gt;
Much easier to set up compared to IPSec, but might be less reliable. Unclear about the different subnet. Might not require an open port on the main gateway.&lt;br /&gt;
&lt;br /&gt;
==== OpenVPN ====&lt;br /&gt;
Fairly simple to set up, running via SSL, can mimick HTTPS traffic. Requires an open port.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Settings/Optimizations ==&lt;br /&gt;
* Enable jumbo frames for better NFS/iSCSI performance&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3661</id>
		<title>New Network</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3661"/>
		<updated>2025-04-06T11:21:03Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
We're creating our own network inside a DMZ.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
* Check whether the router is set to switch on after power failure in the BIOS&lt;br /&gt;
* Enable RSTP on all switches and set a high spanning tree priority on the root bridge&lt;br /&gt;
* When all hosts are in the private network&lt;br /&gt;
** Adjust router settings&lt;br /&gt;
*** Block private and bogon networks on WAN interface&lt;br /&gt;
*** Remove routes between public and private network&lt;br /&gt;
*** Disable gui login from public network&lt;br /&gt;
*** Disable DHC relay&lt;br /&gt;
** Adjust DHCP settings&lt;br /&gt;
*** Make the private network the default one (remove internal tags from config)&lt;br /&gt;
*** Remove classless static route from public to private network&lt;br /&gt;
&lt;br /&gt;
== Subnets ==&lt;br /&gt;
=== Public ===&lt;br /&gt;
The public subnet is a part of the internet as organized through the [https://de.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority IANA]. &amp;quot;Our&amp;quot; subnet is &amp;lt;code&amp;gt;131.188.151.0/24&amp;lt;/code&amp;gt;. At least one of the IPs in this subnet is used by the RRZE to provide a gateway. It's a [https://www.cisco.com/site/de/de/index.html Cisco] router in the basement with the IP &amp;lt;code&amp;gt;131.188.151.1&amp;lt;/code&amp;gt; and FQDN &amp;lt;code&amp;gt;astro.gate.uni-erlangen.de&amp;lt;/code&amp;gt;. We need to use this gateway to access the WAN.&lt;br /&gt;
&lt;br /&gt;
=== Private ===&lt;br /&gt;
We need to use a private network as defined in [https://www.rfc-editor.org/rfc/rfc1918.html RFC1918] for our own subnet. Because it's easy to remember and short to write we pick the class A network from RFC1918 which is &amp;lt;code&amp;gt;10.0.0.0/8&amp;lt;/code&amp;gt;. We can allocate a &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; network from this block. Since it sounds nice we can choose the second octet to also be 10. This gives us more than 65000 IP addresses to work with in &amp;lt;code&amp;gt;10.10.0.0/16&amp;lt;/code&amp;gt;. Because it makes sense we use the first address for our own gateway: &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Address blocks ====&lt;br /&gt;
Using the &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; doesn't only provide more than enough addresses, probably forever, it also enables the grouping into blocks of addresses which denote different classes of devices. This makes it easier to identify the devices and find their IP address. Note that these are not separate subnets, it's only nomenclature. These blocks are used in the DHCP server of [https://thekelleys.org.uk/dnsmasq/doc.html dnsmasq] and defined in the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet/-/blob/master/modules/remeis/files/dnsmasq/internal-dhcp.conf internal-dhcp.conf] file of the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet puppet] gitlab repository.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Address blocks&lt;br /&gt;
|-&lt;br /&gt;
! Block !! Device class&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.1.*   || Switches&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.2.*   || Management interfaces (iLO, iDRAC, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.10.*  || Servers&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.20.*  || VMs&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.30.*  || Meggie cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.40.*  || Blade center&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.50.*  || Messier cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.90.*  || Functional hosts (Raspbbery Pis, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.100.* || Office computers main building&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.200.* || Testing (Installation testing, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.250.* || Private notebooks&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Router ==&lt;br /&gt;
&lt;br /&gt;
The uplink to the WAN is realized with a server (Dell Poweredge 1950) which runs [https://opnsense.org OPNSense], a FreeBSD based routing and firewall distribution which is very easy to set up and highly reliable. The server has two 1G interfaces. One is connected to the public network managed by the RRZE (WAN) and has a public IP, the other one is connected to our own switches and has a private ip (LAN). Both interfaces are labelled in the back of the server. The router routes traffic between these two networks to make our computers talk to each other.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
The router can be configure through the web gui. It's accessible directly over the IP address. The user for the login is &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and the password is the same as the LDAP admin passwort (as of writing). A lot of information is provided in the [https://docs.opnsense.org/ OPNSense documentation]. One of the interfaces has a public IP, at the time of writing the public IP is &amp;lt;code&amp;gt;131.188.151.92&amp;lt;/code&amp;gt;. The other interface has the private used as the gateway, &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;. Its public IP might be changed depending on how we proceed with mechansim for remote access.&lt;br /&gt;
&lt;br /&gt;
==== Gateway ====&lt;br /&gt;
The router uses the RRZE gateway as its own upstream gateway. By default the firmware always sends packets destined to the WAN network to this gateway. At the time of writing this is problematic because the upstream gateway drops packets arriving from a private network (according to RFC1918) which makes it impossible for hosts in our private network to directly communicate with hosts in our public network. This option is therefore disabled in the configuration of the router. See the &amp;quot;Disable force gateway&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
==== Private and bogon networks ====&lt;br /&gt;
According to RFC1918 packets with source or destination IP addresses in private networks must not be routed through the internet. It often happens that such packets are generated and end up at edge routers (keep the private notebooks connected to our network in mind). Therefore such routers usually drop these packets on purpose. At the time of writing we actually want to route such packets from our private to our public network and vice versa. Therefore the option to drop packets from or to private networks is disabled on both interfaces. When we have all our hosts behind the router we should re enable this option for the WAN interface to avoid trouble with the RRZE. On the LAN interface this option should obviously stay disabled.&lt;br /&gt;
&lt;br /&gt;
There are addresses in the public IPv4 space which are not assigned to anything or do not make sense. These are called [https://de.wikipedia.org/wiki/Bogon &amp;quot;Bogon&amp;quot; networks]. The router is configured to drop these packets if they arrive on the WAN interface.&lt;br /&gt;
&lt;br /&gt;
==== NAT ====&lt;br /&gt;
Hosts within the private network can not directly talk to the internet (see the previous section), they need an intermidiary to do this. This is accomplished by using [https://en.wikipedia.org/wiki/Network_address_translation Network address translation (NAT)]. When a client wants to talk to the internet (except our own public network, see the following section), the router replaces the source address of the packet with its own public address and sends it of to the WAN. From the WAN it looks as if the router is making requests, instead of the client. When the reply arrives on the WAN interface the router changes the destination address of the packet from its own public address to the private address of the client and sends if off into the LAN.&lt;br /&gt;
&lt;br /&gt;
We need this mechanism for all clients behind the router to talk to the internet, except our own public network. This option is available as outbound NAT in the routers firmware and enabled by default.&lt;br /&gt;
&lt;br /&gt;
There is an important exception: Traffic from our private network which has a destination in our own public network should be routed directly, without any NAT, such that these two computers can talk directly to each other. Therefore there is a rule in the outbound NAT section which identifies such traffic and disables NAT for it. It can then be routed normally (see the following section). Note that this should be disabled as soon as all our computers are in the private network and can talk to each other directly.&lt;br /&gt;
&lt;br /&gt;
==== Routing between public and private network ====&lt;br /&gt;
At the time of writing our computers are distributed in a private and a public network. Both need to be reachable by each other. Therefore the router allows traffic to pass between these exact two networks without any restrictions. The rules for this can be found in the LAN and WAN sections of the firewall rules of the router. Especially the rule allowing any traffic originating from the public network to pass directly into the private network should be disabled as soon as all computers are in the private network.&lt;br /&gt;
&lt;br /&gt;
==== DHCP relay ====&lt;br /&gt;
At the time of writing we have DHCP (and DNS etc.) servers in the public network. Replicating these services behind the router can be avoided by allowing the router to forward DHCP requests from the private to the public network. This is done in the DHC relay section in the Services menu. With this service and the working routing and NAT there is no need to replicate these services in the private network for now. Everything seems to work, including PXE boot to install clients within the private network. As soon as all computers are in the private network the DHC relay should be disabled.&lt;br /&gt;
&lt;br /&gt;
==== Backup ====&lt;br /&gt;
The configuration can be backed up simply by downloading it in the GUI. It's recommended to do this once in a while just in case the router dies. This configuration can then be very easily applied after a new installation.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
Updates of the route can simply be done through the GUI. For security reasons this is recommended on a regular basis, but since we have the firewall of the RRZE in front of it it's probably not critical. Often the updates ca be done even without restarting the firmware.&lt;br /&gt;
&lt;br /&gt;
== Layer 2 ==&lt;br /&gt;
With the router working we can use our own ethernet switches behind it without interfering with the RRZE switches.&lt;br /&gt;
&lt;br /&gt;
=== VLAN ===&lt;br /&gt;
[https://en.wikipedia.org/wiki/VLAN Local Area Networks (VLAN)] are logical layer 2 networks which can spread across multiple switches. They can be used to separate different broadcast domains (ethernet networks) and usually only contain a single IP subnet. Under certain scenarios VLANs can offer performance, flexibility and security advantages. We don't want to segment our network, therefore performance and flexibility enhancements are not possible. Security is also of no concern. We therefore do not use VLANs.&lt;br /&gt;
&lt;br /&gt;
However, from a technical perspective this is impossible with layer 3 switches. By default all interfaces of a switch are assigned to the so called default VLAN. For most switch manufacturers this is VLAN 1, but it doesn't have to be. Most manufacturers also use VLAN 1 as the native VLAN. This means that all frames in VLAN 1 are sent untagged (without VLAN information) also to other switches, even over tagged ports (trunk ports). This ensures interoperability without changing settings.&lt;br /&gt;
&lt;br /&gt;
We are good as long as all switches we buy have default VLAN 1 (which can not be changed) and native VLAN 1 (which can be changed). In case we get a switch which does not have the default VLAN 1 we need to set the native VLAN of this switch also to the same VLAN, making all frames in this VLAN untagged, enabling communication with other switches.&lt;br /&gt;
&lt;br /&gt;
=== Spanning tree ===&lt;br /&gt;
We know for a fact that sometimes people plug ethernet cables into random ports, even both ends of it, causing potential loops (see mail on 22 August 2023). To avoid such loops the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol spanning tree protocol (STP)] defined in [https://en.wikipedia.org/wiki/IEEE_802.1D IEEE 802.1d]. When this protocol is enabled on a switch it exchanges [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Bridge_protocol_data_units bridge protocol data units (BPDUs)] with its neighbouring switches, containing some information about the network topology. This information is used to elect the so called [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Root_bridge_and_the_bridge_ID root bridge]. This switch can be thought of as the top of the spanning tree. All other switches then determine one port they use as a path towards this root bridge, even if it goes through another switch. All other ports which also provide a path towards the root bridge are disabled (set to the blocking [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Port_states state]). The election of the root bridge also enters an individual priority for each switch which can be set by the administrator. We should make sure to set a high priority on our central switch.&lt;br /&gt;
&lt;br /&gt;
When a change in the network topology is detected via the BPDUs 802.1d causes the entire spanning tree to be newly established with a new election of a root bridge. This can take somewhere around a minute, which is too long. Therefore the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Rapid_Spanning_Tree_Protocol rapid STP (RSTP)] was defined in IEEE 802.1w. It is fully backwards compatible with 802.1d and uses additional information to define port based rules such as alternate and backup ports for the path to the root bridge such that a topology change can be acted on in just a few seconds. It has the nice benefit that a link to a computer which is plugged into an access port on a given switch becomes ready in just a few seconds. We therefore enable RSTP on all our switches. Usually this is done by enabling STP and forcing the STP mode to RSTP. No further configuration is needed, except the priority of the root bridge.&lt;br /&gt;
&lt;br /&gt;
== DNS ==&lt;br /&gt;
=== Domains ===&lt;br /&gt;
Our public domain is &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt;. For the internal domain we don't need to register a domain, it doesn't make sense. Currently it is configure to &amp;lt;code&amp;gt;internal.sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; which is clunky but accurate. It is configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; which has the nice sideeffect of &amp;lt;code&amp;gt;bla.internal&amp;lt;/code&amp;gt; being correctly resolved from computers in the public network to the computer in the private network. The other way round it does not work, but &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; is therefore configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; as a search domain for all hosts in the private network. If we make sure to not duplicate computer names in the private and public network DNS enables the reference of another computer directly by its hostname.&lt;br /&gt;
&lt;br /&gt;
=== /etc/hosts ===&lt;br /&gt;
With all the hostnames available via the &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; configuration there is no need to out them all in &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; as well. &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; knows the IP associated with a hostname from its dhcp configuration file and uses it to resolve the names if a DNS query is made. We could therefore only put aliases (such as &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt;) in the &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; file and save the work of always trying to keep &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; up to date.&lt;br /&gt;
&lt;br /&gt;
== Remote Access ==&lt;br /&gt;
We need a login node with a separate interface and a dedicated public IP, see the following section.&lt;br /&gt;
&lt;br /&gt;
== Exposed services ==&lt;br /&gt;
Some services need to be exposed to the internet under a specific address. Most importantly the webserver (www.stern....de). This needs to have a public IP resolving to a specific host. Therefore such services need to run on a server which has two interfaces. One for the LAN and one for the WAN. The weak end system model of Linux ''might'' become a problem here.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Desired uplink speeds for individual hardware&lt;br /&gt;
* NFS servers: At least 10G, some maybe with 2x10G.&lt;br /&gt;
* Bladecenter: 10G&lt;br /&gt;
* Meggie nodes: 80x1G&lt;br /&gt;
* Other clients: 1G&lt;br /&gt;
&lt;br /&gt;
All switches should support RSTP (IEEE 802.1w).&lt;br /&gt;
&lt;br /&gt;
=== Main Building ===&lt;br /&gt;
In the main building we can create our own layer 2 network fairly straightforwardly.&lt;br /&gt;
&lt;br /&gt;
Let's ''please'' mount the switches in reverse in the server racks.&lt;br /&gt;
&lt;br /&gt;
==== Root Bridge ====&lt;br /&gt;
The root bridge will be the core of the network. Needs to have the capability to attach the NFS servers as well as other fast enough uplinks to switches, so at least several 10G SFP+ ports.&lt;br /&gt;
&lt;br /&gt;
Omada: SX3032F, 32x10G SFP+, ~900€&lt;br /&gt;
&lt;br /&gt;
Ubiquity (same as above): USW-Pro-Aggregation, 28x10G SFP+, 4x25G SFP28, ~900€&lt;br /&gt;
&lt;br /&gt;
==== Meggie Switches ====&lt;br /&gt;
Each Meggie node provides a 1G uplink (apart from Intel OP). With 80 nodes we need 2 48 port switches.&lt;br /&gt;
&lt;br /&gt;
Omada: SG3452X, 48x1G RJ45, 4x10G SFP+, ~400€&lt;br /&gt;
&lt;br /&gt;
Ubiquity: USW-Pro-48, 48x1G RJ45, 4x10G SFP+, ~600€&lt;br /&gt;
&lt;br /&gt;
==== Peripheral Switches ====&lt;br /&gt;
If we decommission the Messiers we can make due with 3 peripheral switches for the main building. If the RRZE lets us use the currently installed 3 switches with the 10G uplink we do not need new hardware for this.&lt;br /&gt;
&lt;br /&gt;
==== Shopping List ====&lt;br /&gt;
* 10G root bridge: ~900 Euros&lt;br /&gt;
* 2x 48x1G + 10G uplink meggie switches: 2x~400 Euros&lt;br /&gt;
* Lots of Cat 6 (or 5e) cables for the meggies&lt;br /&gt;
* We might need new DAC cables&lt;br /&gt;
* Total: 1700 Euros&lt;br /&gt;
&lt;br /&gt;
== Integrating Meridian building and Bundschuhhaus ==&lt;br /&gt;
&lt;br /&gt;
=== Layer 2 ===&lt;br /&gt;
There are two fibers going to the Meridian building. One is patched through to the Bundschuhhaus.&lt;br /&gt;
For the Meridian building it is technically possible to use one of the fibers to directly integrate an additional switch in the Clock room via layer 2. But the RRZE needs to play ball for this because they need to switch the other pair through to Bundschuhhause. If this route is taken there is still no option to integrate Bundschuhhause on layer 2.&lt;br /&gt;
&lt;br /&gt;
=== Layer 3 ===&lt;br /&gt;
A VPN would be an option to incorporate the other buildings over layer 3 without interaction with the RRZE (fingers crossed). Each building needs to have a separate OPNsense box establishing a VPN directly to the main gateway over the WAN and an attached switch for the computers.&lt;br /&gt;
&lt;br /&gt;
NFS etc. might be a bit wonky in this scenarion. Performance will certainly be limited. Strong CPU hardware of the OPNSense boxes is required for this to work with low latency.&lt;br /&gt;
&lt;br /&gt;
==== IPSec ====&lt;br /&gt;
According to the documentation this is the preferred solution for a site-to-site setup such as in our case. It's a bit complicated to set up compared to the other options. It requires an open port on the main gateway (similar to port forwarding). The computers on the other sites then also need to be in a separate subnet, necessitating a separate DHCP (possibly DNS etc.) server (TBC).&lt;br /&gt;
&lt;br /&gt;
==== Wireguard ====&lt;br /&gt;
Much easier to set up compared to IPSec, but might be less reliable. Unclear about the different subnet. Might not require an open port on the main gateway.&lt;br /&gt;
&lt;br /&gt;
==== OpenVPN ====&lt;br /&gt;
Fairly simple to set up, running via SSL, can mimick HTTPS traffic. Requires an open port.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Settings/Optimizations ==&lt;br /&gt;
* Enable jumbo frames for better NFS/iSCSI performance&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3660</id>
		<title>New Network</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3660"/>
		<updated>2025-04-05T22:31:23Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
We're creating our own network inside a DMZ.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
* Check whether the router is set to switch on after power failure in the BIOS&lt;br /&gt;
* Enable RSTP on all switchesa and set a high spanning tree priority on the root bridge&lt;br /&gt;
* &amp;lt;s&amp;gt;Have only one DHCP server&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;&amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; does DHCP, DNS, and TFTP. We have two DHCP servers right now which is a problem. See the dhcp-authoritative)&amp;lt;/s&amp;gt;&lt;br /&gt;
* When all hosts are in the private network&lt;br /&gt;
** Adjust router settings&lt;br /&gt;
*** Block private and bogon networks on WAN interface&lt;br /&gt;
*** Remove routes between public and private network&lt;br /&gt;
*** Disable gui login from public network&lt;br /&gt;
*** Disable DHC relay&lt;br /&gt;
** Adjust DHCP settings&lt;br /&gt;
*** Make the private network the default one (remove internal tags from config)&lt;br /&gt;
*** Remove classless static route from public to private network&lt;br /&gt;
&lt;br /&gt;
== Subnets ==&lt;br /&gt;
=== Public ===&lt;br /&gt;
The public subnet is a part of the internet as organized through the [https://de.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority IANA]. &amp;quot;Our&amp;quot; subnet is &amp;lt;code&amp;gt;131.188.151.0/24&amp;lt;/code&amp;gt;. At least one of the IPs in this subnet is used by the RRZE to provide a gateway. It's a [https://www.cisco.com/site/de/de/index.html Cisco] router in the basement with the IP &amp;lt;code&amp;gt;131.188.151.1&amp;lt;/code&amp;gt; and FQDN &amp;lt;code&amp;gt;astro.gate.uni-erlangen.de&amp;lt;/code&amp;gt;. We need to use this gateway to access the WAN.&lt;br /&gt;
&lt;br /&gt;
=== Private ===&lt;br /&gt;
We need to use a private network as defined in [https://www.rfc-editor.org/rfc/rfc1918.html RFC1918] for our own subnet. Because it's easy to remember and short to write we pick the class A network from RFC1918 which is &amp;lt;code&amp;gt;10.0.0.0/8&amp;lt;/code&amp;gt;. We can allocate a &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; network from this block. Since it sounds nice we can choose the second octet to also be 10. This gives us more than 65000 IP addresses to work with in &amp;lt;code&amp;gt;10.10.0.0/16&amp;lt;/code&amp;gt;. Because it makes sense we use the first address for our own gateway: &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Address blocks ====&lt;br /&gt;
Using the &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; doesn't only provide more than enough addresses, probably forever, it also enables the grouping into blocks of addresses which denote different classes of devices. This makes it easier to identify the devices and find their IP address. Note that these are not separate subnets, it's only nomenclature. These blocks are used in the DHCP server of [https://thekelleys.org.uk/dnsmasq/doc.html dnsmasq] and defined in the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet/-/blob/master/modules/remeis/files/dnsmasq/internal-dhcp.conf internal-dhcp.conf] file of the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet puppet] gitlab repository.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Address blocks&lt;br /&gt;
|-&lt;br /&gt;
! Block !! Device class&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.1.*   || Switches&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.2.*   || Management interfaces (iLO, iDRAC, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.10.*  || Servers&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.20.*  || VMs&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.30.*  || Meggie cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.40.*  || Blade center&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.50.*  || Messier cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.90.*  || Functional hosts (Raspbbery Pis, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.100.* || Office computers main building&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.200.* || Testing (Installation testing, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.250.* || Private notebooks&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Router ==&lt;br /&gt;
&lt;br /&gt;
The uplink to the WAN is realized with a server (Dell Poweredge 1950) which runs [https://opnsense.org OPNSense], a FreeBSD based routing and firewall distribution which is very easy to set up and highly reliable. The server has two 1G interfaces. One is connected to the public network managed by the RRZE (WAN) and has a public IP, the other one is connected to our own switches and has a private ip (LAN). Both interfaces are labelled in the back of the server. The router routes traffic between these two networks to make our computers talk to each other.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
The router can be configure through the web gui. It's accessible directly over the IP address. The user for the login is &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and the password is the same as the LDAP admin passwort (as of writing). A lot of information is provided in the [https://docs.opnsense.org/ OPNSense documentation]. One of the interfaces has a public IP, at the time of writing the public IP is &amp;lt;code&amp;gt;131.188.151.92&amp;lt;/code&amp;gt;. The other interface has the private used as the gateway, &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;. Its public IP might be changed depending on how we proceed with mechansim for remote access.&lt;br /&gt;
&lt;br /&gt;
==== Gateway ====&lt;br /&gt;
The router uses the RRZE gateway as its own upstream gateway. By default the firmware always sends packets destined to the WAN network to this gateway. At the time of writing this is problematic because the upstream gateway drops packets arriving from a private network (according to RFC1918) which makes it impossible for hosts in our private network to directly communicate with hosts in our public network. This option is therefore disabled in the configuration of the router. See the &amp;quot;Disable force gateway&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
==== Private and bogon networks ====&lt;br /&gt;
According to RFC1918 packets with source or destination IP addresses in private networks must not be routed through the internet. It often happens that such packets are generated and end up at edge routers (keep the private notebooks connected to our network in mind). Therefore such routers usually drop these packets on purpose. At the time of writing we actually want to route such packets from our private to our public network and vice versa. Therefore the option to drop packets from or to private networks is disabled on both interfaces. When we have all our hosts behind the router we should re enable this option for the WAN interface to avoid trouble with the RRZE. On the LAN interface this option should obviously stay disabled.&lt;br /&gt;
&lt;br /&gt;
There are addresses in the public IPv4 space which are not assigned to anything or do not make sense. These are called [https://de.wikipedia.org/wiki/Bogon &amp;quot;Bogon&amp;quot; networks]. The router is configured to drop these packets if they arrive on the WAN interface.&lt;br /&gt;
&lt;br /&gt;
==== NAT ====&lt;br /&gt;
Hosts within the private network can not directly talk to the internet (see the previous section), they need an intermidiary to do this. This is accomplished by using [https://en.wikipedia.org/wiki/Network_address_translation Network address translation (NAT)]. When a client wants to talk to the internet (except our own public network, see the following section), the router replaces the source address of the packet with its own public address and sends it of to the WAN. From the WAN it looks as if the router is making requests, instead of the client. When the reply arrives on the WAN interface the router changes the destination address of the packet from its own public address to the private address of the client and sends if off into the LAN.&lt;br /&gt;
&lt;br /&gt;
We need this mechanism for all clients behind the router to talk to the internet, except our own public network. This option is available as outbound NAT in the routers firmware and enabled by default.&lt;br /&gt;
&lt;br /&gt;
There is an important exception: Traffic from our private network which has a destination in our own public network should be routed directly, without any NAT, such that these two computers can talk directly to each other. Therefore there is a rule in the outbound NAT section which identifies such traffic and disables NAT for it. It can then be routed normally (see the following section). Note that this should be disabled as soon as all our computers are in the private network and can talk to each other directly.&lt;br /&gt;
&lt;br /&gt;
==== Routing between public and private network ====&lt;br /&gt;
At the time of writing our computers are distributed in a private and a public network. Both need to be reachable by each other. Therefore the router allows traffic to pass between these exact two networks without any restrictions. The rules for this can be found in the LAN and WAN sections of the firewall rules of the router. Especially the rule allowing any traffic originating from the public network to pass directly into the private network should be disabled as soon as all computers are in the private network.&lt;br /&gt;
&lt;br /&gt;
==== DHCP relay ====&lt;br /&gt;
At the time of writing we have DHCP (and DNS etc.) servers in the public network. Replicating these services behind the router can be avoided by allowing the router to forward DHCP requests from the private to the public network. This is done in the DHC relay section in the Services menu. With this service and the working routing and NAT there is no need to replicate these services in the private network for now. Everything seems to work, including PXE boot to install clients within the private network. As soon as all computers are in the private network the DHC relay should be disabled.&lt;br /&gt;
&lt;br /&gt;
==== Backup ====&lt;br /&gt;
The configuration can be backed up simply by downloading it in the GUI. It's recommended to do this once in a while just in case the router dies. This configuration can then be very easily applied after a new installation.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
Updates of the route can simply be done through the GUI. For security reasons this is recommended on a regular basis, but since we have the firewall of the RRZE in front of it it's probably not critical. Often the updates ca be done even without restarting the firmware.&lt;br /&gt;
&lt;br /&gt;
== Layer 2 ==&lt;br /&gt;
With the router working we can use our own ethernet switches behind it without interfering with the RRZE switches.&lt;br /&gt;
&lt;br /&gt;
=== VLAN ===&lt;br /&gt;
[https://en.wikipedia.org/wiki/VLAN Local Area Networks (VLAN)] are logical layer 2 networks which can spread across multiple switches. They can be used to separate different broadcast domains (ethernet networks) and usually only contain a single IP subnet. Under certain scenarios VLANs can offer performance, flexibility and security advantages. We don't want to segment our network, therefore performance and flexibility enhancements are not possible. Security is also of no concern. We therefore do not use VLANs.&lt;br /&gt;
&lt;br /&gt;
However, from a technical perspective this is impossible with layer 3 switches. By default all interfaces of a switch are assigned to the so called default VLAN. For most switch manufacturers this is VLAN 1, but it doesn't have to be. Most manufacturers also use VLAN 1 as the native VLAN. This means that all frames in VLAN 1 are sent untagged (without VLAN information) also to other switches, even over tagged ports (trunk ports). This ensures interoperability without changing settings.&lt;br /&gt;
&lt;br /&gt;
We are good as long as all switches we buy have default VLAN 1 (which can not be changed) and native VLAN 1 (which can be changed). In case we get a switch which does not have the default VLAN 1 we need to set the native VLAN of this switch also to the same VLAN, making all frames in this VLAN untagged, enabling communication with other switches.&lt;br /&gt;
&lt;br /&gt;
=== Spanning tree ===&lt;br /&gt;
We know for a fact that sometimes people plug ethernet cables into random ports, even both ends of it, causing potential loops (see mail on 22 August 2023). To avoid such loops the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol spanning tree protocol (STP)] defined in [https://en.wikipedia.org/wiki/IEEE_802.1D IEEE 802.1d]. When this protocol is enabled on a switch it exchanges [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Bridge_protocol_data_units bridge protocol data units (BPDUs)] with its neighbouring switches, containing some information about the network topology. This information is used to elect the so called [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Root_bridge_and_the_bridge_ID root bridge]. This switch can be thought of as the top of the spanning tree. All other switches then determine one port they use as a path towards this root bridge, even if it goes through another switch. All other ports which also provide a path towards the root bridge are disabled (set to the blocking [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Port_states state]). The election of the root bridge also enters an individual priority for each switch which can be set by the administrator. We should make sure to set a high priority on our central switch.&lt;br /&gt;
&lt;br /&gt;
When a change in the network topology is detected via the BPDUs 802.1d causes the entire spanning tree to be newly established with a new election of a root bridge. This can take somewhere around a minute, which is too long. Therefore the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Rapid_Spanning_Tree_Protocol rapid STP (RSTP)] was defined in IEEE 802.1w. It is fully backwards compatible with 802.1d and uses additional information to define port based rules such as alternate and backup ports for the path to the root bridge such that a topology change can be acted on in just a few seconds. It has the nice benefit that a link to a computer which is plugged into an access port on a given switch becomes ready in just a few seconds. We therefore enable RSTP on all our switches. Usually this is done by enabling STP and forcing the STP mode to RSTP. No further configuration is needed, except the priority of the root bridge.&lt;br /&gt;
&lt;br /&gt;
== DNS ==&lt;br /&gt;
=== Domains ===&lt;br /&gt;
Our public domain is &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt;. For the internal domain we don't need to register a domain, it doesn't make sense. Currently it is configure to &amp;lt;code&amp;gt;internal.sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; which is clunky but accurate. It is configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; which has the nice sideeffect of &amp;lt;code&amp;gt;bla.internal&amp;lt;/code&amp;gt; being correctly resolved from computers in the public network to the computer in the private network. The other way round it does not work, but &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; is therefore configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; as a search domain for all hosts in the private network. If we make sure to not duplicate computer names in the private and public network DNS enables the reference of another computer directly by its hostname.&lt;br /&gt;
&lt;br /&gt;
=== /etc/hosts ===&lt;br /&gt;
With all the hostnames available via the &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; configuration there is no need to out them all in &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; as well. &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; knows the IP associated with a hostname from its dhcp configuration file and uses it to resolve the names if a DNS query is made. We could therefore only put aliases (such as &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt;) in the &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; file and save the work of always trying to keep &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; up to date.&lt;br /&gt;
&lt;br /&gt;
== Remote Access ==&lt;br /&gt;
We need a login node with a separate interface and a dedicated public IP, see the following section.&lt;br /&gt;
&lt;br /&gt;
== Exposed services ==&lt;br /&gt;
Some services need to be exposed to the internet under a specific address. Most importantly the webserver (www.stern....de). This needs to have a public IP resolving to a specific host. Therefore such services need to run on a server which has two interfaces. One for the LAN and one for the WAN. The weak end system model of Linux ''might'' become a problem here.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Desired uplink speeds for individual hardware&lt;br /&gt;
* NFS servers: At least 10G, some maybe with 2x10G.&lt;br /&gt;
* Bladecenter: 10G&lt;br /&gt;
* Meggie nodes: 80x1G&lt;br /&gt;
* Other clients: 1G&lt;br /&gt;
&lt;br /&gt;
All switches should support RSTP (IEEE 802.1w).&lt;br /&gt;
&lt;br /&gt;
=== Main Building ===&lt;br /&gt;
In the main building we can create our own layer 2 network fairly straightforwardly.&lt;br /&gt;
&lt;br /&gt;
Let's ''please'' mount the switches in reverse in the server racks.&lt;br /&gt;
&lt;br /&gt;
==== Root Bridge ====&lt;br /&gt;
The root bridge will be the core of the network. Needs to have the capability to attach the NFS servers as well as other fast enough uplinks to switches, so at least several 10G SFP+ ports.&lt;br /&gt;
&lt;br /&gt;
Omada: SX3032F, 32x10G SFP+, ~900€&lt;br /&gt;
&lt;br /&gt;
Ubiquity (same as above): USW-Pro-Aggregation, 28x10G SFP+, 4x25G SFP28, ~900€&lt;br /&gt;
&lt;br /&gt;
==== Meggie Switches ====&lt;br /&gt;
Each Meggie node provides a 1G uplink (apart from Intel OP). With 80 nodes we need 2 48 port switches.&lt;br /&gt;
&lt;br /&gt;
Omada: SG3452X, 48x1G RJ45, 4x10G SFP+, ~400€&lt;br /&gt;
&lt;br /&gt;
Ubiquity: USW-Pro-48, 48x1G RJ45, 4x10G SFP+, ~600€&lt;br /&gt;
&lt;br /&gt;
==== Peripheral Switches ====&lt;br /&gt;
If we decommission the Messiers we can make due with 3 peripheral switches for the main building. If the RRZE lets us use the currently installed 3 switches with the 10G uplink we do not need new hardware for this.&lt;br /&gt;
&lt;br /&gt;
==== Shopping List ====&lt;br /&gt;
* 10G root bridge: ~900 Euros&lt;br /&gt;
* 2x 48x1G + 10G uplink meggie switches: 2x~400 Euros&lt;br /&gt;
* Lots of Cat 6 (or 5e) cables for the meggies&lt;br /&gt;
* We might need new DAC cables&lt;br /&gt;
* Total: 1700 Euros&lt;br /&gt;
&lt;br /&gt;
== Integrating Meridian building and Bundschuhhaus ==&lt;br /&gt;
&lt;br /&gt;
=== Layer 2 ===&lt;br /&gt;
There are two fibers going to the Meridian building. One is patched through to the Bundschuhhaus.&lt;br /&gt;
For the Meridian building it is technically possible to use one of the fibers to directly integrate an additional switch in the Clock room via layer 2. But the RRZE needs to play ball for this because they need to switch the other pair through to Bundschuhhause. If this route is taken there is still no option to integrate Bundschuhhause on layer 2.&lt;br /&gt;
&lt;br /&gt;
=== Layer 3 ===&lt;br /&gt;
A VPN would be an option to incorporate the other buildings over layer 3 without interaction with the RRZE (fingers crossed). Each building needs to have a separate OPNsense box establishing a VPN directly to the main gateway over the WAN and an attached switch for the computers.&lt;br /&gt;
&lt;br /&gt;
NFS etc. might be a bit wonky in this scenarion. Performance will certainly be limited. Strong CPU hardware of the OPNSense boxes is required for this to work with low latency.&lt;br /&gt;
&lt;br /&gt;
==== IPSec ====&lt;br /&gt;
According to the documentation this is the preferred solution for a site-to-site setup such as in our case. It's a bit complicated to set up compared to the other options. It requires an open port on the main gateway (similar to port forwarding). The computers on the other sites then also need to be in a separate subnet, necessitating a separate DHCP (possibly DNS etc.) server (TBC).&lt;br /&gt;
&lt;br /&gt;
==== Wireguard ====&lt;br /&gt;
Much easier to set up compared to IPSec, but might be less reliable. Unclear about the different subnet. Might not require an open port on the main gateway.&lt;br /&gt;
&lt;br /&gt;
==== OpenVPN ====&lt;br /&gt;
Fairly simple to set up, running via SSL, can mimick HTTPS traffic. Requires an open port.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Settings/Optimizations ==&lt;br /&gt;
* Enable jumbo frames for better NFS/iSCSI performance&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3659</id>
		<title>New Network</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3659"/>
		<updated>2025-04-05T22:29:51Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
We're creating our own network inside a DMZ.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
* Check whether the router is set to switch on after power failure in the BIOS&lt;br /&gt;
* Set a high spanning tree priority on the root bridge&lt;br /&gt;
* &amp;lt;s&amp;gt;Have only one DHCP server&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;&amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; does DHCP, DNS, and TFTP. We have two DHCP servers right now which is a problem. See the dhcp-authoritative)&amp;lt;/s&amp;gt;&lt;br /&gt;
* When all hosts are in the private network&lt;br /&gt;
** Adjust router settings&lt;br /&gt;
*** Block private and bogon networks on WAN interface&lt;br /&gt;
*** Remove routes between public and private network&lt;br /&gt;
*** Disable gui login from public network&lt;br /&gt;
*** Disable DHC relay&lt;br /&gt;
** Adjust DHCP settings&lt;br /&gt;
*** Make the private network the default one (remove internal tags from config)&lt;br /&gt;
*** Remove classless static route from public to private network&lt;br /&gt;
&lt;br /&gt;
== Subnets ==&lt;br /&gt;
=== Public ===&lt;br /&gt;
The public subnet is a part of the internet as organized through the [https://de.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority IANA]. &amp;quot;Our&amp;quot; subnet is &amp;lt;code&amp;gt;131.188.151.0/24&amp;lt;/code&amp;gt;. At least one of the IPs in this subnet is used by the RRZE to provide a gateway. It's a [https://www.cisco.com/site/de/de/index.html Cisco] router in the basement with the IP &amp;lt;code&amp;gt;131.188.151.1&amp;lt;/code&amp;gt; and FQDN &amp;lt;code&amp;gt;astro.gate.uni-erlangen.de&amp;lt;/code&amp;gt;. We need to use this gateway to access the WAN.&lt;br /&gt;
&lt;br /&gt;
=== Private ===&lt;br /&gt;
We need to use a private network as defined in [https://www.rfc-editor.org/rfc/rfc1918.html RFC1918] for our own subnet. Because it's easy to remember and short to write we pick the class A network from RFC1918 which is &amp;lt;code&amp;gt;10.0.0.0/8&amp;lt;/code&amp;gt;. We can allocate a &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; network from this block. Since it sounds nice we can choose the second octet to also be 10. This gives us more than 65000 IP addresses to work with in &amp;lt;code&amp;gt;10.10.0.0/16&amp;lt;/code&amp;gt;. Because it makes sense we use the first address for our own gateway: &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Address blocks ====&lt;br /&gt;
Using the &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; doesn't only provide more than enough addresses, probably forever, it also enables the grouping into blocks of addresses which denote different classes of devices. This makes it easier to identify the devices and find their IP address. Note that these are not separate subnets, it's only nomenclature. These blocks are used in the DHCP server of [https://thekelleys.org.uk/dnsmasq/doc.html dnsmasq] and defined in the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet/-/blob/master/modules/remeis/files/dnsmasq/internal-dhcp.conf internal-dhcp.conf] file of the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet puppet] gitlab repository.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Address blocks&lt;br /&gt;
|-&lt;br /&gt;
! Block !! Device class&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.1.*   || Switches&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.2.*   || Management interfaces (iLO, iDRAC, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.10.*  || Servers&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.20.*  || VMs&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.30.*  || Meggie cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.40.*  || Blade center&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.50.*  || Messier cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.90.*  || Functional hosts (Raspbbery Pis, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.100.* || Office computers main building&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.200.* || Testing (Installation testing, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.250.* || Private notebooks&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Router ==&lt;br /&gt;
&lt;br /&gt;
The uplink to the WAN is realized with a server (Dell Poweredge 1950) which runs [https://opnsense.org OPNSense], a FreeBSD based routing and firewall distribution which is very easy to set up and highly reliable. The server has two 1G interfaces. One is connected to the public network managed by the RRZE (WAN) and has a public IP, the other one is connected to our own switches and has a private ip (LAN). Both interfaces are labelled in the back of the server. The router routes traffic between these two networks to make our computers talk to each other.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
The router can be configure through the web gui. It's accessible directly over the IP address. The user for the login is &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and the password is the same as the LDAP admin passwort (as of writing). A lot of information is provided in the [https://docs.opnsense.org/ OPNSense documentation]. One of the interfaces has a public IP, at the time of writing the public IP is &amp;lt;code&amp;gt;131.188.151.92&amp;lt;/code&amp;gt;. The other interface has the private used as the gateway, &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;. Its public IP might be changed depending on how we proceed with mechansim for remote access.&lt;br /&gt;
&lt;br /&gt;
==== Gateway ====&lt;br /&gt;
The router uses the RRZE gateway as its own upstream gateway. By default the firmware always sends packets destined to the WAN network to this gateway. At the time of writing this is problematic because the upstream gateway drops packets arriving from a private network (according to RFC1918) which makes it impossible for hosts in our private network to directly communicate with hosts in our public network. This option is therefore disabled in the configuration of the router. See the &amp;quot;Disable force gateway&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
==== Private and bogon networks ====&lt;br /&gt;
According to RFC1918 packets with source or destination IP addresses in private networks must not be routed through the internet. It often happens that such packets are generated and end up at edge routers (keep the private notebooks connected to our network in mind). Therefore such routers usually drop these packets on purpose. At the time of writing we actually want to route such packets from our private to our public network and vice versa. Therefore the option to drop packets from or to private networks is disabled on both interfaces. When we have all our hosts behind the router we should re enable this option for the WAN interface to avoid trouble with the RRZE. On the LAN interface this option should obviously stay disabled.&lt;br /&gt;
&lt;br /&gt;
There are addresses in the public IPv4 space which are not assigned to anything or do not make sense. These are called [https://de.wikipedia.org/wiki/Bogon &amp;quot;Bogon&amp;quot; networks]. The router is configured to drop these packets if they arrive on the WAN interface.&lt;br /&gt;
&lt;br /&gt;
==== NAT ====&lt;br /&gt;
Hosts within the private network can not directly talk to the internet (see the previous section), they need an intermidiary to do this. This is accomplished by using [https://en.wikipedia.org/wiki/Network_address_translation Network address translation (NAT)]. When a client wants to talk to the internet (except our own public network, see the following section), the router replaces the source address of the packet with its own public address and sends it of to the WAN. From the WAN it looks as if the router is making requests, instead of the client. When the reply arrives on the WAN interface the router changes the destination address of the packet from its own public address to the private address of the client and sends if off into the LAN.&lt;br /&gt;
&lt;br /&gt;
We need this mechanism for all clients behind the router to talk to the internet, except our own public network. This option is available as outbound NAT in the routers firmware and enabled by default.&lt;br /&gt;
&lt;br /&gt;
There is an important exception: Traffic from our private network which has a destination in our own public network should be routed directly, without any NAT, such that these two computers can talk directly to each other. Therefore there is a rule in the outbound NAT section which identifies such traffic and disables NAT for it. It can then be routed normally (see the following section). Note that this should be disabled as soon as all our computers are in the private network and can talk to each other directly.&lt;br /&gt;
&lt;br /&gt;
==== Routing between public and private network ====&lt;br /&gt;
At the time of writing our computers are distributed in a private and a public network. Both need to be reachable by each other. Therefore the router allows traffic to pass between these exact two networks without any restrictions. The rules for this can be found in the LAN and WAN sections of the firewall rules of the router. Especially the rule allowing any traffic originating from the public network to pass directly into the private network should be disabled as soon as all computers are in the private network.&lt;br /&gt;
&lt;br /&gt;
==== DHCP relay ====&lt;br /&gt;
At the time of writing we have DHCP (and DNS etc.) servers in the public network. Replicating these services behind the router can be avoided by allowing the router to forward DHCP requests from the private to the public network. This is done in the DHC relay section in the Services menu. With this service and the working routing and NAT there is no need to replicate these services in the private network for now. Everything seems to work, including PXE boot to install clients within the private network. As soon as all computers are in the private network the DHC relay should be disabled.&lt;br /&gt;
&lt;br /&gt;
==== Backup ====&lt;br /&gt;
The configuration can be backed up simply by downloading it in the GUI. It's recommended to do this once in a while just in case the router dies. This configuration can then be very easily applied after a new installation.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
Updates of the route can simply be done through the GUI. For security reasons this is recommended on a regular basis, but since we have the firewall of the RRZE in front of it it's probably not critical. Often the updates ca be done even without restarting the firmware.&lt;br /&gt;
&lt;br /&gt;
== Layer 2 ==&lt;br /&gt;
With the router working we can use our own ethernet switches behind it without interfering with the RRZE switches.&lt;br /&gt;
&lt;br /&gt;
=== VLAN ===&lt;br /&gt;
[https://en.wikipedia.org/wiki/VLAN Local Area Networks (VLAN)] are logical layer 2 networks which can spread across multiple switches. They can be used to separate different broadcast domains (ethernet networks) and usually only contain a single IP subnet. Under certain scenarios VLANs can offer performance, flexibility and security advantages. We don't want to segment our network, therefore performance and flexibility enhancements are not possible. Security is also of no concern. We therefore do not use VLANs.&lt;br /&gt;
&lt;br /&gt;
However, from a technical perspective this is impossible with layer 3 switches. By default all interfaces of a switch are assigned to the so called default VLAN. For most switch manufacturers this is VLAN 1, but it doesn't have to be. Most manufacturers also use VLAN 1 as the native VLAN. This means that all frames in VLAN 1 are sent untagged (without VLAN information) also to other switches, even over tagged ports (trunk ports). This ensures interoperability without changing settings.&lt;br /&gt;
&lt;br /&gt;
We are good as long as all switches we buy have default VLAN 1 (which can not be changed) and native VLAN 1 (which can be changed). In case we get a switch which does not have the default VLAN 1 we need to set the native VLAN of this switch also to the same VLAN, making all frames in this VLAN untagged, enabling communication with other switches.&lt;br /&gt;
&lt;br /&gt;
=== Spanning tree ===&lt;br /&gt;
We know for a fact that sometimes people plug ethernet cables into random ports, even both ends of it, causing potential loops (see mail on 22 August 2023). To avoid such loops the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol spanning tree protocol (STP)] defined in [https://en.wikipedia.org/wiki/IEEE_802.1D IEEE 802.1d]. When this protocol is enabled on a switch it exchanges [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Bridge_protocol_data_units bridge protocol data units (BPDUs)] with its neighbouring switches, containing some information about the network topology. This information is used to elect the so called [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Root_bridge_and_the_bridge_ID root bridge]. This switch can be thought of as the top of the spanning tree. All other switches then determine one port they use as a path towards this root bridge, even if it goes through another switch. All other ports which also provide a path towards the root bridge are disabled (set to the blocking [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Port_states state]). The election of the root bridge also enters an individual priority for each switch which can be set by the administrator. We should make sure to set a high priority on our central switch.&lt;br /&gt;
&lt;br /&gt;
When a change in the network topology is detected via the BPDUs 802.1d causes the entire spanning tree to be newly established with a new election of a root bridge. This can take somewhere around a minute, which is too long. Therefore the [https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Rapid_Spanning_Tree_Protocol rapid STP (RSTP)] was defined in IEEE 802.1w. It is fully backwards compatible with 802.1d and uses additional information to define port based rules such as alternate and backup ports for the path to the root bridge such that a topology change can be acted on in just a few seconds. It has the nice benefit that a link to a computer which is plugged into an access port on a given switch becomes ready in just a few seconds. We therefore enable RSTP on all our switches. Usually this is done by enabling STP and forcing the STP mode to RSTP. No further configuration is needed, except the priority of the root bridge.&lt;br /&gt;
&lt;br /&gt;
== DNS ==&lt;br /&gt;
=== Domains ===&lt;br /&gt;
Our public domain is &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt;. For the internal domain we don't need to register a domain, it doesn't make sense. Currently it is configure to &amp;lt;code&amp;gt;internal.sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; which is clunky but accurate. It is configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; which has the nice sideeffect of &amp;lt;code&amp;gt;bla.internal&amp;lt;/code&amp;gt; being correctly resolved from computers in the public network to the computer in the private network. The other way round it does not work, but &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; is therefore configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; as a search domain for all hosts in the private network. If we make sure to not duplicate computer names in the private and public network DNS enables the reference of another computer directly by its hostname.&lt;br /&gt;
&lt;br /&gt;
=== /etc/hosts ===&lt;br /&gt;
With all the hostnames available via the &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; configuration there is no need to out them all in &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; as well. &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; knows the IP associated with a hostname from its dhcp configuration file and uses it to resolve the names if a DNS query is made. We could therefore only put aliases (such as &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt;) in the &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; file and save the work of always trying to keep &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; up to date.&lt;br /&gt;
&lt;br /&gt;
== Remote Access ==&lt;br /&gt;
We need a login node with a separate interface and a dedicated public IP, see the following section.&lt;br /&gt;
&lt;br /&gt;
== Exposed services ==&lt;br /&gt;
Some services need to be exposed to the internet under a specific address. Most importantly the webserver (www.stern....de). This needs to have a public IP resolving to a specific host. Therefore such services need to run on a server which has two interfaces. One for the LAN and one for the WAN. The weak end system model of Linux ''might'' become a problem here.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Desired uplink speeds for individual hardware&lt;br /&gt;
* NFS servers: At least 10G, some maybe with 2x10G.&lt;br /&gt;
* Bladecenter: 10G&lt;br /&gt;
* Meggie nodes: 80x1G&lt;br /&gt;
* Other clients: 1G&lt;br /&gt;
&lt;br /&gt;
=== Main Building ===&lt;br /&gt;
In the main building we can create our own layer 2 network fairly straightforwardly.&lt;br /&gt;
&lt;br /&gt;
Let's ''please'' mount the switches in reverse in the server racks.&lt;br /&gt;
&lt;br /&gt;
==== Root Bridge ====&lt;br /&gt;
The root bridge will be the core of the network. Needs to have the capability to attach the NFS servers as well as other fast enough uplinks to switches, so at least several 10G SFP+ ports.&lt;br /&gt;
&lt;br /&gt;
Omada: SX3032F, 32x10G SFP+, ~900€&lt;br /&gt;
&lt;br /&gt;
Ubiquity (same as above): USW-Pro-Aggregation, 28x10G SFP+, 4x25G SFP28, ~900€&lt;br /&gt;
&lt;br /&gt;
==== Meggie Switches ====&lt;br /&gt;
Each Meggie node provides a 1G uplink (apart from Intel OP). With 80 nodes we need 2 48 port switches.&lt;br /&gt;
&lt;br /&gt;
Omada: SG3452X, 48x1G RJ45, 4x10G SFP+, ~400€&lt;br /&gt;
&lt;br /&gt;
Ubiquity: USW-Pro-48, 48x1G RJ45, 4x10G SFP+, ~600€&lt;br /&gt;
&lt;br /&gt;
==== Peripheral Switches ====&lt;br /&gt;
If we decommission the Messiers we can make due with 3 peripheral switches for the main building. If the RRZE lets us use the currently installed 3 switches with the 10G uplink we do not need new hardware for this.&lt;br /&gt;
&lt;br /&gt;
==== Shopping List ====&lt;br /&gt;
* 10G root bridge: ~900 Euros&lt;br /&gt;
* 2x 48x1G + 10G uplink meggie switches: 2x~400 Euros&lt;br /&gt;
* Lots of Cat 6 (or 5e) cables for the meggies&lt;br /&gt;
* We might need new DAC cables&lt;br /&gt;
* Total: 1700 Euros&lt;br /&gt;
&lt;br /&gt;
== Integrating Meridian building and Bundschuhhaus ==&lt;br /&gt;
&lt;br /&gt;
=== Layer 2 ===&lt;br /&gt;
There are two fibers going to the Meridian building. One is patched through to the Bundschuhhaus.&lt;br /&gt;
For the Meridian building it is technically possible to use one of the fibers to directly integrate an additional switch in the Clock room via layer 2. But the RRZE needs to play ball for this because they need to switch the other pair through to Bundschuhhause. If this route is taken there is still no option to integrate Bundschuhhause on layer 2.&lt;br /&gt;
&lt;br /&gt;
=== Layer 3 ===&lt;br /&gt;
A VPN would be an option to incorporate the other buildings over layer 3 without interaction with the RRZE (fingers crossed). Each building needs to have a separate OPNsense box establishing a VPN directly to the main gateway over the WAN and an attached switch for the computers.&lt;br /&gt;
&lt;br /&gt;
NFS etc. might be a bit wonky in this scenarion. Performance will certainly be limited. Strong CPU hardware of the OPNSense boxes is required for this to work with low latency.&lt;br /&gt;
&lt;br /&gt;
==== IPSec ====&lt;br /&gt;
According to the documentation this is the preferred solution for a site-to-site setup such as in our case. It's a bit complicated to set up compared to the other options. It requires an open port on the main gateway (similar to port forwarding). The computers on the other sites then also need to be in a separate subnet, necessitating a separate DHCP (possibly DNS etc.) server (TBC).&lt;br /&gt;
&lt;br /&gt;
==== Wireguard ====&lt;br /&gt;
Much easier to set up compared to IPSec, but might be less reliable. Unclear about the different subnet. Might not require an open port on the main gateway.&lt;br /&gt;
&lt;br /&gt;
==== OpenVPN ====&lt;br /&gt;
Fairly simple to set up, running via SSL, can mimick HTTPS traffic. Requires an open port.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Settings/Optimizations ==&lt;br /&gt;
* Enable jumbo frames for better NFS/iSCSI performance&lt;br /&gt;
* Use spanning tree? If so configure the root bridge with high priority, and use portfast&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3658</id>
		<title>New Network</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3658"/>
		<updated>2025-04-05T21:57:54Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
We're creating our own network inside a DMZ.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
* Check whether the router is set to switch on after power failure in the BIOS&lt;br /&gt;
* Have only one DHCP server&lt;br /&gt;
** &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; does DHCP, DNS, and TFTP. We have two DHCP servers right now which is a problem. See the dhcp-authoritative)&lt;br /&gt;
* When all hosts are in the private network&lt;br /&gt;
** Adjust router settings&lt;br /&gt;
*** Block private and bogon networks on WAN interface&lt;br /&gt;
*** Remove routes between public and private network&lt;br /&gt;
*** Disable gui login from public network&lt;br /&gt;
*** Disable DHC relay&lt;br /&gt;
** Adjust DHCP settings&lt;br /&gt;
*** Make the private network the default one (remove internal tags from config)&lt;br /&gt;
*** Remove classless static route from public to private network&lt;br /&gt;
&lt;br /&gt;
== Subnets ==&lt;br /&gt;
=== Public ===&lt;br /&gt;
The public subnet is a part of the internet as organized through the [https://de.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority IANA]. &amp;quot;Our&amp;quot; subnet is &amp;lt;code&amp;gt;131.188.151.0/24&amp;lt;/code&amp;gt;. At least one of the IPs in this subnet is used by the RRZE to provide a gateway. It's a [https://www.cisco.com/site/de/de/index.html Cisco] router in the basement with the IP &amp;lt;code&amp;gt;131.188.151.1&amp;lt;/code&amp;gt; and FQDN &amp;lt;code&amp;gt;astro.gate.uni-erlangen.de&amp;lt;/code&amp;gt;. We need to use this gateway to access the WAN.&lt;br /&gt;
&lt;br /&gt;
=== Private ===&lt;br /&gt;
We need to use a private network as defined in [https://www.rfc-editor.org/rfc/rfc1918.html RFC1918] for our own subnet. Because it's easy to remember and short to write we pick the class A network from RFC1918 which is &amp;lt;code&amp;gt;10.0.0.0/8&amp;lt;/code&amp;gt;. We can allocate a &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; network from this block. Since it sounds nice we can choose the second octet to also be 10. This gives us more than 65000 IP addresses to work with in &amp;lt;code&amp;gt;10.10.0.0/16&amp;lt;/code&amp;gt;. Because it makes sense we use the first address for our own gateway: &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Address blocks ====&lt;br /&gt;
Using the &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; doesn't only provide more than enough addresses, probably forever, it also enables the grouping into blocks of addresses which denote different classes of devices. This makes it easier to identify the devices and find their IP address. Note that these are not separate subnets, it's only nomenclature. These blocks are used in the DHCP server of [https://thekelleys.org.uk/dnsmasq/doc.html dnsmasq] and defined in the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet/-/blob/master/modules/remeis/files/dnsmasq/internal-dhcp.conf internal-dhcp.conf] file of the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet puppet] gitlab repository.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Address blocks&lt;br /&gt;
|-&lt;br /&gt;
! Block !! Device class&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.1.*   || Switches&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.2.*   || Management interfaces (iLO, iDRAC, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.10.*  || Servers&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.20.*  || VMs&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.30.*  || Meggie cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.40.*  || Blade center&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.50.*  || Messier cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.90.*  || Functional hosts (Raspbbery Pis, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.100.* || Office computers main building&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.200.* || Testing (Installation testing, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.250.* || Private notebooks&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Router ==&lt;br /&gt;
&lt;br /&gt;
The uplink to the WAN is realized with a server (Dell Poweredge 1950) which runs [https://opnsense.org OPNSense], a FreeBSD based routing and firewall distribution which is very easy to set up and highly reliable. The server has two 1G interfaces. One is connected to the public network managed by the RRZE (WAN) and has a public IP, the other one is connected to our own switches and has a private ip (LAN). Both interfaces are labelled in the back of the server. The router routes traffic between these two networks to make our computers talk to each other.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
The router can be configure through the web gui. It's accessible directly over the IP address. The user for the login is &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and the password is the same as the LDAP admin passwort (as of writing). A lot of information is provided in the [https://docs.opnsense.org/ OPNSense documentation]. One of the interfaces has a public IP, at the time of writing the public IP is &amp;lt;code&amp;gt;131.188.151.92&amp;lt;/code&amp;gt;. The other interface has the private used as the gateway, &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;. Its public IP might be changed depending on how we proceed with mechansim for remote access.&lt;br /&gt;
&lt;br /&gt;
==== Gateway ====&lt;br /&gt;
The router uses the RRZE gateway as its own upstream gateway. By default the firmware always sends packets destined to the WAN network to this gateway. At the time of writing this is problematic because the upstream gateway drops packets arriving from a private network (according to RFC1918) which makes it impossible for hosts in our private network to directly communicate with hosts in our public network. This option is therefore disabled in the configuration of the router. See the &amp;quot;Disable force gateway&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
==== Private and bogon networks ====&lt;br /&gt;
According to RFC1918 packets with source or destination IP addresses in private networks must not be routed through the internet. It often happens that such packets are generated and end up at edge routers (keep the private notebooks connected to our network in mind). Therefore such routers usually drop these packets on purpose. At the time of writing we actually want to route such packets from our private to our public network and vice versa. Therefore the option to drop packets from or to private networks is disabled on both interfaces. When we have all our hosts behind the router we should re enable this option for the WAN interface to avoid trouble with the RRZE. On the LAN interface this option should obviously stay disabled.&lt;br /&gt;
&lt;br /&gt;
There are addresses in the public IPv4 space which are not assigned to anything or do not make sense. These are called [https://de.wikipedia.org/wiki/Bogon &amp;quot;Bogon&amp;quot; networks]. The router is configured to drop these packets if they arrive on the WAN interface.&lt;br /&gt;
&lt;br /&gt;
==== NAT ====&lt;br /&gt;
Hosts within the private network can not directly talk to the internet (see the previous section), they need an intermidiary to do this. This is accomplished by using [https://en.wikipedia.org/wiki/Network_address_translation Network address translation (NAT)]. When a client wants to talk to the internet (except our own public network, see the following section), the router replaces the source address of the packet with its own public address and sends it of to the WAN. From the WAN it looks as if the router is making requests, instead of the client. When the reply arrives on the WAN interface the router changes the destination address of the packet from its own public address to the private address of the client and sends if off into the LAN.&lt;br /&gt;
&lt;br /&gt;
We need this mechanism for all clients behind the router to talk to the internet, except our own public network. This option is available as outbound NAT in the routers firmware and enabled by default.&lt;br /&gt;
&lt;br /&gt;
There is an important exception: Traffic from our private network which has a destination in our own public network should be routed directly, without any NAT, such that these two computers can talk directly to each other. Therefore there is a rule in the outbound NAT section which identifies such traffic and disables NAT for it. It can then be routed normally (see the following section). Note that this should be disabled as soon as all our computers are in the private network and can talk to each other directly.&lt;br /&gt;
&lt;br /&gt;
==== Routing between public and private network ====&lt;br /&gt;
At the time of writing our computers are distributed in a private and a public network. Both need to be reachable by each other. Therefore the router allows traffic to pass between these exact two networks without any restrictions. The rules for this can be found in the LAN and WAN sections of the firewall rules of the router. Especially the rule allowing any traffic originating from the public network to pass directly into the private network should be disabled as soon as all computers are in the private network.&lt;br /&gt;
&lt;br /&gt;
==== DHCP relay ====&lt;br /&gt;
At the time of writing we have DHCP (and DNS etc.) servers in the public network. Replicating these services behind the router can be avoided by allowing the router to forward DHCP requests from the private to the public network. This is done in the DHC relay section in the Services menu. With this service and the working routing and NAT there is no need to replicate these services in the private network for now. Everything seems to work, including PXE boot to install clients within the private network. As soon as all computers are in the private network the DHC relay should be disabled.&lt;br /&gt;
&lt;br /&gt;
==== Backup ====&lt;br /&gt;
The configuration can be backed up simply by downloading it in the GUI. It's recommended to do this once in a while just in case the router dies. This configuration can then be very easily applied after a new installation.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
Updates of the route can simply be done through the GUI. For security reasons this is recommended on a regular basis, but since we have the firewall of the RRZE in front of it it's probably not critical. Often the updates ca be done even without restarting the firmware.&lt;br /&gt;
&lt;br /&gt;
== Layer 2 ==&lt;br /&gt;
With the router working we can use our own ethernet switches behind it without interfering with the RRZE switches.&lt;br /&gt;
&lt;br /&gt;
=== VLAN ===&lt;br /&gt;
[https://en.wikipedia.org/wiki/VLAN Local Area Networks (VLAN)] are logical layer 2 networks which can spread across multiple switches. They can be used to separate different broadcast domains (ethernet networks) and usually only contain a single IP subnet. Under certain scenarios VLANs can offer performance, flexibility and security advantages. We don't want to segment our network, therefore performance and flexibility enhancements are not possible. Security is also of no concern. We therefore do not use VLANs.&lt;br /&gt;
&lt;br /&gt;
However, from a technical perspective this is impossible with layer 3 switches. By default all interfaces of a switch are assigned to the so called default VLAN. For most switch manufacturers this is VLAN 1, but it doesn't have to be. Most manufacturers also use VLAN 1 as the native VLAN. This means that all frames in VLAN 1 are sent untagged (without VLAN information) also to other switches, even over tagged ports (trunk ports). This ensures interoperability without changing settings.&lt;br /&gt;
&lt;br /&gt;
We are good as long as all switches we buy have default VLAN 1 (which can not be changed) and native VLAN 1 (which can be changed). In case we get a switch which does not have the default VLAN 1 we need to set the native VLAN of this switch also to the same VLAN, making all frames in this VLAN untagged, enabling communication with other switches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== DNS ==&lt;br /&gt;
=== Domains ===&lt;br /&gt;
Our public domain is &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt;. For the internal domain we don't need to register a domain, it doesn't make sense. Currently it is configure to &amp;lt;code&amp;gt;internal.sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; which is clunky but accurate. It is configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; which has the nice sideeffect of &amp;lt;code&amp;gt;bla.internal&amp;lt;/code&amp;gt; being correctly resolved from computers in the public network to the computer in the private network. The other way round it does not work, but &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; is therefore configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; as a search domain for all hosts in the private network. If we make sure to not duplicate computer names in the private and public network DNS enables the reference of another computer directly by its hostname.&lt;br /&gt;
&lt;br /&gt;
=== /etc/hosts ===&lt;br /&gt;
With all the hostnames available via the &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; configuration there is no need to out them all in &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; as well. &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; knows the IP associated with a hostname from its dhcp configuration file and uses it to resolve the names if a DNS query is made. We could therefore only put aliases (such as &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt;) in the &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; file and save the work of always trying to keep &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; up to date.&lt;br /&gt;
&lt;br /&gt;
== Remote Access ==&lt;br /&gt;
We need a login node with a separate interface and a dedicated public IP, see the following section.&lt;br /&gt;
&lt;br /&gt;
== Exposed services ==&lt;br /&gt;
Some services need to be exposed to the internet under a specific address. Most importantly the webserver (www.stern....de). This needs to have a public IP resolving to a specific host. Therefore such services need to run on a server which has two interfaces. One for the LAN and one for the WAN. The weak end system model of Linux ''might'' become a problem here.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Desired uplink speeds for individual hardware&lt;br /&gt;
* NFS servers: At least 10G, some maybe with 2x10G.&lt;br /&gt;
* Bladecenter: 10G&lt;br /&gt;
* Meggie nodes: 80x1G&lt;br /&gt;
* Other clients: 1G&lt;br /&gt;
&lt;br /&gt;
=== Main Building ===&lt;br /&gt;
In the main building we can create our own layer 2 network fairly straightforwardly.&lt;br /&gt;
&lt;br /&gt;
Let's ''please'' mount the switches in reverse in the server racks.&lt;br /&gt;
&lt;br /&gt;
==== Root Bridge ====&lt;br /&gt;
The root bridge will be the core of the network. Needs to have the capability to attach the NFS servers as well as other fast enough uplinks to switches, so at least several 10G SFP+ ports.&lt;br /&gt;
&lt;br /&gt;
Omada: SX3032F, 32x10G SFP+, ~900€&lt;br /&gt;
&lt;br /&gt;
Ubiquity (same as above): USW-Pro-Aggregation, 28x10G SFP+, 4x25G SFP28, ~900€&lt;br /&gt;
&lt;br /&gt;
==== Meggie Switches ====&lt;br /&gt;
Each Meggie node provides a 1G uplink (apart from Intel OP). With 80 nodes we need 2 48 port switches.&lt;br /&gt;
&lt;br /&gt;
Omada: SG3452X, 48x1G RJ45, 4x10G SFP+, ~400€&lt;br /&gt;
&lt;br /&gt;
Ubiquity: USW-Pro-48, 48x1G RJ45, 4x10G SFP+, ~600€&lt;br /&gt;
&lt;br /&gt;
==== Peripheral Switches ====&lt;br /&gt;
If we decommission the Messiers we can make due with 3 peripheral switches for the main building. If the RRZE lets us use the currently installed 3 switches with the 10G uplink we do not need new hardware for this.&lt;br /&gt;
&lt;br /&gt;
==== Shopping List ====&lt;br /&gt;
* 10G root bridge: ~900 Euros&lt;br /&gt;
* 2x 48x1G + 10G uplink meggie switches: 2x~400 Euros&lt;br /&gt;
* Lots of Cat 6 (or 5e) cables for the meggies&lt;br /&gt;
* We might need new DAC cables&lt;br /&gt;
* Total: 1700 Euros&lt;br /&gt;
&lt;br /&gt;
== Integrating Meridian building and Bundschuhhaus ==&lt;br /&gt;
&lt;br /&gt;
=== Layer 2 ===&lt;br /&gt;
There are two fibers going to the Meridian building. One is patched through to the Bundschuhhaus.&lt;br /&gt;
For the Meridian building it is technically possible to use one of the fibers to directly integrate an additional switch in the Clock room via layer 2. But the RRZE needs to play ball for this because they need to switch the other pair through to Bundschuhhause. If this route is taken there is still no option to integrate Bundschuhhause on layer 2.&lt;br /&gt;
&lt;br /&gt;
=== Layer 3 ===&lt;br /&gt;
A VPN would be an option to incorporate the other buildings over layer 3 without interaction with the RRZE (fingers crossed). Each building needs to have a separate OPNsense box establishing a VPN directly to the main gateway over the WAN and an attached switch for the computers.&lt;br /&gt;
&lt;br /&gt;
NFS etc. might be a bit wonky in this scenarion. Performance will certainly be limited. Strong CPU hardware of the OPNSense boxes is required for this to work with low latency.&lt;br /&gt;
&lt;br /&gt;
==== IPSec ====&lt;br /&gt;
According to the documentation this is the preferred solution for a site-to-site setup such as in our case. It's a bit complicated to set up compared to the other options. It requires an open port on the main gateway (similar to port forwarding). The computers on the other sites then also need to be in a separate subnet, necessitating a separate DHCP (possibly DNS etc.) server (TBC).&lt;br /&gt;
&lt;br /&gt;
==== Wireguard ====&lt;br /&gt;
Much easier to set up compared to IPSec, but might be less reliable. Unclear about the different subnet. Might not require an open port on the main gateway.&lt;br /&gt;
&lt;br /&gt;
==== OpenVPN ====&lt;br /&gt;
Fairly simple to set up, running via SSL, can mimick HTTPS traffic. Requires an open port.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Settings/Optimizations ==&lt;br /&gt;
* Enable jumbo frames for better NFS/iSCSI performance&lt;br /&gt;
* Use spanning tree? If so configure the root bridge with high priority, and use portfast&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3657</id>
		<title>New Network</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3657"/>
		<updated>2025-04-05T20:35:27Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
We're creating our own network inside a DMZ.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
* Check whether the router is set to switch on after power failure in the BIOS&lt;br /&gt;
* Have only one DHCP server&lt;br /&gt;
** &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; does DHCP, DNS, and TFTP. We have two DHCP servers right now which is a problem. See the dhcp-authoritative)&lt;br /&gt;
* When all hosts are in the private network&lt;br /&gt;
** Adjust router settings&lt;br /&gt;
*** Block private and bogon networks on WAN interface&lt;br /&gt;
*** Remove routes between public and private network&lt;br /&gt;
*** Disable gui login from public network&lt;br /&gt;
*** Disable DHC relay&lt;br /&gt;
** Adjust DHCP settings&lt;br /&gt;
*** Make the private network the default one (remove internal tags from config)&lt;br /&gt;
*** Remove classless static route from public to private network&lt;br /&gt;
&lt;br /&gt;
== Subnets ==&lt;br /&gt;
=== Public ===&lt;br /&gt;
The public subnet is a part of the internet as organized through the [https://de.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority IANA]. &amp;quot;Our&amp;quot; subnet is &amp;lt;code&amp;gt;131.188.151.0/24&amp;lt;/code&amp;gt;. At least one of the IPs in this subnet is used by the RRZE to provide a gateway. It's a [https://www.cisco.com/site/de/de/index.html Cisco] router in the basement with the IP &amp;lt;code&amp;gt;131.188.151.1&amp;lt;/code&amp;gt; and FQDN &amp;lt;code&amp;gt;astro.gate.uni-erlangen.de&amp;lt;/code&amp;gt;. We need to use this gateway to access the WAN.&lt;br /&gt;
&lt;br /&gt;
=== Private ===&lt;br /&gt;
We need to use a private network as defined in [https://www.rfc-editor.org/rfc/rfc1918.html RFC1918] for our own subnet. Because it's easy to remember and short to write we pick the class A network from RFC1918 which is &amp;lt;code&amp;gt;10.0.0.0/8&amp;lt;/code&amp;gt;. If we put our own computers in a separate [https://de.wikipedia.org/wiki/Virtual_Local_Area_Network VLAN] to make mangement easier we can allocate a &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; network from this block and use the second octet to denote the VLAN. This gives us more than 65000 IP addresses to work with in &amp;lt;code&amp;gt;10.10.0.0/16&amp;lt;/code&amp;gt;. Because it makes sense we use the first address for our own gateway: &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Address blocks ====&lt;br /&gt;
Using the &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; doesn't only provide more than enough addresses, probably forever, it also enables the grouping into blocks of addresses which denote different classes of devices. This makes it easier to identify the devices and find their IP address. Note that these are not separate subnets, it's only nomenclature. These blocks are used in the DHCP server of [https://thekelleys.org.uk/dnsmasq/doc.html dnsmasq] and defined in the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet/-/blob/master/modules/remeis/files/dnsmasq/internal-dhcp.conf internal-dhcp.conf] file of the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet puppet] gitlab repository.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Address blocks&lt;br /&gt;
|-&lt;br /&gt;
! Block !! Device class&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.1.*   || Switches&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.2.*   || Management interfaces (iLO, iDRAC, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.10.*  || Servers&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.20.*  || VMs&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.30.*  || Meggie cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.40.*  || Blade center&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.50.*  || Messier cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.90.*  || Functional hosts (Raspbbery Pis, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.100.* || Office computers main building&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.200.* || Testing (Installation testing, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.250.* || Private notebooks&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Router ==&lt;br /&gt;
&lt;br /&gt;
The uplink to the WAN is realized with a server (Dell Poweredge 1950) which runs [https://opnsense.org OPNSense], a FreeBSD based routing and firewall distribution which is very easy to set up and highly reliable. The server has two 1G interfaces. One is connected to the public network managed by the RRZE (WAN) and has a public IP, the other one is connected to our own switches and has a private ip (LAN). Both interfaces are labelled in the back of the server. The router routes traffic between these two networks to make our computers talk to each other.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
The router can be configure through the web gui. It's accessible directly over the IP address. The user for the login is &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and the password is the same as the LDAP admin passwort (as of writing). A lot of information is provided in the [https://docs.opnsense.org/ OPNSense documentation]. One of the interfaces has a public IP, at the time of writing the public IP is &amp;lt;code&amp;gt;131.188.151.92&amp;lt;/code&amp;gt;. The other interface has the private used as the gateway, &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;. Its public IP might be changed depending on how we proceed with mechansim for remote access.&lt;br /&gt;
&lt;br /&gt;
==== Gateway ====&lt;br /&gt;
The router uses the RRZE gateway as its own upstream gateway. By default the firmware always sends packets destined to the WAN network to this gateway. At the time of writing this is problematic because the upstream gateway drops packets arriving from a private network (according to RFC1918) which makes it impossible for hosts in our private network to directly communicate with hosts in our public network. This option is therefore disabled in the configuration of the router. See the &amp;quot;Disable force gateway&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
==== Private and bogon networks ====&lt;br /&gt;
According to RFC1918 packets with source or destination IP addresses in private networks must not be routed through the internet. It often happens that such packets are generated and end up at edge routers (keep the private notebooks connected to our network in mind). Therefore such routers usually drop these packets on purpose. At the time of writing we actually want to route such packets from our private to our public network and vice versa. Therefore the option to drop packets from or to private networks is disabled on both interfaces. When we have all our hosts behind the router we should re enable this option for the WAN interface to avoid trouble with the RRZE. On the LAN interface this option should obviously stay disabled.&lt;br /&gt;
&lt;br /&gt;
There are addresses in the public IPv4 space which are not assigned to anything or do not make sense. These are called [https://de.wikipedia.org/wiki/Bogon &amp;quot;Bogon&amp;quot; networks]. The router is configured to drop these packets if they arrive on the WAN interface.&lt;br /&gt;
&lt;br /&gt;
==== NAT ====&lt;br /&gt;
Hosts within the private network can not directly talk to the internet (see the previous section), they need an intermidiary to do this. This is accomplished by using [https://en.wikipedia.org/wiki/Network_address_translation Network address translation (NAT)]. When a client wants to talk to the internet (except our own public network, see the following section), the router replaces the source address of the packet with its own public address and sends it of to the WAN. From the WAN it looks as if the router is making requests, instead of the client. When the reply arrives on the WAN interface the router changes the destination address of the packet from its own public address to the private address of the client and sends if off into the LAN.&lt;br /&gt;
&lt;br /&gt;
We need this mechanism for all clients behind the router to talk to the internet, except our own public network. This option is available as outbound NAT in the routers firmware and enabled by default.&lt;br /&gt;
&lt;br /&gt;
There is an important exception: Traffic from our private network which has a destination in our own public network should be routed directly, without any NAT, such that these two computers can talk directly to each other. Therefore there is a rule in the outbound NAT section which identifies such traffic and disables NAT for it. It can then be routed normally (see the following section). Note that this should be disabled as soon as all our computers are in the private network and can talk to each other directly.&lt;br /&gt;
&lt;br /&gt;
==== Routing between public and private network ====&lt;br /&gt;
At the time of writing our computers are distributed in a private and a public network. Both need to be reachable by each other. Therefore the router allows traffic to pass between these exact two networks without any restrictions. The rules for this can be found in the LAN and WAN sections of the firewall rules of the router. Especially the rule allowing any traffic originating from the public network to pass directly into the private network should be disabled as soon as all computers are in the private network.&lt;br /&gt;
&lt;br /&gt;
==== DHCP relay ====&lt;br /&gt;
At the time of writing we have DHCP (and DNS etc.) servers in the public network. Replicating these services behind the router can be avoided by allowing the router to forward DHCP requests from the private to the public network. This is done in the DHC relay section in the Services menu. With this service and the working routing and NAT there is no need to replicate these services in the private network for now. Everything seems to work, including PXE boot to install clients within the private network. As soon as all computers are in the private network the DHC relay should be disabled.&lt;br /&gt;
&lt;br /&gt;
==== Backup ====&lt;br /&gt;
The configuration can be backed up simply by downloading it in the GUI. It's recommended to do this once in a while just in case the router dies. This configuration can then be very easily applied after a new installation.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
Updates of the route can simply be done through the GUI. For security reasons this is recommended on a regular basis, but since we have the firewall of the RRZE in front of it it's probably not critical. Often the updates ca be done even without restarting the firmware.&lt;br /&gt;
&lt;br /&gt;
== Layer 2 ==&lt;br /&gt;
With the router working we can use our own ethernet switches behind it without interfering with the RRZE switches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== DNS ==&lt;br /&gt;
=== Domains ===&lt;br /&gt;
Our public domain is &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt;. For the internal domain we don't need to register a domain, it doesn't make sense. Currently it is configure to &amp;lt;code&amp;gt;internal.sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; which is clunky but accurate. It is configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; which has the nice sideeffect of &amp;lt;code&amp;gt;bla.internal&amp;lt;/code&amp;gt; being correctly resolved from computers in the public network to the computer in the private network. The other way round it does not work, but &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; is therefore configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; as a search domain for all hosts in the private network. If we make sure to not duplicate computer names in the private and public network DNS enables the reference of another computer directly by its hostname.&lt;br /&gt;
&lt;br /&gt;
=== /etc/hosts ===&lt;br /&gt;
With all the hostnames available via the &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; configuration there is no need to out them all in &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; as well. &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; knows the IP associated with a hostname from its dhcp configuration file and uses it to resolve the names if a DNS query is made. We could therefore only put aliases (such as &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt;) in the &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; file and save the work of always trying to keep &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; up to date.&lt;br /&gt;
&lt;br /&gt;
== Remote Access ==&lt;br /&gt;
We need a login node with a separate interface and a dedicated public IP, see the following section.&lt;br /&gt;
&lt;br /&gt;
== Exposed services ==&lt;br /&gt;
Some services need to be exposed to the internet under a specific address. Most importantly the webserver (www.stern....de). This needs to have a public IP resolving to a specific host. Therefore such services need to run on a server which has two interfaces. One for the LAN and one for the WAN. The weak end system model of Linux ''might'' become a problem here.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Desired uplink speeds for individual hardware&lt;br /&gt;
* NFS servers: At least 10G, some maybe with 2x10G.&lt;br /&gt;
* Bladecenter: 10G&lt;br /&gt;
* Meggie nodes: 80x1G&lt;br /&gt;
* Other clients: 1G&lt;br /&gt;
&lt;br /&gt;
=== Main Building ===&lt;br /&gt;
In the main building we can create our own layer 2 network fairly straightforwardly.&lt;br /&gt;
&lt;br /&gt;
Let's ''please'' mount the switches in reverse in the server racks.&lt;br /&gt;
&lt;br /&gt;
==== Root Bridge ====&lt;br /&gt;
The root bridge will be the core of the network. Needs to have the capability to attach the NFS servers as well as other fast enough uplinks to switches, so at least several 10G SFP+ ports.&lt;br /&gt;
&lt;br /&gt;
Omada: SX3032F, 32x10G SFP+, ~900€&lt;br /&gt;
&lt;br /&gt;
Ubiquity (same as above): USW-Pro-Aggregation, 28x10G SFP+, 4x25G SFP28, ~900€&lt;br /&gt;
&lt;br /&gt;
==== Meggie Switches ====&lt;br /&gt;
Each Meggie node provides a 1G uplink (apart from Intel OP). With 80 nodes we need 2 48 port switches.&lt;br /&gt;
&lt;br /&gt;
Omada: SG3452X, 48x1G RJ45, 4x10G SFP+, ~400€&lt;br /&gt;
&lt;br /&gt;
Ubiquity: USW-Pro-48, 48x1G RJ45, 4x10G SFP+, ~600€&lt;br /&gt;
&lt;br /&gt;
==== Peripheral Switches ====&lt;br /&gt;
If we decommission the Messiers we can make due with 3 peripheral switches for the main building. If the RRZE lets us use the currently installed 3 switches with the 10G uplink we do not need new hardware for this.&lt;br /&gt;
&lt;br /&gt;
==== Shopping List ====&lt;br /&gt;
* 10G root bridge: ~900 Euros&lt;br /&gt;
* 2x 48x1G + 10G uplink meggie switches: 2x~400 Euros&lt;br /&gt;
* Lots of Cat 6 (or 5e) cables for the meggies&lt;br /&gt;
* We might need new DAC cables&lt;br /&gt;
* Total: 1700 Euros&lt;br /&gt;
&lt;br /&gt;
== Integrating Meridian building and Bundschuhhaus ==&lt;br /&gt;
&lt;br /&gt;
=== Layer 2 ===&lt;br /&gt;
There are two fibers going to the Meridian building. One is patched through to the Bundschuhhaus.&lt;br /&gt;
For the Meridian building it is technically possible to use one of the fibers to directly integrate an additional switch in the Clock room via layer 2. But the RRZE needs to play ball for this because they need to switch the other pair through to Bundschuhhause. If this route is taken there is still no option to integrate Bundschuhhause on layer 2.&lt;br /&gt;
&lt;br /&gt;
=== Layer 3 ===&lt;br /&gt;
A VPN would be an option to incorporate the other buildings over layer 3 without interaction with the RRZE (fingers crossed). Each building needs to have a separate OPNsense box establishing a VPN directly to the main gateway over the WAN and an attached switch for the computers.&lt;br /&gt;
&lt;br /&gt;
NFS etc. might be a bit wonky in this scenarion. Performance will certainly be limited. Strong CPU hardware of the OPNSense boxes is required for this to work with low latency.&lt;br /&gt;
&lt;br /&gt;
==== IPSec ====&lt;br /&gt;
According to the documentation this is the preferred solution for a site-to-site setup such as in our case. It's a bit complicated to set up compared to the other options. It requires an open port on the main gateway (similar to port forwarding). The computers on the other sites then also need to be in a separate subnet, necessitating a separate DHCP (possibly DNS etc.) server (TBC).&lt;br /&gt;
&lt;br /&gt;
==== Wireguard ====&lt;br /&gt;
Much easier to set up compared to IPSec, but might be less reliable. Unclear about the different subnet. Might not require an open port on the main gateway.&lt;br /&gt;
&lt;br /&gt;
==== OpenVPN ====&lt;br /&gt;
Fairly simple to set up, running via SSL, can mimick HTTPS traffic. Requires an open port.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Settings/Optimizations ==&lt;br /&gt;
* Enable jumbo frames for better NFS/iSCSI performance&lt;br /&gt;
* Use spanning tree? If so configure the root bridge with high priority, and use portfast&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3656</id>
		<title>New Network</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3656"/>
		<updated>2025-04-05T18:20:12Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
We're creating our own network inside a DMZ.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
* Check whether the router is set to switch on after power failure in the BIOS&lt;br /&gt;
* Have only one DHCP server&lt;br /&gt;
** &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; does DHCP, DNS, and TFTP. We have two DHCP servers right now which is a problem. See the dhcp-authoritative)&lt;br /&gt;
* When all hosts are in the private network&lt;br /&gt;
** Adjust router settings&lt;br /&gt;
*** Block private and bogon networks on WAN interface&lt;br /&gt;
*** Remove routes between public and private network&lt;br /&gt;
*** Disable gui login from public network&lt;br /&gt;
*** Disable DHC relay&lt;br /&gt;
** Adjust DHCP settings&lt;br /&gt;
*** Make the private network the default one (remove internal tags from config)&lt;br /&gt;
*** Remove classless static route from public to private network&lt;br /&gt;
&lt;br /&gt;
== Subnets ==&lt;br /&gt;
=== Public ===&lt;br /&gt;
The public subnet is a part of the internet as organized through the [https://de.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority IANA]. &amp;quot;Our&amp;quot; subnet is &amp;lt;code&amp;gt;131.188.151.0/24&amp;lt;/code&amp;gt;. At least one of the IPs in this subnet is used by the RRZE to provide a gateway. It's a [https://www.cisco.com/site/de/de/index.html Cisco] router in the basement with the IP &amp;lt;code&amp;gt;131.188.151.1&amp;lt;/code&amp;gt; and FQDN &amp;lt;code&amp;gt;astro.gate.uni-erlangen.de&amp;lt;/code&amp;gt;. We need to use this gateway to access the WAN.&lt;br /&gt;
&lt;br /&gt;
=== Private ===&lt;br /&gt;
We need to use a private network as defined in [https://www.rfc-editor.org/rfc/rfc1918.html RFC1918] for our own subnet. Because it's easy to remember and short to write we pick the class A network from RFC1918 which is &amp;lt;code&amp;gt;10.0.0.0/8&amp;lt;/code&amp;gt;. If we put our own computers in a separate [https://de.wikipedia.org/wiki/Virtual_Local_Area_Network VLAN] to make mangement easier we can allocate a &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; network from this block and use the second octet to denote the VLAN. This gives us more than 65000 IP addresses to work with in &amp;lt;code&amp;gt;10.10.0.0/16&amp;lt;/code&amp;gt;. Because it makes sense we use the first address for our own gateway: &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Address blocks ====&lt;br /&gt;
Using the &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; doesn't only provide more than enough addresses, probably forever, it also enables the grouping into blocks of addresses which denote different classes of devices. This makes it easier to identify the devices and find their IP address. Note that these are not separate subnets, it's only nomenclature. These blocks are used in the DHCP server of [https://thekelleys.org.uk/dnsmasq/doc.html dnsmasq] and defined in the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet/-/blob/master/modules/remeis/files/dnsmasq/internal-dhcp.conf internal-dhcp.conf] file of the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet puppet] gitlab repository.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Address blocks&lt;br /&gt;
|-&lt;br /&gt;
! Block !! Device class&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.1.*   || Switches&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.2.*   || Management interfaces (iLO, iDRAC, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.10.*  || Servers&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.20.*  || VMs&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.30.*  || Meggie cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.40.*  || Blade center&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.50.*  || Messier cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.90.*  || Functional hosts (Raspbbery Pis, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.100.* || Office computers main building&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.200.* || Testing (Installation testing, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.250.* || Private notebooks&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Router ==&lt;br /&gt;
&lt;br /&gt;
The uplink to the WAN is realized with a server (Dell Poweredge 1950) which runs [https://opnsense.org OPNSense], a FreeBSD based routing and firewall distribution which is very easy to set up and highly reliable. The server has two 1G interfaces. One is connected to the public network managed by the RRZE (WAN) and has a public IP, the other one is connected to our own switches and has a private ip (LAN). Both interfaces are labelled in the back of the server. The router routes traffic between these two networks to make our computers talk to each other.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
The router can be configure through the web gui. It's accessible directly over the IP address. The user for the login is &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and the password is the same as the LDAP admin passwort (as of writing). A lot of information is provided in the [https://docs.opnsense.org/ OPNSense documentation]. One of the interfaces has a public IP, at the time of writing the public IP is &amp;lt;code&amp;gt;131.188.151.92&amp;lt;/code&amp;gt;. The other interface has the private used as the gateway, &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;. Its public IP might be changed depending on how we proceed with mechansim for remote access.&lt;br /&gt;
&lt;br /&gt;
==== Gateway ====&lt;br /&gt;
The router uses the RRZE gateway as its own upstream gateway. By default the firmware always sends packets destined to the WAN network to this gateway. At the time of writing this is problematic because the upstream gateway drops packets arriving from a private network (according to RFC1918) which makes it impossible for hosts in our private network to directly communicate with hosts in our public network. This option is therefore disabled in the configuration of the router. See the &amp;quot;Disable force gateway&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
==== Private and bogon networks ====&lt;br /&gt;
According to RFC1918 packets with source or destination IP addresses in private networks must not be routed through the internet. It often happens that such packets are generated and end up at edge routers (keep the private notebooks connected to our network in mind). Therefore such routers usually drop these packets on purpose. At the time of writing we actually want to route such packets from our private to our public network and vice versa. Therefore the option to drop packets from or to private networks is disabled on both interfaces. When we have all our hosts behind the router we should re enable this option for the WAN interface to avoid trouble with the RRZE. On the LAN interface this option should obviously stay disabled.&lt;br /&gt;
&lt;br /&gt;
There are addresses in the public IPv4 space which are not assigned to anything or do not make sense. These are called [https://de.wikipedia.org/wiki/Bogon &amp;quot;Bogon&amp;quot; networks]. The router is configured to drop these packets if they arrive on the WAN interface.&lt;br /&gt;
&lt;br /&gt;
==== NAT ====&lt;br /&gt;
Hosts within the private network can not directly talk to the internet (see the previous section), they need an intermidiary to do this. This is accomplished by using [https://en.wikipedia.org/wiki/Network_address_translation Network address translation (NAT)]. When a client wants to talk to the internet (except our own public network, see the following section), the router replaces the source address of the packet with its own public address and sends it of to the WAN. From the WAN it looks as if the router is making requests, instead of the client. When the reply arrives on the WAN interface the router changes the destination address of the packet from its own public address to the private address of the client and sends if off into the LAN.&lt;br /&gt;
&lt;br /&gt;
We need this mechanism for all clients behind the router to talk to the internet, except our own public network. This option is available as outbound NAT in the routers firmware and enabled by default.&lt;br /&gt;
&lt;br /&gt;
There is an important exception: Traffic from our private network which has a destination in our own public network should be routed directly, without any NAT, such that these two computers can talk directly to each other. Therefore there is a rule in the outbound NAT section which identifies such traffic and disables NAT for it. It can then be routed normally (see the following section). Note that this should be disabled as soon as all our computers are in the private network and can talk to each other directly.&lt;br /&gt;
&lt;br /&gt;
==== Routing between public and private network ====&lt;br /&gt;
At the time of writing our computers are distributed in a private and a public network. Both need to be reachable by each other. Therefore the router allows traffic to pass between these exact two networks without any restrictions. The rules for this can be found in the LAN and WAN sections of the firewall rules of the router. Especially the rule allowing any traffic originating from the public network to pass directly into the private network should be disabled as soon as all computers are in the private network.&lt;br /&gt;
&lt;br /&gt;
==== DHCP relay ====&lt;br /&gt;
At the time of writing we have DHCP (and DNS etc.) servers in the public network. Replicating these services behind the router can be avoided by allowing the router to forward DHCP requests from the private to the public network. This is done in the DHC relay section in the Services menu. With this service and the working routing and NAT there is no need to replicate these services in the private network for now. Everything seems to work, including PXE boot to install clients within the private network. As soon as all computers are in the private network the DHC relay should be disabled.&lt;br /&gt;
&lt;br /&gt;
==== Backup ====&lt;br /&gt;
The configuration can be backed up simply by downloading it in the GUI. It's recommended to do this once in a while just in case the router dies. This configuration can then be very easily applied after a new installation.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
Updates of the route can simply be done through the GUI. For security reasons this is recommended on a regular basis, but since we have the firewall of the RRZE in front of it it's probably not critical. Often the updates ca be done even without restarting the firmware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== DNS ==&lt;br /&gt;
=== Domains ===&lt;br /&gt;
Our public domain is &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt;. For the internal domain we don't need to register a domain, it doesn't make sense. Currently it is configure to &amp;lt;code&amp;gt;internal.sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; which is clunky but accurate. It is configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; which has the nice sideeffect of &amp;lt;code&amp;gt;bla.internal&amp;lt;/code&amp;gt; being correctly resolved from computers in the public network to the computer in the private network. The other way round it does not work, but &amp;lt;code&amp;gt;sternwarte.uni-erlangen.de&amp;lt;/code&amp;gt; is therefore configured in &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; as a search domain for all hosts in the private network. If we make sure to not duplicate computer names in the private and public network DNS enables the reference of another computer directly by its hostname.&lt;br /&gt;
&lt;br /&gt;
=== /etc/hosts ===&lt;br /&gt;
With all the hostnames available via the &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; configuration there is no need to out them all in &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; as well. &amp;lt;code&amp;gt;dnsmasq&amp;lt;/code&amp;gt; knows the IP associated with a hostname from its dhcp configuration file and uses it to resolve the names if a DNS query is made. We could therefore only put aliases (such as &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt;) in the &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; file and save the work of always trying to keep &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; up to date.&lt;br /&gt;
&lt;br /&gt;
== Remote Access ==&lt;br /&gt;
We need a login node with a separate interface and a dedicated public IP, see the following section.&lt;br /&gt;
&lt;br /&gt;
== Exposed services ==&lt;br /&gt;
Some services need to be exposed to the internet under a specific address. Most importantly the webserver (www.stern....de). This needs to have a public IP resolving to a specific host. Therefore such services need to run on a server which has two interfaces. One for the LAN and one for the WAN. The weak end system model of Linux ''might'' become a problem here.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Desired uplink speeds for individual hardware&lt;br /&gt;
* NFS servers: At least 10G, some maybe with 2x10G.&lt;br /&gt;
* Bladecenter: 10G&lt;br /&gt;
* Meggie nodes: 80x1G&lt;br /&gt;
* Other clients: 1G&lt;br /&gt;
&lt;br /&gt;
=== Main Building ===&lt;br /&gt;
In the main building we can create our own layer 2 network fairly straightforwardly.&lt;br /&gt;
&lt;br /&gt;
Let's ''please'' mount the switches in reverse in the server racks.&lt;br /&gt;
&lt;br /&gt;
==== Root Bridge ====&lt;br /&gt;
The root bridge will be the core of the network. Needs to have the capability to attach the NFS servers as well as other fast enough uplinks to switches, so at least several 10G SFP+ ports.&lt;br /&gt;
&lt;br /&gt;
Omada: SX3032F, 32x10G SFP+, ~900€&lt;br /&gt;
&lt;br /&gt;
Ubiquity (same as above): USW-Pro-Aggregation, 28x10G SFP+, 4x25G SFP28, ~900€&lt;br /&gt;
&lt;br /&gt;
==== Meggie Switches ====&lt;br /&gt;
Each Meggie node provides a 1G uplink (apart from Intel OP). With 80 nodes we need 2 48 port switches.&lt;br /&gt;
&lt;br /&gt;
Omada: SG3452X, 48x1G RJ45, 4x10G SFP+, ~400€&lt;br /&gt;
&lt;br /&gt;
Ubiquity: USW-Pro-48, 48x1G RJ45, 4x10G SFP+, ~600€&lt;br /&gt;
&lt;br /&gt;
==== Peripheral Switches ====&lt;br /&gt;
If we decommission the Messiers we can make due with 3 peripheral switches for the main building. If the RRZE lets us use the currently installed 3 switches with the 10G uplink we do not need new hardware for this.&lt;br /&gt;
&lt;br /&gt;
==== Shopping List ====&lt;br /&gt;
* 10G root bridge: ~900 Euros&lt;br /&gt;
* 2x 48x1G + 10G uplink meggie switches: 2x~400 Euros&lt;br /&gt;
* Lots of Cat 6 (or 5e) cables for the meggies&lt;br /&gt;
* We might need new DAC cables&lt;br /&gt;
* Total: 1700 Euros&lt;br /&gt;
&lt;br /&gt;
== Integrating Meridian building and Bundschuhhaus ==&lt;br /&gt;
&lt;br /&gt;
=== Layer 2 ===&lt;br /&gt;
There are two fibers going to the Meridian building. One is patched through to the Bundschuhhaus.&lt;br /&gt;
For the Meridian building it is technically possible to use one of the fibers to directly integrate an additional switch in the Clock room via layer 2. But the RRZE needs to play ball for this because they need to switch the other pair through to Bundschuhhause. If this route is taken there is still no option to integrate Bundschuhhause on layer 2.&lt;br /&gt;
&lt;br /&gt;
=== Layer 3 ===&lt;br /&gt;
A VPN would be an option to incorporate the other buildings over layer 3 without interaction with the RRZE (fingers crossed). Each building needs to have a separate OPNsense box establishing a VPN directly to the main gateway over the WAN and an attached switch for the computers.&lt;br /&gt;
&lt;br /&gt;
NFS etc. might be a bit wonky in this scenarion. Performance will certainly be limited. Strong CPU hardware of the OPNSense boxes is required for this to work with low latency.&lt;br /&gt;
&lt;br /&gt;
==== IPSec ====&lt;br /&gt;
According to the documentation this is the preferred solution for a site-to-site setup such as in our case. It's a bit complicated to set up compared to the other options. It requires an open port on the main gateway (similar to port forwarding). The computers on the other sites then also need to be in a separate subnet, necessitating a separate DHCP (possibly DNS etc.) server (TBC).&lt;br /&gt;
&lt;br /&gt;
==== Wireguard ====&lt;br /&gt;
Much easier to set up compared to IPSec, but might be less reliable. Unclear about the different subnet. Might not require an open port on the main gateway.&lt;br /&gt;
&lt;br /&gt;
==== OpenVPN ====&lt;br /&gt;
Fairly simple to set up, running via SSL, can mimick HTTPS traffic. Requires an open port.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Settings/Optimizations ==&lt;br /&gt;
* Enable jumbo frames for better NFS/iSCSI performance&lt;br /&gt;
* Use spanning tree? If so configure the root bridge with high priority, and use portfast&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3655</id>
		<title>New Network</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3655"/>
		<updated>2025-04-05T17:33:20Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
We're creating our own network inside a DMZ.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
* Check whether the router is set to switch on after power failure in the BIOS&lt;br /&gt;
* When all hosts are in the private network: Adjust router settings&lt;br /&gt;
** Block private and bogon networks on WAN interface&lt;br /&gt;
** Remove routes between public and private network&lt;br /&gt;
** Disable gui login from public network&lt;br /&gt;
** Disable DHC relay&lt;br /&gt;
&lt;br /&gt;
== Subnets ==&lt;br /&gt;
=== Public ===&lt;br /&gt;
The public subnet is a part of the internet as organized through the [https://de.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority IANA]. &amp;quot;Our&amp;quot; subnet is &amp;lt;code&amp;gt;131.188.151.0/24&amp;lt;/code&amp;gt;. At least one of the IPs in this subnet is used by the RRZE to provide a gateway. It's a [https://www.cisco.com/site/de/de/index.html Cisco] router in the basement with the IP &amp;lt;code&amp;gt;131.188.151.1&amp;lt;/code&amp;gt; and FQDN &amp;lt;code&amp;gt;astro.gate.uni-erlangen.de&amp;lt;/code&amp;gt;. We need to use this gateway to access the WAN.&lt;br /&gt;
&lt;br /&gt;
=== Private ===&lt;br /&gt;
We need to use a private network as defined in [https://www.rfc-editor.org/rfc/rfc1918.html RFC1918] for our own subnet. Because it's easy to remember and short to write we pick the class A network from RFC1918 which is &amp;lt;code&amp;gt;10.0.0.0/8&amp;lt;/code&amp;gt;. If we put our own computers in a separate [https://de.wikipedia.org/wiki/Virtual_Local_Area_Network VLAN] to make mangement easier we can allocate a &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; network from this block and use the second octet to denote the VLAN. This gives us more than 65000 IP addresses to work with in &amp;lt;code&amp;gt;10.10.0.0/16&amp;lt;/code&amp;gt;. Because it makes sense we use the first address for our own gateway: &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Address blocks ====&lt;br /&gt;
Using the &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; doesn't only provide more than enough addresses, probably forever, it also enables the grouping into blocks of addresses which denote different classes of devices. This makes it easier to identify the devices and find their IP address. Note that these are not separate subnets, it's only nomenclature. These blocks are used in the DHCP server of [https://thekelleys.org.uk/dnsmasq/doc.html dnsmasq] and defined in the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet/-/blob/master/modules/remeis/files/dnsmasq/internal-dhcp.conf internal-dhcp.conf] file of the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet puppet] gitlab repository.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Address blocks&lt;br /&gt;
|-&lt;br /&gt;
! Block !! Device class&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.1.*   || Switches&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.2.*   || Management interfaces (iLO, iDRAC, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.10.*  || Servers&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.20.*  || VMs&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.30.*  || Meggie cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.40.*  || Blade center&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.50.*  || Messier cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.90.*  || Functional hosts (Raspbbery Pis, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.100.* || Office computers main building&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.200.* || Testing (Installation testing, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.250.* || Private notebooks&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Router ==&lt;br /&gt;
&lt;br /&gt;
The uplink to the WAN is realized with a server (Dell Poweredge 1950) which runs [https://opnsense.org OPNSense], a FreeBSD based routing and firewall distribution which is very easy to set up and highly reliable. The server has two 1G interfaces. One is connected to the public network managed by the RRZE (WAN) and has a public IP, the other one is connected to our own switches and has a private ip (LAN). Both interfaces are labelled in the back of the server. The router routes traffic between these two networks to make our computers talk to each other.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
The router can be configure through the web gui. It's accessible directly over the IP address. The user for the login is &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and the password is the same as the LDAP admin passwort (as of writing). A lot of information is provided in the [https://docs.opnsense.org/ OPNSense documentation]. One of the interfaces has a public IP, at the time of writing the public IP is &amp;lt;code&amp;gt;131.188.151.92&amp;lt;/code&amp;gt;. The other interface has the private used as the gateway, &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;. Its public IP might be changed depending on how we proceed with mechansim for remote access.&lt;br /&gt;
&lt;br /&gt;
==== Gateway ====&lt;br /&gt;
The router uses the RRZE gateway as its own upstream gateway. By default the firmware always sends packets destined to the WAN network to this gateway. At the time of writing this is problematic because the upstream gateway drops packets arriving from a private network (according to RFC1918) which makes it impossible for hosts in our private network to directly communicate with hosts in our public network. This option is therefore disabled in the configuration of the router. See the &amp;quot;Disable force gateway&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
==== Private and bogon networks ====&lt;br /&gt;
According to RFC1918 packets with source or destination IP addresses in private networks must not be routed through the internet. It often happens that such packets are generated and end up at edge routers (keep the private notebooks connected to our network in mind). Therefore such routers usually drop these packets on purpose. At the time of writing we actually want to route such packets from our private to our public network and vice versa. Therefore the option to drop packets from or to private networks is disabled on both interfaces. When we have all our hosts behind the router we should re enable this option for the WAN interface to avoid trouble with the RRZE. On the LAN interface this option should obviously stay disabled.&lt;br /&gt;
&lt;br /&gt;
There are addresses in the public IPv4 space which are not assigned to anything or do not make sense. These are called [https://de.wikipedia.org/wiki/Bogon &amp;quot;Bogon&amp;quot; networks]. The router is configured to drop these packets if they arrive on the WAN interface.&lt;br /&gt;
&lt;br /&gt;
==== NAT ====&lt;br /&gt;
Hosts within the private network can not directly talk to the internet (see the previous section), they need an intermidiary to do this. This is accomplished by using [https://en.wikipedia.org/wiki/Network_address_translation Network address translation (NAT)]. When a client wants to talk to the internet (except our own public network, see the following section), the router replaces the source address of the packet with its own public address and sends it of to the WAN. From the WAN it looks as if the router is making requests, instead of the client. When the reply arrives on the WAN interface the router changes the destination address of the packet from its own public address to the private address of the client and sends if off into the LAN.&lt;br /&gt;
&lt;br /&gt;
We need this mechanism for all clients behind the router to talk to the internet, except our own public network. This option is available as outbound NAT in the routers firmware and enabled by default.&lt;br /&gt;
&lt;br /&gt;
There is an important exception: Traffic from our private network which has a destination in our own public network should be routed directly, without any NAT, such that these two computers can talk directly to each other. Therefore there is a rule in the outbound NAT section which identifies such traffic and disables NAT for it. It can then be routed normally (see the following section). Note that this should be disabled as soon as all our computers are in the private network and can talk to each other directly.&lt;br /&gt;
&lt;br /&gt;
==== Routing between public and private network ====&lt;br /&gt;
At the time of writing our computers are distributed in a private and a public network. Both need to be reachable by each other. Therefore the router allows traffic to pass between these exact two networks without any restrictions. The rules for this can be found in the LAN and WAN sections of the firewall rules of the router. Especially the rule allowing any traffic originating from the public network to pass directly into the private network should be disabled as soon as all computers are in the private network.&lt;br /&gt;
&lt;br /&gt;
==== DHCP relay ====&lt;br /&gt;
At the time of writing we have DHCP (and DNS etc.) servers in the public network. Replicating these services behind the router can be avoided by allowing the router to forward DHCP requests from the private to the public network. This is done in the DHC relay section in the Services menu. With this service and the working routing and NAT there is no need to replicate these services in the private network for now. Everything seems to work, including PXE boot to install clients within the private network. As soon as all computers are in the private network the DHC relay should be disabled.&lt;br /&gt;
&lt;br /&gt;
==== Backup ====&lt;br /&gt;
The configuration can be backed up simply by downloading it in the GUI. It's recommended to do this once in a while just in case the router dies. This configuration can then be very easily applied after a new installation.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
Updates of the route can simply be done through the GUI. For security reasons this is recommended on a regular basis, but since we have the firewall of the RRZE in front of it it's probably not critical. Often the updates ca be done even without restarting the firmware.&lt;br /&gt;
&lt;br /&gt;
== Remote Access ==&lt;br /&gt;
We need a login node with a separate interface and a dedicated public IP, see the following section.&lt;br /&gt;
&lt;br /&gt;
== Exposed services ==&lt;br /&gt;
Some services need to be exposed to the internet under a specific address. Most importantly the webserver (www.stern....de). This needs to have a public IP resolving to a specific host. Therefore such services need to run on a server which has two interfaces. One for the LAN and one for the WAN. The weak end system model of Linux ''might'' become a problem here.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Desired uplink speeds for individual hardware&lt;br /&gt;
* NFS servers: At least 10G, some maybe with 2x10G.&lt;br /&gt;
* Bladecenter: 10G&lt;br /&gt;
* Meggie nodes: 80x1G&lt;br /&gt;
* Other clients: 1G&lt;br /&gt;
&lt;br /&gt;
=== Main Building ===&lt;br /&gt;
In the main building we can create our own layer 2 network fairly straightforwardly.&lt;br /&gt;
&lt;br /&gt;
Let's ''please'' mount the switches in reverse in the server racks.&lt;br /&gt;
&lt;br /&gt;
==== Root Bridge ====&lt;br /&gt;
The root bridge will be the core of the network. Needs to have the capability to attach the NFS servers as well as other fast enough uplinks to switches, so at least several 10G SFP+ ports.&lt;br /&gt;
&lt;br /&gt;
Omada: SX3032F, 32x10G SFP+, ~900€&lt;br /&gt;
&lt;br /&gt;
Ubiquity (same as above): USW-Pro-Aggregation, 28x10G SFP+, 4x25G SFP28, ~900€&lt;br /&gt;
&lt;br /&gt;
==== Meggie Switches ====&lt;br /&gt;
Each Meggie node provides a 1G uplink (apart from Intel OP). With 80 nodes we need 2 48 port switches.&lt;br /&gt;
&lt;br /&gt;
Omada: SG3452X, 48x1G RJ45, 4x10G SFP+, ~400€&lt;br /&gt;
&lt;br /&gt;
Ubiquity: USW-Pro-48, 48x1G RJ45, 4x10G SFP+, ~600€&lt;br /&gt;
&lt;br /&gt;
==== Peripheral Switches ====&lt;br /&gt;
If we decommission the Messiers we can make due with 3 peripheral switches for the main building. If the RRZE lets us use the currently installed 3 switches with the 10G uplink we do not need new hardware for this.&lt;br /&gt;
&lt;br /&gt;
==== Shopping List ====&lt;br /&gt;
* 10G root bridge: ~900 Euros&lt;br /&gt;
* 2x 48x1G + 10G uplink meggie switches: 2x~400 Euros&lt;br /&gt;
* Lots of Cat 6 (or 5e) cables for the meggies&lt;br /&gt;
* We might need new DAC cables&lt;br /&gt;
* Total: 1700 Euros&lt;br /&gt;
&lt;br /&gt;
== Integrating Meridian building and Bundschuhhaus ==&lt;br /&gt;
&lt;br /&gt;
=== Layer 2 ===&lt;br /&gt;
There are two fibers going to the Meridian building. One is patched through to the Bundschuhhaus.&lt;br /&gt;
For the Meridian building it is technically possible to use one of the fibers to directly integrate an additional switch in the Clock room via layer 2. But the RRZE needs to play ball for this because they need to switch the other pair through to Bundschuhhause. If this route is taken there is still no option to integrate Bundschuhhause on layer 2.&lt;br /&gt;
&lt;br /&gt;
=== Layer 3 ===&lt;br /&gt;
A VPN would be an option to incorporate the other buildings over layer 3 without interaction with the RRZE (fingers crossed). Each building needs to have a separate OPNsense box establishing a VPN directly to the main gateway over the WAN and an attached switch for the computers.&lt;br /&gt;
&lt;br /&gt;
NFS etc. might be a bit wonky in this scenarion. Performance will certainly be limited. Strong CPU hardware of the OPNSense boxes is required for this to work with low latency.&lt;br /&gt;
&lt;br /&gt;
==== IPSec ====&lt;br /&gt;
According to the documentation this is the preferred solution for a site-to-site setup such as in our case. It's a bit complicated to set up compared to the other options. It requires an open port on the main gateway (similar to port forwarding). The computers on the other sites then also need to be in a separate subnet, necessitating a separate DHCP (possibly DNS etc.) server (TBC).&lt;br /&gt;
&lt;br /&gt;
==== Wireguard ====&lt;br /&gt;
Much easier to set up compared to IPSec, but might be less reliable. Unclear about the different subnet. Might not require an open port on the main gateway.&lt;br /&gt;
&lt;br /&gt;
==== OpenVPN ====&lt;br /&gt;
Fairly simple to set up, running via SSL, can mimick HTTPS traffic. Requires an open port.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Settings/Optimizations ==&lt;br /&gt;
* Enable jumbo frames for better NFS/iSCSI performance&lt;br /&gt;
* Use spanning tree? If so configure the root bridge with high priority, and use portfast&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3654</id>
		<title>New Network</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3654"/>
		<updated>2025-04-05T16:41:42Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
&lt;br /&gt;
We're creating our own network inside a DMZ.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
* When all hosts are in the private network: Adjust router settings&lt;br /&gt;
** Block private and bogon networks on WAN interface&lt;br /&gt;
** Remove routes between public and private network&lt;br /&gt;
** Disable gui login from public network&lt;br /&gt;
&lt;br /&gt;
== Subnets ==&lt;br /&gt;
=== Public ===&lt;br /&gt;
The public subnet is a part of the internet as organized through the [https://de.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority IANA]. &amp;quot;Our&amp;quot; subnet is &amp;lt;code&amp;gt;131.188.151.0/24&amp;lt;/code&amp;gt;. At lesat one of the IPs in this subnet is used by the RRZE to provide a gateway. It's a [https://www.cisco.com/site/de/de/index.html Cisco] router in the basement with the IP &amp;lt;code&amp;gt;131.188.151.1&amp;lt;/code&amp;gt; and FQDN &amp;lt;code&amp;gt;astro.gate.uni-erlangen.de&amp;lt;/code&amp;gt;. We need to use this gateway to access the WAN.&lt;br /&gt;
&lt;br /&gt;
=== Private ===&lt;br /&gt;
We need to use a private network as defined in [https://www.rfc-editor.org/rfc/rfc1918.html RFC1918] for our own subnet. Because it's easy to remember and short to write we pick the class A network from RFC1918 which is &amp;lt;code&amp;gt;10.0.0.0/8&amp;lt;/code&amp;gt;. If we put our own computers in a separate [https://de.wikipedia.org/wiki/Virtual_Local_Area_Network VLAN] to make mangement easier we can allocate a &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; network from this block and use the second octet to denote the VLAN. This gives us more than 65000 IP addresses to work with in &amp;lt;code&amp;gt;10.10.0.0/16&amp;lt;/code&amp;gt;. Because it makes sense we use the first address for our own gateway: &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Address blocks ====&lt;br /&gt;
Using the &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; doesn't only provide more than enough addresses, probably forever, it also enables the grouping into blocks of addresses which denote different classes of devices. This makes it easier to identify the devices and find their IP address. Note that these are not separate subnets, it's only nomenclature. These blocks are used in the DHCP server of [https://thekelleys.org.uk/dnsmasq/doc.html dnsmasq] and defined in the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet/-/blob/master/modules/remeis/files/dnsmasq/internal-dhcp.conf internal-dhcp.conf] file of the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet puppet] gitlab repository.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Address blocks&lt;br /&gt;
|-&lt;br /&gt;
! Block !! Device class&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.1.*   || Switches&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.2.*   || Management interfaces (iLO, iDRAC, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.10.*  || Servers&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.20.*  || VMs&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.30.*  || Meggie cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.40.*  || Blade center&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.50.*  || Messier cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.90.*  || Functional hosts (Raspbbery Pis, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.100.* || Office computers main building&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.200.* || Testing (Installation testing, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.250.* || Private notebooks&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Router ==&lt;br /&gt;
&lt;br /&gt;
The uplink to the WAN is realized with a server (Dell Poweredge 1950) which runs [https://opnsense.org OPNSense], a FreeBSD based routing and firewall distribution which is very easy to set up and highly reliable. The server has two 1G interfaces. One is connected to the public network managed by the RRZE and has a public IP, the other one is connected to our own switches and has a private ip. The router routes traffic between these two networks to make our computers talk to each other. On the public interface neither private nor bogon networks are blocked. &lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
The router can be configure through the web gui. It's accessible directly over the IP address. The user for the login is &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and the password is the same as the LDAP admin passwort (as of writing). A lot of information is provided in the [https://docs.opnsense.org/ OPNSense documentation]. One of the interfaces has a public IP, at the time of writing the public IP is &amp;lt;code&amp;gt;131.188.151.92&amp;lt;/code&amp;gt;. The other interface has the private used as the gateway, &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;. Its public IP might be changed depending on how we proceed with mechansim for remote access.&lt;br /&gt;
&lt;br /&gt;
The configuration can be backup up simply by downloading it in the GUI. It's recommended to do this once in a while just in case the router dies. This configuration can then be very easily applied after a new installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
We can use a small dedicated server with at least two interfaces running a router distribution as gateway and firewall.&lt;br /&gt;
pfSense and OPNSense are the most commonly used distributions for this workload.&lt;br /&gt;
OPNSense seems to be the preferred choice. PW has a bit of experience with it (personal use).&lt;br /&gt;
&lt;br /&gt;
=== Port Forwarding ===&lt;br /&gt;
Port forwarding would enable us to directly expose services to the WAN. For example dynamically redirect the SSH access to the login node or the gitlab server. Makes moving services '''much''' easier. But for this to work the RRZE needs to completely remove the firewall on this host.&lt;br /&gt;
&lt;br /&gt;
=== Remote Access ===&lt;br /&gt;
Ideally we could use the option described above. Otherwise we need a login node with a separate interface and a dedicated public IP, see the following section.&lt;br /&gt;
&lt;br /&gt;
=== Exposed services ===&lt;br /&gt;
Some services need to be exposed to the internet under a specific address. Most importantly the webserver (www.stern....de). This needs to have a public IP resolving to a specific host. In principle this could also be done with port forwarding, but it's very ugly because the gateway then needs to have more public IP addresses. Therefore such services need to run on a server which has two interfaces. One for the LAN and one for the WAN. The weak end system model of Linux ''might'' become a problem here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Desired uplink speeds for individual hardware&lt;br /&gt;
* NFS servers: At least 10G, some maybe with 2x10G.&lt;br /&gt;
* Bladecenter: 10G&lt;br /&gt;
* Meggie nodes: 80x1G&lt;br /&gt;
* Other clients: 1G&lt;br /&gt;
&lt;br /&gt;
=== Main Building ===&lt;br /&gt;
In the main building we can create our own layer 2 network fairly straightforwardly.&lt;br /&gt;
&lt;br /&gt;
Let's ''please'' mount the switches in reverse in the server racks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Root Bridge ====&lt;br /&gt;
The root bridge will be the core of the network. Needs to have the capability to attach the NFS servers as well as other fast enough uplinks to switches, so at least several 10G SFP+ ports.&lt;br /&gt;
&lt;br /&gt;
Omada: SX3032F, 32x10G SFP+, ~900€&lt;br /&gt;
&lt;br /&gt;
Ubiquity (same as above): USW-Pro-Aggregation, 28x10G SFP+, 4x25G SFP28, ~900€&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Meggie Switches ====&lt;br /&gt;
Each Meggie node provides a 1G uplink (apart from Intel OP). With 80 nodes we need 2 48 port switches.&lt;br /&gt;
&lt;br /&gt;
Omada: SG3452X, 48x1G RJ45, 4x10G SFP+, ~400€&lt;br /&gt;
&lt;br /&gt;
Ubiquity: USW-Pro-48, 48x1G RJ45, 4x10G SFP+, ~600€&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Peripheral Switches ====&lt;br /&gt;
If we decommission the Messiers we can make due with 3 peripheral switches for the main building. If the RRZE lets us use the currently installed 3 switches with the 10G uplink we do not need new hardware for this.&lt;br /&gt;
&lt;br /&gt;
==== Shopping List ====&lt;br /&gt;
* 10G root bridge: ~900 Euros&lt;br /&gt;
* 2x 48x1G + 10G uplink meggie switches: 2x~400 Euros&lt;br /&gt;
* Lots of Cat 6 (or 5e) cables for the meggies&lt;br /&gt;
* We might need new DAC cables&lt;br /&gt;
* Total: 1700 Euros&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Integrating Meridian building and Bundschuhhaus ==&lt;br /&gt;
&lt;br /&gt;
=== Layer 2 ===&lt;br /&gt;
There are two fibers going to the Meridian building. One is patched through to the Bundschuhhaus.&lt;br /&gt;
For the Meridian building it is technically possible to use one of the fibers to directly integrate an additional switch in the Clock room via layer 2. But the RRZE needs to play ball for this because they need to switch the other pair through to Bundschuhhause. If this route is taken there is still no option to integrate Bundschuhhause on layer 2.&lt;br /&gt;
&lt;br /&gt;
=== Layer 3 ===&lt;br /&gt;
A VPN would be an option to incorporate the other buildings over layer 3 without interaction with the RRZE (fingers crossed). Each building needs to have a separate OPNsense box establishing a VPN directly to the main gateway over the WAN and an attached switch for the computers.&lt;br /&gt;
&lt;br /&gt;
NFS etc. might be a bit wonky in this scenarion. Performance will certainly be limited. Strong CPU hardware of the OPNSense boxes is required for this to work with low latency.&lt;br /&gt;
&lt;br /&gt;
==== IPSec ====&lt;br /&gt;
According to the documentation this is the preferred solution for a site-to-site setup such as in our case. It's a bit complicated to set up compared to the other options. It requires an open port on the main gateway (similar to port forwarding). The computers on the other sites then also need to be in a separate subnet, necessitating a separate DHCP (possibly DNS etc.) server (TBC).&lt;br /&gt;
&lt;br /&gt;
==== Wireguard ====&lt;br /&gt;
Much easier to set up compared to IPSec, but might be less reliable. Unclear about the different subnet. Might not require an open port on the main gateway.&lt;br /&gt;
&lt;br /&gt;
==== OpenVPN ====&lt;br /&gt;
Fairly simple to set up, running via SSL, can mimick HTTPS traffic. Requires an open port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Settings/Advantages ==&lt;br /&gt;
* Enable jumbo frames for better NFS/iSCSI performance&lt;br /&gt;
* Use spanning tree? If so configure the root bridge with high priority, and use portfast&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3653</id>
		<title>New Network</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3653"/>
		<updated>2025-04-05T16:08:11Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
&lt;br /&gt;
We're creating our own network inside a DMZ.&lt;br /&gt;
&lt;br /&gt;
== Subnets ==&lt;br /&gt;
=== Public ===&lt;br /&gt;
The public subnet is a part of the internet as organized through the [https://de.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority IANA]. &amp;quot;Our&amp;quot; subnet is &amp;lt;code&amp;gt;131.188.151.0/24&amp;lt;/code&amp;gt;. At lesat one of the IPs in this subnet is used by the RRZE to provide a gateway. It's a [https://www.cisco.com/site/de/de/index.html Cisco] router in the basement with the IP &amp;lt;code&amp;gt;131.188.151.1&amp;lt;/code&amp;gt; and FQDN &amp;lt;code&amp;gt;astro.gate.uni-erlangen.de&amp;lt;/code&amp;gt;. We need to use this gateway to access the WAN.&lt;br /&gt;
&lt;br /&gt;
=== Private ===&lt;br /&gt;
We need to use a private network as defined in [https://www.rfc-editor.org/rfc/rfc1918.html RFC1918] for our own subnet. Because it's easy to remember and short to write we pick the class A network from RFC1918 which is &amp;lt;code&amp;gt;10.0.0.0/8&amp;lt;/code&amp;gt;. If we put our own computers in a separate [https://de.wikipedia.org/wiki/Virtual_Local_Area_Network VLAN] to make mangement easier we can allocate a &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; network from this block and use the second octet to denote the VLAN. This gives us more than 65000 IP addresses to work with in &amp;lt;code&amp;gt;10.10.0.0/16&amp;lt;/code&amp;gt;. Because it makes sense we use the first address for our own gateway: &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Address blocks ====&lt;br /&gt;
Using the &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; doesn't only provide more than enough addresses, probably forever, it also enables the grouping into blocks of addresses which denote different classes of devices. This makes it easier to identify the devices and find their IP address. Note that these are not separate subnets, it's only nomenclature. These blocks are used in the DHCP server of [https://thekelleys.org.uk/dnsmasq/doc.html dnsmasq] and defined in the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet/-/blob/master/modules/remeis/files/dnsmasq/internal-dhcp.conf internal-dhcp.conf] file of the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet puppet] gitlab repository.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Address blocks&lt;br /&gt;
|-&lt;br /&gt;
! Block !! Device class&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.1.*   || Switches&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.2.*   || Management interfaces (iLO, iDRAC, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.10.*  || Servers&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.20.*  || VMs&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.30.*  || Meggie cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.40.*  || Blade center&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.50.*  || Messier cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.90.*  || Functional hosts (Raspbbery Pis, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.100.* || Office computers main building&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.200.* || Testing (Installation testing, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.250.* || Private notebooks&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Router ==&lt;br /&gt;
&lt;br /&gt;
The uplink to the WAN is realized with a server (Dell Poweredge 1950) which runs [https://opnsense.org OPNSense], a FreeBSD based routing and firewall distribution. It can very easily be configure through a webinterface. The server has two 1G interfaces. One is connected to the public network managed by the RRZE and has a public IP, the other one is connected to our own switches and has a private ip. At the time of writing the public IP is &amp;lt;code&amp;gt;131.188.151.92&amp;lt;/code&amp;gt;, and the private IP is &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;. Its public IP might be changed depending on how we proceed with mechansim for remote access.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
We can use a small dedicated server with at least two interfaces running a router distribution as gateway and firewall.&lt;br /&gt;
pfSense and OPNSense are the most commonly used distributions for this workload.&lt;br /&gt;
OPNSense seems to be the preferred choice. PW has a bit of experience with it (personal use).&lt;br /&gt;
&lt;br /&gt;
=== Port Forwarding ===&lt;br /&gt;
Port forwarding would enable us to directly expose services to the WAN. For example dynamically redirect the SSH access to the login node or the gitlab server. Makes moving services '''much''' easier. But for this to work the RRZE needs to completely remove the firewall on this host.&lt;br /&gt;
&lt;br /&gt;
=== Remote Access ===&lt;br /&gt;
Ideally we could use the option described above. Otherwise we need a login node with a separate interface and a dedicated public IP, see the following section.&lt;br /&gt;
&lt;br /&gt;
=== Exposed services ===&lt;br /&gt;
Some services need to be exposed to the internet under a specific address. Most importantly the webserver (www.stern....de). This needs to have a public IP resolving to a specific host. In principle this could also be done with port forwarding, but it's very ugly because the gateway then needs to have more public IP addresses. Therefore such services need to run on a server which has two interfaces. One for the LAN and one for the WAN. The weak end system model of Linux ''might'' become a problem here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Desired uplink speeds for individual hardware&lt;br /&gt;
* NFS servers: At least 10G, some maybe with 2x10G.&lt;br /&gt;
* Bladecenter: 10G&lt;br /&gt;
* Meggie nodes: 80x1G&lt;br /&gt;
* Other clients: 1G&lt;br /&gt;
&lt;br /&gt;
=== Main Building ===&lt;br /&gt;
In the main building we can create our own layer 2 network fairly straightforwardly.&lt;br /&gt;
&lt;br /&gt;
Let's ''please'' mount the switches in reverse in the server racks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Root Bridge ====&lt;br /&gt;
The root bridge will be the core of the network. Needs to have the capability to attach the NFS servers as well as other fast enough uplinks to switches, so at least several 10G SFP+ ports.&lt;br /&gt;
&lt;br /&gt;
Omada: SX3032F, 32x10G SFP+, ~900€&lt;br /&gt;
&lt;br /&gt;
Ubiquity (same as above): USW-Pro-Aggregation, 28x10G SFP+, 4x25G SFP28, ~900€&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Meggie Switches ====&lt;br /&gt;
Each Meggie node provides a 1G uplink (apart from Intel OP). With 80 nodes we need 2 48 port switches.&lt;br /&gt;
&lt;br /&gt;
Omada: SG3452X, 48x1G RJ45, 4x10G SFP+, ~400€&lt;br /&gt;
&lt;br /&gt;
Ubiquity: USW-Pro-48, 48x1G RJ45, 4x10G SFP+, ~600€&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Peripheral Switches ====&lt;br /&gt;
If we decommission the Messiers we can make due with 3 peripheral switches for the main building. If the RRZE lets us use the currently installed 3 switches with the 10G uplink we do not need new hardware for this.&lt;br /&gt;
&lt;br /&gt;
==== Shopping List ====&lt;br /&gt;
* 10G root bridge: ~900 Euros&lt;br /&gt;
* 2x 48x1G + 10G uplink meggie switches: 2x~400 Euros&lt;br /&gt;
* Lots of Cat 6 (or 5e) cables for the meggies&lt;br /&gt;
* We might need new DAC cables&lt;br /&gt;
* Total: 1700 Euros&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Integrating Meridian building and Bundschuhhaus ==&lt;br /&gt;
&lt;br /&gt;
=== Layer 2 ===&lt;br /&gt;
There are two fibers going to the Meridian building. One is patched through to the Bundschuhhaus.&lt;br /&gt;
For the Meridian building it is technically possible to use one of the fibers to directly integrate an additional switch in the Clock room via layer 2. But the RRZE needs to play ball for this because they need to switch the other pair through to Bundschuhhause. If this route is taken there is still no option to integrate Bundschuhhause on layer 2.&lt;br /&gt;
&lt;br /&gt;
=== Layer 3 ===&lt;br /&gt;
A VPN would be an option to incorporate the other buildings over layer 3 without interaction with the RRZE (fingers crossed). Each building needs to have a separate OPNsense box establishing a VPN directly to the main gateway over the WAN and an attached switch for the computers.&lt;br /&gt;
&lt;br /&gt;
NFS etc. might be a bit wonky in this scenarion. Performance will certainly be limited. Strong CPU hardware of the OPNSense boxes is required for this to work with low latency.&lt;br /&gt;
&lt;br /&gt;
==== IPSec ====&lt;br /&gt;
According to the documentation this is the preferred solution for a site-to-site setup such as in our case. It's a bit complicated to set up compared to the other options. It requires an open port on the main gateway (similar to port forwarding). The computers on the other sites then also need to be in a separate subnet, necessitating a separate DHCP (possibly DNS etc.) server (TBC).&lt;br /&gt;
&lt;br /&gt;
==== Wireguard ====&lt;br /&gt;
Much easier to set up compared to IPSec, but might be less reliable. Unclear about the different subnet. Might not require an open port on the main gateway.&lt;br /&gt;
&lt;br /&gt;
==== OpenVPN ====&lt;br /&gt;
Fairly simple to set up, running via SSL, can mimick HTTPS traffic. Requires an open port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Settings/Advantages ==&lt;br /&gt;
* Enable jumbo frames for better NFS/iSCSI performance&lt;br /&gt;
* Use spanning tree? If so configure the root bridge with high priority, and use portfast&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3652</id>
		<title>New Network</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3652"/>
		<updated>2025-04-05T16:04:25Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
&lt;br /&gt;
We're creating our own network inside a DMZ.&lt;br /&gt;
&lt;br /&gt;
== Subnets ==&lt;br /&gt;
=== Public ===&lt;br /&gt;
The public subnet is a part of the internet as organized through the [https://de.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority IANA]. &amp;quot;Our&amp;quot; subnet is &amp;lt;code&amp;gt;131.188.151.0/24&amp;lt;/code&amp;gt;. At lesat one of the IPs in this subnet is used by the RRZE to provide a gateway. It's a [https://www.cisco.com/site/de/de/index.html Cisco] router in the basement with the IP &amp;lt;code&amp;gt;131.188.151.1&amp;lt;/code&amp;gt; and FQDN &amp;lt;code&amp;gt;astro.gate.uni-erlangen.de&amp;lt;/code&amp;gt;. We need to use this gateway to access the WAN.&lt;br /&gt;
&lt;br /&gt;
=== Private ===&lt;br /&gt;
We need to use a private network as defined in [https://www.rfc-editor.org/rfc/rfc1918.html RFC1918] for our own subnet. Because it's easy to remember and short to write we pick the class A network from RFC1918 which is &amp;lt;code&amp;gt;10.0.0.0/8&amp;lt;/code&amp;gt;. If we put our own computers in a separate [https://de.wikipedia.org/wiki/Virtual_Local_Area_Network VLAN] to make mangement easier we can allocate a &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; network from this block and use the second octet to denote the VLAN. This gives us more than 65000 IP addresses to work with in &amp;lt;code&amp;gt;10.10.0.0/16&amp;lt;/code&amp;gt;. Because it makes sense we use the first address for our own gateway: &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Address blocks ====&lt;br /&gt;
Using the &amp;lt;code&amp;gt;/16&amp;lt;/code&amp;gt; doesn't only provide more than enough addresses, probably forever, it also enables the grouping into blocks of addresses which denote different classes of devices. This makes it easier to identify the devices and find their IP address. Note that these are not separate subnets, it's only nomenclature. These blocks are used in the DHCP server of [https://thekelleys.org.uk/dnsmasq/doc.html dnsmasq] and defined in the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet/-/blob/master/modules/remeis/files/dnsmasq/internal-dhcp.conf internal-dhcp.conf] file of the [https://www.sternwarte.uni-erlangen.de/gitlab/Admins/puppet puppet] gitlab repository.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Address blocks&lt;br /&gt;
|-&lt;br /&gt;
! Block !! Device class&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.1.*   || Switches&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.2.*   || Management interfaces (iLO, iDRAC, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.10.*  || Servers&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.20.*  || VMs&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.30.*  || Meggie cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.40.*  || Blade center&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.50.*  || Messier cluster&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.90.*  || Functional hosts (Raspbbery Pis, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.100.* || Office computers main building&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.200.* || Testing (Installation testing, ...)&lt;br /&gt;
|-&lt;br /&gt;
| 10.10.250.* || Private notebooks&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Uplink ==&lt;br /&gt;
&lt;br /&gt;
The uplink to the WAN is realized with a server (Dell Poweredge 1950) which runs [https://opnsense.org OPNSense], a FreeBSD based routing and firewall distribution. It can very easily be configure through a webinterface. The server has two 1G interfaces. One is connected to the public network managed by the RRZE and has a public IP, the other one is connected to our own switches and has a private ip. At the time of writing the public IP is &amp;lt;code&amp;gt;131.188.151.92&amp;lt;/code&amp;gt;, and the private IP is &amp;lt;code&amp;gt;10.10.0.1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
We can use a small dedicated server with at least two interfaces running a router distribution as gateway and firewall.&lt;br /&gt;
pfSense and OPNSense are the most commonly used distributions for this workload.&lt;br /&gt;
OPNSense seems to be the preferred choice. PW has a bit of experience with it (personal use).&lt;br /&gt;
&lt;br /&gt;
=== Port Forwarding ===&lt;br /&gt;
Port forwarding would enable us to directly expose services to the WAN. For example dynamically redirect the SSH access to the login node or the gitlab server. Makes moving services '''much''' easier. But for this to work the RRZE needs to completely remove the firewall on this host.&lt;br /&gt;
&lt;br /&gt;
=== Remote Access ===&lt;br /&gt;
Ideally we could use the option described above. Otherwise we need a login node with a separate interface and a dedicated public IP, see the following section.&lt;br /&gt;
&lt;br /&gt;
=== Exposed services ===&lt;br /&gt;
Some services need to be exposed to the internet under a specific address. Most importantly the webserver (www.stern....de). This needs to have a public IP resolving to a specific host. In principle this could also be done with port forwarding, but it's very ugly because the gateway then needs to have more public IP addresses. Therefore such services need to run on a server which has two interfaces. One for the LAN and one for the WAN. The weak end system model of Linux ''might'' become a problem here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Desired uplink speeds for individual hardware&lt;br /&gt;
* NFS servers: At least 10G, some maybe with 2x10G.&lt;br /&gt;
* Bladecenter: 10G&lt;br /&gt;
* Meggie nodes: 80x1G&lt;br /&gt;
* Other clients: 1G&lt;br /&gt;
&lt;br /&gt;
=== Main Building ===&lt;br /&gt;
In the main building we can create our own layer 2 network fairly straightforwardly.&lt;br /&gt;
&lt;br /&gt;
Let's ''please'' mount the switches in reverse in the server racks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Root Bridge ====&lt;br /&gt;
The root bridge will be the core of the network. Needs to have the capability to attach the NFS servers as well as other fast enough uplinks to switches, so at least several 10G SFP+ ports.&lt;br /&gt;
&lt;br /&gt;
Omada: SX3032F, 32x10G SFP+, ~900€&lt;br /&gt;
&lt;br /&gt;
Ubiquity (same as above): USW-Pro-Aggregation, 28x10G SFP+, 4x25G SFP28, ~900€&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Meggie Switches ====&lt;br /&gt;
Each Meggie node provides a 1G uplink (apart from Intel OP). With 80 nodes we need 2 48 port switches.&lt;br /&gt;
&lt;br /&gt;
Omada: SG3452X, 48x1G RJ45, 4x10G SFP+, ~400€&lt;br /&gt;
&lt;br /&gt;
Ubiquity: USW-Pro-48, 48x1G RJ45, 4x10G SFP+, ~600€&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Peripheral Switches ====&lt;br /&gt;
If we decommission the Messiers we can make due with 3 peripheral switches for the main building. If the RRZE lets us use the currently installed 3 switches with the 10G uplink we do not need new hardware for this.&lt;br /&gt;
&lt;br /&gt;
==== Shopping List ====&lt;br /&gt;
* 10G root bridge: ~900 Euros&lt;br /&gt;
* 2x 48x1G + 10G uplink meggie switches: 2x~400 Euros&lt;br /&gt;
* Lots of Cat 6 (or 5e) cables for the meggies&lt;br /&gt;
* We might need new DAC cables&lt;br /&gt;
* Total: 1700 Euros&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Integrating Meridian building and Bundschuhhaus ==&lt;br /&gt;
&lt;br /&gt;
=== Layer 2 ===&lt;br /&gt;
There are two fibers going to the Meridian building. One is patched through to the Bundschuhhaus.&lt;br /&gt;
For the Meridian building it is technically possible to use one of the fibers to directly integrate an additional switch in the Clock room via layer 2. But the RRZE needs to play ball for this because they need to switch the other pair through to Bundschuhhause. If this route is taken there is still no option to integrate Bundschuhhause on layer 2.&lt;br /&gt;
&lt;br /&gt;
=== Layer 3 ===&lt;br /&gt;
A VPN would be an option to incorporate the other buildings over layer 3 without interaction with the RRZE (fingers crossed). Each building needs to have a separate OPNsense box establishing a VPN directly to the main gateway over the WAN and an attached switch for the computers.&lt;br /&gt;
&lt;br /&gt;
NFS etc. might be a bit wonky in this scenarion. Performance will certainly be limited. Strong CPU hardware of the OPNSense boxes is required for this to work with low latency.&lt;br /&gt;
&lt;br /&gt;
==== IPSec ====&lt;br /&gt;
According to the documentation this is the preferred solution for a site-to-site setup such as in our case. It's a bit complicated to set up compared to the other options. It requires an open port on the main gateway (similar to port forwarding). The computers on the other sites then also need to be in a separate subnet, necessitating a separate DHCP (possibly DNS etc.) server (TBC).&lt;br /&gt;
&lt;br /&gt;
==== Wireguard ====&lt;br /&gt;
Much easier to set up compared to IPSec, but might be less reliable. Unclear about the different subnet. Might not require an open port on the main gateway.&lt;br /&gt;
&lt;br /&gt;
==== OpenVPN ====&lt;br /&gt;
Fairly simple to set up, running via SSL, can mimick HTTPS traffic. Requires an open port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Settings/Advantages ==&lt;br /&gt;
* Enable jumbo frames for better NFS/iSCSI performance&lt;br /&gt;
* Use spanning tree? If so configure the root bridge with high priority, and use portfast&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3651</id>
		<title>New Network</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=New_Network&amp;diff=3651"/>
		<updated>2025-04-05T15:10:36Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
&lt;br /&gt;
We're thinking about creating our own network inside a DMZ.&lt;br /&gt;
&lt;br /&gt;
== Uplink ==&lt;br /&gt;
&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
We can use a small dedicated server with at least two interfaces running a router distribution as gateway and firewall.&lt;br /&gt;
pfSense and OPNSense are the most commonly used distributions for this workload.&lt;br /&gt;
OPNSense seems to be the preferred choice. PW has a bit of experience with it (personal use).&lt;br /&gt;
&lt;br /&gt;
=== Port Forwarding ===&lt;br /&gt;
Port forwarding would enable us to directly expose services to the WAN. For example dynamically redirect the SSH access to the login node or the gitlab server. Makes moving services '''much''' easier. But for this to work the RRZE needs to completely remove the firewall on this host.&lt;br /&gt;
&lt;br /&gt;
=== Remote Access ===&lt;br /&gt;
Ideally we could use the option described above. Otherwise we need a login node with a separate interface and a dedicated public IP, see the following section.&lt;br /&gt;
&lt;br /&gt;
=== Exposed services ===&lt;br /&gt;
Some services need to be exposed to the internet under a specific address. Most importantly the webserver (www.stern....de). This needs to have a public IP resolving to a specific host. In principle this could also be done with port forwarding, but it's very ugly because the gateway then needs to have more public IP addresses. Therefore such services need to run on a server which has two interfaces. One for the LAN and one for the WAN. The weak end system model of Linux ''might'' become a problem here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Desired uplink speeds for individual hardware&lt;br /&gt;
* NFS servers: At least 10G, some maybe with 2x10G.&lt;br /&gt;
* Bladecenter: 10G&lt;br /&gt;
* Meggie nodes: 80x1G&lt;br /&gt;
* Other clients: 1G&lt;br /&gt;
&lt;br /&gt;
=== Main Building ===&lt;br /&gt;
In the main building we can create our own layer 2 network fairly straightforwardly.&lt;br /&gt;
&lt;br /&gt;
Let's ''please'' mount the switches in reverse in the server racks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Root Bridge ====&lt;br /&gt;
The root bridge will be the core of the network. Needs to have the capability to attach the NFS servers as well as other fast enough uplinks to switches, so at least several 10G SFP+ ports.&lt;br /&gt;
&lt;br /&gt;
Omada: SX3032F, 32x10G SFP+, ~900€&lt;br /&gt;
&lt;br /&gt;
Ubiquity (same as above): USW-Pro-Aggregation, 28x10G SFP+, 4x25G SFP28, ~900€&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Meggie Switches ====&lt;br /&gt;
Each Meggie node provides a 1G uplink (apart from Intel OP). With 80 nodes we need 2 48 port switches.&lt;br /&gt;
&lt;br /&gt;
Omada: SG3452X, 48x1G RJ45, 4x10G SFP+, ~400€&lt;br /&gt;
&lt;br /&gt;
Ubiquity: USW-Pro-48, 48x1G RJ45, 4x10G SFP+, ~600€&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Peripheral Switches ====&lt;br /&gt;
If we decommission the Messiers we can make due with 3 peripheral switches for the main building. If the RRZE lets us use the currently installed 3 switches with the 10G uplink we do not need new hardware for this.&lt;br /&gt;
&lt;br /&gt;
==== Shopping List ====&lt;br /&gt;
* 10G root bridge: ~900 Euros&lt;br /&gt;
* 2x 48x1G + 10G uplink meggie switches: 2x~400 Euros&lt;br /&gt;
* Lots of Cat 6 (or 5e) cables for the meggies&lt;br /&gt;
* We might need new DAC cables&lt;br /&gt;
* Total: 1700 Euros&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Integrating Meridian building and Bundschuhhaus ==&lt;br /&gt;
&lt;br /&gt;
=== Layer 2 ===&lt;br /&gt;
There are two fibers going to the Meridian building. One is patched through to the Bundschuhhaus.&lt;br /&gt;
For the Meridian building it is technically possible to use one of the fibers to directly integrate an additional switch in the Clock room via layer 2. But the RRZE needs to play ball for this because they need to switch the other pair through to Bundschuhhause. If this route is taken there is still no option to integrate Bundschuhhause on layer 2.&lt;br /&gt;
&lt;br /&gt;
=== Layer 3 ===&lt;br /&gt;
A VPN would be an option to incorporate the other buildings over layer 3 without interaction with the RRZE (fingers crossed). Each building needs to have a separate OPNsense box establishing a VPN directly to the main gateway over the WAN and an attached switch for the computers.&lt;br /&gt;
&lt;br /&gt;
NFS etc. might be a bit wonky in this scenarion. Performance will certainly be limited. Strong CPU hardware of the OPNSense boxes is required for this to work with low latency.&lt;br /&gt;
&lt;br /&gt;
==== IPSec ====&lt;br /&gt;
According to the documentation this is the preferred solution for a site-to-site setup such as in our case. It's a bit complicated to set up compared to the other options. It requires an open port on the main gateway (similar to port forwarding). The computers on the other sites then also need to be in a separate subnet, necessitating a separate DHCP (possibly DNS etc.) server (TBC).&lt;br /&gt;
&lt;br /&gt;
==== Wireguard ====&lt;br /&gt;
Much easier to set up compared to IPSec, but might be less reliable. Unclear about the different subnet. Might not require an open port on the main gateway.&lt;br /&gt;
&lt;br /&gt;
==== OpenVPN ====&lt;br /&gt;
Fairly simple to set up, running via SSL, can mimick HTTPS traffic. Requires an open port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Settings/Advantages ==&lt;br /&gt;
* Enable jumbo frames for better NFS/iSCSI performance&lt;br /&gt;
* Use spanning tree? If so configure the root bridge with high priority, and use portfast&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3650</id>
		<title>Meggie Cluster</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3650"/>
		<updated>2025-04-05T10:53:16Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
&lt;br /&gt;
The meggies are diskless nodes inherited from the RRZE used from computing only. We would like to boot them from the network. NFS and iSCSI are two options to accomplish this. Since iSCSI is directly supported by the UEFI of the nodes this is the option which is by far the easiest to implement.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
&lt;br /&gt;
=== OS setup ===&lt;br /&gt;
* &amp;lt;s&amp;gt;Make the installer recognize the iSCSI LUN as a block device before searching for those&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;Supply LUN information directly to the UEFI via DHCP&amp;lt;/s&amp;gt;&lt;br /&gt;
* Make a list of UEFI settings&lt;br /&gt;
* Prepare LUNs&lt;br /&gt;
** Use ZFS zvols as storage backend&lt;br /&gt;
** Create a separate dataset for easier zfs setting propagation&lt;br /&gt;
** Leave a README file in the dataset directory for other people to know that it shouldn't be deleted&lt;br /&gt;
** Optimize dataset settings for iSCSI targets&lt;br /&gt;
*** Compression lz4&lt;br /&gt;
*** Larger &amp;lt;code&amp;gt;recordsize&amp;lt;/code&amp;gt; (1M or something)&lt;br /&gt;
** Name the zvols &amp;lt;code&amp;gt;zvol-MM-m&amp;lt;/code&amp;gt; where MM is the chassis number from 01 to 20 and m the node number from 1 to 4&lt;br /&gt;
* Remove the stupid /swap.img file. This is a general point affecting all computers&lt;br /&gt;
* Adjust puppet&lt;br /&gt;
** &amp;lt;s&amp;gt;Make no scratch available&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Make /tmp and friends a tmpfs&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Restrict sizes of all tmpfs&amp;lt;/s&amp;gt;&lt;br /&gt;
** Remove unnecessary user stuff? (e.g. x2go, firefox, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Hardware setup ===&lt;br /&gt;
* Install nodes in a rack&lt;br /&gt;
* Buy and set up up switches&lt;br /&gt;
* Lots of cabling&lt;br /&gt;
* Power requirements?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Boot Process ==&lt;br /&gt;
&lt;br /&gt;
=== General layout ===&lt;br /&gt;
The boot process works like this:&lt;br /&gt;
# UEFI stage&lt;br /&gt;
## The UEFI starts up&lt;br /&gt;
## Establishes a connection to the network&lt;br /&gt;
## Runs a DHCP client&lt;br /&gt;
## Gets an IP as well as the iSCSI LUN information directly from our DHCP server&lt;br /&gt;
## Accesses the GPT on the LUN and loads grub&lt;br /&gt;
# grub stage&lt;br /&gt;
## Grub starts&lt;br /&gt;
## Loads the kernel and initrd from the LUN&lt;br /&gt;
## Jumbs into the kernel&lt;br /&gt;
# ramdisk stage&lt;br /&gt;
## The kernel runs&lt;br /&gt;
## Mounts the initrd&lt;br /&gt;
## Inside the initrd our custom iSCSI hook is called&lt;br /&gt;
### Loads the iSCSI kernel module&lt;br /&gt;
### Loads the iSCSI iBFT kernel module&lt;br /&gt;
### Runs &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; which makes the iSCSI LUN available as a block device&lt;br /&gt;
# Normal boot continues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Further explanations ===&lt;br /&gt;
==== UEFI DHCP ====&lt;br /&gt;
The UEFI can talk to the DHCP server and get an IP. We use DHCP option 17 (root-path) to supply the iSCSI information to the nodes.&lt;br /&gt;
&lt;br /&gt;
==== grub ====&lt;br /&gt;
As of now we don't know why grub even works. It's installed on the efi partition on the LUN, just like a normal computer. The UEFI uses the information on this EFI partition to find grub and run it, and grub then sees the partitions of the installed OS. Either the UEFI somehow emulates a blockdevice for grub such that it can see these partitions and load the kernel and initrd, or grub somehow also does iSCSI by using the iBFT. Anyway, it loads the kernel and initrd, which is the most important part.&lt;br /&gt;
&lt;br /&gt;
==== iBFT ====&lt;br /&gt;
This is really cool. When the UEFI launches and gets iSCSI information from the DHCP server it puts this information into the EFI system table, the Boot Firmware Table (iBFT). Linux can use this information to connect to the same LUN used for the boot process and set up the block device before trying to mount the root partition. The necessary kernel module is called &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt;. After the module is loaded its only a matter of calling the &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; program to set up the block device. All this needs to happen before root is mounted, therefore modifications to the initrd are necessary.&lt;br /&gt;
&lt;br /&gt;
==== initrd modifications ====&lt;br /&gt;
During the boot, when the kernel is running and mounted the initrd, the &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;iscsi_tcp&amp;lt;/code&amp;gt; modules need to be loaded, after which the block device can be created. To do this a hook needs to be installed in the initramfs. On ubuntu this can be done by putting files into the &amp;lt;code&amp;gt;/etc/initramfs-tools/scripts&amp;lt;/code&amp;gt; directory (or rather subdirectories). The hook for the iSCSI setup need to happen after the network is available, which means the hook needs to be put in the &amp;lt;code&amp;gt;local-top&amp;lt;/code&amp;gt; directory and made executable. The content is:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# iSCSI init script&lt;br /&gt;
PREREQ=&amp;quot;&amp;quot;&lt;br /&gt;
prereqs()&lt;br /&gt;
{&lt;br /&gt;
     echo &amp;quot;$PREREQ&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
prereqs)&lt;br /&gt;
     prereqs&lt;br /&gt;
     exit 0&lt;br /&gt;
     ;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
. /scripts/functions&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Begin iSCSI init&amp;quot;&lt;br /&gt;
&lt;br /&gt;
modprobe iscsi_tcp&lt;br /&gt;
modprobe iscsi_ibft&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Network configuration based on iBFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
iscsistart -N || panic &amp;quot;Could not initialize iSCSI&amp;quot;&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Waiting to finish iscsistart&amp;quot;&lt;br /&gt;
until iscsistart -b ; do&lt;br /&gt;
    sleep 1&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Of course the script needs to be made executable. After that the initial ramdisk(s) need to be regenerated by calling &amp;lt;code&amp;gt;update-initramfs -u&amp;lt;/code&amp;gt;. When the script is called during the boot process the block device exists for the kernel to mount the root filesystem and continue the boot process as normal.&lt;br /&gt;
&lt;br /&gt;
=== Installing ===&lt;br /&gt;
Unfortunately we can't completely rely on the normal installation process because Ubuntu by default doesn't use the iBFT to set up an iSCSI LUN before the installer searches for block devices to install on. We could get around this by simply switching to a TTY, running &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; and relaunching the installer, which then identified the block device and proceeded as normal. Since this entire stuff runs off LUNs on the network we can potentially completely get around the installation by just preparing enough LUNS with the appropriate data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== iSCSI targets ===&lt;br /&gt;
We need to put the iSCSI Luns somewhere. We have 80 computers. The root filesystem size for each node will be around 40GB. In total around 3TB of data will be used for these LUNs, minus compression by ZFS. The new virgo is maybe a good choice for that, but it's still in testing mode. This needs to be clarified.&lt;br /&gt;
&lt;br /&gt;
== UEFI settings ==&lt;br /&gt;
Settings applied after resetting the UEFI to default settings:&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3649</id>
		<title>Meggie Cluster</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3649"/>
		<updated>2025-04-04T23:42:34Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
&lt;br /&gt;
The meggies are diskless nodes inherited from the RRZE used from computing only. We would like to boot them from the network. NFS and iSCSI are two options to accomplish this. Since iSCSI is directly supported by the UEFI of the nodes this is the option which is by far the easiest to implement.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
&lt;br /&gt;
=== OS setup ===&lt;br /&gt;
* &amp;lt;s&amp;gt;Make the installer recognize the iSCSI LUN as a block device before searching for those&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;Supply LUN information directly to the UEFI via DHCP&amp;lt;/s&amp;gt;&lt;br /&gt;
* Make a list of UEFI settings&lt;br /&gt;
* Prepare LUNs&lt;br /&gt;
* Remove the stupid /swap.img file. This is a general point affecting all computers&lt;br /&gt;
* Adjust puppet&lt;br /&gt;
** &amp;lt;s&amp;gt;Make no scratch available&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Make /tmp and friends a tmpfs&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Restrict sizes of all tmpfs&amp;lt;/s&amp;gt;&lt;br /&gt;
** Remove unnecessary user stuff? (e.g. x2go, firefox, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Hardware setup ===&lt;br /&gt;
* Install nodes in a rack&lt;br /&gt;
* Buy and set up up switches&lt;br /&gt;
* Lots of cabling&lt;br /&gt;
* Power requirements?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Boot Process ==&lt;br /&gt;
&lt;br /&gt;
=== General layout ===&lt;br /&gt;
The boot process works like this:&lt;br /&gt;
# UEFI stage&lt;br /&gt;
## The UEFI starts up&lt;br /&gt;
## Establishes a connection to the network&lt;br /&gt;
## Runs a DHCP client&lt;br /&gt;
## Gets an IP as well as the iSCSI LUN information directly from our DHCP server&lt;br /&gt;
## Accesses the GPT on the LUN and loads grub&lt;br /&gt;
# grub stage&lt;br /&gt;
## Grub starts&lt;br /&gt;
## Loads the kernel and initrd from the LUN&lt;br /&gt;
## Jumbs into the kernel&lt;br /&gt;
# ramdisk stage&lt;br /&gt;
## The kernel runs&lt;br /&gt;
## Mounts the initrd&lt;br /&gt;
## Inside the initrd our custom iSCSI hook is called&lt;br /&gt;
### Loads the iSCSI kernel module&lt;br /&gt;
### Loads the iSCSI iBFT kernel module&lt;br /&gt;
### Runs &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; which makes the iSCSI LUN available as a block device&lt;br /&gt;
# Normal boot continues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Further explanations ===&lt;br /&gt;
==== UEFI DHCP ====&lt;br /&gt;
The UEFI can talk to the DHCP server and get an IP. We use DHCP option 17 (root-path) to supply the iSCSI information to the nodes.&lt;br /&gt;
&lt;br /&gt;
==== grub ====&lt;br /&gt;
As of now we don't know why grub even works. It's installed on the efi partition on the LUN, just like a normal computer. The UEFI uses the information on this EFI partition to find grub and run it, and grub then sees the partitions of the installed OS. Either the UEFI somehow emulates a blockdevice for grub such that it can see these partitions and load the kernel and initrd, or grub somehow also does iSCSI by using the iBFT. Anyway, it loads the kernel and initrd, which is the most important part.&lt;br /&gt;
&lt;br /&gt;
==== iBFT ====&lt;br /&gt;
This is really cool. When the UEFI launches and gets iSCSI information from the DHCP server it puts this information into the EFI system table, the Boot Firmware Table (iBFT). Linux can use this information to connect to the same LUN used for the boot process and set up the block device before trying to mount the root partition. The necessary kernel module is called &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt;. After the module is loaded its only a matter of calling the &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; program to set up the block device. All this needs to happen before root is mounted, therefore modifications to the initrd are necessary.&lt;br /&gt;
&lt;br /&gt;
==== initrd modifications ====&lt;br /&gt;
During the boot, when the kernel is running and mounted the initrd, the &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;iscsi_tcp&amp;lt;/code&amp;gt; modules need to be loaded, after which the block device can be created. To do this a hook needs to be installed in the initramfs. On ubuntu this can be done by putting files into the &amp;lt;code&amp;gt;/etc/initramfs-tools/scripts&amp;lt;/code&amp;gt; directory (or rather subdirectories). The hook for the iSCSI setup need to happen after the network is available, which means the hook needs to be put in the &amp;lt;code&amp;gt;local-top&amp;lt;/code&amp;gt; directory and made executable. The content is:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# iSCSI init script&lt;br /&gt;
PREREQ=&amp;quot;&amp;quot;&lt;br /&gt;
prereqs()&lt;br /&gt;
{&lt;br /&gt;
     echo &amp;quot;$PREREQ&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
prereqs)&lt;br /&gt;
     prereqs&lt;br /&gt;
     exit 0&lt;br /&gt;
     ;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
. /scripts/functions&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Begin iSCSI init&amp;quot;&lt;br /&gt;
&lt;br /&gt;
modprobe iscsi_tcp&lt;br /&gt;
modprobe iscsi_ibft&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Network configuration based on iBFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
iscsistart -N || panic &amp;quot;Could not initialize iSCSI&amp;quot;&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Waiting to finish iscsistart&amp;quot;&lt;br /&gt;
until iscsistart -b ; do&lt;br /&gt;
    sleep 1&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Of course the script needs to be made executable. After that the initial ramdisk(s) need to be regenerated by calling &amp;lt;code&amp;gt;update-initramfs -u&amp;lt;/code&amp;gt;. When the script is called during the boot process the block device exists for the kernel to mount the root filesystem and continue the boot process as normal.&lt;br /&gt;
&lt;br /&gt;
=== Installing ===&lt;br /&gt;
Unfortunately we can't completely rely on the normal installation process because Ubuntu by default doesn't use the iBFT to set up an iSCSI LUN before the installer searches for block devices to install on. We could get around this by simply switching to a TTY, running &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; and relaunching the installer, which then identified the block device and proceeded as normal. Since this entire stuff runs off LUNs on the network we can potentially completely get around the installation by just preparing enough LUNS with the appropriate data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== iSCSI targets ===&lt;br /&gt;
We need to put the iSCSI Luns somewhere. We have 80 computers. The root filesystem size for each node will be around 40GB. In total around 3TB of data will be used for these LUNs, minus compression by ZFS. The new virgo is maybe a good choice for that, but it's still in testing mode. This needs to be clarified.&lt;br /&gt;
&lt;br /&gt;
== UEFI settings ==&lt;br /&gt;
Settings applied after resetting the UEFI to default settings:&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3648</id>
		<title>Meggie Cluster</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3648"/>
		<updated>2025-04-04T21:48:28Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
&lt;br /&gt;
The meggies are diskless nodes inherited from the RRZE used from computing only. We would like to boot them from the network. NFS and iSCSI are two options to accomplish this. Since iSCSI is directly supported by the UEFI of the nodes this is the option which is by far the easiest to implement.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
&lt;br /&gt;
=== OS setup ===&lt;br /&gt;
* &amp;lt;s&amp;gt;Make the installer recognize the iSCSI LUN as a block device before searching for those&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;Supply LUN information directly to the UEFI via DHCP&amp;lt;/s&amp;gt;&lt;br /&gt;
* Make a list of UEFI settings&lt;br /&gt;
* Prepare LUNs&lt;br /&gt;
* Remove the stupid /swap.img file. This is a general point affecting all computers&lt;br /&gt;
* Adjust puppet&lt;br /&gt;
** Make no scratch available&lt;br /&gt;
** Make /tmp and friends a tmpfs&lt;br /&gt;
** Restrict sizes of all tmpfs&lt;br /&gt;
** Remove unnecessary user stuff? (e.g. x2go, firefox, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Hardware setup ===&lt;br /&gt;
* Install nodes in a rack&lt;br /&gt;
* Buy and set up up switches&lt;br /&gt;
* Lots of cabling&lt;br /&gt;
* Power requirements?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Boot Process ==&lt;br /&gt;
&lt;br /&gt;
=== General layout ===&lt;br /&gt;
The boot process works like this:&lt;br /&gt;
# UEFI stage&lt;br /&gt;
## The UEFI starts up&lt;br /&gt;
## Establishes a connection to the network&lt;br /&gt;
## Runs a DHCP client&lt;br /&gt;
## Gets an IP as well as the iSCSI LUN information directly from our DHCP server&lt;br /&gt;
## Accesses the GPT on the LUN and loads grub&lt;br /&gt;
# grub stage&lt;br /&gt;
## Grub starts&lt;br /&gt;
## Loads the kernel and initrd from the LUN&lt;br /&gt;
## Jumbs into the kernel&lt;br /&gt;
# ramdisk stage&lt;br /&gt;
## The kernel runs&lt;br /&gt;
## Mounts the initrd&lt;br /&gt;
## Inside the initrd our custom iSCSI hook is called&lt;br /&gt;
### Loads the iSCSI kernel module&lt;br /&gt;
### Loads the iSCSI iBFT kernel module&lt;br /&gt;
### Runs &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; which makes the iSCSI LUN available as a block device&lt;br /&gt;
# Normal boot continues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Further explanations ===&lt;br /&gt;
==== UEFI DHCP ====&lt;br /&gt;
The UEFI can talk to the DHCP server and get an IP. We use DHCP option 17 (root-path) to supply the iSCSI information to the nodes.&lt;br /&gt;
&lt;br /&gt;
==== grub ====&lt;br /&gt;
As of now we don't know why grub even works. It's installed on the efi partition on the LUN, just like a normal computer. The UEFI uses the information on this EFI partition to find grub and run it, and grub then sees the partitions of the installed OS. Either the UEFI somehow emulates a blockdevice for grub such that it can see these partitions and load the kernel and initrd, or grub somehow also does iSCSI by using the iBFT. Anyway, it loads the kernel and initrd, which is the most important part.&lt;br /&gt;
&lt;br /&gt;
==== iBFT ====&lt;br /&gt;
This is really cool. When the UEFI launches and gets iSCSI information from the DHCP server it puts this information into the EFI system table, the Boot Firmware Table (iBFT). Linux can use this information to connect to the same LUN used for the boot process and set up the block device before trying to mount the root partition. The necessary kernel module is called &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt;. After the module is loaded its only a matter of calling the &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; program to set up the block device. All this needs to happen before root is mounted, therefore modifications to the initrd are necessary.&lt;br /&gt;
&lt;br /&gt;
==== initrd modifications ====&lt;br /&gt;
During the boot, when the kernel is running and mounted the initrd, the &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;iscsi_tcp&amp;lt;/code&amp;gt; modules need to be loaded, after which the block device can be created. To do this a hook needs to be installed in the initramfs. On ubuntu this can be done by putting files into the &amp;lt;code&amp;gt;/etc/initramfs-tools/scripts&amp;lt;/code&amp;gt; directory (or rather subdirectories). The hook for the iSCSI setup need to happen after the network is available, which means the hook needs to be put in the &amp;lt;code&amp;gt;local-top&amp;lt;/code&amp;gt; directory and made executable. The content is:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# iSCSI init script&lt;br /&gt;
PREREQ=&amp;quot;&amp;quot;&lt;br /&gt;
prereqs()&lt;br /&gt;
{&lt;br /&gt;
     echo &amp;quot;$PREREQ&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
prereqs)&lt;br /&gt;
     prereqs&lt;br /&gt;
     exit 0&lt;br /&gt;
     ;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
. /scripts/functions&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Begin iSCSI init&amp;quot;&lt;br /&gt;
&lt;br /&gt;
modprobe iscsi_tcp&lt;br /&gt;
modprobe iscsi_ibft&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Network configuration based on iBFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
iscsistart -N || panic &amp;quot;Could not initialize iSCSI&amp;quot;&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Waiting to finish iscsistart&amp;quot;&lt;br /&gt;
until iscsistart -b ; do&lt;br /&gt;
    sleep 1&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Of course the script needs to be made executable. After that the initial ramdisk(s) need to be regenerated by calling &amp;lt;code&amp;gt;update-initramfs -u&amp;lt;/code&amp;gt;. When the script is called during the boot process the block device exists for the kernel to mount the root filesystem and continue the boot process as normal.&lt;br /&gt;
&lt;br /&gt;
=== Installing ===&lt;br /&gt;
Unfortunately we can't completely rely on the normal installation process because Ubuntu by default doesn't use the iBFT to set up an iSCSI LUN before the installer searches for block devices to install on. We could get around this by simply switching to a TTY, running &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; and relaunching the installer, which then identified the block device and proceeded as normal. Since this entire stuff runs off LUNs on the network we can potentially completely get around the installation by just preparing enough LUNS with the appropriate data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== iSCSI targets ===&lt;br /&gt;
We need to put the iSCSI Luns somewhere. We have 80 computers. The root filesystem size for each node will be around 40GB. In total around 3TB of data will be used for these LUNs, minus compression by ZFS. The new virgo is maybe a good choice for that, but it's still in testing mode. This needs to be clarified.&lt;br /&gt;
&lt;br /&gt;
== UEFI settings ==&lt;br /&gt;
Settings applied after resetting the UEFI to default settings:&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3647</id>
		<title>Meggie Cluster</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3647"/>
		<updated>2025-04-04T21:47:18Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
&lt;br /&gt;
The meggies are diskless nodes inherited from the RRZE used from computing only. We would like to boot them from the network. NFS and iSCSI are two options to accomplish this. Since iSCSI is directly supported by the UEFI of the nodes this is the option which is by far the easiest to implement.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
&lt;br /&gt;
=== OS setup ===&lt;br /&gt;
* &amp;lt;s&amp;gt;Make the installer recognize the iSCSI LUN as a block device before searching for those&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;Supply LUN information directly to the UEFI via DHCP&amp;lt;/s&amp;gt;&lt;br /&gt;
* Make a list of UEFI settings&lt;br /&gt;
* Prepare LUNs&lt;br /&gt;
* Adjust puppet&lt;br /&gt;
** Make no scratch available&lt;br /&gt;
** Make /tmp and friends a tmpfs&lt;br /&gt;
** Restrict sizes of all tmpfs&lt;br /&gt;
** Remove unnecessary user stuff? (e.g. x2go, firefox, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Hardware setup ===&lt;br /&gt;
* Install nodes in a rack&lt;br /&gt;
* Buy and set up up switches&lt;br /&gt;
* Lots of cabling&lt;br /&gt;
* Power requirements?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Boot Process ==&lt;br /&gt;
&lt;br /&gt;
=== General layout ===&lt;br /&gt;
The boot process works like this:&lt;br /&gt;
# UEFI stage&lt;br /&gt;
## The UEFI starts up&lt;br /&gt;
## Establishes a connection to the network&lt;br /&gt;
## Runs a DHCP client&lt;br /&gt;
## Gets an IP as well as the iSCSI LUN information directly from our DHCP server&lt;br /&gt;
## Accesses the GPT on the LUN and loads grub&lt;br /&gt;
# grub stage&lt;br /&gt;
## Grub starts&lt;br /&gt;
## Loads the kernel and initrd from the LUN&lt;br /&gt;
## Jumbs into the kernel&lt;br /&gt;
# ramdisk stage&lt;br /&gt;
## The kernel runs&lt;br /&gt;
## Mounts the initrd&lt;br /&gt;
## Inside the initrd our custom iSCSI hook is called&lt;br /&gt;
### Loads the iSCSI kernel module&lt;br /&gt;
### Loads the iSCSI iBFT kernel module&lt;br /&gt;
### Runs &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; which makes the iSCSI LUN available as a block device&lt;br /&gt;
# Normal boot continues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Further explanations ===&lt;br /&gt;
==== UEFI DHCP ====&lt;br /&gt;
The UEFI can talk to the DHCP server and get an IP. We use DHCP option 17 (root-path) to supply the iSCSI information to the nodes.&lt;br /&gt;
&lt;br /&gt;
==== grub ====&lt;br /&gt;
As of now we don't know why grub even works. It's installed on the efi partition on the LUN, just like a normal computer. The UEFI uses the information on this EFI partition to find grub and run it, and grub then sees the partitions of the installed OS. Either the UEFI somehow emulates a blockdevice for grub such that it can see these partitions and load the kernel and initrd, or grub somehow also does iSCSI by using the iBFT. Anyway, it loads the kernel and initrd, which is the most important part.&lt;br /&gt;
&lt;br /&gt;
==== iBFT ====&lt;br /&gt;
This is really cool. When the UEFI launches and gets iSCSI information from the DHCP server it puts this information into the EFI system table, the Boot Firmware Table (iBFT). Linux can use this information to connect to the same LUN used for the boot process and set up the block device before trying to mount the root partition. The necessary kernel module is called &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt;. After the module is loaded its only a matter of calling the &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; program to set up the block device. All this needs to happen before root is mounted, therefore modifications to the initrd are necessary.&lt;br /&gt;
&lt;br /&gt;
==== initrd modifications ====&lt;br /&gt;
During the boot, when the kernel is running and mounted the initrd, the &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;iscsi_tcp&amp;lt;/code&amp;gt; modules need to be loaded, after which the block device can be created. To do this a hook needs to be installed in the initramfs. On ubuntu this can be done by putting files into the &amp;lt;code&amp;gt;/etc/initramfs-tools/scripts&amp;lt;/code&amp;gt; directory (or rather subdirectories). The hook for the iSCSI setup need to happen after the network is available, which means the hook needs to be put in the &amp;lt;code&amp;gt;local-top&amp;lt;/code&amp;gt; directory and made executable. The content is:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# iSCSI init script&lt;br /&gt;
PREREQ=&amp;quot;&amp;quot;&lt;br /&gt;
prereqs()&lt;br /&gt;
{&lt;br /&gt;
     echo &amp;quot;$PREREQ&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
prereqs)&lt;br /&gt;
     prereqs&lt;br /&gt;
     exit 0&lt;br /&gt;
     ;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
. /scripts/functions&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Begin iSCSI init&amp;quot;&lt;br /&gt;
&lt;br /&gt;
modprobe iscsi_tcp&lt;br /&gt;
modprobe iscsi_ibft&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Network configuration based on iBFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
iscsistart -N || panic &amp;quot;Could not initialize iSCSI&amp;quot;&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Waiting to finish iscsistart&amp;quot;&lt;br /&gt;
until iscsistart -b ; do&lt;br /&gt;
    sleep 1&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Of course the script needs to be made executable. After that the initial ramdisk(s) need to be regenerated by calling &amp;lt;code&amp;gt;update-initramfs -u&amp;lt;/code&amp;gt;. When the script is called during the boot process the block device exists for the kernel to mount the root filesystem and continue the boot process as normal.&lt;br /&gt;
&lt;br /&gt;
=== Installing ===&lt;br /&gt;
Unfortunately we can't completely rely on the normal installation process because Ubuntu by default doesn't use the iBFT to set up an iSCSI LUN before the installer searches for block devices to install on. We could get around this by simply switching to a TTY, running &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; and relaunching the installer, which then identified the block device and proceeded as normal. Since this entire stuff runs off LUNs on the network we can potentially completely get around the installation by just preparing enough LUNS with the appropriate data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== iSCSI targets ===&lt;br /&gt;
We need to put the iSCSI Luns somewhere. We have 80 computers. The root filesystem size for each node will be around 40GB. In total around 3TB of data will be used for these LUNs, minus compression by ZFS. The new virgo is maybe a good choice for that, but it's still in testing mode. This needs to be clarified.&lt;br /&gt;
&lt;br /&gt;
== UEFI settings ==&lt;br /&gt;
Settings applied after resetting the UEFI to default settings:&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3646</id>
		<title>Meggie Cluster</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3646"/>
		<updated>2025-04-04T20:34:00Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
&lt;br /&gt;
The meggies are diskless nodes inherited from the RRZE used from computing only. We would like to boot them from the network. NFS and iSCSI are two options to accomplish this. Since iSCSI is directly supported by the UEFI of the nodes this is the option which is by far the easiest to implement.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
&lt;br /&gt;
=== OS setup ===&lt;br /&gt;
* &amp;lt;s&amp;gt;Make the installer recognize the iSCSI LUN as a block device before searching for those&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;Supply LUN information directly to the UEFI via DHCP&amp;lt;/s&amp;gt;&lt;br /&gt;
* Make a list of UEFI settings&lt;br /&gt;
* Prepare LUNs&lt;br /&gt;
* Adjust puppet&lt;br /&gt;
** Make no scratch available&lt;br /&gt;
** Remove unnecessary user stuff? (e.g. x2go, firefox, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Hardware setup ===&lt;br /&gt;
* Install nodes in a rack&lt;br /&gt;
* Buy and set up up switches&lt;br /&gt;
* Lots of cabling&lt;br /&gt;
* Power requirements?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Boot Process ==&lt;br /&gt;
&lt;br /&gt;
=== General layout ===&lt;br /&gt;
The boot process works like this:&lt;br /&gt;
# UEFI stage&lt;br /&gt;
## The UEFI starts up&lt;br /&gt;
## Establishes a connection to the network&lt;br /&gt;
## Runs a DHCP client&lt;br /&gt;
## Gets an IP as well as the iSCSI LUN information directly from our DHCP server&lt;br /&gt;
## Accesses the GPT on the LUN and loads grub&lt;br /&gt;
# grub stage&lt;br /&gt;
## Grub starts&lt;br /&gt;
## Loads the kernel and initrd from the LUN&lt;br /&gt;
## Jumbs into the kernel&lt;br /&gt;
# ramdisk stage&lt;br /&gt;
## The kernel runs&lt;br /&gt;
## Mounts the initrd&lt;br /&gt;
## Inside the initrd our custom iSCSI hook is called&lt;br /&gt;
### Loads the iSCSI kernel module&lt;br /&gt;
### Loads the iSCSI iBFT kernel module&lt;br /&gt;
### Runs &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; which makes the iSCSI LUN available as a block device&lt;br /&gt;
# Normal boot continues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Further explanations ===&lt;br /&gt;
==== UEFI DHCP ====&lt;br /&gt;
The UEFI can talk to the DHCP server and get an IP. We use DHCP option 17 (root-path) to supply the iSCSI information to the nodes.&lt;br /&gt;
&lt;br /&gt;
==== grub ====&lt;br /&gt;
As of now we don't know why grub even works. It's installed on the efi partition on the LUN, just like a normal computer. The UEFI uses the information on this EFI partition to find grub and run it, and grub then sees the partitions of the installed OS. Either the UEFI somehow emulates a blockdevice for grub such that it can see these partitions and load the kernel and initrd, or grub somehow also does iSCSI by using the iBFT. Anyway, it loads the kernel and initrd, which is the most important part.&lt;br /&gt;
&lt;br /&gt;
==== iBFT ====&lt;br /&gt;
This is really cool. When the UEFI launches and gets iSCSI information from the DHCP server it puts this information into the EFI system table, the Boot Firmware Table (iBFT). Linux can use this information to connect to the same LUN used for the boot process and set up the block device before trying to mount the root partition. The necessary kernel module is called &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt;. After the module is loaded its only a matter of calling the &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; program to set up the block device. All this needs to happen before root is mounted, therefore modifications to the initrd are necessary.&lt;br /&gt;
&lt;br /&gt;
==== initrd modifications ====&lt;br /&gt;
During the boot, when the kernel is running and mounted the initrd, the &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;iscsi_tcp&amp;lt;/code&amp;gt; modules need to be loaded, after which the block device can be created. To do this a hook needs to be installed in the initramfs. On ubuntu this can be done by putting files into the &amp;lt;code&amp;gt;/etc/initramfs-tools/scripts&amp;lt;/code&amp;gt; directory (or rather subdirectories). The hook for the iSCSI setup need to happen after the network is available, which means the hook needs to be put in the &amp;lt;code&amp;gt;local-top&amp;lt;/code&amp;gt; directory and made executable. The content is:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# iSCSI init script&lt;br /&gt;
PREREQ=&amp;quot;&amp;quot;&lt;br /&gt;
prereqs()&lt;br /&gt;
{&lt;br /&gt;
     echo &amp;quot;$PREREQ&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
prereqs)&lt;br /&gt;
     prereqs&lt;br /&gt;
     exit 0&lt;br /&gt;
     ;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
. /scripts/functions&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Begin iSCSI init&amp;quot;&lt;br /&gt;
&lt;br /&gt;
modprobe iscsi_tcp&lt;br /&gt;
modprobe iscsi_ibft&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Network configuration based on iBFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
iscsistart -N || panic &amp;quot;Could not initialize iSCSI&amp;quot;&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Waiting to finish iscsistart&amp;quot;&lt;br /&gt;
until iscsistart -b ; do&lt;br /&gt;
    sleep 1&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Of course the script needs to be made executable. After that the initial ramdisk(s) need to be regenerated by calling &amp;lt;code&amp;gt;update-initramfs -u&amp;lt;/code&amp;gt;. When the script is called during the boot process the block device exists for the kernel to mount the root filesystem and continue the boot process as normal.&lt;br /&gt;
&lt;br /&gt;
=== Installing ===&lt;br /&gt;
Unfortunately we can't completely rely on the normal installation process because Ubuntu by default doesn't use the iBFT to set up an iSCSI LUN before the installer searches for block devices to install on. We could get around this by simply switching to a TTY, running &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; and relaunching the installer, which then identified the block device and proceeded as normal. Since this entire stuff runs off LUNs on the network we can potentially completely get around the installation by just preparing enough LUNS with the appropriate data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== iSCSI targets ===&lt;br /&gt;
We need to put the iSCSI Luns somewhere. We have 80 computers. The root filesystem size for each node will be around 40GB. In total around 3TB of data will be used for these LUNs, minus compression by ZFS. The new virgo is maybe a good choice for that, but it's still in testing mode. This needs to be clarified.&lt;br /&gt;
&lt;br /&gt;
== UEFI settings ==&lt;br /&gt;
Settings applied after resetting the UEFI to default settings:&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=User:Weber&amp;diff=3645</id>
		<title>User:Weber</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=User:Weber&amp;diff=3645"/>
		<updated>2025-04-04T09:33:44Z</updated>

		<summary type="html">&lt;p&gt;Weber: Created page with &amp;quot;What an idiot&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;What an idiot&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3644</id>
		<title>Meggie Cluster</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3644"/>
		<updated>2025-04-04T09:30:41Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
&lt;br /&gt;
The meggies are diskless nodes inherited from the RRZE used from computing only. We would like to boot them from the network. NFS and iSCSI are two options to accomplish this. Since iSCSI is directly supported by the UEFI of the nodes this is the option which is by far the easiest to implement.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
&lt;br /&gt;
=== OS setup ===&lt;br /&gt;
* Make the installer recognize the iSCSI LUN as a block device before searching for those&lt;br /&gt;
* &amp;lt;s&amp;gt;Supply LUN information directly to the UEFI via DHCP&amp;lt;/s&amp;gt;&lt;br /&gt;
* Make a list of UEFI settings&lt;br /&gt;
* Prepare LUNs&lt;br /&gt;
* Adjust puppet&lt;br /&gt;
** Make no scratch available&lt;br /&gt;
** Remove unnecessary user stuff? (e.g. x2go, firefox, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Hardware setup ===&lt;br /&gt;
* Install nodes in a rack&lt;br /&gt;
* Buy and set up up switches&lt;br /&gt;
* Lots of cabling&lt;br /&gt;
* Power requirements?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Boot Process ==&lt;br /&gt;
&lt;br /&gt;
=== General layout ===&lt;br /&gt;
The boot process works like this:&lt;br /&gt;
# UEFI stage&lt;br /&gt;
## The UEFI starts up&lt;br /&gt;
## Establishes a connection to the network&lt;br /&gt;
## Runs a DHCP client&lt;br /&gt;
## Gets an IP as well as the iSCSI LUN information directly from our DHCP server&lt;br /&gt;
## Accesses the GPT on the LUN and loads grub&lt;br /&gt;
# grub stage&lt;br /&gt;
## Grub starts&lt;br /&gt;
## Loads the kernel and initrd from the LUN&lt;br /&gt;
## Jumbs into the kernel&lt;br /&gt;
# ramdisk stage&lt;br /&gt;
## The kernel runs&lt;br /&gt;
## Mounts the initrd&lt;br /&gt;
## Inside the initrd our custom iSCSI hook is called&lt;br /&gt;
### Loads the iSCSI kernel module&lt;br /&gt;
### Loads the iSCSI iBFT kernel module&lt;br /&gt;
### Runs &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; which makes the iSCSI LUN available as a block device&lt;br /&gt;
# Normal boot continues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Further explanations ===&lt;br /&gt;
==== UEFI DHCP ====&lt;br /&gt;
The UEFI can talk to the DHCP server and get an IP. We use DHCP option 17 (root-path) to supply the iSCSI information to the nodes.&lt;br /&gt;
&lt;br /&gt;
==== grub ====&lt;br /&gt;
As of now we don't know why grub even works. It's installed on the efi partition on the LUN, just like a normal computer. The UEFI uses the information on this EFI partition to find grub and run it, and grub then sees the partitions of the installed OS. Either the UEFI somehow emulates a blockdevice for grub such that it can see these partitions and load the kernel and initrd, or grub somehow also does iSCSI by using the iBFT. Anyway, it loads the kernel and initrd, which is the most important part.&lt;br /&gt;
&lt;br /&gt;
==== iBFT ====&lt;br /&gt;
This is really cool. When the UEFI launches and gets iSCSI information from the DHCP server it puts this information into the EFI system table, the Boot Firmware Table (iBFT). Linux can use this information to connect to the same LUN used for the boot process and set up the block device before trying to mount the root partition. The necessary kernel module is called &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt;. After the module is loaded its only a matter of calling the &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; program to set up the block device. All this needs to happen before root is mounted, therefore modifications to the initrd are necessary.&lt;br /&gt;
&lt;br /&gt;
==== initrd modifications ====&lt;br /&gt;
During the boot, when the kernel is running and mounted the initrd, the &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;iscsi_tcp&amp;lt;/code&amp;gt; modules need to be loaded, after which the block device can be created. To do this a hook needs to be installed in the initramfs. On ubuntu this can be done by putting files into the &amp;lt;code&amp;gt;/etc/initramfs-tools/scripts&amp;lt;/code&amp;gt; directory (or rather subdirectories). The hook for the iSCSI setup need to happen after the network is available, which means the hook needs to be put in the &amp;lt;code&amp;gt;local-top&amp;lt;/code&amp;gt; directory and made executable. The content is:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# iSCSI init script&lt;br /&gt;
PREREQ=&amp;quot;&amp;quot;&lt;br /&gt;
prereqs()&lt;br /&gt;
{&lt;br /&gt;
     echo &amp;quot;$PREREQ&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
prereqs)&lt;br /&gt;
     prereqs&lt;br /&gt;
     exit 0&lt;br /&gt;
     ;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
. /scripts/functions&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Begin iSCSI init&amp;quot;&lt;br /&gt;
&lt;br /&gt;
modprobe iscsi_tcp&lt;br /&gt;
modprobe iscsi_ibft&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Network configuration based on iBFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
iscsistart -N || panic &amp;quot;Could not initialize iSCSI&amp;quot;&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Waiting to finish iscsistart&amp;quot;&lt;br /&gt;
until iscsistart -b ; do&lt;br /&gt;
    sleep 1&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Of course the script needs to be made executable. After that the initial ramdisk(s) need to be regenerated by calling &amp;lt;code&amp;gt;update-initramfs -u&amp;lt;/code&amp;gt;. When the script is called during the boot process the block device exists for the kernel to mount the root filesystem and continue the boot process as normal.&lt;br /&gt;
&lt;br /&gt;
=== Installing ===&lt;br /&gt;
Unfortunately we can't completely rely on the normal installation process because Ubuntu by default doesn't use the iBFT to set up an iSCSI LUN before the installer searches for block devices to install on. We could get around this by simply switching to a TTY, running &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; and relaunching the installer, which then identified the block device and proceeded as normal. Since this entire stuff runs off LUNs on the network we can potentially completely get around the installation by just preparing enough LUNS with the appropriate data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== iSCSI targets ===&lt;br /&gt;
We need to put the iSCSI Luns somewhere. We have 80 computers. The root filesystem size for each node will be around 40GB. In total around 3TB of data will be used for these LUNs, minus compression by ZFS. The new virgo is maybe a good choice for that, but it's still in testing mode. This needs to be clarified.&lt;br /&gt;
&lt;br /&gt;
== UEFI settings ==&lt;br /&gt;
Settings applied after resetting the UEFI to default settings:&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3643</id>
		<title>Meggie Cluster</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3643"/>
		<updated>2025-04-03T22:35:01Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
&lt;br /&gt;
The meggies are diskless nodes inherited from the RRZE used from computing only. We would like to boot them from the network. NFS and iSCSI are two options to accomplish this. Since iSCSI is directly supported by the UEFI of the nodes this is the option which is by far the easiest to implement.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
&lt;br /&gt;
=== OS setup ===&lt;br /&gt;
* &amp;lt;s&amp;gt;Make the installer recognize the iSCSI LUN as a block device before searching for those&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;Supply LUN information directly to the UEFI via DHCP&amp;lt;/s&amp;gt;&lt;br /&gt;
* Make a list of UEFI settings&lt;br /&gt;
* Prepare LUNs&lt;br /&gt;
* Adjust puppet&lt;br /&gt;
** Make no scratch available&lt;br /&gt;
** Remove unnecessary user stuff? (e.g. x2go, firefox, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Hardware setup ===&lt;br /&gt;
* Install nodes in a rack&lt;br /&gt;
* Buy and set up up switches&lt;br /&gt;
* Lots of cabling&lt;br /&gt;
* Power requirements?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Boot Process ==&lt;br /&gt;
&lt;br /&gt;
=== General layout ===&lt;br /&gt;
The boot process works like this:&lt;br /&gt;
# UEFI stage&lt;br /&gt;
## The UEFI starts up&lt;br /&gt;
## Establishes a connection to the network&lt;br /&gt;
## Runs a DHCP client&lt;br /&gt;
## Gets an IP as well as the iSCSI LUN information directly from our DHCP server&lt;br /&gt;
## Accesses the GPT on the LUN and loads grub&lt;br /&gt;
# grub stage&lt;br /&gt;
## Grub starts&lt;br /&gt;
## Loads the kernel and initrd from the LUN&lt;br /&gt;
## Jumbs into the kernel&lt;br /&gt;
# ramdisk stage&lt;br /&gt;
## The kernel runs&lt;br /&gt;
## Mounts the initrd&lt;br /&gt;
## Inside the initrd our custom iSCSI hook is called&lt;br /&gt;
### Loads the iSCSI kernel module&lt;br /&gt;
### Loads the iSCSI iBFT kernel module&lt;br /&gt;
### Runs &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; which makes the iSCSI LUN available as a block device&lt;br /&gt;
# Normal boot continues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Further explanations ===&lt;br /&gt;
==== UEFI DHCP ====&lt;br /&gt;
The UEFI can talk to the DHCP server and get an IP. We use DHCP option 17 (root-path) to supply the iSCSI information to the nodes.&lt;br /&gt;
&lt;br /&gt;
==== grub ====&lt;br /&gt;
As of now we don't know why grub even works. It's installed on the efi partition on the LUN, just like a normal computer. The UEFI uses the information on this EFI partition to find grub and run it, and grub then sees the partitions of the installed OS. Either the UEFI somehow emulates a blockdevice for grub such that it can see these partitions and load the kernel and initrd, or grub somehow also does iSCSI by using the iBFT. Anyway, it loads the kernel and initrd, which is the most important part.&lt;br /&gt;
&lt;br /&gt;
==== iBFT ====&lt;br /&gt;
This is really cool. When the UEFI launches and gets iSCSI information from the DHCP server it puts this information into the EFI system table, the Boot Firmware Table (iBFT). Linux can use this information to connect to the same LUN used for the boot process and set up the block device before trying to mount the root partition. The necessary kernel module is called &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt;. After the module is loaded its only a matter of calling the &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; program to set up the block device. All this needs to happen before root is mounted, therefore modifications to the initrd are necessary.&lt;br /&gt;
&lt;br /&gt;
==== initrd modifications ====&lt;br /&gt;
During the boot, when the kernel is running and mounted the initrd, the &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;iscsi_tcp&amp;lt;/code&amp;gt; modules need to be loaded, after which the block device can be created. To do this a hook needs to be installed in the initramfs. On ubuntu this can be done by putting files into the &amp;lt;code&amp;gt;/etc/initramfs-tools/scripts&amp;lt;/code&amp;gt; directory (or rather subdirectories). The hook for the iSCSI setup need to happen after the network is available, which means the hook needs to be put in the &amp;lt;code&amp;gt;local-top&amp;lt;/code&amp;gt; directory and made executable. The content is:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# iSCSI init script&lt;br /&gt;
PREREQ=&amp;quot;&amp;quot;&lt;br /&gt;
prereqs()&lt;br /&gt;
{&lt;br /&gt;
     echo &amp;quot;$PREREQ&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
prereqs)&lt;br /&gt;
     prereqs&lt;br /&gt;
     exit 0&lt;br /&gt;
     ;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
. /scripts/functions&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Begin iSCSI init&amp;quot;&lt;br /&gt;
&lt;br /&gt;
modprobe iscsi_tcp&lt;br /&gt;
modprobe iscsi_ibft&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Network configuration based on iBFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
iscsistart -N || panic &amp;quot;Could not initialize iSCSI&amp;quot;&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Waiting to finish iscsistart&amp;quot;&lt;br /&gt;
until iscsistart -b ; do&lt;br /&gt;
    sleep 1&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Of course the script needs to be made executable. After that the initial ramdisk(s) need to be regenerated by calling &amp;lt;code&amp;gt;update-initramfs -u&amp;lt;/code&amp;gt;. When the script is called during the boot process the block device exists for the kernel to mount the root filesystem and continue the boot process as normal.&lt;br /&gt;
&lt;br /&gt;
=== Installing ===&lt;br /&gt;
Unfortunately we can't completely rely on the normal installation process because Ubuntu by default doesn't use the iBFT to set up an iSCSI LUN before the installer searches for block devices to install on. We could get around this by simply switching to a TTY, running &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; and relaunching the installer, which then identified the block device and proceeded as normal. Since this entire stuff runs off LUNs on the network we can potentially completely get around the installation by just preparing enough LUNS with the appropriate data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== iSCSI targets ===&lt;br /&gt;
We need to put the iSCSI Luns somewhere. We have 80 computers. The root filesystem size for each node will be around 40GB. In total around 3TB of data will be used for these LUNs, minus compression by ZFS. The new virgo is maybe a good choice for that, but it's still in testing mode. This needs to be clarified.&lt;br /&gt;
&lt;br /&gt;
== UEFI settings ==&lt;br /&gt;
Settings applied after resetting the UEFI to default settings:&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3642</id>
		<title>Meggie Cluster</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Meggie_Cluster&amp;diff=3642"/>
		<updated>2025-04-03T22:32:29Z</updated>

		<summary type="html">&lt;p&gt;Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
&lt;br /&gt;
The meggies are diskless nodes inherited from the RRZE used from computing only. We would like to boot them from the network. NFS and iSCSI are two options to accomplish this. Since iSCSI is directly supported by the UEFI of the nodes this is the option which is by far the easiest to implement.&lt;br /&gt;
&lt;br /&gt;
== To Do List ==&lt;br /&gt;
&lt;br /&gt;
=== OS setup ===&lt;br /&gt;
* &amp;lt;s&amp;gt;Make the installer recognize the iSCSI LUN as a block device before searching for those&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;Supply LUN information directly to the UEFI via DHCP&amp;lt;/s&amp;gt;&lt;br /&gt;
* Make a list of UEFI settings&lt;br /&gt;
* Prepare LUNs&lt;br /&gt;
&lt;br /&gt;
=== Hardware setup ===&lt;br /&gt;
* Install nodes in a rack&lt;br /&gt;
* Buy and set up up switches&lt;br /&gt;
* Lots of cabling&lt;br /&gt;
* Power requirements?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Boot Process ==&lt;br /&gt;
&lt;br /&gt;
=== General layout ===&lt;br /&gt;
The boot process works like this:&lt;br /&gt;
# UEFI stage&lt;br /&gt;
## The UEFI starts up&lt;br /&gt;
## Establishes a connection to the network&lt;br /&gt;
## Runs a DHCP client&lt;br /&gt;
## Gets an IP as well as the iSCSI LUN information directly from our DHCP server&lt;br /&gt;
## Accesses the GPT on the LUN and loads grub&lt;br /&gt;
# grub stage&lt;br /&gt;
## Grub starts&lt;br /&gt;
## Loads the kernel and initrd from the LUN&lt;br /&gt;
## Jumbs into the kernel&lt;br /&gt;
# ramdisk stage&lt;br /&gt;
## The kernel runs&lt;br /&gt;
## Mounts the initrd&lt;br /&gt;
## Inside the initrd our custom iSCSI hook is called&lt;br /&gt;
### Loads the iSCSI kernel module&lt;br /&gt;
### Loads the iSCSI iBFT kernel module&lt;br /&gt;
### Runs &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; which makes the iSCSI LUN available as a block device&lt;br /&gt;
# Normal boot continues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Further explanations ===&lt;br /&gt;
==== UEFI DHCP ====&lt;br /&gt;
The UEFI can talk to the DHCP server and get an IP. We use DHCP option 17 (root-path) to supply the iSCSI information to the nodes.&lt;br /&gt;
&lt;br /&gt;
==== grub ====&lt;br /&gt;
As of now we don't know why grub even works. It's installed on the efi partition on the LUN, just like a normal computer. The UEFI uses the information on this EFI partition to find grub and run it, and grub then sees the partitions of the installed OS. Either the UEFI somehow emulates a blockdevice for grub such that it can see these partitions and load the kernel and initrd, or grub somehow also does iSCSI by using the iBFT. Anyway, it loads the kernel and initrd, which is the most important part.&lt;br /&gt;
&lt;br /&gt;
==== iBFT ====&lt;br /&gt;
This is really cool. When the UEFI launches and gets iSCSI information from the DHCP server it puts this information into the EFI system table, the Boot Firmware Table (iBFT). Linux can use this information to connect to the same LUN used for the boot process and set up the block device before trying to mount the root partition. The necessary kernel module is called &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt;. After the module is loaded its only a matter of calling the &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; program to set up the block device. All this needs to happen before root is mounted, therefore modifications to the initrd are necessary.&lt;br /&gt;
&lt;br /&gt;
==== initrd modifications ====&lt;br /&gt;
During the boot, when the kernel is running and mounted the initrd, the &amp;lt;code&amp;gt;iscsi_ibft&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;iscsi_tcp&amp;lt;/code&amp;gt; modules need to be loaded, after which the block device can be created. To do this a hook needs to be installed in the initramfs. On ubuntu this can be done by putting files into the &amp;lt;code&amp;gt;/etc/initramfs-tools/scripts&amp;lt;/code&amp;gt; directory (or rather subdirectories). The hook for the iSCSI setup need to happen after the network is available, which means the hook needs to be put in the &amp;lt;code&amp;gt;local-top&amp;lt;/code&amp;gt; directory and made executable. The content is:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# iSCSI init script&lt;br /&gt;
PREREQ=&amp;quot;&amp;quot;&lt;br /&gt;
prereqs()&lt;br /&gt;
{&lt;br /&gt;
     echo &amp;quot;$PREREQ&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
prereqs)&lt;br /&gt;
     prereqs&lt;br /&gt;
     exit 0&lt;br /&gt;
     ;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
. /scripts/functions&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Begin iSCSI init&amp;quot;&lt;br /&gt;
&lt;br /&gt;
modprobe iscsi_tcp&lt;br /&gt;
modprobe iscsi_ibft&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Network configuration based on iBFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
iscsistart -N || panic &amp;quot;Could not initialize iSCSI&amp;quot;&lt;br /&gt;
&lt;br /&gt;
log_begin_msg &amp;quot;Waiting to finish iscsistart&amp;quot;&lt;br /&gt;
until iscsistart -b ; do&lt;br /&gt;
    sleep 1&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Of course the script needs to be made executable. After that the initial ramdisk(s) need to be regenerated by calling &amp;lt;code&amp;gt;update-initramfs -u&amp;lt;/code&amp;gt;. When the script is called during the boot process the block device exists for the kernel to mount the root filesystem and continue the boot process as normal.&lt;br /&gt;
&lt;br /&gt;
=== Installing ===&lt;br /&gt;
Unfortunately we can't completely rely on the normal installation process because Ubuntu by default doesn't use the iBFT to set up an iSCSI LUN before the installer searches for block devices to install on. We could get around this by simply switching to a TTY, running &amp;lt;code&amp;gt;iscsistart&amp;lt;/code&amp;gt; and relaunching the installer, which then identified the block device and proceeded as normal. Since this entire stuff runs off LUNs on the network we can potentially completely get around the installation by just preparing enough LUNS with the appropriate data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== iSCSI targets ===&lt;br /&gt;
We need to put the iSCSI Luns somewhere. We have 80 computers. The root filesystem size for each node will be around 40GB. In total around 3TB of data will be used for these LUNs, minus compression by ZFS. The new virgo is maybe a good choice for that, but it's still in testing mode. This needs to be clarified.&lt;br /&gt;
&lt;br /&gt;
== UEFI settings ==&lt;br /&gt;
Settings applied after resetting the UEFI to default settings:&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>Weber</name></author>
	</entry>
</feed>