Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
simple routing question
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
drkstorm
Tux's lil' helper
Tux's lil' helper


Joined: 22 Apr 2004
Posts: 118

PostPosted: Thu Jul 01, 2004 2:57 pm    Post subject: simple routing question Reply with quote

I will soon have two networks, connected by a T-1, I want to route between the two but I am not sure how to set this up so as to minimize traffic over the T-1 link, here is what i am thinking

network 1:

internet -> server | eth0 (real world ip) & eth1 (192.168.1.1) | -> private network (192.168.1.x)

network 2:

T-1 to above network -> server | eth0 (????) & eth1 (192.168.2.1) | -> private network (192.168.2.x)

my question is, how to I connect all of this, do I connect the T-1 uplink into a switch on network one, and set my current gateway (192.168.1.1) to route all requests to 192.168.2.1 and then on network 2 configure the server's eth0 with 192.168.1.x?

I'm not too sure what should be connected where, i want two subnets and I have two servers each with two nics.... any ideas?
Back to top
View user's profile Send private message
grimm26
Guru
Guru


Joined: 23 May 2004
Posts: 313
Location: Chicagoland, IL

PostPosted: Thu Jul 01, 2004 4:53 pm    Post subject: Reply with quote

My first question is why do you need two separate subnets at home? Well, let's look at the issue anyway.

First of all, routing traffic between your two private subnets will generate no traffic over the T1 since the T1 leads to the internet - unless you want to route between them using their public IPs. Your switch should also know not to route 192.168/16.

There are additional questions. How are you handling NAT? Is your switch doing it?

Unless you have another public IP, you can't plug server2 into your switch with the T1 uplink - unless it is a managed switch, I suppose. What do you plkan on plugging eth0 from server2 into?
_________________
"Blessed is he who finds happiness in his own foolishness, for he will always be happy".
Back to top
View user's profile Send private message
drkstorm
Tux's lil' helper
Tux's lil' helper


Joined: 22 Apr 2004
Posts: 118

PostPosted: Thu Jul 01, 2004 8:21 pm    Post subject: Reply with quote

let me clarify, the T-1 is a peer to peer connecting two buildings, internet is provided by a wireless T-1, this isnt a home setup. Also my switches are not managed

here is another view

T1 #1(internet) <--> Server #1<-->Switch #1<-->T1 #2(peer-2-peer)<-->server #2<-->switch #2

Something is not right with this setup, the peer to peer T-1 will only be routing data between 192.168.1.x and 192.168.2.x networks. I just don't know what to hook up where, do I connect one end of the T1 into the switch, and the other into the server having it act as a router between 192.168.1.x and 192.168.2.x, do I connect each end into a server, if so what IP do I use for each interface

Its a simple setup, I've just never done it before
Back to top
View user's profile Send private message
Houdini
Apprentice
Apprentice


Joined: 14 Jun 2002
Posts: 224
Location: New Mexico Tech, Socorro, NM

PostPosted: Thu Jul 01, 2004 10:12 pm    Post subject: Reply with quote

I would do something like:

Code:

Internet <--> Server #1 <--> Switch #1
                 ^---> p2p T1 <--> Server #2 <--> Switch #2


(p2p T1 connects to Server #1, in case my ASCII art sucks)

And just teach the servers how to route. That way, you don't have to worry about local traffic going out the p2p T1.
_________________
^]:wq
Back to top
View user's profile Send private message
Lajasha
Veteran
Veteran


Joined: 17 Mar 2004
Posts: 1040
Location: Vibe Central

PostPosted: Fri Jul 02, 2004 12:02 am    Post subject: Reply with quote

Code:
NETWORK 1:

                     Server#1               Private Network
                     |      |                (192.168.1.X)
        Eth0(192.168.3.4) ETH1(192.168.1.1) Default Gateway
            ____|                |           (192.168.1.1)
            |                    |________________|
            |
            |
        ETH1(192.168.3.2)
            |
      [Router/SERVER]--ETH2(PUBLIC IP)--INTERNET
            |
        ETH0(192.168.3.1)
            |
NETWORK2:   |
            |
            |        Server#2               Private Network
            |        |      |                (192.168.2.X)
        Eth0(192.168.3.3) ETH1(192.168.2.1) Default Gateway
                                 |           (192.168.2.1)
                                 |________________|


This would be doable although the routing tables would be fun to put in, and the depending on what the servers are that would be alot of load on them without need. However,
Code:
NETWORK 1:

Server#1                Private Network
   |                     (192.168.1.X)
ETH0(192.168.1.2)       Default Gateway
   |                     (192.168.1.1)
   |____________  ___________|
               |  |
               |  |
             [SWITCH]
                |
ETH0(192.168.1.1)
   |
   |
[SERVER#3/ROUTER]---ETH2(PUBLIC IP)--[INTERNET]
   |
   |
ETH1(192.168.2.1)
                |
             [SWITCH]
               |  |
   ____________|  |__________
   |                        |
ETH0(192.168.2.2)       Default Gateway
   |                     (192.168.2.1)
Server#2                Private Network
                         (192.168.2.X)
                                             
NETWORK2:                                     
Would be more practical
_________________
Come and play in my land
Back to top
View user's profile Send private message
drkstorm
Tux's lil' helper
Tux's lil' helper


Joined: 22 Apr 2004
Posts: 118

PostPosted: Fri Jul 02, 2004 5:37 pm    Post subject: Reply with quote

Thanks for your help, I need to make sure that traffic on the peer to peer T-1 has minimal overhead, placing the T-1 on it's own "backbone" subnet may make the best use, it would prevent the other 2 subnets 192.168.2.x and 192.168.3.x from broadcasting, also my switches are unmanaged and do not have IP assignable ports for creating vlans, they are basic $300 24-port switches.

let me see if i can get this straight:

Code:

Server #1 (firewall, gateway, router)
ETH0 --- (209.x.x.x)  --- Internet
ETH1 --- (192.168.2.1) --- Switch -- (192.168.2.x) Network #1
ETH2 --- (192.168.1.1) ------------
                                   |
                                   | <-- p2p T-1 Link
                                   |
Server #2 (router, gateway)        |
ETH0 --- (192.168.1.2) ------------
ETH1 --- (192.168.3.1) --- Switch -- (192.168.3.x) Network #2


Does that seem more optimized? If so, my next question will be, how do i go about setting this up in linux? Do I need to use iptables? Can I just use routing statements?
Back to top
View user's profile Send private message
Lajasha
Veteran
Veteran


Joined: 17 Mar 2004
Posts: 1040
Location: Vibe Central

PostPosted: Fri Jul 02, 2004 6:37 pm    Post subject: Reply with quote

You can use that setup as long as the servers are only routers as they will be proccessing all the traffic and could get quite busy doing so. The setup you have should work and should be achieveable using routing tables.

[EDIT] You'll probly have to use IP Masquerading also.
_________________
Come and play in my land


Last edited by Lajasha on Fri Jul 02, 2004 7:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
drkstorm
Tux's lil' helper
Tux's lil' helper


Joined: 22 Apr 2004
Posts: 118

PostPosted: Fri Jul 02, 2004 6:48 pm    Post subject: Reply with quote

the two networks are very small, only 20 -30 comps, so i will use server one as a web server as well...

Do you know any good how-tos for setting up routing tables, i've always used gshield's firewall router script, but for routing over the p2p T1 i don't want to have any firewalling at all, just straight routing
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum