Skip to contentSkip to conversation

iproute2, alternative tables, no default route: routing

LARTC Marek Kierdelewicz 2 participants 2 messages Aug 18, 2006

lore
Share & tools
lore
#0 lore raw
Quoted 2 lines

Hi.

Hi

Quoted 9 lines

router # cat /etc/iproute2/rt_tables
#

# reserved values
#
255     local
254     main
253     default
0       unspec
#

Add default route to the "default" table .. it gets hit after your custom tables as you can see here:

router # ip rule ls

0:      from all lookup local
32763:  from 10.10.100.101/24 lookup Club
32764:  from 10.10.100.100/24 lookup Clients
32765:  from 192.168.1.0/24 lookup Servers
32766:  from all lookup main
32767:  from all lookup default

This should allow your router to connect out and receive connections.

cheers

Signature · 9 lines
Marek Kierdelewicz
Kierownik Dzia?u Systemów Sieciowych, KoBa
Manager of Network Systems Department, KoBa
tel. (85) 7406466; fax. (85) 7406467
e-mail: [email protected]
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
#1 lore raw

Re: [LARTC] iproute2, alternative tables, no default route:

В Птн, 18/08/2006 в 14:52 +0200, Marek Kierdelewicz пишет:

Quoted 18 lines
Quoted 1 line

Hi.

Hi

Quoted 9 lines

router # cat /etc/iproute2/rt_tables
#

# reserved values
#
255     local
254     main
253     default
0       unspec
#

Add default route to the "default" table .. it gets hit after your custom tables as you can see here:

router # ip rule ls

Quoted 8 lines
0:      from all lookup local
32763:  from 10.10.100.101/24 lookup Club
32764:  from 10.10.100.100/24 lookup Clients
32765:  from 192.168.1.0/24 lookup Servers
32766:  from all lookup main
32767:  from all lookup default

This should allow your router to connect out and receive connections.

Would 10.10.100.101/24 and 10.10.100.100/24 hit that table too? That's not desirable because 10.10.100.101/24 should have no route if there is no one in Club table, and 10.10.100.100/24 should have no route if there no one in Clients table.

Signature · 6 lines
Покотиленко Костик <[email protected]>

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc