<!-- Copyright (C) 2003 Red Hat, Inc. -->
|
<!-- Copyright (C) 2003 Red Hat, Inc. -->
|
<!-- This material may be distributed only subject to the terms -->
|
<!-- This material may be distributed only subject to the terms -->
|
<!-- and conditions set forth in the Open Publication License, v1.0 -->
|
<!-- and conditions set forth in the Open Publication License, v1.0 -->
|
<!-- or later (the latest version is presently available at -->
|
<!-- or later (the latest version is presently available at -->
|
<!-- http://www.opencontent.org/openpub/). -->
|
<!-- http://www.opencontent.org/openpub/). -->
|
<!-- Distribution of the work or derivative of the work in any -->
|
<!-- Distribution of the work or derivative of the work in any -->
|
<!-- standard (paper) book form is prohibited unless prior -->
|
<!-- standard (paper) book form is prohibited unless prior -->
|
<!-- permission is obtained from the copyright holder. -->
|
<!-- permission is obtained from the copyright holder. -->
|
<HTML
|
<HTML
|
><HEAD
|
><HEAD
|
><TITLE
|
><TITLE
|
>Configuring the RedBoot Environment</TITLE
|
>Configuring the RedBoot Environment</TITLE
|
><meta name="MSSmartTagsPreventParsing" content="TRUE">
|
><meta name="MSSmartTagsPreventParsing" content="TRUE">
|
<META
|
<META
|
NAME="GENERATOR"
|
NAME="GENERATOR"
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
"><LINK
|
"><LINK
|
REL="HOME"
|
REL="HOME"
|
TITLE="eCos Reference Manual"
|
TITLE="eCos Reference Manual"
|
HREF="ecos-ref.html"><LINK
|
HREF="ecos-ref.html"><LINK
|
REL="UP"
|
REL="UP"
|
TITLE="Getting Started with RedBoot"
|
TITLE="Getting Started with RedBoot"
|
HREF="getting-started-with-redboot.html"><LINK
|
HREF="getting-started-with-redboot.html"><LINK
|
REL="PREVIOUS"
|
REL="PREVIOUS"
|
TITLE="RedBoot Resource Usage"
|
TITLE="RedBoot Resource Usage"
|
HREF="resource-usage.html"><LINK
|
HREF="resource-usage.html"><LINK
|
REL="NEXT"
|
REL="NEXT"
|
TITLE="RedBoot Commands and Examples"
|
TITLE="RedBoot Commands and Examples"
|
HREF="redboot-commands-and-examples.html"></HEAD
|
HREF="redboot-commands-and-examples.html"></HEAD
|
><BODY
|
><BODY
|
CLASS="SECT1"
|
CLASS="SECT1"
|
BGCOLOR="#FFFFFF"
|
BGCOLOR="#FFFFFF"
|
TEXT="#000000"
|
TEXT="#000000"
|
LINK="#0000FF"
|
LINK="#0000FF"
|
VLINK="#840084"
|
VLINK="#840084"
|
ALINK="#0000FF"
|
ALINK="#0000FF"
|
><DIV
|
><DIV
|
CLASS="NAVHEADER"
|
CLASS="NAVHEADER"
|
><TABLE
|
><TABLE
|
SUMMARY="Header navigation table"
|
SUMMARY="Header navigation table"
|
WIDTH="100%"
|
WIDTH="100%"
|
BORDER="0"
|
BORDER="0"
|
CELLPADDING="0"
|
CELLPADDING="0"
|
CELLSPACING="0"
|
CELLSPACING="0"
|
><TR
|
><TR
|
><TH
|
><TH
|
COLSPAN="3"
|
COLSPAN="3"
|
ALIGN="center"
|
ALIGN="center"
|
>eCos Reference Manual</TH
|
>eCos Reference Manual</TH
|
></TR
|
></TR
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="10%"
|
WIDTH="10%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
><A
|
><A
|
HREF="resource-usage.html"
|
HREF="resource-usage.html"
|
ACCESSKEY="P"
|
ACCESSKEY="P"
|
>Prev</A
|
>Prev</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="80%"
|
WIDTH="80%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
>Chapter 1. Getting Started with RedBoot</TD
|
>Chapter 1. Getting Started with RedBoot</TD
|
><TD
|
><TD
|
WIDTH="10%"
|
WIDTH="10%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
><A
|
><A
|
HREF="redboot-commands-and-examples.html"
|
HREF="redboot-commands-and-examples.html"
|
ACCESSKEY="N"
|
ACCESSKEY="N"
|
>Next</A
|
>Next</A
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><HR
|
><HR
|
ALIGN="LEFT"
|
ALIGN="LEFT"
|
WIDTH="100%"></DIV
|
WIDTH="100%"></DIV
|
><DIV
|
><DIV
|
CLASS="SECT1"
|
CLASS="SECT1"
|
><H1
|
><H1
|
CLASS="SECT1"
|
CLASS="SECT1"
|
><A
|
><A
|
NAME="CONFIGURING-THE-REDBOOT-ENVIRONMENT">Configuring the RedBoot Environment</H1
|
NAME="CONFIGURING-THE-REDBOOT-ENVIRONMENT">Configuring the RedBoot Environment</H1
|
><P
|
><P
|
>Once installed, RedBoot will operate fairly generically. However,
|
>Once installed, RedBoot will operate fairly generically. However,
|
there are some features that can be configured for a particular installation.
|
there are some features that can be configured for a particular installation.
|
These depend primarily on whether flash and/or networking support are available. The remainder
|
These depend primarily on whether flash and/or networking support are available. The remainder
|
of this discussion assumes that support for both of these options is included
|
of this discussion assumes that support for both of these options is included
|
in RedBoot.</P
|
in RedBoot.</P
|
><DIV
|
><DIV
|
CLASS="SECT2"
|
CLASS="SECT2"
|
><H2
|
><H2
|
CLASS="SECT2"
|
CLASS="SECT2"
|
><A
|
><A
|
NAME="TARGET-NETWORK-CONFIGURATION">Target Network Configuration</H2
|
NAME="TARGET-NETWORK-CONFIGURATION">Target Network Configuration</H2
|
><P
|
><P
|
>Each node in a networked
|
>Each node in a networked
|
system needs to have a unique address. Since the network support in RedBoot
|
system needs to have a unique address. Since the network support in RedBoot
|
is based on TCP/IP, this address
|
is based on TCP/IP, this address
|
is an IP (Internet Protocol) address. There are two ways for a system to “know”
|
is an IP (Internet Protocol) address. There are two ways for a system to “know”
|
its IP address. First, it can be stored locally on the platform. This is known
|
its IP address. First, it can be stored locally on the platform. This is known
|
as having a static IP address. Second, the system can use the network itself
|
as having a static IP address. Second, the system can use the network itself
|
to discover its IP address. This is known as a dynamic IP address. RedBoot
|
to discover its IP address. This is known as a dynamic IP address. RedBoot
|
supports this dynamic IP address mode by use of the BOOTP (a subset of DHCP) protocol. In this case, RedBoot will ask the network (actually
|
supports this dynamic IP address mode by use of the BOOTP (a subset of DHCP) protocol. In this case, RedBoot will ask the network (actually
|
some generic server on the network) for the IP address to use.</P
|
some generic server on the network) for the IP address to use.</P
|
><DIV
|
><DIV
|
CLASS="NOTE"
|
CLASS="NOTE"
|
><BLOCKQUOTE
|
><BLOCKQUOTE
|
CLASS="NOTE"
|
CLASS="NOTE"
|
><P
|
><P
|
><B
|
><B
|
>NOTE: </B
|
>NOTE: </B
|
>Currently, RedBoot only supports BOOTP. In future releases, DHCP may
|
>Currently, RedBoot only supports BOOTP. In future releases, DHCP may
|
also be supported, but such support will be limited to additional data items,
|
also be supported, but such support will be limited to additional data items,
|
not lease-based address allocation.</P
|
not lease-based address allocation.</P
|
></BLOCKQUOTE
|
></BLOCKQUOTE
|
></DIV
|
></DIV
|
><P
|
><P
|
>The choice of IP
|
>The choice of IP
|
address type is made via the <B
|
address type is made via the <B
|
CLASS="COMMAND"
|
CLASS="COMMAND"
|
>fconfig</B
|
>fconfig</B
|
> command. Once a selection
|
> command. Once a selection
|
is made, it will be stored in flash memory. RedBoot only queries the flash
|
is made, it will be stored in flash memory. RedBoot only queries the flash
|
configuration information at reset, so any changes will require restarting
|
configuration information at reset, so any changes will require restarting
|
the platform.</P
|
the platform.</P
|
><P
|
><P
|
>Here is an example of the RedBoot <B
|
>Here is an example of the RedBoot <B
|
CLASS="COMMAND"
|
CLASS="COMMAND"
|
>fconfig</B
|
>fconfig</B
|
>
|
>
|
command, showing network addressing: </P
|
command, showing network addressing: </P
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="PROGRAMLISTING"
|
CLASS="PROGRAMLISTING"
|
>RedBoot> <TT
|
>RedBoot> <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>fconfig -l</B
|
>fconfig -l</B
|
></TT
|
></TT
|
>
|
>
|
Run script at boot: false
|
Run script at boot: false
|
Use BOOTP for network configuration: false
|
Use BOOTP for network configuration: false
|
Local IP address: 192.168.1.29
|
Local IP address: 192.168.1.29
|
Default server IP address: 192.168.1.101
|
Default server IP address: 192.168.1.101
|
DNS server IP address: 192.168.1.1
|
DNS server IP address: 192.168.1.1
|
GDB connection port: 9000
|
GDB connection port: 9000
|
Network debug at boot time: false </PRE
|
Network debug at boot time: false </PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><P
|
><P
|
>In this case, the board has been configured with a static IP address
|
>In this case, the board has been configured with a static IP address
|
listed as the Local IP address. The default server IP address specifies which
|
listed as the Local IP address. The default server IP address specifies which
|
network node to communicate with for TFTP service. This address can be overridden
|
network node to communicate with for TFTP service. This address can be overridden
|
directly in the TFTP
|
directly in the TFTP
|
commands.</P
|
commands.</P
|
><P
|
><P
|
>The <TT
|
>The <TT
|
CLASS="COMPUTEROUTPUT"
|
CLASS="COMPUTEROUTPUT"
|
>DNS server IP address</TT
|
>DNS server IP address</TT
|
> option
|
> option
|
controls where RedBoot should make DNS lookups. A setting of 0.0.0.0 will disable DNS
|
controls where RedBoot should make DNS lookups. A setting of 0.0.0.0 will disable DNS
|
lookups. The DNS server IP address can also be set at runtime.</P
|
lookups. The DNS server IP address can also be set at runtime.</P
|
><P
|
><P
|
>If the selection for <TT
|
>If the selection for <TT
|
CLASS="COMPUTEROUTPUT"
|
CLASS="COMPUTEROUTPUT"
|
>Use BOOTP for network configuration</TT
|
>Use BOOTP for network configuration</TT
|
> had been <TT
|
> had been <TT
|
CLASS="COMPUTEROUTPUT"
|
CLASS="COMPUTEROUTPUT"
|
>true</TT
|
>true</TT
|
>, these IP
|
>, these IP
|
addresses would be determined at boot time, via the BOOTP protocol. The final
|
addresses would be determined at boot time, via the BOOTP protocol. The final
|
number which needs to be configured, regardless of IP address selection mode,
|
number which needs to be configured, regardless of IP address selection mode,
|
is the <TT
|
is the <TT
|
CLASS="COMPUTEROUTPUT"
|
CLASS="COMPUTEROUTPUT"
|
>GDB connection port</TT
|
>GDB connection port</TT
|
>. RedBoot allows for incoming commands
|
>. RedBoot allows for incoming commands
|
on either the available serial ports or via the network. This port number
|
on either the available serial ports or via the network. This port number
|
is the TCP port that RedBoot will use to accept incoming connections. </P
|
is the TCP port that RedBoot will use to accept incoming connections. </P
|
><P
|
><P
|
>These connections can be used for GDB sessions, but they can also be
|
>These connections can be used for GDB sessions, but they can also be
|
used for generic RedBoot commands. In particular, it is possible to communicate
|
used for generic RedBoot commands. In particular, it is possible to communicate
|
with RedBoot via the telnet
|
with RedBoot via the telnet
|
protocol. For example, on Linux®: </P
|
protocol. For example, on Linux®: </P
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="PROGRAMLISTING"
|
CLASS="PROGRAMLISTING"
|
>% telnet redboot_board 9000
|
>% telnet redboot_board 9000
|
Connected to redboot_board
|
Connected to redboot_board
|
Escape character is ‘^]’.
|
Escape character is ‘^]’.
|
RedBoot> </PRE
|
RedBoot> </PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="SECT2"
|
CLASS="SECT2"
|
><H2
|
><H2
|
CLASS="SECT2"
|
CLASS="SECT2"
|
><A
|
><A
|
NAME="AEN2722">Host Network Configuration</H2
|
NAME="AEN2722">Host Network Configuration</H2
|
><P
|
><P
|
>RedBoot
|
>RedBoot
|
may require three different classes of service from a network host: </P
|
may require three different classes of service from a network host: </P
|
><P
|
><P
|
></P
|
></P
|
><UL
|
><UL
|
><LI
|
><LI
|
><P
|
><P
|
>dynamic IP address allocation, using BOOTP </P
|
>dynamic IP address allocation, using BOOTP </P
|
></LI
|
></LI
|
><LI
|
><LI
|
><P
|
><P
|
>TFTP service for file downloading </P
|
>TFTP service for file downloading </P
|
></LI
|
></LI
|
><LI
|
><LI
|
><P
|
><P
|
>DNS server for hostname lookups </P
|
>DNS server for hostname lookups </P
|
></LI
|
></LI
|
></UL
|
></UL
|
><P
|
><P
|
>Depending on the host system, these services may or may not be available
|
>Depending on the host system, these services may or may not be available
|
or enabled by default. See your system documentation for more details.</P
|
or enabled by default. See your system documentation for more details.</P
|
><P
|
><P
|
>In particular, on Red Hat Linux, neither of these services will be configured
|
>In particular, on Red Hat Linux, neither of these services will be configured
|
out of the box. The following will provide a limited explanation of how to
|
out of the box. The following will provide a limited explanation of how to
|
set them up. These configuration setups must be done as <TT
|
set them up. These configuration setups must be done as <TT
|
CLASS="COMPUTEROUTPUT"
|
CLASS="COMPUTEROUTPUT"
|
>root</TT
|
>root</TT
|
> on the host or server machine.</P
|
> on the host or server machine.</P
|
><DIV
|
><DIV
|
CLASS="SECT3"
|
CLASS="SECT3"
|
><H3
|
><H3
|
CLASS="SECT3"
|
CLASS="SECT3"
|
><A
|
><A
|
NAME="AEN2743">Enable TFTP on Red Hat Linux 6.2</H3
|
NAME="AEN2743">Enable TFTP on Red Hat Linux 6.2</H3
|
><DIV
|
><DIV
|
CLASS="PROCEDURE"
|
CLASS="PROCEDURE"
|
><OL
|
><OL
|
TYPE="1"
|
TYPE="1"
|
><LI
|
><LI
|
><P
|
><P
|
>Ensure that
|
>Ensure that
|
you have the tftp-server RPM package installed. By default, this installs
|
you have the tftp-server RPM package installed. By default, this installs
|
the TFTP server in a disabled state. These steps will enable it:</P
|
the TFTP server in a disabled state. These steps will enable it:</P
|
></LI
|
></LI
|
><LI
|
><LI
|
><P
|
><P
|
>Make sure that the following line is uncommented in the control
|
>Make sure that the following line is uncommented in the control
|
file <TT
|
file <TT
|
CLASS="FILENAME"
|
CLASS="FILENAME"
|
>/etc/inetd.conf</TT
|
>/etc/inetd.conf</TT
|
> <TABLE
|
> <TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
>tftp dgram udp wait root /usr/sbin/tcpd /usr/sbin/in.tftpd</PRE
|
>tftp dgram udp wait root /usr/sbin/tcpd /usr/sbin/in.tftpd</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></P
|
></P
|
><P
|
><P
|
></P
|
></P
|
></LI
|
></LI
|
><LI
|
><LI
|
><P
|
><P
|
>If it was necessary to change the line in Step 2, then the inetd
|
>If it was necessary to change the line in Step 2, then the inetd
|
server must be restarted, which can be done via the command: <TABLE
|
server must be restarted, which can be done via the command: <TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="PROGRAMLISTING"
|
CLASS="PROGRAMLISTING"
|
># service inet reload</PRE
|
># service inet reload</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></P
|
></P
|
></LI
|
></LI
|
></OL
|
></OL
|
></DIV
|
></DIV
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="SECT3"
|
CLASS="SECT3"
|
><H3
|
><H3
|
CLASS="SECT3"
|
CLASS="SECT3"
|
><A
|
><A
|
NAME="AEN2762">Enable TFTP on Red Hat Linux 7 (or newer)</H3
|
NAME="AEN2762">Enable TFTP on Red Hat Linux 7 (or newer)</H3
|
><DIV
|
><DIV
|
CLASS="PROCEDURE"
|
CLASS="PROCEDURE"
|
><OL
|
><OL
|
TYPE="1"
|
TYPE="1"
|
><LI
|
><LI
|
><P
|
><P
|
>Ensure that the
|
>Ensure that the
|
xinetd RPM is installed.</P
|
xinetd RPM is installed.</P
|
></LI
|
></LI
|
><LI
|
><LI
|
><P
|
><P
|
>Ensure that the tftp-server RPM is installed.</P
|
>Ensure that the tftp-server RPM is installed.</P
|
></LI
|
></LI
|
><LI
|
><LI
|
><P
|
><P
|
>Enable TFTP by means of the following: <TABLE
|
>Enable TFTP by means of the following: <TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="PROGRAMLISTING"
|
CLASS="PROGRAMLISTING"
|
>/sbin/chkconfig tftp on</PRE
|
>/sbin/chkconfig tftp on</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
>Reload the xinetd configuration using the command:<TABLE
|
>Reload the xinetd configuration using the command:<TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="PROGRAMLISTING"
|
CLASS="PROGRAMLISTING"
|
> /sbin/service xinetd reload </PRE
|
> /sbin/service xinetd reload </PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
>Create the directory /tftpboot
|
>Create the directory /tftpboot
|
using the command <TABLE
|
using the command <TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="PROGRAMLISTING"
|
CLASS="PROGRAMLISTING"
|
>mkdir /tftpboot</PRE
|
>mkdir /tftpboot</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></P
|
></P
|
></LI
|
></LI
|
></OL
|
></OL
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="NOTE"
|
CLASS="NOTE"
|
><BLOCKQUOTE
|
><BLOCKQUOTE
|
CLASS="NOTE"
|
CLASS="NOTE"
|
><P
|
><P
|
><B
|
><B
|
>NOTE: </B
|
>NOTE: </B
|
>Under Red Hat 7 you must address files by absolute pathnames, for example: <TT
|
>Under Red Hat 7 you must address files by absolute pathnames, for example: <TT
|
CLASS="FILENAME"
|
CLASS="FILENAME"
|
>/tftpboot/boot.img</TT
|
>/tftpboot/boot.img</TT
|
> not <TT
|
> not <TT
|
CLASS="FILENAME"
|
CLASS="FILENAME"
|
>/boot.img</TT
|
>/boot.img</TT
|
>, as you may have done with
|
>, as you may have done with
|
other implementations.
|
other implementations.
|
On systems newer than Red Hat 7 (7.1 and beyond), filenames are once again relative to the
|
On systems newer than Red Hat 7 (7.1 and beyond), filenames are once again relative to the
|
<TT
|
<TT
|
CLASS="FILENAME"
|
CLASS="FILENAME"
|
>/tftpboot</TT
|
>/tftpboot</TT
|
> directory.</P
|
> directory.</P
|
></BLOCKQUOTE
|
></BLOCKQUOTE
|
></DIV
|
></DIV
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="SECT3"
|
CLASS="SECT3"
|
><H3
|
><H3
|
CLASS="SECT3"
|
CLASS="SECT3"
|
><A
|
><A
|
NAME="AEN2786">Enable BOOTP/DHCP server on Red Hat Linux</H3
|
NAME="AEN2786">Enable BOOTP/DHCP server on Red Hat Linux</H3
|
><P
|
><P
|
>First, ensure that you have
|
>First, ensure that you have
|
the proper package, <TT
|
the proper package, <TT
|
CLASS="COMPUTEROUTPUT"
|
CLASS="COMPUTEROUTPUT"
|
>dhcp</TT
|
>dhcp</TT
|
> (not <TT
|
> (not <TT
|
CLASS="COMPUTEROUTPUT"
|
CLASS="COMPUTEROUTPUT"
|
>dhcpd</TT
|
>dhcpd</TT
|
>) installed. The DHCP server provides Dynamic Host Configuration,
|
>) installed. The DHCP server provides Dynamic Host Configuration,
|
that is, IP address and other data to hosts on a network. It does this in
|
that is, IP address and other data to hosts on a network. It does this in
|
different ways. Next, there can be a fixed relationship between a certain
|
different ways. Next, there can be a fixed relationship between a certain
|
node and the data, based on that node’s unique Ethernet Station Address
|
node and the data, based on that node’s unique Ethernet Station Address
|
(ESA, sometimes called a MAC address). The other possibility is simply to
|
(ESA, sometimes called a MAC address). The other possibility is simply to
|
assign addresses that are free. The sample DHCP configuration file shown does
|
assign addresses that are free. The sample DHCP configuration file shown does
|
both. Refer to the DHCP documentation for more details.</P
|
both. Refer to the DHCP documentation for more details.</P
|
><DIV
|
><DIV
|
CLASS="EXAMPLE"
|
CLASS="EXAMPLE"
|
><A
|
><A
|
NAME="AEN2797"><P
|
NAME="AEN2797"><P
|
><B
|
><B
|
>Example 1-1. Sample DHCP configuration file</B
|
>Example 1-1. Sample DHCP configuration file</B
|
></P
|
></P
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="PROGRAMLISTING"
|
CLASS="PROGRAMLISTING"
|
>--------------- /etc/dhcpd.conf -----------------------------
|
>--------------- /etc/dhcpd.conf -----------------------------
|
default-lease-time 600;
|
default-lease-time 600;
|
max-lease-time 7200;
|
max-lease-time 7200;
|
option subnet-mask 255.255.255.0;
|
option subnet-mask 255.255.255.0;
|
option broadcast-address 192.168.1.255;
|
option broadcast-address 192.168.1.255;
|
option domain-name-servers 198.41.0.4, 128.9.0.107;
|
option domain-name-servers 198.41.0.4, 128.9.0.107;
|
option domain-name “bogus.com”;
|
option domain-name “bogus.com”;
|
allow bootp;
|
allow bootp;
|
shared-network BOGUS {
|
shared-network BOGUS {
|
subnet 192.168.1.0 netmask 255.255.255.0 {
|
subnet 192.168.1.0 netmask 255.255.255.0 {
|
option routers 192.168.1.101;
|
option routers 192.168.1.101;
|
range 192.168.1.1 192.168.1.254;
|
range 192.168.1.1 192.168.1.254;
|
}
|
}
|
}
|
}
|
host mbx {
|
host mbx {
|
hardware ethernet 08:00:3E:28:79:B8;
|
hardware ethernet 08:00:3E:28:79:B8;
|
fixed-address 192.168.1.20;
|
fixed-address 192.168.1.20;
|
filename “/tftpboot/192.168.1.21/zImage”;
|
filename “/tftpboot/192.168.1.21/zImage”;
|
default-lease-time -1;
|
default-lease-time -1;
|
server-name “srvr.bugus.com”;
|
server-name “srvr.bugus.com”;
|
server-identifier 192.168.1.101;
|
server-identifier 192.168.1.101;
|
option host-name “mbx”;
|
option host-name “mbx”;
|
} </PRE
|
} </PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></DIV
|
></DIV
|
><P
|
><P
|
>Once the DHCP package has been installed and the configuration file
|
>Once the DHCP package has been installed and the configuration file
|
set up, type:<TABLE
|
set up, type:<TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
># <TT
|
># <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>service dhcpd start</B
|
>service dhcpd start</B
|
></TT
|
></TT
|
></PRE
|
></PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></P
|
></P
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="SECT3"
|
CLASS="SECT3"
|
><H3
|
><H3
|
CLASS="SECT3"
|
CLASS="SECT3"
|
><A
|
><A
|
NAME="AEN2803">Enable DNS server on Red Hat Linux</H3
|
NAME="AEN2803">Enable DNS server on Red Hat Linux</H3
|
><P
|
><P
|
>First, ensure that you have the proper
|
>First, ensure that you have the proper
|
RPM package, <TT
|
RPM package, <TT
|
CLASS="COMPUTEROUTPUT"
|
CLASS="COMPUTEROUTPUT"
|
>caching-nameserver</TT
|
>caching-nameserver</TT
|
>
|
>
|
installed. Then change the configuration
|
installed. Then change the configuration
|
(in <TT
|
(in <TT
|
CLASS="FILENAME"
|
CLASS="FILENAME"
|
>/etc/named.conf</TT
|
>/etc/named.conf</TT
|
>) so that the
|
>) so that the
|
<TT
|
<TT
|
CLASS="COMPUTEROUTPUT"
|
CLASS="COMPUTEROUTPUT"
|
>forwarders</TT
|
>forwarders</TT
|
> point to the primary
|
> point to the primary
|
nameservers for your machine, normally using the nameservers listed in
|
nameservers for your machine, normally using the nameservers listed in
|
<TT
|
<TT
|
CLASS="FILENAME"
|
CLASS="FILENAME"
|
>/etc/resolv.conf</TT
|
>/etc/resolv.conf</TT
|
>.</P
|
>.</P
|
><DIV
|
><DIV
|
CLASS="EXAMPLE"
|
CLASS="EXAMPLE"
|
><A
|
><A
|
NAME="AEN2813"><P
|
NAME="AEN2813"><P
|
><B
|
><B
|
>Example 1-2. Sample <TT
|
>Example 1-2. Sample <TT
|
CLASS="FILENAME"
|
CLASS="FILENAME"
|
>/etc/named.conf</TT
|
>/etc/named.conf</TT
|
> for Red Hat Linux 7.x</B
|
> for Red Hat Linux 7.x</B
|
></P
|
></P
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="PROGRAMLISTING"
|
CLASS="PROGRAMLISTING"
|
>--------------- /etc/named.conf -----------------------------
|
>--------------- /etc/named.conf -----------------------------
|
// generated by named-bootconf.pl
|
// generated by named-bootconf.pl
|
|
|
options {
|
options {
|
directory "/var/named";
|
directory "/var/named";
|
/*
|
/*
|
* If there is a firewall between you and nameservers you want
|
* If there is a firewall between you and nameservers you want
|
* to talk to, you might need to uncomment the query-source
|
* to talk to, you might need to uncomment the query-source
|
* directive below. Previous versions of BIND always asked
|
* directive below. Previous versions of BIND always asked
|
* questions using port 53, but BIND 8.1 uses an unprivileged
|
* questions using port 53, but BIND 8.1 uses an unprivileged
|
* port by default.
|
* port by default.
|
*/
|
*/
|
// query-source address * port 53;
|
// query-source address * port 53;
|
|
|
|
|
forward first;
|
forward first;
|
forwarders {
|
forwarders {
|
212.242.40.3;
|
212.242.40.3;
|
212.242.40.51;
|
212.242.40.51;
|
};
|
};
|
};
|
};
|
|
|
//
|
//
|
// a caching only nameserver config
|
// a caching only nameserver config
|
//
|
//
|
// Uncomment the following for Red Hat Linux 7.2 or above:
|
// Uncomment the following for Red Hat Linux 7.2 or above:
|
// controls {
|
// controls {
|
// inet 127.0.0.1 allow { localhost; } keys { rndckey; };
|
// inet 127.0.0.1 allow { localhost; } keys { rndckey; };
|
// };
|
// };
|
// include "/etc/rndc.key";
|
// include "/etc/rndc.key";
|
zone "." IN {
|
zone "." IN {
|
type hint;
|
type hint;
|
file "named.ca";
|
file "named.ca";
|
};
|
};
|
|
|
zone "localhost" IN {
|
zone "localhost" IN {
|
type master;
|
type master;
|
file "localhost.zone";
|
file "localhost.zone";
|
allow-update { none; };
|
allow-update { none; };
|
};
|
};
|
|
|
zone "0.0.127.in-addr.arpa" IN {
|
zone "0.0.127.in-addr.arpa" IN {
|
type master;
|
type master;
|
file "named.local";
|
file "named.local";
|
allow-update { none; };
|
allow-update { none; };
|
}; </PRE
|
}; </PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></DIV
|
></DIV
|
><P
|
><P
|
>Make sure the server is started with the command:
|
>Make sure the server is started with the command:
|
<TABLE
|
<TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
># <TT
|
># <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>service named start</B
|
>service named start</B
|
></TT
|
></TT
|
></PRE
|
></PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
> and is
|
> and is
|
started on next reboot with the command
|
started on next reboot with the command
|
<TABLE
|
<TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
># <TT
|
># <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>chkconfig named on</B
|
>chkconfig named on</B
|
></TT
|
></TT
|
></PRE
|
></PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
>
|
>
|
Finally, you may wish to change
|
Finally, you may wish to change
|
<TT
|
<TT
|
CLASS="FILENAME"
|
CLASS="FILENAME"
|
>/etc/resolv.conf</TT
|
>/etc/resolv.conf</TT
|
> to use
|
> to use
|
<TT
|
<TT
|
CLASS="COMPUTEROUTPUT"
|
CLASS="COMPUTEROUTPUT"
|
>127.0.0.1</TT
|
>127.0.0.1</TT
|
> as the nameserver for your
|
> as the nameserver for your
|
local machine.</P
|
local machine.</P
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="SECT3"
|
CLASS="SECT3"
|
><H3
|
><H3
|
CLASS="SECT3"
|
CLASS="SECT3"
|
><A
|
><A
|
NAME="AEN2824">RedBoot network gateway</H3
|
NAME="AEN2824">RedBoot network gateway</H3
|
><P
|
><P
|
>RedBoot cannot communicate with
|
>RedBoot cannot communicate with
|
machines on different subnets because it does not support routing. It always
|
machines on different subnets because it does not support routing. It always
|
assumes that it can get to an address directly, therefore it always tries
|
assumes that it can get to an address directly, therefore it always tries
|
to ARP and then send packets directly to that unit. This means that whatever
|
to ARP and then send packets directly to that unit. This means that whatever
|
it talks to must be on the same subnet. If you need to talk to a host on a
|
it talks to must be on the same subnet. If you need to talk to a host on a
|
different subnet (even if it's on the same ‘wire’), you need to
|
different subnet (even if it's on the same ‘wire’), you need to
|
go through an ARP proxy, providing that there is a Linux box connected to
|
go through an ARP proxy, providing that there is a Linux box connected to
|
the network which is able to route to the TFTP server. For example: <TT
|
the network which is able to route to the TFTP server. For example: <TT
|
CLASS="FILENAME"
|
CLASS="FILENAME"
|
>/proc/sys/net/ipv4/conf/<TT
|
>/proc/sys/net/ipv4/conf/<TT
|
CLASS="REPLACEABLE"
|
CLASS="REPLACEABLE"
|
><I
|
><I
|
><interface></I
|
><interface></I
|
></TT
|
></TT
|
>/proxy_arp </TT
|
>/proxy_arp </TT
|
>where <TT
|
>where <TT
|
CLASS="REPLACEABLE"
|
CLASS="REPLACEABLE"
|
><I
|
><I
|
><interface></I
|
><interface></I
|
></TT
|
></TT
|
>should be replaced with whichever network interface
|
>should be replaced with whichever network interface
|
is directly connected to the board.</P
|
is directly connected to the board.</P
|
></DIV
|
></DIV
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="SECT2"
|
CLASS="SECT2"
|
><H2
|
><H2
|
CLASS="SECT2"
|
CLASS="SECT2"
|
><A
|
><A
|
NAME="AEN2834">Verification</H2
|
NAME="AEN2834">Verification</H2
|
><P
|
><P
|
>Once your network setup
|
>Once your network setup
|
has been configured, perform simple verification tests as follows: <P
|
has been configured, perform simple verification tests as follows: <P
|
></P
|
></P
|
><UL
|
><UL
|
><LI
|
><LI
|
><P
|
><P
|
>Reboot your system, to enable the setup, and then try to ‘ping’
|
>Reboot your system, to enable the setup, and then try to ‘ping’
|
the target board from a host.</P
|
the target board from a host.</P
|
></LI
|
></LI
|
><LI
|
><LI
|
><P
|
><P
|
>Once communication has been established, try to ping
|
>Once communication has been established, try to ping
|
a host using the RedBoot ping command - both by IP address and hostname.</P
|
a host using the RedBoot ping command - both by IP address and hostname.</P
|
></LI
|
></LI
|
><LI
|
><LI
|
><P
|
><P
|
>Try using the RedBoot load command to download a file
|
>Try using the RedBoot load command to download a file
|
from a host.</P
|
from a host.</P
|
></LI
|
></LI
|
></UL
|
></UL
|
></P
|
></P
|
></DIV
|
></DIV
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="NAVFOOTER"
|
CLASS="NAVFOOTER"
|
><HR
|
><HR
|
ALIGN="LEFT"
|
ALIGN="LEFT"
|
WIDTH="100%"><TABLE
|
WIDTH="100%"><TABLE
|
SUMMARY="Footer navigation table"
|
SUMMARY="Footer navigation table"
|
WIDTH="100%"
|
WIDTH="100%"
|
BORDER="0"
|
BORDER="0"
|
CELLPADDING="0"
|
CELLPADDING="0"
|
CELLSPACING="0"
|
CELLSPACING="0"
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="resource-usage.html"
|
HREF="resource-usage.html"
|
ACCESSKEY="P"
|
ACCESSKEY="P"
|
>Prev</A
|
>Prev</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="34%"
|
WIDTH="34%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="ecos-ref.html"
|
HREF="ecos-ref.html"
|
ACCESSKEY="H"
|
ACCESSKEY="H"
|
>Home</A
|
>Home</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="redboot-commands-and-examples.html"
|
HREF="redboot-commands-and-examples.html"
|
ACCESSKEY="N"
|
ACCESSKEY="N"
|
>Next</A
|
>Next</A
|
></TD
|
></TD
|
></TR
|
></TR
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="top"
|
VALIGN="top"
|
>RedBoot Resource Usage</TD
|
>RedBoot Resource Usage</TD
|
><TD
|
><TD
|
WIDTH="34%"
|
WIDTH="34%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="getting-started-with-redboot.html"
|
HREF="getting-started-with-redboot.html"
|
ACCESSKEY="U"
|
ACCESSKEY="U"
|
>Up</A
|
>Up</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="top"
|
VALIGN="top"
|
>RedBoot Commands and Examples</TD
|
>RedBoot Commands and Examples</TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></DIV
|
></DIV
|
></BODY
|
></BODY
|
></HTML
|
></HTML
|
|
|