LinuxQuestions.org
Visit Jeremy's Blog.
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 01-16-2004, 06:19 AM   #1
fragger
LQ Newbie
 
Registered: Aug 2003
Posts: 9

Rep: Reputation: 0
Question kinda complicated


here it goes: i have a private network (192.168.0.x) and a server which gives some public ips through dhcp, and the other guys with private ips must have a gateway set up (192.168.0.xxx) to access the public ips.
the problem is that another server is up..and gives internet through NAT to some guys with private ips. so the problem is they cant access the guys with public ips cuze they use diff. gateway (gateway to NAT server)
what can i do to tell the nat clients to access the extern ips through local network?
 
Old 01-16-2004, 09:39 AM   #2
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
You should look into using the route command. Try man route for more info.

Håkan
 
Old 01-16-2004, 03:36 PM   #3
fragger
LQ Newbie
 
Registered: Aug 2003
Posts: 9

Original Poster
Rep: Reputation: 0
i've tried...some explicit help please
 
Old 01-16-2004, 03:52 PM   #4
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
hmm. How about assigning 2 IPs to the guys that have a real world IP. You couldn't use DHCP for both but you would set in a 192.168.0.x address for eth0:1 and use dhcp for eth0. That may not help in your situation. I don't know. But it's a suggestion.
 
Old 01-16-2004, 04:08 PM   #5
nysethe
Member
 
Registered: Jul 2003
Distribution: Fedora Core 1
Posts: 35

Rep: Reputation: 15
Static routes are most likely your best bet. The following examples will give you an idea on how to setup static routes on your workstations:

For Windows:
route add DESTINATION_IP SUBET_MASK GATEWAY_IP
(example: route add 12.12.124.20 255.255.0.0 192.168.0.254)
This means that whenever the computer needs to reach the IP 12.12.124.20, it will ask 192.168.0.254 about it. The 192 address should be a system or router with knowledge about where the 12.x.x.x network is.

For Linux:
route add -net DESTINATION_IP SUBNET_MASK dev eth0
(example: route add -net 12.12.0.0 255.255.0.0 dev eth0)
This means that whenever the computer needs to reach the 12.12.x.x network, the request will be sent through the device "eth0". Just remember that in this case, your default gateway must have a route to the 12.12.x.x network, in order for the request to be passed on.

Also note that the public side will need a route BACK to the private systems. Otherwise, the public systems will get traffic, but won't know how to send it back!

I hope this helps,
Erik
 
Old 01-16-2004, 06:46 PM   #6
fragger
LQ Newbie
 
Registered: Aug 2003
Posts: 9

Original Poster
Rep: Reputation: 0
i wrote and i wrote...and nothing. The thing is the public system have a route to the private systems..thats settled.
but the private system with internet from the NAT server use a diff. gateway..so I need some kind of link between the dhcp server and nat server...well..i think so..anyway
the default gateway on the nat server is a ISP gateway..so i cant change it
i might be wrong..if there can be another way..some hints.

please..be very explicit..i want to study from the commands

thank you
 
Old 01-17-2004, 05:12 PM   #7
fragger
LQ Newbie
 
Registered: Aug 2003
Posts: 9

Original Poster
Rep: Reputation: 0
anyone?
 
Old 01-20-2004, 12:57 PM   #8
nysethe
Member
 
Registered: Jul 2003
Distribution: Fedora Core 1
Posts: 35

Rep: Reputation: 15
The bottom line is that you need to have a route for each hop in both directions. For example, let's say you have two routers on your network. Let's call them, router A, and router B. Let's pretend you have one router giving your network internet access, and the other router connects a remote office.

Not that it matters, but let's pretend router A is your internet router, and router B is for your remote office. If your default gateway is router A, and you want to be able to reach systems on the remote network via router B, you will need the following:

1. You will need to add a static route to the remote network, and that route entry MUST have router B's IP as your gateway.
2. Router B MUST have a route to the remote network, AND a route back.
3. The computer on the remote end MUST have a route back to the original network, with a gateway of router B's IP.

Once you do this, you will have a full route to and from. Your situation sounds very much like this one. I would attempt to solve your exact situation, but it's not making much sense to me. The bottom line with any kind of routing is that you make sure that every hop knows exactly where to go next.

Good luck, hope this helps...
Erik
 
Old 01-20-2004, 01:40 PM   #9
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
I think the problem lies in the fact that he's probably NATing multiple internal IP addresses behind a single public IP. Most NAT gateways won't let a connection go through to the internal network unless you do 1-to-1 NAT or port forwarding.
 
Old 01-27-2004, 07:08 AM   #10
fragger
LQ Newbie
 
Registered: Aug 2003
Posts: 9

Original Poster
Rep: Reputation: 0
yes nysethe, its the same situation
thanks..i'll try it

keep in touch
 
Old 01-27-2004, 08:39 AM   #11
Looking_Lost
Senior Member
 
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
I've only had a quick read so may be of the mark. You want to ensure that certain clients get a certain gateway address?

looking at the man for dhcpcd using the -G flag when invoking dhcpcd may be of help.
 
  


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
ipw2200 ...this looks complicated jnsg Slackware 7 12-22-2005 11:03 AM
Sendmail, kinda working, kinda borken Sizam Red Hat 1 02-08-2005 12:16 PM
why must linux be so complicated? r_hartless Linux - Newbie 7 07-12-2004 01:50 AM
Complicated Network XTJ7 Linux - Networking 9 05-18-2004 12:48 PM
basic proftp questions - kinda works kinda don't case1984 Linux - Newbie 4 11-06-2003 12:29 AM

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

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