Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

problem with netcfg

Posted on 1997-08-27
6
Medium Priority
?
270 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
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
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

 
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 200 total points
ID: 1586314
Ok, then you will not mind giving me the points.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

824 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