Text Based Network Configuration

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: David Mandala
Date:  
Subject: Text Based Network Configuration
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C17F64.B12E4020
Content-Type: text/plain;
    charset="iso-8859-1"


Not sure where there is documentation on this (though I'm sure there is a
howto somewhere). But for informational purposes I'll give it a try.

For general Redhat systems (also mostly correct for Mandrake):
File                General info                more
info
/etc/resolv.conf    -> list your nameservers one per line     man
resolv.conf
/etc/hosts        -> list of hostname to ip resolution    man hosts


The rest of these files appear to be redhat specific for the most part


/etc/sysconf/static-routes
/etc/sysconf/static-routes-ipv6
The above files store static routes that are to be loaded at startup, sorry
it's been a while and I don't remember the file format but you can read the
file "/etc/sysconf/network-scripts/ifup and figure it out for both if
needed.


etc/sysconf/network
This file contains several entries necessary for configuration of networking
one entry per line in a tag=value format. blank lines appear to be ok, # is
a comment and comments to the end of the line.

In my network configuration I have 3 entries NETWORKING, HOSTNAME, and
FORWARD_IPV4.

NETWORKING=yes  # appears to have two values yes and no. no turns off
external netowrking
HOSTNAME=CX868974-C # is assigned my you to condifure the hostname, 
                    # if not assigned and using dhcp for network info 
                    # the hostname can be assigned bu dhcp
FORWARD_IPV4=false  # appears to have two values true and false. If the
boxen has two or more
                    # interfaces true configures as a router and will
forward packets 
                    # inbetween interfaces. Should read the router howto for
more information.
FORWARD_IPV6=false  # same as IPV4 but for ip version 6, make sure your
kernel is configured for this.


/etc/sysconf/network-scripts/ifcfg-lo -> configures the 127.0.0.1 interface
/etc/sysconf/network-scripts/ifcfg-eth0 -> configures the first ethernet
interface
/etc/sysconf/network-scripts/ifcfg-eth0:0 -> configures the first ethernet
alias on the first ethernet interface
/etc/sysconf/network-scripts/ifcfg-eth1 -> configures the second ethernet
interface
/etc/sysconf/network-scripts/ifcfg-eth1:0 -> configures the second ethernet
alias on the second ethernet interface

The content of the files are very simular, they use a tag=value format.

DEVICE=eth0 # the physcial device name MUST EXIST and must match the base
name of the file!
BOOTPROTO=dhcp # the boot protocol to be used if any, dhcp, bootp, none
ONBOOT=yes # is this device to be activated upon booting the system
BROADCAST=127.255.255.255 # the broadcast address for the interface
NAME=loopback # the name assigned to the interface
IPADDR=127.0.0.1 # the ip address to be assigned to this interface if not
using a boot protocol
NETMASK=255.0.0.0 # the mask assigned to this interface, only assigned if
not using a boot protocol
NETWORK=127.0.0.0 # the network the interface is in, only assigned if not
using a boot protocol


/etc/sysconf/network-scripts/ifup
/etc/sysconf/network-scripts/ifdown

These files are used to bring up and down the interfaces. ifup eth0 or
ifdown eth0

Hope this helps

> -----Original Message-----
> From: Simper, Brian D [mailto:brian.d.simper@intel.com]
> Sent: Friday, December 07, 2001 1:10 PM
> To: ''
> Subject: Text Based Network Configuration
>
>
>
> I am looking for command line or text based network
> configuration tools. As
> you may be aware, Red Hat does not include linuxconf or
> netconf with RH 7.1
> or 7.2. Admittedly, using this venerable tool could cause
> problems but
> netconf was functional once you got past the quirks.
>
> The new graphical tools are OK, but I don't always have access to the
> console and sometimes I want to build a server without a GUI.
> So how do you
> make changes to the network with text only tools? Is there a complete
> reference showing exactly which configuration files you can
> manually edit
> and which services to manually start to get the network configured?
>
> Thanks,
>
> Brian
> ________________________________________________
> See http://PLUG.phoenix.az.us/navigator-mail.shtml if your
> mail doesn't post to the list quickly and you use Netscape to
> write mail.
>
> PLUG-discuss mailing list -
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>


------_=_NextPart_001_01C17F64.B12E4020
Content-Type: text/html;
    charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: Text Based Network Configuration</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Not sure where there is documentation on this (though =
I'm sure there is a howto somewhere). But for informational purposes =
I'll give it a try.</FONT></P>

<P><FONT SIZE=3D2>For general Redhat systems (also mostly correct for =
Mandrake):</FONT>
<BR><FONT SIZE=3D2>File&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; General =
info&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; more info</FONT>
<BR><FONT =
SIZE=3D2>/etc/resolv.conf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
-&gt; list your nameservers one per line &nbsp; man resolv.conf</FONT>
<BR><FONT SIZE=3D2>/etc/hosts&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&gt; list of hostname to ip =
resolution&nbsp;&nbsp;&nbsp; man hosts</FONT>
</P>

<P><FONT SIZE=3D2>The rest of these files appear to be redhat specific =
for the most part</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>/etc/sysconf/static-routes</FONT>
<BR><FONT SIZE=3D2>/etc/sysconf/static-routes-ipv6</FONT>
<BR><FONT SIZE=3D2>The above files store static routes that are to be =
loaded at startup, sorry it's been a while and I don't remember the =
file format but you can read the file =
&quot;/etc/sysconf/network-scripts/ifup and figure it out for both if =
needed.</FONT></P>
<BR>

<P><FONT SIZE=3D2>etc/sysconf/network</FONT>
<BR><FONT SIZE=3D2>This file contains several entries necessary for =
configuration of networking one entry per line in a tag=3Dvalue format. =
blank lines appear to be ok, # is a comment and comments to the end of =
the line.</FONT></P>

<P><FONT SIZE=3D2>In my network configuration I have 3 entries =
NETWORKING, HOSTNAME, and FORWARD_IPV4.</FONT>
</P>

<P><FONT SIZE=3D2>NETWORKING=3Dyes&nbsp; # appears to have two values =
yes and no. no turns off external netowrking</FONT>
<BR><FONT SIZE=3D2>HOSTNAME=3DCX868974-C # is assigned my you to =
condifure the hostname, </FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # if not assigned =
and using dhcp for network info </FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # the hostname can =
be assigned bu dhcp</FONT>
<BR><FONT SIZE=3D2>FORWARD_IPV4=3Dfalse&nbsp; # appears to have two =
values true and false. If the boxen has two or more</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # interfaces true =
configures as a router and will forward packets </FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # inbetween =
interfaces. Should read the router howto for more information.</FONT>
<BR><FONT SIZE=3D2>FORWARD_IPV6=3Dfalse&nbsp; # same as IPV4 but for ip =
version 6, make sure your kernel is configured for this.</FONT>
</P>

<P><FONT SIZE=3D2>/etc/sysconf/network-scripts/ifcfg-lo -&gt; =
configures the 127.0.0.1 interface</FONT>
<BR><FONT SIZE=3D2>/etc/sysconf/network-scripts/ifcfg-eth0 -&gt; =
configures the first ethernet interface</FONT>
<BR><FONT SIZE=3D2>/etc/sysconf/network-scripts/ifcfg-eth0:0 -&gt; =
configures the first ethernet alias on the first ethernet =
interface</FONT>
<BR><FONT SIZE=3D2>/etc/sysconf/network-scripts/ifcfg-eth1 -&gt; =
configures the second ethernet interface</FONT>
<BR><FONT SIZE=3D2>/etc/sysconf/network-scripts/ifcfg-eth1:0 -&gt; =
configures the second ethernet alias on the second ethernet =
interface</FONT>
</P>

<P><FONT SIZE=3D2>The content of the files are very simular, they use a =
tag=3Dvalue format.</FONT>
</P>

<P><FONT SIZE=3D2>DEVICE=3Deth0 # the physcial device name MUST EXIST =
and must match the base name of the file!</FONT>
<BR><FONT SIZE=3D2>BOOTPROTO=3Ddhcp # the boot protocol to be used if =
any, dhcp, bootp, none</FONT>
<BR><FONT SIZE=3D2>ONBOOT=3Dyes # is this device to be activated upon =
booting the system</FONT>
<BR><FONT SIZE=3D2>BROADCAST=3D127.255.255.255 # the broadcast address =
for the interface</FONT>
<BR><FONT SIZE=3D2>NAME=3Dloopback # the name assigned to the =
interface</FONT>
<BR><FONT SIZE=3D2>IPADDR=3D127.0.0.1 # the ip address to be assigned =
to this interface if not using a boot protocol</FONT>
<BR><FONT SIZE=3D2>NETMASK=3D255.0.0.0 # the mask assigned to this =
interface, only assigned if not using a boot protocol</FONT>
<BR><FONT SIZE=3D2>NETWORK=3D127.0.0.0 # the network the interface is =
in, only assigned if not using a boot protocol</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>/etc/sysconf/network-scripts/ifup</FONT>
<BR><FONT SIZE=3D2>/etc/sysconf/network-scripts/ifdown</FONT>
</P>

<P><FONT SIZE=3D2>These files are used to bring up and down the =
interfaces. ifup eth0 or ifdown eth0</FONT>
</P>

<P><FONT SIZE=3D2>Hope this helps</FONT>
</P>

<P><FONT SIZE=3D2>&gt; -----Original Message-----</FONT>
<BR><FONT SIZE=3D2>&gt; From: Simper, Brian D [<A =
HREF=3D"mailto:brian.d.simper@intel.com">mailto:brian.d.simper@intel.com=
</A>]</FONT>
<BR><FONT SIZE=3D2>&gt; Sent: Friday, December 07, 2001 1:10 PM</FONT>
<BR><FONT SIZE=3D2>&gt; To: =
''</FONT>
<BR><FONT SIZE=3D2>&gt; Subject: Text Based Network =
Configuration</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; I am looking for command line or text based =
network </FONT>
<BR><FONT SIZE=3D2>&gt; configuration tools.&nbsp; As</FONT>
<BR><FONT SIZE=3D2>&gt; you may be aware, Red Hat does not include =
linuxconf or </FONT>
<BR><FONT SIZE=3D2>&gt; netconf with RH 7.1</FONT>
<BR><FONT SIZE=3D2>&gt; or 7.2.&nbsp; Admittedly, using this venerable =
tool could cause </FONT>
<BR><FONT SIZE=3D2>&gt; problems but</FONT>
<BR><FONT SIZE=3D2>&gt; netconf was functional once you got past the =
quirks.&nbsp; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; The new graphical tools are OK, but I don't =
always have access to the</FONT>
<BR><FONT SIZE=3D2>&gt; console and sometimes I want to build a server =
without a GUI. </FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp; So how do you</FONT>
<BR><FONT SIZE=3D2>&gt; make changes to the network with text only =
tools?&nbsp; Is there a complete</FONT>
<BR><FONT SIZE=3D2>&gt; reference showing exactly which configuration =
files you can </FONT>
<BR><FONT SIZE=3D2>&gt; manually edit</FONT>
<BR><FONT SIZE=3D2>&gt; and which services to manually start to get the =
network configured?</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Thanks,</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Brian</FONT>
<BR><FONT SIZE=3D2>&gt; =
________________________________________________</FONT>
<BR><FONT SIZE=3D2>&gt; See <A =
HREF=3D"http://PLUG.phoenix.az.us/navigator-mail.shtml" =
TARGET=3D"_blank">http://PLUG.phoenix.az.us/navigator-mail.shtml</A> if =
your </FONT>
<BR><FONT SIZE=3D2>&gt; mail doesn't post to the list quickly and you =
use Netscape to </FONT>
<BR><FONT SIZE=3D2>&gt; write mail.</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; PLUG-discuss mailing list&nbsp; -&nbsp; =
</FONT>
<BR><FONT SIZE=3D2>&gt; <A =
HREF=3D"http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss" =
TARGET=3D"_blank">http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-=
discuss</A></FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C17F64.B12E4020--