418 lines
7.2 KiB
HTML
418 lines
7.2 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>Multiple Ethernet Card per Machine</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.60"><LINK
|
|
REL="HOME"
|
|
TITLE="Securing and Optimizing Linux"
|
|
HREF="index.html"><LINK
|
|
REL="UP"
|
|
TITLE="TCP/IP -Network Management"
|
|
HREF="tcp-ip.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="TCP/IP -Network Management"
|
|
HREF="tcp-ip.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Files -Networking Functionality"
|
|
HREF="file-netfunc.html"></HEAD
|
|
><BODY
|
|
CLASS="section"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>Securing and Optimizing Linux: RedHat Edition -A Hands on Guide</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="tcp-ip.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
>Chapter 8. <SPAN
|
|
CLASS="acronym"
|
|
>TCP/IP</SPAN
|
|
> -Network Management</TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="file-netfunc.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="section"
|
|
><H1
|
|
CLASS="section"
|
|
><A
|
|
NAME="AEN5906"
|
|
>8.1. Multiple Ethernet Card per Machine</A
|
|
></H1
|
|
><P
|
|
> You can use Linux as a gateway between two Ethernet networks. In that case, you might have two Ethernet cards on your server. To eliminate problems at boot time, the Linux kernel doesn't detect multiple cards
|
|
automatically. If you happen to have two or more cards, you should specify the parameters of the cards in the <TT
|
|
CLASS="filename"
|
|
>lilo.conf</TT
|
|
> file for a monolithic kernel or in the <TT
|
|
CLASS="filename"
|
|
>conf.modules</TT
|
|
> file
|
|
for a modularized kernel. The following are problems you may encounter with your network cards.
|
|
</P
|
|
><DIV
|
|
CLASS="formalpara"
|
|
><P
|
|
><B
|
|
>Problem 1. </B
|
|
>
|
|
If the driver(s) of the card(s) is/are being used as a loadable module <EM
|
|
>modularized kernel</EM
|
|
>, in the case of <SPAN
|
|
CLASS="acronym"
|
|
>PCI</SPAN
|
|
> drivers, the module will typically detect all of the installed cards
|
|
automatically. For <SPAN
|
|
CLASS="acronym"
|
|
><SPAN
|
|
CLASS="acronym"
|
|
>ISA</SPAN
|
|
></SPAN
|
|
> cards, you need to supply the <TT
|
|
CLASS="literal"
|
|
>I/O</TT
|
|
> base address of the card so the module knows where to look. This information is stored in the file <TT
|
|
CLASS="filename"
|
|
>/etc/conf.modules</TT
|
|
>.
|
|
|
|
<DIV
|
|
CLASS="example"
|
|
><A
|
|
NAME="AEN5920"
|
|
></A
|
|
><P
|
|
><B
|
|
>Example 8-1. Two ISA ethernet cards</B
|
|
></P
|
|
><P
|
|
>
|
|
|
|
Consider we have two <SPAN
|
|
CLASS="acronym"
|
|
>ISA</SPAN
|
|
> <TT
|
|
CLASS="literal"
|
|
>3c509</TT
|
|
> cards, one at <TT
|
|
CLASS="literal"
|
|
>I/O</TT
|
|
> <TT
|
|
CLASS="literal"
|
|
>0x300</TT
|
|
> and one at <TT
|
|
CLASS="literal"
|
|
>I/O</TT
|
|
> <TT
|
|
CLASS="literal"
|
|
>0x320</TT
|
|
>.
|
|
|
|
For <SPAN
|
|
CLASS="acronym"
|
|
>ISA</SPAN
|
|
> cards, edit the <TT
|
|
CLASS="filename"
|
|
>conf.modules</TT
|
|
> file, <B
|
|
CLASS="command"
|
|
>vi</B
|
|
> <TT
|
|
CLASS="filename"
|
|
>/etc/conf.modules</TT
|
|
> and add:
|
|
<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><PRE
|
|
CLASS="programlisting"
|
|
> alias eth0 3c509
|
|
alias eth1 3c509
|
|
options 3c509 io=0x300,0x320
|
|
</PRE
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
>
|
|
|
|
This says that the <TT
|
|
CLASS="literal"
|
|
>3c509</TT
|
|
> driver should be loaded for either <TT
|
|
CLASS="literal"
|
|
>eth0</TT
|
|
> or <TT
|
|
CLASS="literal"
|
|
>eth1</TT
|
|
> alias <TT
|
|
CLASS="literal"
|
|
>eth0</TT
|
|
>, <TT
|
|
CLASS="literal"
|
|
>eth1</TT
|
|
> and it should be loaded with
|
|
the options <TT
|
|
CLASS="literal"
|
|
>io=0x300,0x320</TT
|
|
> so that the drivers knows where to look for the cards. Note that <TT
|
|
CLASS="literal"
|
|
>0x</TT
|
|
> is important, things like <TT
|
|
CLASS="literal"
|
|
>300h</TT
|
|
> as commonly used in the <SPAN
|
|
CLASS="acronym"
|
|
>DOS</SPAN
|
|
> world wont work.
|
|
</P
|
|
><P
|
|
> For <SPAN
|
|
CLASS="acronym"
|
|
>PCI</SPAN
|
|
> cards, you typically only need the alias lines to correlate the <TT
|
|
CLASS="literal"
|
|
>ethN</TT
|
|
> interfaces with the appropriate driver name, since the <TT
|
|
CLASS="literal"
|
|
>I/O</TT
|
|
> base of a <SPAN
|
|
CLASS="acronym"
|
|
>PCI</SPAN
|
|
> card can be safely
|
|
detected.
|
|
|
|
For <SPAN
|
|
CLASS="acronym"
|
|
>PCI</SPAN
|
|
> cards, edit the <TT
|
|
CLASS="filename"
|
|
>conf.modules</TT
|
|
> file <B
|
|
CLASS="command"
|
|
>vi</B
|
|
> <TT
|
|
CLASS="filename"
|
|
>/etc/conf.modules</TT
|
|
> and add:
|
|
<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><PRE
|
|
CLASS="programlisting"
|
|
> alias eth0 3c509
|
|
alias eth1 3c509
|
|
</PRE
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
>
|
|
</P
|
|
></DIV
|
|
>
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="formalpara"
|
|
><P
|
|
><B
|
|
>Problem 2. </B
|
|
>
|
|
If the drivers(s) of the card(s) is/are compiled into the kernel -<EM
|
|
>monolithic kernel</EM
|
|
>, the <SPAN
|
|
CLASS="acronym"
|
|
>PCI</SPAN
|
|
> probes will find all related cards automatically. <SPAN
|
|
CLASS="acronym"
|
|
>ISA</SPAN
|
|
> cards
|
|
will also find all related cards automatically, but in some circumstance <SPAN
|
|
CLASS="acronym"
|
|
>ISA</SPAN
|
|
> cards still need to do the following. This information is stored in the file <TT
|
|
CLASS="filename"
|
|
>/etc/lilo.conf</TT
|
|
>. The method
|
|
is to pass boot-time arguments to the kernel, which is usually done by <TT
|
|
CLASS="literal"
|
|
>LILO</TT
|
|
>.
|
|
For <SPAN
|
|
CLASS="acronym"
|
|
>ISA</SPAN
|
|
> cards, edit the <TT
|
|
CLASS="filename"
|
|
>lilo.conf</TT
|
|
> file, <B
|
|
CLASS="command"
|
|
>vi</B
|
|
> <TT
|
|
CLASS="filename"
|
|
>/etc/lilo.conf</TT
|
|
> and add:
|
|
|
|
<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><PRE
|
|
CLASS="programlisting"
|
|
> append=ether=0,0,eth1
|
|
</PRE
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
>
|
|
<DIV
|
|
CLASS="important"
|
|
><BLOCKQUOTE
|
|
CLASS="important"
|
|
><P
|
|
><B
|
|
><SPAN
|
|
CLASS="inlinemediaobject"
|
|
><IMG
|
|
SRC="./images/Important.gif"
|
|
ALT="Important"
|
|
></IMG
|
|
></SPAN
|
|
>: </B
|
|
>
|
|
First test your <SPAN
|
|
CLASS="acronym"
|
|
>ISA</SPAN
|
|
> cards without the boot-time arguments in the <TT
|
|
CLASS="filename"
|
|
>lilo.conf</TT
|
|
> file, and if this fails, use the boot-time arguments.
|
|
</P
|
|
></BLOCKQUOTE
|
|
></DIV
|
|
>
|
|
|
|
In this case <TT
|
|
CLASS="literal"
|
|
>eth0</TT
|
|
> and <TT
|
|
CLASS="literal"
|
|
>eth1</TT
|
|
> will be assigned in the order that the cards are found at boot. Since we have recompiled the kernel, we must use the
|
|
second method. If the drivers(s) is/are compiled into the kernel to install our second Ethernet card on the system. Remember that this is required only in some circumstance
|
|
for <SPAN
|
|
CLASS="acronym"
|
|
>ISA</SPAN
|
|
> cards, <SPAN
|
|
CLASS="acronym"
|
|
>PCI</SPAN
|
|
> cards will be found automatically.
|
|
|
|
</P
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="tcp-ip.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="file-netfunc.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><SPAN
|
|
CLASS="acronym"
|
|
>TCP/IP</SPAN
|
|
> -Network Management</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="tcp-ip.html"
|
|
>Up</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Files -Networking Functionality</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |