Solved

ifconfig

Posted on 1998-12-21
6
1,790 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
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 

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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Suggested Solutions

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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

914 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

19 Experts available now in Live!

Get 1:1 Help Now