Solved

ifconfig

Posted on 1998-12-21
6
1,794 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
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
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 

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

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MySql client tunnel through intermediate host 5 90
ovirt web management page 1 87
Help with Ubuntu 14.04 LTS 10 139
IPA - how do I choose who can log into which servers? 1 82
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

685 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