LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-12-2009, 04:41 PM   #1
tenko20xx
LQ Newbie
 
Registered: Jan 2009
Distribution: Linux Mint
Posts: 7

Rep: Reputation: 0
Question Advanced routing based on outgoing port


We currently have two uplinks that we can use here but only one is in use. The other we use as a backup for when our main uplink fails. I've recently read about how I can setup our router to be connected to both and use them simultaneously to do load balancing which is awesome. What I'd really like to happen though is for us to be able to send FTP through one uplink and everything else through the other.

One of our connections is a 3Mbps-down/up connection and the other is 10Mbps-down/768Kbps-up and a couple days out of the week, we upload a few gigs worth of jpegs to our webserver. That tends to typically take up a lot of bandwidth and slow everyone else down. So it would be optimal if FTP had its own dedicated line so that it doesn't use up everyone else's bandwidth and because our backup uplink actually has faster upload speeds. So in summary, the configuration I would like is:

FTP -> 3Mbps Connection
All other services -> 10Mbsp/768Kbsp Connection

I would really like this to be able to the entire network as opposed to having a single system that has its own dedicated line out to the Internet that we used to FTP. Is there any way this can be accomplished?
 
Old 02-14-2009, 10:11 AM   #2
Valkyr1e
LQ Newbie
 
Registered: Jul 2008
Location: Earth
Distribution: Debian/Kubuntu
Posts: 12

Rep: Reputation: 0
You need to setup a routing protocol and ACL for you to do this. It can also be done with static routes too by including a different metric for each link.
Basic example of commands for a cisco router would be:
R1 = ISP(s)
R2 = your router

Link1 = ftp
Link2 = *

Link 1 on R1 to R2 will be 192.168.4.0/30
Link 2 on R1 to R2 will be 192.168.4.4/30

on R1 (the ISP(s) routers))

router ospf 1
network 192.168.4.0 0.0.0.3 area 0
network 192.168.4.4 0.0.0.3 area 0


on R2 (your router)

host R2

interface fas 0
description for FTP only
address 192.168.4.2/30
ip access-group 101 out

interface fas 1
description for everything else
address 192.168.4.6/30
ip access-group 102 out

router ospf 1
192.168.4.0 0.0.0.3 area 0
192.168.4.4 0.0.0.3 area 0
log detail

access-list 101 remark For ftp only
access-list 101 permit tcp any any eq 20
access-list 101 permit tcp any any eq 20
access-list 101 deny ip any any log
access-list 102 remark For everything else
access-list 102 permit ip any any


Now this is just to give you the basic idea. You are probably NOT using ospf on your internet interfaces as ospf is an internal routing protocol. if you can get bgp setup between you and your isp's or if you cant then just do static routing and say that one link has a better metric than the other. Now, I can't help much with bgp as I am not well versed in that yet :P (am working on that though) anyway, I hope this helps.
 
Old 02-14-2009, 11:18 AM   #3
Valkyr1e
LQ Newbie
 
Registered: Jul 2008
Location: Earth
Distribution: Debian/Kubuntu
Posts: 12

Rep: Reputation: 0
One other note you can also do this on a host-based router via linux. check out http://shorewall.net/MultiISP.html

and for routing protocols go by www.quagga.net
 
  


Reply

Tags
ftp, port, 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
Routing based on destination port rvo Linux - Networking 9 01-11-2011 09:48 AM
Outgoing Mail Routing on LAN richbl Linux - Software 3 07-20-2008 03:51 AM
SMTP Outgoing Routing kngspook Linux - Software 3 04-14-2008 10:10 PM
Port based routing neos Linux - Networking 1 09-21-2005 01:15 PM
Advanced Routing bakerv3 Linux - Networking 3 01-24-2003 06:54 AM


All times are GMT -5. The time now is 07:26 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration