Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 08-06-2005, 05:53 AM   #1
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:

I have a global IP : 215.x.x.x, I set cable router: then I have a linux box, and one more router, it's wireless router. IP of wireless router is , I want to share internet via wireless router, so I set Lan for it, 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
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 That is a network address and not a host address.
Set it as


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

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 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
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 , subnet : . At this time, my linux server has IP :, and I saw that my wireless router has IP:, 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 , subnet, default gateway:, DNS: . Then Lan setting: I set this router with IP , subnet

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
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? (
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
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
I cannot ping non-wireless router from laptop, I means
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
Registered: Nov 2003
Location: Bangladesh
Posts: 101

Rep: Reputation: 15

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

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

you have 2 options -


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



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......


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 > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:03 PM.

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