Talk:Network Environment

From BCCD 3.0

(Difference between revisions)
Jump to: navigation, search
(mdns notes)
Line 171: Line 171:
</pre>
</pre>
** Can limit which IP addresses are published via <code<>allow-interfaces</code> in the <code>server</code> stanza in <code>/etc/avahi/avahi-daemon.conf</code>
** Can limit which IP addresses are published via <code<>allow-interfaces</code> in the <code>server</code> stanza in <code>/etc/avahi/avahi-daemon.conf</code>
-
** Better/more-sustainable option might be to just parse out the interface in <code>bccd-neighbors</code>
+
** Better/more-sustainable option might be to just parse out the interface in <code>bccd-neighbors</code>, and filter on BCCD_NIC variable set in <code>~/bccd.conf</code>

Revision as of 02:24, 16 June 2020

Contents

Stages

Stage descriptions

BCCD goes through the following network configuration stages:

  1. Live mode
    1. Initial boot:
      1. Try to obtain an IP address from a BCCD DHCP server
      2. If no BCCD DHCP servers are available, obtain an IP address from any DHCP server
    2. Head node: Upon user request, start DHCP server that will answer requests only from other BCCD systems
  2. Liberated mode
    1. Initial boot:
      1. Try to obtain an IP address from a BCCD DHCP server
      2. If no BCCD DHCP servers are available, obtain an IP address from any DHCP server
    2. Diskless boot: Upon user request, start DHCP server that will answer requests from diskless BCCD systems on only a given interface

Open questions:

  1. Can bccd-reset-network be rewritten to produce systemd.network configuration files via templates for each stage?
  2. How do we detect that a BCCD DHCP server has not responded to a client, and obtain an address from any DHCP server?


Answered questions:

  1. Should we continue using bccd-identifier or switch to using the standard vendor-class-identifier that can be provided via systemd.network? vendor-class-identifier confirmed to work. dhcpd.conf snippet:
# dhclient on live BCCD systems will set this identifier
class "bccd-nodes" {
  match if option vendor-class-identifier = "bccd-client";
}

# Anything else, including PXE boot, will not
class "pxelinux-nodes" {
  match if option vendor-class-identifier != "bccd-client";
}
  1. How do we have both a static (i.e. 192.168.3.1/24) and DHCP address on one interface, with a DHCP server listening on the static (192.168.3.1/24) address? Supply an Address stanza in addition to a Network stanza with DHCP set

Stage configuration

Current testing files:

[Match]
Name=eth0

[Network]
DHCP=yes
[Match]
Name=eth0

[Network]
DHCP=yes

[Address]
Address=192.168.3.1/24
[Match]
Name=eth1

[Network]
Address=192.168.3.1/24
DHCP=no
[Match]
Name=eth0

[Network]
DHCP=yes

[DHCP]
VendorClassIdentifier=bccd-client

DHCP configs:

class "bccd-nodes" {
  match if (option vendor-class-identifier = "bccd-client") or
    (option bccd-identifier = "bccd-client");
}

systemd notes

systemd commands

Restart networking 
systemctl restart systemd-networkd
Networking status 
networkctl

systemd tricks

Troubleshooting

RTNETLINK answers: File exists

If you get an error like this:

RTNETLINK answers: File exists
Failed to bring up eth1.

Try flushing that interface and replumbing it:

$ sudo ip addr flush dev eth1

Getting a previous IP address

If you run dhclient and it just decides to pick a previous IP address (it might even do a DHCPREQUEST, but not a DHCPDISCOVER):

  1. Release the IP address: dhclient -r
  2. Shutdown the interface: ifconfig nic down
  3. Try doing DHCP again

mdns notes

Bookmark: https://learning.oreilly.com/library/view/zero-configuration-networking/0596101007/ch06.html

<?xml version="1.0" standalone="no"?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
   <name>Bootable Cluster CD</name>
   <service>
       <type>_bccd._tcp</type>
       <port>22</port>
   </service>
</service-group>
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox