Solved

ifconfig

Posted on 1998-12-21
6
1,789 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
6 Comments
 

Accepted Solution

by:
NetDudeFL earned 50 total points
Comment Utility
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
Comment Utility
> 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
Comment Utility
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Expert Comment

by:NetDudeFL
Comment Utility
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
Comment Utility
You also can use linuxconf command to setup your network config needn't to have X-Windows.
Cheers
0
 

Author Comment

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

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

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…
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

771 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