LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 07-24-2005, 11:01 PM   #1
yenonn
Member
 
Registered: Feb 2003
Location: Malaysia
Distribution: Redhat 8.0, 9, Slackware 9.1
Posts: 511

Rep: Reputation: 30
how to create ip rule table?


hi,

i am using fc2. i want to create a user define table for ip rule. how can i do it???

i been looking at the http://lartc.org/lartc.html, for documentation. but, no point to create it. thanks.
 
Old 07-24-2005, 11:26 PM   #2
DoubleOTeC
Member
 
Registered: Aug 2003
Location: Dominica
Distribution: RedHat, FC1, FC3, FC4
Posts: 266

Rep: Reputation: 30
if i understand correctly.. you should be able to search for iptables or firewall scripts to get an idea on how to use BASH, for example, to create a script for iptable rules.
 
Old 07-25-2005, 12:36 AM   #3
yenonn
Member
 
Registered: Feb 2003
Location: Malaysia
Distribution: Redhat 8.0, 9, Slackware 9.1
Posts: 511

Original Poster
Rep: Reputation: 30
i am looking for multiple routing for 2 isp. i am not planning for iptables.
 
Old 07-25-2005, 01:11 AM   #4
mpeg4codec
Member
 
Registered: Jul 2005
Distribution: Debian, Gentoo, self-built [not LFS]
Posts: 109

Rep: Reputation: 15
I was just investigating this..

There are a couple ways to do it. If the interfaces are relatively equal in terms of bandwidth, I would recommend using the teql0 qdisc like so:

tc qdisc add dev eth0 root teql0
tc qdisc add dev eth1 root teql0

Then, configure your [public] interfaces. Give teql0 a dummy IP. You don't necessarily have to do the first two commands if your IP addresses [and routes] are already assigned, such as by your PPP client for DSL or DHCP client for cable.

ip addr add dev eth0 1.1.1.1/24
ip addr add dev eth1 2.2.2.2/24
ip addr add dev teql0 10.1.1.1

Finally, set the default route via the teql interface.

ip route add default via 10.1.1.1 dev teql0

Finally, you'll need to turn off an option that controls whether Linux will watch the return path of a packet. Substitute your interface names into these commands:

echo 0 > /proc/sys/net/ipv4/conf/eth0/rp_filter
echo 0 > /proc/sys/net/ipv4/conf/eth1/rp_filter

That should work for using teql.

If you're more interested in doing it with routing tables only, you'll need to have multipath routing enabled in the kernel. If you're using a stock kernel from your distro, you most likely have it. Bring up both interfaces using whatever commands you may use to do so. Once that is done, run:

ip route add default equalize

I personally have not tested it this way, but I have read that this is what works. Feel free to give it a try and let me know how it turns out.
 
Old 07-25-2005, 02:02 AM   #5
yenonn
Member
 
Registered: Feb 2003
Location: Malaysia
Distribution: Redhat 8.0, 9, Slackware 9.1
Posts: 511

Original Poster
Rep: Reputation: 30
it was failed from the first prompt

tc qdisc add dev eth0 root teql0
RTNETLINK answers: Invalid argument

what is tc qdisc? any comprehensive documentations?? thanks
 
Old 07-25-2005, 03:44 AM   #6
yenonn
Member
 
Registered: Feb 2003
Location: Malaysia
Distribution: Redhat 8.0, 9, Slackware 9.1
Posts: 511

Original Poster
Rep: Reputation: 30
prior to everything, first we have to modprobe sch_teql
 
Old 07-26-2005, 12:57 AM   #7
mpeg4codec
Member
 
Registered: Jul 2005
Distribution: Debian, Gentoo, self-built [not LFS]
Posts: 109

Rep: Reputation: 15
tc is the traffic control command. qdisc stands for queuing discipline. The Linux Advanced Routing & Traffic Control HOWTO does a fairly good job of explaining it in chapter nine. I think it should be required reading for anyone interested in this stuff.
 
  


Reply


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
create table in postgres database kranti Linux - Newbie 1 11-15-2005 07:52 PM
Script or Simple App to Create HTML Table Populated With Images infidel Linux - Software 14 06-07-2005 02:08 AM
create, read and write a table in xml file using C alix123 Programming 1 12-02-2004 01:18 PM
CREATE TABLE problems in MySQL mosdef Linux - Software 0 03-10-2004 11:18 AM
mysql doesnt create a table for each domain PurpleMotion Linux - General 0 08-01-2003 04:16 AM


All times are GMT -5. The time now is 10:48 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration