From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Fedyk mfedyk@matchmail.com Date: Fri, 17 Nov 2000 21:25:44 +0000 Subject: [LARTC] A complicated routing scenario (for me at least) Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org
Arthur van Leeuwen wrote:
> 
> On Thu, 16 Nov 2000, Andrew wrote:
> 
> > Hey, I'm working on the rules and routes to implement what I've been talking
> > about, and I've got a small question about the ip rule add.
> 
> > I'm trying to add a blackhole route, and ip rule add seems to insist that I
> > provide a lookup table with the route.
> >
> > For instance If I execute the command:
> >
> > "ip rule add from 0.0.0.0/0 type blackhole."
> >
> > when I look at what it did with "ip rule ls" I see
> >
> > "from all lookup main blackhole"
> 
> Try using   ip rule add priority 256 from 0.0.0.0/0 type blackhole
> 
> Doei, Arthur. (There's some hints as to the priority being required in the
>                IP command reference)

ip rule add lookup 256 from 0.0.0.0/0 type blackhole

or replace "lookup" with "table", same thing.

If you use priority, you are affecting the location of that rule in the rule
search.  In the above case, it should blackhole everything, unless there are any
"ip rule"s with a priority below 256.  This is in theory, I didn't want to try
it on my one linux box.