<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.lustre.org/index.php?action=history&amp;feed=atom&amp;title=LNet_Configuration_Edge_Case_Behaviors_and_Side-Effects</id>
	<title>LNet Configuration Edge Case Behaviors and Side-Effects - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.lustre.org/index.php?action=history&amp;feed=atom&amp;title=LNet_Configuration_Edge_Case_Behaviors_and_Side-Effects"/>
	<link rel="alternate" type="text/html" href="http://wiki.lustre.org/index.php?title=LNet_Configuration_Edge_Case_Behaviors_and_Side-Effects&amp;action=history"/>
	<updated>2026-07-19T08:31:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.7</generator>
	<entry>
		<id>http://wiki.lustre.org/index.php?title=LNet_Configuration_Edge_Case_Behaviors_and_Side-Effects&amp;diff=2729&amp;oldid=prev</id>
		<title>Malcolm at 05:47, 31 August 2017</title>
		<link rel="alternate" type="text/html" href="http://wiki.lustre.org/index.php?title=LNet_Configuration_Edge_Case_Behaviors_and_Side-Effects&amp;diff=2729&amp;oldid=prev"/>
		<updated>2017-08-31T05:47:43Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:47, 30 August 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l40&quot;&gt;Line 40:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 40:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Lustre Networking (LNet)]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Lustre Networking (LNet)]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Lustre Systems Administration]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki_lustre_org:diff::1.12:old-2610:rev-2729 --&gt;
&lt;/table&gt;</summary>
		<author><name>Malcolm</name></author>
	</entry>
	<entry>
		<id>http://wiki.lustre.org/index.php?title=LNet_Configuration_Edge_Case_Behaviors_and_Side-Effects&amp;diff=2610&amp;oldid=prev</id>
		<title>Malcolm: Created page with &quot;If no explicit configuration is supplied to LNet, either through a modprobe options file or a YAML description for &lt;code&gt;lnetctl&lt;/code&gt;, it will attempt to create a valid TCP/...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.lustre.org/index.php?title=LNet_Configuration_Edge_Case_Behaviors_and_Side-Effects&amp;diff=2610&amp;oldid=prev"/>
		<updated>2017-08-10T03:22:11Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;If no explicit configuration is supplied to LNet, either through a modprobe options file or a YAML description for &amp;lt;code&amp;gt;lnetctl&amp;lt;/code&amp;gt;, it will attempt to create a valid TCP/...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;If no explicit configuration is supplied to LNet, either through a modprobe options file or a YAML description for &amp;lt;code&amp;gt;lnetctl&amp;lt;/code&amp;gt;, it will attempt to create a valid TCP/IP (&amp;lt;code&amp;gt;socklnd&amp;lt;/code&amp;gt;) NID for &amp;lt;code&amp;gt;tcp0&amp;lt;/code&amp;gt; using the first network interface that is detected by the operating system (e.g. &amp;lt;code&amp;gt;eth0&amp;lt;/code&amp;gt;) when the module is loaded and the LNet service started.&lt;br /&gt;
&lt;br /&gt;
The order of interface detection is entirely at the discretion of the operating system, which means that there is no guarantee that the ordering of interfaces will be preserved between reboots and on the insertion of a new hardware device. It also means that the default behavior for a host will differ depending on its hardware configuration. Most operating systems do try to ensure that a device, after it is detected, maintains the same device name (&amp;lt;code&amp;gt;eth0&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;eth1&amp;lt;/code&amp;gt;, etc.) between reboots. Nevertheless, it is strongly recommended that all configuration be stated explicitly: defining the configuration also defines the expected behavior of the system, making it easier to audit.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;ip2nets&amp;lt;/code&amp;gt; option for the LNet kernel module is a list of network definition and IP-match pairs. These pairs are processed in sequence. If there is a match for a local IP address, then that network definition is used for the node, and further pairs for that network are ignored. Multiple networks can be matched.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow-x:auto;&amp;quot;&amp;gt;&lt;br /&gt;
ip2nets=&amp;quot;tcp(eth2) 134.32.1.[4-10/2]; tcp(eth1) *.*.*.*&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This set of rules is used to create network &amp;lt;code&amp;gt;tcp0&amp;lt;/code&amp;gt; (the &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is implied, because the LNet network number is omitted). If a local IP address matches &amp;lt;code&amp;gt;134.32.1.[4-10/2]&amp;lt;/code&amp;gt;, meaning it is one of &amp;lt;code&amp;gt;134.32.1.4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;134.32.1.6&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;134.32.1.8&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;134.32.1.10&amp;lt;/code&amp;gt;, then &amp;lt;code&amp;gt;tcp0&amp;lt;/code&amp;gt; is created using interface &amp;lt;code&amp;gt;eth2&amp;lt;/code&amp;gt;. Otherwise the second pair is used, and because &amp;quot;&amp;lt;code&amp;gt;*.*.*.*&amp;lt;/code&amp;gt;&amp;quot; matches every address, it always creates &amp;lt;code&amp;gt;tcp0&amp;lt;/code&amp;gt; on &amp;lt;code&amp;gt;eth1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;ip2nets&amp;lt;/code&amp;gt; will use the IP address definition to match the host, not the interface. The &amp;lt;code&amp;gt;ip2nets&amp;lt;/code&amp;gt; definition will not verify or otherwise qualify that the IP address matched is associated with the physical network interface in the specification. This means that a pattern can match the IP address of an interface that will not actually be used for LNet communications. From the above example, if  a host has an interface &amp;lt;code&amp;gt;eth3&amp;lt;/code&amp;gt; with IP address &amp;lt;code&amp;gt;134.32.1.4&amp;lt;/code&amp;gt;, then that would be considered a match good enough to trigger the creation of  the NID on &amp;lt;code&amp;gt;tcp0&amp;lt;/code&amp;gt;(&amp;lt;code&amp;gt;eth2&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Also, if the device is not specified in an &amp;lt;code&amp;gt;ip2nets&amp;lt;/code&amp;gt; definition, LNet will pick up the first available device rather than the device that matches the IP address pattern. For example, if the IP address pattern matches the IP address on &amp;lt;code&amp;gt;eth1&amp;lt;/code&amp;gt;, but no device is mentioned in the &amp;lt;code&amp;gt;ip2nets&amp;lt;/code&amp;gt; definition, then &amp;lt;code&amp;gt;eth0&amp;lt;/code&amp;gt; will get an LNet configuration. As an illustration, consider a host with a &amp;lt;code&amp;gt;10.70/16&amp;lt;/code&amp;gt; IP address on &amp;lt;code&amp;gt;eth0&amp;lt;/code&amp;gt;, and a &amp;lt;code&amp;gt;192.168/24&amp;lt;/code&amp;gt; address on &amp;lt;code&amp;gt;eth1&amp;lt;/code&amp;gt;. The following &amp;lt;code&amp;gt;ip2nets&amp;lt;/code&amp;gt; definition will create a NID on &amp;lt;code&amp;gt;eth0&amp;lt;/code&amp;gt;, even though the pattern matches the &amp;lt;code&amp;gt;eth1&amp;lt;/code&amp;gt; device:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow-x:auto;&amp;quot;&amp;gt;&lt;br /&gt;
options lnet ip2nets=&amp;quot;tcp0 192.168.*.*&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If, instead, the device is included in the spec, then the configuration will be applied to &amp;lt;code&amp;gt;eth1&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow-x:auto;&amp;quot;&amp;gt;&lt;br /&gt;
options lnet ip2nets=&amp;quot;tcp0(eth1) 192.168.*.*&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition is interpreted as follows: configure the first socklnd NID that is found on the host where there is an IP Address matching &amp;lt;code&amp;gt;192.168.*.*&amp;lt;/code&amp;gt;. In this respect, it&amp;#039;s consistent with the behavior of the much simpler networks syntax in the following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow-x:auto;&amp;quot;&amp;gt;&lt;br /&gt;
options lnet networks=&amp;quot;tcp0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example creates a NID on the first network device detected by the operating system, because no device was specified. In common with the &amp;lt;code&amp;gt;ip2nets&amp;lt;/code&amp;gt; parameter, the lack of definition of a specific network interface means that LNet will configure the first interface that was detected by the host operating system.&lt;br /&gt;
&lt;br /&gt;
If an interface is explicitly specified as well as a pattern, the interface matched using the IP pattern will be compared against the explicitly defined interface. For example, if the &amp;lt;code&amp;gt;ip2nets&amp;lt;/code&amp;gt; definition is “&amp;lt;code&amp;gt;tcp(eth0) 192.168.*.3&amp;lt;/code&amp;gt;” and there exists in the system a device &amp;lt;code&amp;gt;eth0&amp;lt;/code&amp;gt; with IP address &amp;lt;code&amp;gt;192.0.19.3&amp;lt;/code&amp;gt; and a device &amp;lt;code&amp;gt;eth1&amp;lt;/code&amp;gt; with IP address &amp;lt;code&amp;gt;192.168.3.3&amp;lt;/code&amp;gt;, then configuration will fail, because the pattern contradicts the interface specified. A clear warning will be displayed if inconsistent configuration is encountered.&lt;br /&gt;
&lt;br /&gt;
If the LNet number for a NID is 0 (zero), for example, &amp;lt;code&amp;gt;tcp0&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;o2ib0&amp;lt;/code&amp;gt;, the number will sometimes be omitted from command output, and can usually be omitted from configuration files as well (although it is not recommended – for reasons of clarity alone, it is recommended to supply as much information as is reasonable when creating configuration information).&lt;br /&gt;
&lt;br /&gt;
[[Category:Lustre Networking (LNet)]]&lt;/div&gt;</summary>
		<author><name>Malcolm</name></author>
	</entry>
</feed>