-----Original Message-----
From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Friday, September 29, 2000 2:46 AM
Subject: How to add an eth0 or PPP interface without X running


>
> hi,
>
> can anybody help me to add an interface to my
> linux box, with a tool that doesn't require
> X be running.
> i.e i want to do it at the console itself.
> or are there any files that i can edit, and
> insert this info of the new interface.

There is linuxconf... but it can be a bit unreliable.  Editing the files
will work, but you need to be careful with it.  I'll try and give you a few
examples of the files you will need to have and edit.  Go to
/etc/sysconfig/network-scripts/ and do an ls.  You will see a few files like
this:

[root@Server network-scripts]# ls
ifcfg-eth0  ifdown-post  ifup          ifup-plip  ifup-routes
ifcfg-lo    ifdown-ppp   ifup-aliases  ifup-post  ifup-sl
ifdown      ifdown-sl    ifup-ipx      ifup-ppp   network-functions
[root@Server network-scripts]#

If you don't have some of these, don't worry.  They only exist if your
system is already using those interfaces.  I'll go on and put the contents
of my ifcfg-eth0 here for you:

[root@Server network-scripts]# cat ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
BROADCAST=10.0.0.255
IPADDR=10.0.0.11
NETMASK=255.255.255.0
NETWORK=10.0.0.0
ONBOOT=yes
[root@Server network-scripts]#

If you replace the ip address and mask with what you want to use, this file
should work fine.  Just create a file with the same name and put in the
values you need.  A file named ifcfg-eth1 would define eth1, if you put in a
second NIC.  You will also need to edit /etc/sysconfig/network to make use
of eth0.  Here is mine:

[root@Sandy sysconfig]# cat network
NETWORKING=yes
FORWARD_IPV4=yes
HOSTNAME=Server.Kendilson.com
DOMAINNAME=Kendilson.com
GATEWAY=10.0.0.254
GATEWAYDEV=eth0
[root@Sandy sysconfig]#

You will need to edit this one to use your ip address of choice, as well as
the gateway or lack thereof you wish to have.  I use ipchains to firewall
and masquerade our internal network so we can access the internet from
behind the firewalling machine.  If you get hooked up to the net, you
probably should give ipchains a look too :)  To get all these changes to
take effect, you can reboot or type /etc/rc.d/init.d/network restart.

>From a different machine with a modem installed and defined here is the file
ifcfg-ppp0:

[root@Sandy network-scripts]# cat ifcfg-ppp0
PERSIST=yes
DEFROUTE=yes
ONBOOT=no
INITSTRING=ATZ
MODEMPORT=/dev/modem
LINESPEED=115200
ESCAPECHARS=no
DEFABORT=yes
HARDFLOWCTL=yes
DEVICE=ppp0
PPPOPTIONS='defaultroute noipdefault '
DEBUG=yes
PAPNAME=tasha
REMIP=
IPADDR=
BOOTPROTO=none
MTU=
MRU=
DISCONNECTTIMEOUT=
RETRYTIMEOUT=
USERCTL=yes
[root@Sandy network-scripts]#

You can see this file contains some of the same things that ifcfg-eth0 did,
but has quite a few more added in.  You could use this file as well, though
you might need to change some of the settings here.  Unfortunately,
ifcfg-ppp0 is not all you need to use a modem in linux.  You also need to
make a sym link from /dev/ttyS0 to /dev/modem, if you modem is on what dos
would call com1,  It could also be on /dev/ttyS1-S3.  Depends on how the
jumpers are set, or where you connect an external modem to.  Beyond this,
you would need a chat script to make a connection to an ISP.  That tends to
vary too much for my files to make any sense, so just check out man chat.
The HOWTO's are  a good place to go for examples on this too.  For the sym
link I think something like ln -s /dev/ttyS0 /dev/modem will do the job.
It's been a while since I needed to sym link anything, so check the man page
for the syntax.  If you want more details, just ask, or read up on the ppp
howto and the networking howto.  They are on the CD and probably got
installed on your system under /usr/doc/HOWTO.  Good luck.

Jeff Hogg




_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to