Solved

problem with netcfg

Posted on 1997-08-27
6
215 Views
Last Modified: 2010-03-18
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?
0
Comment
Question by:Pakman
6 Comments
 
LVL 3

Expert Comment

by:sauron
Comment Utility
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
 

Author Comment

by:Pakman
Comment Utility
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
 

Expert Comment

by:saliya
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 2

Expert Comment

by:n3mtr
Comment Utility
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
 

Author Comment

by:Pakman
Comment Utility
Its ok, I reinstalled them. Works now. Thanks.
0
 
LVL 2

Accepted Solution

by:
n3mtr earned 100 total points
Comment Utility
Ok, then you will not mind giving me the points.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now