* [LARTC] one dude about rt_tables
@ 2002-11-27 14:52 Luis Miguel Cruz Miranda
2002-11-27 15:02 ` Martin A. Brown
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Luis Miguel Cruz Miranda @ 2002-11-27 14:52 UTC (permalink / raw)
To: lartc
Can I add routes to rt_tables by hand with the vi editor?
If I add a route to that file, it will be there if I reboot the box?
I am sure there are stupid questions but I can't find the answer into the
papers I have here.
Luis Miguel Cruz Miranda.
CCNA - Systems Administrator
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LARTC] one dude about rt_tables
2002-11-27 14:52 [LARTC] one dude about rt_tables Luis Miguel Cruz Miranda
@ 2002-11-27 15:02 ` Martin A. Brown
2002-11-27 15:07 ` Luis Miguel Cruz Miranda
2002-11-27 16:05 ` Martin A. Brown
2 siblings, 0 replies; 4+ messages in thread
From: Martin A. Brown @ 2002-11-27 15:02 UTC (permalink / raw)
To: lartc
Luis,
: Can I add routes to rt_tables by hand with the vi editor?
/etc/iproute2/rt_tables contains a mapping of human names to routing table
numbers. I call them table identifiers to table ids. This file does not
contain routes.
: If I add a route to that file, it will be there if I reboot the box?
If you wish to add static routes to the system at boot, you should be able
to use the system network initialization scripts and config files (e.g.,
redhat has a file /etc/sysconfig/static-routes).
Otherwise, you should write your own startup script or modify
/etc/rc.d/rc.local to include the routes you wish to add.
If you are using network address translation, you may find my NAT SysV
init scripts convenient:
http://plorf.net/linux-ip/html/scripts/nat
http://plorf.net/linux-ip/html/scripts/static-nat
Does that answer your question?
-Martin
--
Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LARTC] one dude about rt_tables
2002-11-27 14:52 [LARTC] one dude about rt_tables Luis Miguel Cruz Miranda
2002-11-27 15:02 ` Martin A. Brown
@ 2002-11-27 15:07 ` Luis Miguel Cruz Miranda
2002-11-27 16:05 ` Martin A. Brown
2 siblings, 0 replies; 4+ messages in thread
From: Luis Miguel Cruz Miranda @ 2002-11-27 15:07 UTC (permalink / raw)
To: lartc
>/etc/iproute2/rt_tables contains a mapping of human names to routing table
>numbers. I call them table identifiers to table ids. This file does not
>contain routes.
So, if I understand all correctly, I don't need that file to use multiple
route tables, do I?
> : If I add a route to that file, it will be there if I reboot the box?
>
>If you wish to add static routes to the system at boot, you should be able
>to use the system network initialization scripts and config files (e.g.,
>redhat has a file /etc/sysconfig/static-routes).
I found a solution here:
http://www.samag.com/documents/s\x1824/sam0201h/0201h.htm
>Otherwise, you should write your own startup script or modify
>/etc/rc.d/rc.local to include the routes you wish to add.
>
>If you are using network address translation, you may find my NAT SysV
>init scripts convenient:
>
> http://plorf.net/linux-ip/html/scripts/nat
> http://plorf.net/linux-ip/html/scripts/static-nat
>
>Does that answer your question?
>
>-Martin
>
>--
>Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com
Luis Miguel Cruz Miranda.
CCNA - Systems Administrator
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LARTC] one dude about rt_tables
2002-11-27 14:52 [LARTC] one dude about rt_tables Luis Miguel Cruz Miranda
2002-11-27 15:02 ` Martin A. Brown
2002-11-27 15:07 ` Luis Miguel Cruz Miranda
@ 2002-11-27 16:05 ` Martin A. Brown
2 siblings, 0 replies; 4+ messages in thread
From: Martin A. Brown @ 2002-11-27 16:05 UTC (permalink / raw)
To: lartc
: >/etc/iproute2/rt_tables contains a mapping of human names to routing table
: >numbers. I call them table identifiers to table ids. This file does not
: >contain routes.
: So, if I understand all correctly, I don't need that file to use multiple
: route tables, do I?
You are correct. It simply maps names to numbers so that you can use
something like this if you want:
# ip route add default via 10.0.0.1 table dsl-link
# ip route add default via 10.0.0.2 table t1-link
Where the rt_tables file contains:
1 dsl-link
2 t1-link
If you do not have the file /etc/iproute2/rt_tables, you can use the
following syntax .
# ip route add default via 10.0.0.1 table 1
# ip route add default via 10.0.0.2 table 2
: I found a solution here:
: http://www.samag.com/documents/s\x1824/sam0201h/0201h.htm
I've not seen this before and will have to read this article. Thanks for
the link.
I do have some general documentation on the use of "ip route" and "ip
rule" in the appendices of my documentation available here:
http://plorf.net/linux-ip/
Let me know if you find any flaws, areas for improvement, or missing
content.
-Martin
--
Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-11-27 16:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-27 14:52 [LARTC] one dude about rt_tables Luis Miguel Cruz Miranda
2002-11-27 15:02 ` Martin A. Brown
2002-11-27 15:07 ` Luis Miguel Cruz Miranda
2002-11-27 16:05 ` Martin A. Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.