[NMLUG] nic conf from command line

Jason Davis nmlug@swcp.com
Mon, 19 Nov 2001 16:11:40 -0700


thanks for the help
/etc/sysconfig/network-scripts/ifcfg-ethN was where i needed to be
jd










On Tuesday 20 November 2001 04:00 pm, you wrote:
> On Tue, Nov 20, 2001 at 03:29:39PM -0700, Eric Krieger wrote:
> > On Mon, 2001-11-19 at 15:24, Jason Davis wrote:
> > > hi,
> > > dumb question.....in rh 7.1 from the command line, where do i set up
> > > the ip's of my nics. i used the setup command but it only allows
> > > me to configure eth0, i need to conf. eth1....this is my first box
> > > without x.
>
> On a Red Hat box, NIC configuration occurs in the files
>
> /etc/sysconfig/network
>
> and
>
> /etc/sysconfig/network-scripts/ifcfg-ethN
>
> where ifcfg-ethN is the config file for card ethN (e.g. for eth0, edit
> the file ifcfg-eth0).
>
> You might now be lacking an ifcfg-eth1 file; here's a good one to start
> with (compare with ifcfg-eth0, which you probably already have):
>
> -- cut here --
>
> # /etc/sysconfig/network-scripts/ifcfg-eth1
>
> DEVICE=eth1
> ONBOOT=yes
> BOOTPROTO=none
> USERCTL=no
> IPADDR=[put desired IP address here]
> NETMASK=255.255.255.0
>
> -- end cut --
>
> To use DHCP, change the BOOTPROTO line to
>
> BOOTPROTO=dhcp
>
> and you don't need the IPADDR or the NETMASK lines (definitely won't
> need the IPADDR line, whether or not NETMASK is needed depends on how
> the DHCP server is configured, usually the NETMASK line is not needed).
>
> That should be enough to get you going.  Once that file is in place,
> and assuming you have support for the NIC as a module or built in to
> the kernel (note that to use *two* of the same NIC, you will have to
> use modules, rather than built in support), you can do
>
> ifup eth0
>
> as root.
>
> Regards,
> Gary S.
> ------------------------------------------------------
> To UNSUBSCRIBE send a message to nmlug-request@swcp.com
> with only the word unsubscribe in the body.  More
> information can be found at www.nmlug.org/info.html
> -----------------------------------------------------
------------------------------------------------------
To UNSUBSCRIBE send a message to nmlug-request@swcp.com
with only the word unsubscribe in the body.  More
information can be found at www.nmlug.org/info.html
-----------------------------------------------------