Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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: 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.
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.