LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-06-2005, 05:53 AM   #1
microsmart
LQ Newbie
 
Registered: Apr 2004
Posts: 12

Rep: Reputation: 0
2 routers WAN, LAN could you please tell me...


Hi everybody
I am sorry for this question, I did search on this forum but I didn't find the answer.
Here is my problem:
I have ADSL connect to the internet, 2 routers one for WAN and one for LAN:

http://vcsj.nhatban.net/truong/lan.JPG

I have a global IP : 215.x.x.x, I set cable router: 192.169.1.0/24 then I have a linux box, and one more router, it's wireless router. IP of wireless router is 192.168.1.3 , I want to share internet via wireless router, so I set Lan for it, 192.168.2.0/24. But my computers are able to connect to the wireless network, they cannot connect to the internet.
How do I configure this network? Is anything wrong here? My wireless router is Corega, and I cannot find anything related to NAT.

Could you please help me?
I'm sorry for my poor English.
 
Old 08-06-2005, 08:20 AM   #2
xnomad
Member
 
Registered: Jun 2005
Posts: 53

Rep: Reputation: 15
First you need to explain the network set up with more detail.

Your adsl modem is plugged into what?
Then what is that plugged into, and so on........

Where is the linux box is it between the "cable router" and the wireless router?

If you can connect to the wireless router but not through to your modem then the routing problem lies with the wireless router. Make sure that it's default gateway address corresponds to the route to your modem.

What do you mean you set the cable router as 192.169.1.0/24? That is a network address and not a host address.
Set it as 192.168.1.1.

e.g.

Internet <-> [Modem]<->[Router with NAT]<->[Linuxbox]<->[wireless router] <->[wireless connected computer]
IP Address [192.168.0.1] <-> [192.168.1.1] <-> [192.168.1.2]<->[192.168.2.1] <-> [192.168.2.2]
def. gateway [215.x.x.x]<->[192.168.0.1]<-> [192.168.1.1]<->[192.168.1.2] <-> [192.168.2.1]



Of course this could all be wrong if you are calling a modem a router or a switch a router. A normal Layer 2 switch does not do routing and doesn't have a gateway to configure. So if your wirelss router is really a wireless switch, then the default gateway for the "wireless connected computer" would be 192.168.1.2 in the above example that would be the linux box.

Last edited by xnomad; 08-06-2005 at 08:31 AM.
 
Old 08-06-2005, 08:35 AM   #3
microsmart
LQ Newbie
 
Registered: Apr 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks a lot for your reply.
Let me explain: my cable router is connected to ASDL moderm( this moderm connected to the internet) then I used Lan cable to connect my Linux server to this router. I also used Lan cable to connect one more router(wireless router) to cable router. My Linux server connected directly to cable router. My laptop, desktop pc are connected to wireless router by cards.

I have a global IP address, I can see this IP when I configured cable router, then I set Lan IP for cable router is 192.168.1.1 , subnet : 255.255.255.0 . At this time, my linux server has IP : 192.168.1.5, and I saw that my wireless router has IP: 192.168.1.3, and I set those IP as static IPs. Next, I configured my wireless router, this router has WAN and Lan settings, I set ist WAN IP is 192.168.1.3 , subnet 255.255.255.0, default gateway: 192.168.1.1, DNS: 192.168.1.1 . Then Lan setting: I set this router with IP 192.168.2.1 , subnet 255.255.255.0

First time I have two routers , so I don't know how to configure them because of my limited knowlege

Thanks to reply and I am waiting for any replies. Thanks in advance.
 
Old 08-06-2005, 09:10 AM   #4
xnomad
Member
 
Registered: Jun 2005
Posts: 53

Rep: Reputation: 15
Hmmm I'm not sure it's late here and I need to go to bed. What I would do if I were you is first try the Wireless router on it's own connected directly to the ADSL modem and see if it works. Also make sure that the default route on your laptop and other wireless users points to your wireless router.

Also how far can you ping with your laptop can you ping the non-wireless router? (192.168.1.1)
Does the wireless router have a uplink port? If so then connect the other router's cable to this port instead and you can forget about the WAN settings.
 
Old 08-06-2005, 11:09 AM   #5
microsmart
LQ Newbie
 
Registered: Apr 2004
Posts: 12

Original Poster
Rep: Reputation: 0
yeah, wireless router has WAN port, so I connected this port to non-wireless router.
My laptop point to wireless router cause Laptop's IP is 192.168.2.11.
I cannot ping non-wireless router from laptop, I means 192.168.1.1
few days ago, I used only wireless router connect directly to ASDL moderm, so it works fine.
I can ping wireless router from laptop because Laptop has IP from wireless router's DHCP.
 
Old 08-06-2005, 01:17 PM   #6
qs_tahmeed
Member
 
Registered: Nov 2003
Location: Bangladesh
Posts: 101

Rep: Reputation: 15
Hello!

to me it seems to be some little mistakes....

first you are using 2 network block in your network - Right!
one is 192.168.1.0/24 and the other is 192.168.2.0/24

you have 2 options -

1)

you activate NAT in the 2nd router (Wireless) - hoping that you have assigned IP from
the 192.168.1.0/24 block to the WAN interface of this router and IP from the 192.168.2.0/24
block to that LAN interface. and activate NAT to translate IPs from your LAN to the IP
of the 192.168.1.0/24 block. as you are using this IP block in the 1st router (Cable).
or you change all IPs to one network ie 192.168.1.0/24. - which is not a good practice.

OR

2)

you assing IP from the 192.1681.0/24 to the WAN interface of the Wireless router and
go with the x.x.2.0/24 block with your LAN. in this case you have to add network block
x.x.2.0/24 in the routing table of the 1st (Cable) router. this is to let the 1st one know that
he is to route traffic to & from that network. The way you do it is based on the 1st router's
controll option. you will find some options similar to this in the conf section of the 1st router.
this to me is a better choise..........

all these has been described assuming that the Linux box of yours is not in the middle of
the 2 routers. it might act as a server but putting it in between the routers and activate it as
another router is just not the right structure for a LAN.
Well - at least its not necessary in any way you think.

have I become Confusing - if yes buzz me

Happy routing......
 
  


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
SSH WAN/LAN problem Hangdog42 Linux - Security 6 10-18-2005 09:51 PM
redhat 7.3 can only access LAN, not WAN ForumKid Linux - Networking 1 08-01-2004 08:14 AM
Routing LAN -> WAN -> LAN with unhelpful router synx13 Linux - Networking 2 06-14-2004 02:35 PM
LAN works, WAN doesn't ? BrianK Linux - Networking 2 06-16-2003 07:11 PM
LAN/WAN problems CyberNet Linux - Networking 1 11-11-2002 10:30 PM

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

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