Solved

problem with netcfg

Posted on 1997-08-27
6
241 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 3

Expert Comment

by:sauron
ID: 1586309
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
ID: 1586310
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
ID: 1586311
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
Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

 
LVL 2

Expert Comment

by:n3mtr
ID: 1586312
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
ID: 1586313
Its ok, I reinstalled them. Works now. Thanks.
0
 
LVL 2

Accepted Solution

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

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
FTP: Servname not supported for ai_socktype 7 1,154
IPA - change main server? 3 183
How does the STUN server helps discover the device public ip address 4 92
High Bandwidth Usage 6 125
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

739 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