| Summary: | Bad ifconfig(8) alias advice in FAQ 10.9 | ||
|---|---|---|---|
| Product: | Documentation | Reporter: | Crist J. Clark <cristjc> |
| Component: | Books & Articles | Assignee: | freebsd-doc (Nobody) <doc> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Latest | ||
| Hardware: | Any | ||
| OS: | Any | ||
How about this patch ?
Ceri
--- doc/en_US.ISO8859-1/books/faq/book.sgml.old Thu Nov 29 13:18:34 2001
+++ doc/en_US.ISO8859-1/books/faq/book.sgml Thu Nov 29 13:23:36 2001
@@ -8802,10 +8802,15 @@
<para>How can I setup Ethernet aliases?</para>
</question><answer>
- <para>Add <literal>netmask 0xffffffff</literal> to your
- &man.ifconfig.8; command-line like the following:</para>
+ <para>If the alias is on the same subnet as the first address, then add
+ <literal>netmask 0xffffffff</literal> to your &man.ifconfig.8; command-line
+ like the following:</para>
- <screen>&prompt.root; <userinput>ifconfig ed0 alias 204.141.95.2 netmask 0xffffffff</userinput></screen>
+ <screen>&prompt.root; <userinput>ifconfig ed0 alias 10.20.30.40 netmask 0xffffffff</userinput></screen>
+
+ <para>Otherwise, just specify the network address and netmask as usual:</para>
+
+ <screen>&prompt.root; <userinput>ifconfig ed0 alias 172.16.141.5 netmask 0xffffff00</userinput</screen>
</answer>
</qandaentry>
On Thu, Nov 29, 2001 at 05:30:01AM -0800, Ceri wrote:
> The following reply was made to PR docs/32373; it has been noted by GNATS.
>
> How about this patch ?
>
> Ceri
>
> --- doc/en_US.ISO8859-1/books/faq/book.sgml.old Thu Nov 29 13:18:34 2001
> +++ doc/en_US.ISO8859-1/books/faq/book.sgml Thu Nov 29 13:23:36 2001
> @@ -8802,10 +8802,15 @@
> <para>How can I setup Ethernet aliases?</para>
> </question><answer>
>
> - <para>Add <literal>netmask 0xffffffff</literal> to your
> - &man.ifconfig.8; command-line like the following:</para>
> + <para>If the alias is on the same subnet as the first address, then add
Maybe "..as an address already configured on the interface"?
It is quite possible (and quite common) to configure an Ethernet
interface with several different addresses on several different subnets.
G'luck,
Peter
--
I am not the subject of this sentence.
>
> Maybe "..as an address already configured on the interface"?
> It is quite possible (and quite common) to configure an Ethernet
> interface with several different addresses on several different subnets.
Fair point.
This one ?
Ceri
--- doc/en_US.ISO8859-1/books/faq/book.sgml.old Thu Nov 29 13:18:34 2001
+++ doc/en_US.ISO8859-1/books/faq/book.sgml Thu Nov 29 14:03:37 2001
@@ -8802,10 +8802,15 @@
<para>How can I setup Ethernet aliases?</para>
</question><answer>
- <para>Add <literal>netmask 0xffffffff</literal> to your
- &man.ifconfig.8; command-line like the following:</para>
+ <para>If the alias is on the same subnet as an address already configured on
+ the interface, then add <literal>netmask 0xffffffff</literal> to your
+ &man.ifconfig.8; command-line, as in the following:</para>
- <screen>&prompt.root; <userinput>ifconfig ed0 alias 204.141.95.2 netmask 0xffffffff</userinput></screen>
+ <screen>&prompt.root; <userinput>ifconfig ed0 alias 10.20.30.40 netmask 0xffffffff</userinput></screen>
+
+ <para>Otherwise, just specify the network address and netmask as usual:</para>
+
+ <screen>&prompt.root; <userinput>ifconfig ed0 alias 172.16.141.5 netmask 0xffffff00</userinput</screen>
</answer>
</qandaentry>
On Thu, Nov 29, 2001 at 07:37:05AM -0800, Bruce A. Mah wrote:
> If memory serves me right, Ruslan Ermilov wrote:
>
> > Newer ifconfig(8) supports the address/bits syntax. :-)
>
> You're quite right, but using the "netmask" keyword in the example will
> ensure that it still works for older versions. Maybe use the newer
> syntax as an alternative? (I'm not sure whether or not it's worth the
> extra space.)
Hmm, I'm not sure that it is (we're not supposed to be duplicating the
manpages).
Could do with a few more opinions if anybody has them ?
Ceri
--
keep a mild groove on
> >Description:
> The FAQ says,
>
> 10.9. How can I setup Ethernet aliases?
Slip in a change of the noun "setup" to the verb "set up"?
Here you go then:
--- doc/en_US.ISO8859-1/books/faq/book.sgml.orig Thu Dec 13 13:49:57 2001
+++ doc/en_US.ISO8859-1/books/faq/book.sgml Tue Dec 18 14:17:06 2001
@@ -8926,13 +8926,18 @@
<qandaentry>
<question id="ethernet-aliases">
- <para>How can I setup Ethernet aliases?</para>
+ <para>How can I set up Ethernet aliases?</para>
</question><answer>
- <para>Add <literal>netmask 0xffffffff</literal> to your
- &man.ifconfig.8; command-line like the following:</para>
+ <para>If the alias is on the same subnet as an address already configured on
+ the interface, then add <literal>netmask 0xffffffff</literal> to your
+ &man.ifconfig.8; command-line, as in the following:</para>
- <screen>&prompt.root; <userinput>ifconfig ed0 alias 204.141.95.2 netmask 0xffffffff</userinput></screen>
+ <screen>&prompt.root; <userinput>ifconfig ed0 alias 10.20.30.40 netmask 0xffffffff</userinput></screen>
+
+ <para>Otherwise, just specify the network address and netmask as usual:</para>
+
+ <screen>&prompt.root; <userinput>ifconfig ed0 alias 172.16.141.5 netmask 0xffffff00</userinput</screen>
</answer>
</qandaentry>
State Changed From-To: open->closed This had sat around long enough. Going through PR's I had submitted. Committed Ceri's last suggestion in the audit trail with one minor change. |
The FAQ says, 10.9. How can I setup Ethernet aliases? Add netmask 0xffffffff to your ifconfig(8) command-line like the following: # ifconfig ed0 alias 204.141.95.2 netmask 0xffffffff This is incorrect. You use a netmask of 0xffffffff for aliases which exist on the same logical network as a previously configured address on the same logical network. The ifconfig(8) manpage gets it right, alias Establish an additional network address for this interface. This is sometimes useful when changing network numbers, and one wishes to accept packets addressed to the old interface. If the address is on the same subnet as the first network address for this interface, a netmask of 0xffffffff has to be specified. How-To-Repeat: http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/networking.html#ETHERNET-ALIASES