LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-12-2008, 11:02 AM   #1
pqzha1
LQ Newbie
 
Registered: May 2008
Posts: 9

Rep: Reputation: 0
LAN and router problem


i have configured LAN, which inludes a server and a client machine connecting to a hub, so that the server can assign IP and provide other services to the client machine. Then the hub connects to a cisco router A(which is connected to router B via series..), and i also configured the both routerA and B. Now the problem is the outside network cannot access the LAN server and client machine, but the server and client machine can access the router A and router B. What else do i need to configure?? i guess i missed something ....

Thanks a lot. I never configured network before, i am a ROOKIE
 
Old 05-12-2008, 11:19 AM   #2
dkm999
Member
 
Registered: Nov 2006
Location: Seattle, WA
Distribution: Fedora
Posts: 407

Rep: Reputation: 35
I will assume that your setup is the most common one: you have a single IP address allotted to you by an ISP, and that address is configured to be on the public-side interface of router B. Then you are trying to share this connection among some number of machines attached to your LAN.

There are two separate cases to resolve here:

1. You start a program on either the server or the client machine, and it tries to reach a site on the Internet, but the communication does not complete.
or
2. A site on the Internet is attempting to initiate communication with your server or client machine.

These cases are very different. For case 1, the most likely problem is that you may have configured your LAN so that it uses a Private Networking address block, but have not arranged for Network Address Translation to be taken care of. In your situation, where you have two routers in the path to the Internet, the most likely way to get NAT set up is to configure Router B (the one closest to the public connection) to do the address translation..

This will then allow all of your machines behind the NAT router to initiate connections to sites in the public Internet. It will not, however, make case 2 any easier.

The second case, where you want to allow external clients to access services on different machines, but have 1 public IP address and several machines hiding behind it, is a good deal more complex to set up. Briefly, you would need to choose one of the machines to be the target for each service that you want to make available through the single public IP address, and then set up that service (FTP, webserver, mail, ...) on that machine. Not all services need to be on a single machine behind the NAT device, but each service port can only be redirected to a single Private Network address by the router.
 
Old 05-12-2008, 02:04 PM   #3
framp
Member
 
Registered: Apr 2003
Location: Next to Stuttgart, Germany
Distribution: Debian, Mint, Raspbian
Posts: 131
Blog Entries: 5

Rep: Reputation: 27
dkm999 gav you a very good explanation. If you would like us to give you more detailed hints you should tell us which OS you have up and running on you server and client.
 
Old 05-13-2008, 12:03 AM   #4
pqzha1
LQ Newbie
 
Registered: May 2008
Posts: 9

Original Poster
Rep: Reputation: 0
thank you guys dkm999 and framp ^_^

my server has ubuntu OS and client has windows OS.


ubuntu server-----windows client-----hub------cisco routerA------seires-----cisco routerB-------hub-----another LAN(ubuntu server, windows client)


in fact, the outside network is another LAN, so both LANs do not need to access real internet. i just want the two LANs can access each other.
So i need make a NAT on one of the machines or something else?

thanks a lot.
 
Old 05-13-2008, 02:19 AM   #5
praveen_218
LQ Newbie
 
Registered: Mar 2008
Posts: 8

Rep: Reputation: 0
Quote:
Originally Posted by pqzha1 View Post
thank you guys dkm999 and framp ^_^

my server has ubuntu OS and client has windows OS.


ubuntu server-----windows client-----hub------cisco routerA------seires-----cisco routerB-------hub-----another LAN(ubuntu server, windows client)


in fact, the outside network is another LAN, so both LANs do not need to access real internet. i just want the two LANs can access each other.
So i need make a NAT on one of the machines or something else?

thanks a lot.
Hi framp, dkm999,
Is the NATing applicable to cases (such as of pqzha1) of local LANs too wherein same kind of network address are used?? I guess, NATing is more than a requirement for LANs having private addresses and have limited number of public IP addresses available to them.

Please let me know if we don't want to use Cisco routers but instead, want to go ahead with computers having multiple NIC interfaces, then what and how to go ahead and also what softwares are available in the open source to convert such computers into a full fledge routers. Please let us know if any such open source softwares are avalible for NATing too?

Will you please let us know in details on how to tackle the case 2 (of dkm999) ?

Is the same above scenario, exactly applicable, if an IPV6 based LAN replaces the public Network in the above cases, where the private network is IPv4 based?

Will you guys send me some good tutorial links?
Eagerly waiting for your reply.
Thanks in advance to all.
Regards,
Praveen

Last edited by praveen_218; 05-13-2008 at 02:37 AM.
 
Old 05-13-2008, 01:37 PM   #6
framp
Member
 
Registered: Apr 2003
Location: Next to Stuttgart, Germany
Distribution: Debian, Mint, Raspbian
Posts: 131
Blog Entries: 5

Rep: Reputation: 27
Quote:
Originally Posted by pqzha1 View Post
in fact, the outside network is another LAN, so both LANs do not need to access real internet. i just want the two LANs can access each other. So i need make a NAT on one of the machines or something else?
That's a different story. You just want to connect two networks. The you don't need NAT but a router who connects the two different networks and have to setup your default route on your clients accordingly. I think you can configure your cisco box to act as a router. But don't aks me for details about cisco router configuration. If you would have used a Linux box instead of a cisco router I can help you to configure the Linux box router.

Last edited by framp; 05-13-2008 at 01:39 PM.
 
Old 05-13-2008, 06:34 PM   #7
dkm999
Member
 
Registered: Nov 2006
Location: Seattle, WA
Distribution: Fedora
Posts: 407

Rep: Reputation: 35
Looks like I have been away for a while. The problem of connecting two networks in a lab that are not attached to any public Internet is, as framp says, pretty simple. You merely need to choose IP addresses, assign them to the various interfaces, and stand back.

The trick is choosing the right IP addresses. My recommendation is to use the smallest set of Private Networking addresses even though you are not making a connection to the Internet (right now).

If you use addresses in the range 192.168.x.y and a subnet mask of 255.255.255.0, you will allow yourself 254 distinct subnets, each of which can have 254 machines attached to it. (For historical reasons, 0 and 255 are reserved numbers.)

So, for machines attached to the hub on the left side of your diagram, you might choose IP addresses like these: 192.168.4.1, 192.168.4.3, 192.168.4.12. The important part is that all of them have 4 in the third octet. For the serial line between the cisco routers, choose a different subnet, perhaps 192.168.1.1 and 192.168.1.2.
Finally, for machines attached to the right-hand hub, choose addresses like 192.168.42.1, 192.168.42.7,etc.

For machines on the left side, the default gateway should be set to the IP address of the cisco router's interface on their subnet (eg, 192.168.4.1); for machines on the right side, the default gateway should be set to the IP address of the cisco router's interface on their subnet (eg, 192.168.42.1). The routers probably don't need any further configuration, since they will talk among themselves to discover what net addresses are reachable through the other.

As you see, no NAT is required in this situation. But if and when you attach this to the public Internet, NAT will be required at that attachment point.
 
Old 05-14-2008, 10:54 AM   #8
pqzha1
LQ Newbie
 
Registered: May 2008
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by dkm999 View Post
Looks like I have been away for a while. The problem of connecting two networks in a lab that are not attached to any public Internet is, as framp says, pretty simple. You merely need to choose IP addresses, assign them to the various interfaces, and stand back.

The trick is choosing the right IP addresses. My recommendation is to use the smallest set of Private Networking addresses even though you are not making a connection to the Internet (right now).

If you use addresses in the range 192.168.x.y and a subnet mask of 255.255.255.0, you will allow yourself 254 distinct subnets, each of which can have 254 machines attached to it. (For historical reasons, 0 and 255 are reserved numbers.)

So, for machines attached to the hub on the left side of your diagram, you might choose IP addresses like these: 192.168.4.1, 192.168.4.3, 192.168.4.12. The important part is that all of them have 4 in the third octet. For the serial line between the cisco routers, choose a different subnet, perhaps 192.168.1.1 and 192.168.1.2.
Finally, for machines attached to the right-hand hub, choose addresses like 192.168.42.1, 192.168.42.7,etc.

For machines on the left side, the default gateway should be set to the IP address of the cisco router's interface on their subnet (eg, 192.168.4.1); for machines on the right side, the default gateway should be set to the IP address of the cisco router's interface on their subnet (eg, 192.168.42.1). The routers probably don't need any further configuration, since they will talk among themselves to discover what net addresses are reachable through the other.

As you see, no NAT is required in this situation. But if and when you attach this to the public Internet, NAT will be required at that attachment point.

yes, this is what exactly i want. I have successfully configured my LANs and that is not that hard i thought. I didn't have to use NAT because global address is not required, just different subnet as you said above.

Thanks a lot. that's really helpful for me.
 
  


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
router pc problem, internet stopped working, lan works, using rc.firewall glorsplitz Linux - Networking 4 10-09-2007 07:18 PM
Qos,router with 2 interfaces (lan+internet) problem Dimitris_Papadakis Linux - Networking 0 02-02-2006 09:21 AM
Routing LAN -> WAN -> LAN with unhelpful router synx13 Linux - Networking 2 06-14-2004 02:35 PM
problem with internet speed within my lan after linux router ilovebytes Linux - Networking 6 02-10-2004 11:41 AM
ADSL Router + Linux Router + LAN = HELP!!! linuxlois Linux - General 2 09-16-2003 08:24 AM

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

All times are GMT -5. The time now is 06:10 PM.

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