Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ifconfig

Posted on 1998-12-21
6
Medium Priority
?
1,797 Views
Last Modified: 2012-05-04
I loaded RedHat 5.1 v2.0.36 and the only way I can get networking to work is if I manually enter the following two commands:

ifconfig eth0 192.168.1.100
route add -net 192.168.1.0

Without these commands ping produces the following error:

ping sendto: Network is unreachable


What am I missing?
Which configuration file do I need to update?
What commands do I need to add in these files?
0
Comment
Question by:4crash
[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
 

Accepted Solution

by:
NetDudeFL earned 100 total points
ID: 1587956
Edit /etc/sysconfig/network-scripts/ifcfg-eth0 (or whatever device)

DEVICE=eth0
IPADDR=*insert IP address here"
NETMASK=*insert netmask here*
NETWORK=*insert network address here*
BROADCAST=*insert broadcast address here*
GATEWAY=_insert gateway address here*
ONBOOT="yes" = interface will be active at boot time.
       "no"  = interface will NOT be active at boot time.

.If you have X-Windows set up, you can also use RH's "Network Configurator" (/usr/bin/netcfg) which actually writes to these files.

Additionally, after editing the file, do a "ifup eth0" to activate it and ifdown eth0 to deactivate it.

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1587957
> ping sendto: Network is unreachable
usually just misse your route command

I'm not used to RedHat, but you either should have a configuration file somewhere in /etc
wher the interface eth0 is specified. Ifconfig eth0 ... usually adds the netroute automatically (seems not to be for RedHat):
If you can not find such a file check the rc startup files in /etc.

(leaving a step-by-step answer to a RedHat expert:)
0
 

Author Comment

by:4crash
ID: 1587958
I checked my ifcfg-eth0 file and it is correct. lo (loopback) is enabled during bootup but eth0 is not.  Once booted, "ifup eth0" does enable eth0. However it takes about 45 seconds for "ifup eth0" to return "search localdoman" to the command line and provide network funcionality.  Should "ifup eth0" be inserted in a config file?
0
Not sure which OpenStack Certification to get?

So you’ve realized you might want to get certified in OpenStack, but you’re not sure what the benefits might be or even which one you should take. You know there are several certification courses you can choose from, but how do you know which one is right for you?

 

Expert Comment

by:NetDudeFL
ID: 1587959
The "onboot=yes" in /etc/sysconfig/network-scripts/ifcfg-eth0 will indicate that it is done at bootup, it is not needed to be manually inserted.  The 45 second delay is odd.  You don't have a 3Com 3C905TX in that box by chance, do you?
0
 
LVL 3

Expert Comment

by:hnminh
ID: 1587960
You also can use linuxconf command to setup your network config needn't to have X-Windows.
Cheers
0
 

Author Comment

by:4crash
ID: 1587961
dmesg shows:
eth0: 3Com 3c589, port 0x300, irq 3, Auto Port, hw_addr 00:00:86:19:AE:CB

However ifconfig still just lists "lo" until I run ifup eth0.
After running ifup eth0 ifconfig lists "lo" and "eth0". I checked again and ONBOOT=yes.

Also, I am using a 3CXEM556 pc card.
0

Featured Post

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
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…

719 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