problem with netcfg

I'm running Red Hat 4.1 and I need to connect my machine to
the the Internet via Ethernet and specify a permanent IP address. So I ran netcfg (from the Control Panel), made some changes, bur it didn't work. The next time I ran netcfg, and ever since, the following happens:
------------------------------------------------------------
[root@hoodbu /root]# netcfg
Red Hat Linux netcfg 2.13
Copyright (C) 1996 Red Hat Software
Redistributable under the terms of the GNU General Public License
Traceback (innermost last):
  File "/usr/lib/rhs/netcfg/netcfg.py", line 1567, in ?
    win = WindowFrame(Toplevel())
  File "/usr/lib/rhs/netcfg/netcfg.py", line 1535, in __init__
    self.G = GV()
  File "/usr/lib/rhs/netcfg/netcfg.py", line 94, in __init__
    self.ESStaticRoutes = ConfESStaticRoutes()
  File "/usr/lib/rhs/python/Conf.py", line 443, in __init__
    Conf.__init__(self, '/etc/sysconfig/static-routes', '#', '\t ', ' ')
  File "/usr/lib/rhs/python/Conf.py", line 110, in __init__
    self.read()
  File "/usr/lib/rhs/python/Conf.py", line 446, in read
    self.initvars()
  File "/usr/lib/rhs/python/Conf.py", line 455, in initvars
    self.vars[var[0]].append([var[2], var[4], var[6]])
KeyError:
[root@hoodbu /root]#
------------------------------------------------------------
How do I get past this and run netcfg so that I can at least view the settings before I can change them?
PakmanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sauronCommented:
Netcfg is a Python app, and I've never used it, so I can't really help you directly with it.

To see your current IP address, run ifconfig. Look at the details for eth0 - this will have your IP address, broadcast address, and netmask specified.
Doing a route -n will show you the current state of the routing table.

To change your IP address etc, you need to do a few things.

Look at /etc/sysconfig/network - in here you set the host name, default gateway, and gateway device. Your gateway device should probably be eth0 (if there's a router on your network), and the gateway IP is the address of the router.

Then, look at /etc/sysconfig/network-scripts/ifcfg-eth0

Here you need to set the IP address, Network address, Broadcast address, and subnet mask for the eth0 adapter.

When you've done all this, do

/etc/rc.d/init.d/network stop, followed by:-
/etc/rc.d/init.d/network start

and you should have your new IP address, and routing table sorted out. You don't even have to reboot. Isn't Linux wonderful ;-)


0
PakmanAuthor Commented:
That didn't help at all. I know enough of networking. What I'm having difficulty in running netcfg on Red Hat 4.1. I still get that error message. Now I can modify /etc/sysconfig/network to change the gateway device, but there is no /etc/sysconfig/network-scripts/ifcfg-eth0 on my system. Also, ifconfig and route are not available (no command for them). I'm increasing the value of this question, so I'd like a pretty decent answer.
0
saliyaCommented:
Try running /sbin/route and /sbin/ifconfig since they may not be in your path (but are definitely there in RedHat 4-1 with Networking enabled).

Check your system logfiles since the error messages you list don't make much sense on their own. It looks like it is having trouble parsing your existing configuration files, so removing them and restarting may be the only solution...
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

n3mtrCommented:
Check your netcfg, and python packages:
rpm -V netcfg
rpm -V python
rpm -V pythonlib
if any of them report errors reinstall them.

It could also be corrupt config files that is causing the problem.(at least netcfg thinks they are) Sometimes these redhat programs don't like it if we edit them by hand.
0
PakmanAuthor Commented:
Its ok, I reinstalled them. Works now. Thanks.
0
n3mtrCommented:
Ok, then you will not mind giving me the points.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.