LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-12-2004, 11:37 AM   #1
papitu76
Member
 
Registered: Apr 2004
Location: Pamplona (NAVARRA)
Distribution: Debian/RedHat/Mandrake
Posts: 36

Rep: Reputation: 15
Fine network configutarion but network problem, why?


I am using a RedHat 9. I have a small home network with 2 pcs and a DSL router that join them. The router also connects the pcs to the internet.

I had a Windows configuration and i am trying to do it in Linux. Hardware works fine becasue the windows configurations worked fine.

I have one pc with RedHat 9 and other with Mandrake 9.2.
With the one with Mandrake everything is fine. I can see everthyng in my LAN(even the other pc) and outside. It is configured as getting the ip from the DHCP is in the router. I coudnt get as static. This is the next battle.

In the RedHat9 coumputer I have configured the files in all the ways i have imagined. And it didnt work. I can ping to the router but not to the pc or outside. The files i have configured are:


/etc/sysconfig/network
NETWORKING=yes

In next two lines i have added them and erased them to try both ways.

HOSTNAME=newpc
GATEWAY=192.168.2.1
The @ip is my router ip.


/etc/sysconfig/network-scripts/ifcfg-eth0.

DEVICE=eth0
BOOTPROTO=static
tryed all as none, dhcp (taking off the next 5 lines) and even taking the whole BOOTPROTO line
IPADDR=192.168.2.2
NETMASK=255.255.255.0
NETWORK=192.168.2.0
BROADCAST=192.168.2.255
GATEWAY=192.168.2.1

ONBOOT=yes

I have put an empty line at the end of the line and i have taken it off, just in case there is any problems with it. I have heard about things like that.

In the etc/resolv.conf theres is a line 'nameserver 192.168.2.1' but i dont remember if i have keyed it in.

There is no configuration files in the directory /etc/sysconfig/networking/ wich is used by the Network Administration Tool (redhat-config-network). And I havent used it.

In the first try i used those tools but it didnt work. I got so desperate that i have reinstalled the OS.

Is there any particular thing to check on the RedHat?

What am i doing wrong?

i apreciate any help.
 
Old 06-12-2004, 12:30 PM   #2
Pete M
Member
 
Registered: Aug 2003
Location: UK
Distribution: Redhat 9 FC 3 SUSE 9.2 SUSE 9.3 Gentoo 2005.0 Debian Sid
Posts: 657

Rep: Reputation: 32
papitu76

This may be a starting point for you these are my files on Redhat 9 using a router for IP via DHCP

/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=server

/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp
TYPE=Ethernet
USERCTL=no
PEERDNS=no

etc/resolv.conf
nameserver 192.168.0.3

The above is the IP for my local DNS server you should list the DNS servers provided by your ISP

/etc/hosts
127.0.0.1 localhost.localdomain localhost
server

Below are the results of running sbin/ifconfig from the command line, have removed my MAC address for eth0

eth0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:192.168.0.3 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:30330 errors:0 dropped:0 overruns:0 frame:0
TX packets:27895 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:17937987 (17.1 Mb) TX bytes:5358315 (5.1 Mb)
Interrupt:18 Base address:0xac00 Memory:fc9e0000-fca00000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:812906 errors:0 dropped:0 overruns:0 frame:0
TX packets:812906 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:52368055 (49.9 Mb) TX bytes:52368055 (49.9 Mb)


I know this is not really what you are looking for but may be a start, after making changes I always reboot, there is probably an easier way but I've yet to find it

Pete
 
Old 06-12-2004, 12:42 PM   #3
papitu76
Member
 
Registered: Apr 2004
Location: Pamplona (NAVARRA)
Distribution: Debian/RedHat/Mandrake
Posts: 36

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Pete M
papitu76


Pete
Thanks. i will give it a try. Not now becasue i am so late.

By the way to avoid reboot the system you can restart the services that are afected. For example in the case of network settings.

service network restart

And i usally do
ifup etho

When i dont get it even i try

service xinetd restart
service portmap restart
 
Old 06-12-2004, 04:14 PM   #4
papitu76
Member
 
Registered: Apr 2004
Location: Pamplona (NAVARRA)
Distribution: Debian/RedHat/Mandrake
Posts: 36

Original Poster
Rep: Reputation: 15
I came back and everything works fine. I guees it needed to reboot. But i am so surprised because i have always heard that Linux doesnt need to reboot to make changes in the configuration. It works, i stop thinking about it. but if anyone knows why, please teel it to me.

Thanks for the interest.
 
Old 06-12-2004, 07:58 PM   #5
urzumph
Member
 
Registered: Jan 2004
Location: Australia
Distribution: Debian
Posts: 168

Rep: Reputation: 30
you don't.
Redhat lets you restart network services (don't ask me how, I don't use it),
some distros let you ifdown eth0 && ifup eth0
and just about all of them let you ifconfig eth0 down && ifconfig eth0 up
 
Old 06-17-2004, 02:05 PM   #6
papitu76
Member
 
Registered: Apr 2004
Location: Pamplona (NAVARRA)
Distribution: Debian/RedHat/Mandrake
Posts: 36

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by urzumph
you don't.
Redhat lets you restart network services (don't ask me how, I don't use it),
some distros let you ifdown eth0 && ifup eth0
and just about all of them let you ifconfig eth0 down && ifconfig eth0 up
The way to work with the services of Linux is by either:

1)
/etc/init.d/"service" {start|stop|restart|reload|status}
for example :
/etc/init.d/network restart
This works on any distros.

2)
And Red Hat has a shortcut

service "service" {start|stop|restart|reload|status}

I hope it helps you
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why fine tuning a network is bad Metablade Linux - Networking 4 10-14-2005 02:45 PM
Why fine tuning a network is bad Metablade LinuxQuestions.org Member Intro 2 10-14-2005 10:05 AM
LAN card works fine during network install but not after that? lothario Linux - Hardware 0 05-28-2004 01:25 AM
fine network traffic... mahamkali Linux - Networking 3 12-05-2003 12:11 AM
2 PC Home samba network, One way transmits fine, the other way has problems.... gamebeavis Linux - Networking 2 09-14-2003 04:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration