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 01-06-2004, 03:41 AM   #1
rebelcan
Member
 
Registered: Jun 2003
Location: British Columbia, Canada
Distribution: Debian unstable
Posts: 83

Rep: Reputation: 15
setting up a home network server


hello everybody..

i'm trying to set up a redhat 9 box to server as a router/gateway for my house.
i'd like the setup to be;

12-port hub -------> linux router/gateway on eth1 -------> internet on linux router/gateway eth0

so far i have both the ethernet cards set up. here's the output of 'ifconfig':


==================================================

eth0 Link encap:Ethernet HWaddr 00:20:78:E0:82:CE
inet addr:192.168.2.81 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:918 errors:0 dropped:0 overruns:0 frame:0
TX packets:1055 errors:6 dropped:0 overruns:0 carrier:6
collisions:0 txqueuelen:100
RX bytes:451750 (441.1 Kb) TX bytes:163195 (159.3 Kb)
Interrupt:11 Base address:0x3f00

eth1 Link encap:Ethernet HWaddr 00:20:AF:A2:5E:CE
inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:798 (798.0 b)
Interrupt:13 Base address:0x300

==================================================

(ommited the lo device)
and here's the output of 'route':

==================================================

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.255.255.0 U 0 0 0 eth1
192.168.2.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 192.168.2.1 0.0.0.0 UG 0 0 0 eth0

==================================================


i have dhcpd set up as so:


==================================================
ddns-update-style none;
ignore client-updates;

subnet 10.0.0.0 netmask 255.255.255.0 {
server-name "therouter";
option routers 10.0.0.1;
option subnet-mask 255.255.255.0;
option domain-name-servers 209.53.4.130 209.53.4.150;
option netbios-name-servers 10.0.0.1;
range 10.0.0.2 10.0.0.200;
default-lease-time 86400;
max-lease-time 25902000;
}

==================================================

my only problem is....... any computer hooked up to the hub doesn't recive any informatin from the dhcpd server.....

'ifup eth0' on a linux computer connected to the hub shows:


==================================================

Determining IP information for eth0...failed; no link present. Check cable?


==================================================

so...... ummm...... i'm stuck. i've been at this for almost a week now, and feeling like quite the big noob. any help much appreciated.


thanks,
rebelcan
 
Old 01-06-2004, 06:56 AM   #2
Ciccio
Member
 
Registered: Nov 2002
Location: Paraguay
Distribution: Mandrake 10
Posts: 573

Rep: Reputation: 30
It is hard to say what the problem is, at least for me.

If you set the other computer with a static IP, can It see (ping, pump, etc) the router? I mean, is the conection working?. If it is then try to pump the IP manually... if it works check your ifup script.
 
Old 01-06-2004, 09:15 AM   #3
LinguelSanchez
LQ Newbie
 
Registered: Jun 2003
Location: Belgium
Distribution: Red Hat 8.0
Posts: 18

Rep: Reputation: 0
I think if you have a 10.* IP-address the subnet mask will be 255.0.0.0
 
Old 01-06-2004, 11:04 AM   #4
fataldata
Member
 
Registered: Jun 2002
Location: Breckenridge, Colorado
Distribution: Ubuntu Hardy 8.04
Posts: 101

Rep: Reputation: 15
dhcpd not assigning address?

When I start dhcpd. I specify the interface that it is to listen on.
Like this :

dhcpd eth1

Using RH9 I edited the /etc/sysconfig/dhcpd
file so it reads:

DHCPDARGS=eth1
 
Old 01-06-2004, 11:41 AM   #5
computergeek84
Member
 
Registered: Nov 2003
Location: /dev/null
Distribution: Gentoo, Ubuntu
Posts: 61

Rep: Reputation: 15
Quote:
Originally posted by LinguelSanchez
I think if you have a 10.* IP-address the subnet mask will be 255.0.0.0
Not necessarily. The IP range for eth1 as it is set up is 10.0.0.0/24 (10.0.0.x, netmask 255.255.255.0) for a home network, although it could theoretically be 10.0.0.0/8 (10.x.x.x, netmask 255.0.0.0), but that is a little too big of a subnet for a private LAN.

Once you get the DHCP working, you'll need to configure iptables (the kernel-level firewall for Linux) for NAT, IP forwarding, and masquerading. I suggest this post:
http://www.linuxquestions.org/questi...hreadid=121379

Last edited by computergeek84; 01-06-2004 at 11:44 AM.
 
Old 01-06-2004, 03:23 PM   #6
rebelcan
Member
 
Registered: Jun 2003
Location: British Columbia, Canada
Distribution: Debian unstable
Posts: 83

Original Poster
Rep: Reputation: 15
well... when i set the non-router linux conputer with 'ifconfig eth0 10.0.0.2 netmask 255.255.255.0' and 'route add default gw 10.0.0.1', it still can't ping the router.

here's what 'route' shows on the non-router linux computer:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.255.255.0 U 0 0 0 eth0
default 10.0.0.1 0.0.0.0 UG 0 0 0 eth0

on the router, when i start up dhcpd manually by typing 'dhcpd eth1', these are the last few lines the it prints to the screen:

Listening on LPF/eth1/00:20:af:a2:5e:ce/10.0.0.0/24
Sending on LPF/eth1/00:20:af:a2:5e:ce/10.0.0.0/24
Sending on Socket/fallback/fallback-net

i was wondering if this would have anything to do with the trouble i'm having.

one last thing..... i noticed that when i look at the ethernet card that is connected to the internet (eth0) on the router, it has a light that is lit up ( green ).

for the non-router linux computer, however, the ethernet card isn't lit up. but when i take the cable from the router and plug it into the non-router, it's ethernet card light turns on. i was wondering if there's some sort of setting i have to setup so that the router brodcasts a certain signal to all the computers connected to the hub, or if that's just a light saying there's a data transfer going on.
 
Old 01-06-2004, 03:39 PM   #7
computergeek84
Member
 
Registered: Nov 2003
Location: /dev/null
Distribution: Gentoo, Ubuntu
Posts: 61

Rep: Reputation: 15
Looks like there is a physical problem with either your hub or the cables connecting both computers to the hub. Does the hub show any green lights lit up when the computers are plugged into it? If one is out, it's probably a bad cable. If both are out, maybe you have a bad hub. Are the computers close enough together where you could test their connection with a single crossover cable?
 
Old 01-06-2004, 06:11 PM   #8
rebelcan
Member
 
Registered: Jun 2003
Location: British Columbia, Canada
Distribution: Debian unstable
Posts: 83

Original Poster
Rep: Reputation: 15
well... i fixed the hub problem... there was a little button that was called MDI/MDIX... and it was set to MDI... i changed it to MDIX and it works fine now. don't have a clue what that did though. now the non-linux computer can get it's dhcp stuff just fine, it's getting to the internet that's a problem.

i just have to get eth1 working again..... when i try 'modprobe 3c509 "irq=13" ', the module loads correctly and everything, but 'ifup eth1' doesn't work.
 
Old 01-06-2004, 08:55 PM   #9
fataldata
Member
 
Registered: Jun 2002
Location: Breckenridge, Colorado
Distribution: Ubuntu Hardy 8.04
Posts: 101

Rep: Reputation: 15
"there was a little button that was called MDI/MDIX"

That was to change the port to crossover mode. When connecting Device to Device you need to use a crossover cable. Either you depress a button like the one you saw or you use a cable that crossess over pins 1,2 with pins 3,6 on the ethernet jack.

"getting to the internet that's a problem."

Just keep pinging away and you'll get there.
 
  


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
Setting Up Server for Home Network geewildman Linux - Newbie 6 11-21-2005 10:17 PM
Question on setting up a home network and a file server centered effect Linux - Networking 5 07-26-2005 07:38 AM
Need help setting up a home network. joe83 Linux - Networking 7 08-09-2004 02:58 PM
Help with setting up home network plehman Linux - Networking 1 02-14-2004 12:15 PM
Setting up a home network gi13s Linux - Networking 1 08-06-2001 08:37 AM

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

All times are GMT -5. The time now is 02:55 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