Link to home
Start Free TrialLog in
Avatar of qiang8
qiang8

asked on

How to configure PC as a server?

Pls bear in mind that I 've no experience in networking...Pls advise.

I wish to setup my linux based PC as a server to my local user group for about 20 users. I have a 3COM NIC, an IP and Hostname given to me by the network administrator.

Pls show me how to install and configure the network card so that my PC can go online so that I can use the netscape navigator to surf net. Can I check the network connection using "ping" command.

And also Recommend me a good site/HOWTO page regarding how to start up a local network from an existing network especially for a novice user as I have browse thru some but rather complicated to understand.

Thanks a lot.
Avatar of rwenzla
rwenzla

We'll need to know what distribution and kernel for specific answers.

If its a modular kernel, (Most are) then inserting:

/sbin/modprobe ne io=0xYYY,irq=Z

into your start up sequence (I use /etc/rc.d/rc.local ) is your firs step.  (replace YYY and Z with the IO address and IRQ of your card.)  If its a PCI network card, then you don't need the 2 parameters.  They will be probed.
Avatar of qiang8

ASKER

Red Hat 6.0.  
Avatar of qiang8

ASKER

I have included "/sbin/modprobe ne" in the /etc/rc.d/rc.local file and restart the machine. How do I know whether the network card ( PCI device ) is successfully detected? IRQ=11, how shall I know the I/O address? I can't find it from my compaq machine setup.

Next, shall I mount the device and how shall I going to do this? I was given a Hostname and IP Address by the system administrator plus the following:
IP broadcast Address
IP netmask                    
Router address              
Domain Name Server Address    

Why this error occur when shutting down:
Sutting down http               [Failed]

Why this error occur when booting up:
Cannot determine local host name[Failed]
Use the server name directive to set it manually.

Contents that added in /etc/hosts:
127.0.0.1    localhost loopback
10.160.169.1  hostname

Pls advise further and thanks.
Sorry I cut the previous answer too short.  Something came up and I only had time to hit "submit".

The boot time error occured because your machine was trying to do a DNS search for it's name, but you haven't finished configuring the network yet.  The shut down probablt failed because the start up failed (you can't shut it down if it didn't start, right?).

If it scrolls by too fast at boot, you can review the boot messages with 'dmesg | more".  The dmesg should tell you if the card was detected properly.

Ethernet devices don't need to be mounted per se.  They need to be brought 'up'.  Use the 'ifconfig' (InterFace) command.  

RedHat comes with script that take care of the parameters.
'ifup' and 'ifdown'

/sbin/ifup eth0

if you want the interface up by default, place the above command after the modprobe in your rc.local. (You don't need to reboot, just type the command at the command line, then add it to the file so it will happen next time you boot.  Knowing Linux, that could be years from now. . . ) (Actually you can use the tool 'netcfg' below for that, too.)

To check the status of all interfaces (at any time) use the 'ifconfig' command with no parameters.  

Once the ethernet is up, RedHat has a wonderful tool called
'netcfg'.  It gives you a GUI interface to enter the info your NetAdmin gave you.  It runs without X, too, using the screen graphics library.  One quirk, though.  You can't log in as a user, open a xterm, and 'su' to root.  netcfg will detect X, but X won't allow even root to access a users graphics screen.  Log in as root.

Click on the "names" button, type in the hostname and domain you were given. Also add your IP entries for nameservers here.

Click on "hosts" and add the name/IP pair of common local net machines (assuming they are static and won't change).
A minimum should be any machine you need for escential boot services.

Click on "interfaces", add eth0, entering the IP you were given.

Routing is probably the trickiest part.  you have to understand IP addresses and netmasks.  A routeing table is a set of rules that say what packes goto what interface.  To do a detailed routng table, I'd need to know the topology of your network.  But assuming it's simple, I'll guess you have 1 local ethernet (that uses eth0) and the Router Address is the gateway to the rest of the Internet.

Routing tables start specific and end in General routes.
The last entry is the default route, and all packets that don't match any other rule go to that interface.  For you, I believe this is the Router IP you were given.

Start with entering this in the Default Gateway IP box.  You only have one interface (right?) so enter eth0 as the gateway device.

Next you need to 'add' a route to your local net. (The gateway doesn't need to be used for the machines already on your local net.  The netmask you were given defines what addresses are on your local net.  Where there are binary ones in the mask, the digits must match your IP.  Where there are zeros, it doesn't.  If the netmask you were given was 255.255.255.0, and your IP was 10.23.45.87, it means all the IP's from 10.23.45.1 through 10.23.45.254 are considered part of your local net.  The Network IP is where there are all 0's in the zeros of your netmask (from the above address, it would be 10.23.45.0) This is what you want to define the route for.  Enter this IP, the netmask, and eth0 as the device. (The Broadcast address is all 1's where there are 0's in the netmask, that why I chose ...1 through ...254 above, ...255 would be the broadcast address.)

When this is done, you should be able to ping the world.

The internet daemon (inetd) runs by default on RedHat.  This gives basic services such as ftp, telnet, finger . . .

Samba (smbd and nmbd) runs by default, but you'll need to define the shares in /etc/smb.conf.
Reject and write more if there are still probs.
If you want to run apache, you might have to install it.  If you didn't select it at install time.

You didn't say what type of server you wanted to run.

But you should be connedted now.
Avatar of qiang8

ASKER

When I ping the dummy device 127.0.0.1,
it is able to Tx and Rx. But when I ping for ext machine, error message is
"Network is unreachable". Is it the network card not properly set up?

When I run the command: ifup eth0
message is: Delaying eth0 initialization

Is this correct for a PCI network card:
/sbin/modprobe irq=11
(unable to know I/O add)

Below are my configs in netcfg:

*** Names ***
Hostname:simod1
Domain:APR
Nameservers:10.160.169.1

*** Hosts ***
1.   IP: 10.160.169.1
     Name:simod1

2.   IP: 127.0.0.1
     Name:localhost
     Nicknames:loopback

*** Interfaces ***
1.   Interface:lo
     IP:127.0.0.1
     proto:none
     atboot:yes
     active:active

2.   Interface:eth0
     IP:10.160.169.1
     proto:none
     atboot:yes
     active:inactive

*** Routing ***

Dafault gateway device: eth0
Interface:eth0
Network address:10.160.169.0
Netmask:255.255.240.0
Gateway: BLANK

Pls advise and thanks.
Avatar of qiang8

ASKER

To rwenzla ONLY. Thanks
ASKER CERTIFIED SOLUTION
Avatar of rwenzla
rwenzla

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of qiang8

ASKER

I have tried whar u have recommended but still message like " Delay eth0
initialization " occurs.

When I ping, message " network is unreachable ", so I think the card was not properly set up.

Pls advise further ... thanks.
If you get a network unreachable error message, then you have an incorrent I/O address or a wrong IRQ interrupt.
Avatar of qiang8

ASKER

Thanks for ur advice .... I have solved the problem by reinstalling RED Hat and network card is auto detected.