LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 11-02-2007, 11:01 PM   #1
davimint
Member
 
Registered: Jan 2006
Distribution: Slackware Current
Posts: 272

Rep: Reputation: 33
home network using linksys wireless router


Hello all,
I own a wireless router (wrt54gs) and I need some help on the
configuration if someone knows a good guide or maybe has some advice.

Here's my network layout.

Internet
|
|
eth0
(firewall/server )eth1 ------ (wired pc)
eth2
|
|
linksys ------- (wirless pc) & (wirelss pc)


I've configured dhcpd on the server

Code:
  ddns-update-style none;
subnet 192.168.1.0 netmask 255.255.255.0
{
        range 192.168.1.25 192.168.1.50;
        option subnet-mask 255.255.255.0;
        option broadcast-address 192.168.1.255;
        option domain-name-servers 68.87.68.162, 68.87.74.162;
        option routers 192.168.1.1;
        default-lease-time 21600;
        max-lease-time 43200;
}
subnet 192.168.2.0 netmask 255.255.255.0
{
        range 192.168.2.100 192.168.2.150;
        option subnet-mask 255.255.255.0;
        option broadcast-address 192.168.2.255;
        option domain-name-servers 68.87.68.162, 68.87.74.162;
        option routers 192.168.2.1;
        default-lease-time 21600;
        max-lease-time 43200;
}
here's my network card info.
Code:
# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""

# Config information for eth1:
IPADDR[1]="192.168.1.1"
NETMASK[1]="255.255.255.0"
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""

# Config information for eth2:
IPADDR[2]="192.168.2.1"
NETMASK[2]="255.255.255.0"
USE_DHCP[2]=""
DHCP_HOSTNAME[2]=""
here's routing information

Code:
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.2.0     0.0.0.0         255.255.255.0   U         0 0          0 eth2
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth1
76.xxx.xxx.0    0.0.0.0         255.255.248.0   U         0 0          0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U         0 0          0 lo
0.0.0.0         76.xxx.xxx.1    0.0.0.0         UG        0 0          0 eth0
also, my almost no firewall !! for now.

Code:
#!/bin/bash
iptables -F
iptables -t nat -F
iptables -t mangle -F
iptables -X
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -s 192.168.1.0/24 -j ACCEPT
iptables -A FORWARD -s 192.168.2.0/24 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
I can swap the cables on eth1 and eth2 to my wired pc and everything works so I know that the dhcpd sever is working on both interfaces or at least one at a time.

I have failed at all my attempts to get the wireless pc's working through the server so any help would be appreciated.
 
Old 11-03-2007, 01:00 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 22,277

Rep: Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542
How are you connecting the router into your network? Are you using the WAN or a LAN port connected to eth2? You can configure your router as a wireless access point in a nutshell by plugging into the LAN (the switch side) and disabling DHCP. You can also simplify your network by just plugging the router into eth1 and then all computers will be on the same subnet.
 
Old 11-03-2007, 02:55 AM   #3
davimint
Member
 
Registered: Jan 2006
Distribution: Slackware Current
Posts: 272

Original Poster
Rep: Reputation: 33
michaelk,
The answer to your questions is that I have tried both with several combinations of settings on the router itself. Just a little bit ago I got the crazy thing working. But I'm afraid that there may be some conflict at some point in the way it's set up. Currently it is plugged into the WAN port from eth2 and I reset the router to factory defaults.

Here's the routers routing table.

Code:
Destination LAN IP  	Subnet Mask  	Gateway  	Interface
0.0.0.0 	0.0.0.0 	192.168.2.1 	WAN (Internet)
192.168.1.0 	255.255.255.0 	192.168.1.1 	LAN & Wireless
192.168.2.0 	255.255.255.0 	192.168.2.149 	WAN (Internet)
I feel sure you can look at that routing table and get a better idea of whats going on. The reason for using two cards and subnets was for security, for the most part I was just trying to be safe.

From what I've read and googled I should be able to just plug into one of the LAN ports and disable dhcp and it should work just like you said. I'm going to give it another try and see.

Thanks for the advice.
 
Old 11-03-2007, 03:20 AM   #4
davimint
Member
 
Registered: Jan 2006
Distribution: Slackware Current
Posts: 272

Original Poster
Rep: Reputation: 33
Follow up to previous post:
Ok, Now the router is hooked to the LAN port and eth2 and I disabled DHCP Server on the router and set the Routers IP address to 192.168.2.149.
It's working !!!!!!!

The routers routing tables looks better also.

Code:
Destination LAN IP  	Subnet Mask  	Gateway  	Interface
192.168.2.0 	255.255.255.0 	192.168.2.149 	LAN & Wireless
It handed me a local address of 192.168.2.148.

I still have two more questions.

First, before I was setting the ROUTERS IP address to what I thought was the gateway for eth0 ( 192.168.2.1 ) and this time I just set it to an address inside the range of the DHCP server on the firewall box. I would like to understand that.

Second, if anyone knows there a section in the routers setup under advanced routing that says I should have the router set to "router" but I still have it set to "Gateway". If someone could explain that to me it would be much appreciated.

Thanks again and any comments welcome.
 
Old 11-03-2007, 02:23 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 22,277

Rep: Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542
Each device on the same subnet requires a unique IP address. So that is why you had problems when the routers LAN address the same as eth2 (i.e. 192.168.2.1) on the server. The netmask i.e. 255.255.255.0 in a nutshell determines the available hosts on the subnet. In your case 192.168.2.x where x=1 to 254. 255 is assigned the broadcast address and zero is the network address. You would want to set the routers LAN IP address to something outside the DHCP IP address range (<100 or >150) so no conflicts can occur. The DHCP server actually assigns address from the top down (150,149 etc) so if you have at least 3 wireless clients your going to have an IP conflict.

Google for more information.
 
Old 11-03-2007, 02:48 PM   #6
davimint
Member
 
Registered: Jan 2006
Distribution: Slackware Current
Posts: 272

Original Poster
Rep: Reputation: 33
Thanks, I get what your saying..I'll get it changed.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Home network problem - Centos - no route to host dralexpe Linux - Networking 2 06-30-2007 06:43 PM
Home Network with mixed static ip and dynamic ip clients using linksys wrt54gs router ghostrider.002 Linux - Networking 6 05-14-2007 02:01 PM
Difficulty setting up wireless network, running route thiqued Linux - Wireless Networking 9 02-05-2006 05:58 PM
Home network: connecting to a Linksys router for DHCP IP address - no ping gunther Linux - Networking 28 05-20-2005 11:14 PM
Home network using linksys router -- DHCP server? GoinEasy9 Linux - General 12 04-02-2004 12:32 AM

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

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