Solved

Setting up tcp/ip for RedHat 4.1 and kernel 2.0.27

Posted on 1997-08-04
8
355 Views
Last Modified: 2013-12-15
This one should be easy for you wizards, but it seems to elude me.  I have installed RedHat 4.1 and updated the kernel to 2.0.27.  The kernel was built with networking turned on as per instructions.  I followed all the instructions in the kernel and Net-2/3 HOWTO files to the letter, but I am still unable to perform any net operations beyond pinging localhost.

When I try to ping or telnet to my own machine (which I have called jeh.linux.org), I get a message saying that the node is unreachable; this is the same message I get if I use DIP to try to establish a PPP connection to another host, so I am assuming that I have something set up wrong amongst all the /etc files.  Ifconfig and route show only the local loopback.

My system is about as uncomplicated as you can get, networkwise.  I have no Ethernet, and have enabled only TCP/IP in the kernel build (not IPX, Appletalk, ISDN, etc. etc).  All I really need to do is to be able to establish PPP connections to my ISP (a university) and my employer, all of which I was able to do on Slackware 2.3 before I upgraded to RedHat 4.1.

What I would like is a succinct, step-by-nauseous-step guide to setting up the essential files to make this trivial setup work.  What kernel build options do I need?  Which /etc (and other) files need to contain what information about my system, routes, servers, gateways, networks, etc?  Do I need to run any daemons besides inetd?  

Thanks

Justin Harlow
harlow@src.org
(919)941-9464
0
Comment
Question by:harlow
8 Comments
 
LVL 1

Expert Comment

by:MikeCrist
ID: 1629053
First off, jeh.linux.org will only work if your computer is registered in the linux.org domain and in their name server.  I have tried to ping it, and so far it doesn't exist.  So you can't use that name.

Second, you have to make sure the kernel recognizes your NIC.  If you have it compiled as a module, you should change /etc/con.modules to be (for a 3Com 3c5x9):

alias eth0 3c5x9
options 3c5x9 io=0x300 (or irq=, whichever you know)

(and for an NE2000)

alias eth0 ne2000
options ne2000 io=0x300 (or irq=, whichever you know)

It all depends on your NIC.  If you don't have it as a module, you can still have it probe for the NIC in lilo.conf.  In lilo.conf, you want to have something similar to this:

prompt
timeout=20
append="ether=0,0x300,eth0"
image=/dev....

The append statement is what you need.  You can put the append statement either before all the images (to have it appened for all kernels) or one in each image section (to initialize a different NIC based on kernel).

Once the kernel has detected the NIC, it then runs /etc/sysconfig/network-scripts/ifup ifcfg-eth0.  ifcfg-eth0 is the file to change if you want to change your IP address, netmask, or broadcast address.  If this is not setup properly, you will not have the interface available.  Read ifup for details on what it does (ifconfig 207.111.222.233 netmask broadcast eth0)


Now.  Since you don't have any network cards, most of the stuff above doesn't matter.  But when you do get one, if will be vital.

As for ppp, the first thing you have to do is change the name of your computer.  As noted above, jeh.linux.org doesn't exist in the linux.org domain.  So what you need to do is ping your assigned ip address once connected.

CONNECT 115200
Your IP address is : 11.122.233.34
[root@jeh /root]# ping 11.122.233.34
PING 11.122.233.34 (11.122.233.34): 56 data bytes
64 bytes from 11.122.233.34: icmp_seq=0 ttl=128 time=0.5 ms
64 bytes from 11.122.233.34: icmp_seq=1 ttl=128 time=0.5 ms
64 bytes from 11.122.233.34: icmp_seq=2 ttl=128 time=0.5 ms
64 bytes from 11.122.233.34: icmp_seq=3 ttl=128 time=0.5 ms
^C
--- 11.122.233.34 ping statistics ---
4 packets transmited,  4 packets recieved, 0% packet loss
round-trip min/ave/max = 0.5/0.5/0.5 ms
[root@jeh /root]#

Now you have your ip address.  As for looking it up, you could try a dnsquery with some of the options, or you could do a traceroute to find out the name.

As for the files in /etc that pertain to networking, there are several to look at:
/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-eth0 (ifcfg-eth1, ifcfg-eth2, whatever)

/etc/hosts.equiv (computers you trust)
/etc/hosts.allow (if you have anything in here, everything not in here will be denied access)

/etc/hosts.deny (if you have a name in here, it will be denied, everything else allowed)

/etc/inetd.conf (how services run depending on port #)
/etc/services (which services your computer knows about, needed for inetd.conf)

/etc/protocols (ip protocols allowed by this computer)

And thats about it.

Mike Crist
mike@mwaz.com
0
 

Author Comment

by:harlow
ID: 1629054
I probably haven't made my situation completely clear, so let me embellish it a bit:

1. I do not have any LAN hardware at all.  However, I will hang onto your instructions for the future; thanks!

2. The reason I assigned the name jeh.linux.org was (perhaps) a misreading of the HOWTOs.  The Net 2/3 and DiP/SLiRP/SLiP HOWTOs both say to use the domain name linux.org as a dummy, if you don't have a "real" one, and they give an IP address to use (I am at the office and don't recall what it is).  They say to put <hostname>.linux.org in /etc/hosts and various places, so that is what I did.  From what you say, I suspect that this is not the right thing to do....

3. I do understand how a temporary IP address is assigned by the PPP server.  I never get that far, however.  I use DIP and a script which used to work under Slackware 2.3 to dial my university; when DIP returns control to the command line, I type <ifconfig> immediately, but see only the loopback, indicating that a PPP connection was never negotiated.  DIP aborts itself after about 30 seconds, presumably because the remote server gave up.

Let's say, for a "reductio ad absurdam" example, that I have no LAN, no desire to do PPP connections, and all I want to do in life is telnet to my own host (this does not currently work; it says jeh.linux.org is unreachable).  What should I use for host and domain names?  What files have to be set up to minimally specify this configuration?  

Now suppose I decide I would like to do a PPP connection after all; does anything in my setup have to change?  What files do I need to modify or define?  Do I even need a domain name defined for my system, since PPP is going to assign me a full IP address at connect time?

I hope this clarifies the question a bit.  Thanks!

JEH

0
 
LVL 1

Expert Comment

by:MikeCrist
ID: 1629055
For just plain telnet into your box, all you should need is a line in hosts saying:

198.123.0.5  jeh.linux.org

I think it's 198, might be 192 also.  But you put in your ipaddress then your hostname.  hosts is a list of computers your computer knows about.  Also, in resolv.conf you need to take out your name servers lines.  This will get your one computer talking to itself.  You can also try telnetting in through the lo interface (127.0.0.anything).

-------------PPP changes---------------------
As for ppp, what you'll need to do is put the proper name server addresses in resolv.conf.  You will also need to change your computers name since it is not valid on the net.  You then have to take out the IP address you assigned, as it too is not valid on the net.  I think the reason you can't connect is your computer is requesting a 198 number from the server, and the server denies it.  As for more specific ppp setup, I don't know but could look it up.

Mike Crist
mike@mwaz.com
0
 

Author Comment

by:harlow
ID: 1629056
I can't seem to get this thing to work.  I have followed all the FAQs and HOWTOs, plus the suggestions supplied by the Experts here, but something is still wrong.  I suspect that it is something so simple and so trivial that we are all overlooking it.  Basically, all I am trying to do is install a clean, new system with no LAN, but working tcp/ip capability via PPP connections.  I don't have a permanently assigned IP address or domain name, but clearly all the various /etc files want me to specify one (or at least a benign "made-up" one).

None of the guides and info sources seem to have a step by step procedure to assure that all the right stuff is where it belongs and all the right defaults are set up right in such a simple configuration; they all assume you are on a LAN or have been given a valid IP address and domain by some Higher Authority.  I'm just a poor standalone PC at home, guys.  Where do I find the step-by-step for this simplest of all cases?

JEH
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 2

Expert Comment

by:aleshka
ID: 1629057
Could you send an output of ifconfig and route programs.
0
 
LVL 4

Expert Comment

by:jlms
ID: 1629058
Did you include:
PPP support in your kernel?
SLIP support? (needed for dip even if you use PPP).
0
 
LVL 4

Accepted Solution

by:
unicorntech earned 50 total points
ID: 1629059
I think that you should also set up named to run and act as your own primary. For detailed instructions see the DNS HOW-TO and this will run you through it....

Jason
0
 

Author Comment

by:harlow
ID: 1629060
I think I am running OK, by a combination of all the hints you kind folks have sent me, plus some good old fashioned cut and try.  

One interesting, lingering question is about the domain name for my box.  It seems that all the various configuration files insist that I have to have a domain name, even though in reality I do not.  I will always be assigned a temporary IP address when I log in via PPP to my ISPs, but I still have to assign a nonexistent domain name to "feed the beast" here.  Any outgoing mail I send shows that domain as the origination point of the message, which seems like a bad idea.  Of course I set my reply-to address to something valid, but I am still wondering if there is another way...
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

747 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

13 Experts available now in Live!

Get 1:1 Help Now