How to use two bandwidth for your Linux server

when you connecting more that an IP and different gateway. its important to you to split your bandwidth into different routing tables.

the tools you should install is iproute2 which is install in most Linux by default.

first you should create the routing tables. for instance i am using two bandwidth.

echo ” 252        table1″   > > /etc/iproute2/rt_tables

echo ” 253        table2″   > > /etc/iproute2/rt_tables

now beside that you have default routing table,  two more routing table added to your Linux router. and you should specifies how your routing tables works.


ip route add default via $yourFirstgateway dev $firstdev table table1

ip route add default via $your2NDgateway dev $2nddev table table2


and also you shold specifies when these tables will be used. ” ip rule” is the tools by which you can specifiy how to each packet route based on their destinatio and source and …. . in this case we determin the linux router to route the packet based the souces IPs.


ip rule add from $yourSourceIP table table1

ip rule add from $your2NDIP table tabl2

thats it!!! its over. by entering these simple command you can be ensure that your server response each request to server by the called IP:).


4 Responses to “How to use two bandwidth for your Linux server”

  • ray ban store:

    I enjoyed the article and thanks recompense posting such valuable palaver squeeze of all of us to gateau down to to, I prearrange up it both worthwhile and revealing and I map senseless to set up it as habitually as I can.

  • ray ban store:

    I enjoyed the article and thanks in behalf of posting such valuable poop seeing that all of us to define, I upon it both valuable and helpful and I method to recall it as again as I can.

  • UGG Boots:

    I found this article useful in a paper I am writing at university. Hopefully, I get an A+ now!

    Thanks

    Bernice Franklin

  • Anonymous:

    After reading you blog, I thought your articles is great! I am very like your articles and I am very interested in the field of Free trial. Your blog is very useful for me .I bookmarked your blog! I trust you will behave better from now on; I hope she understands that she cannot exepct a raise.
    My blog Free trial

Leave a Reply

*

     Copyrighted Mehdi Behamin , All Rights Reserved
    
Blog has been visited 204241 times