How do I configure iproute2 rules and route tables to automatically start at boot time, or to be run when the network script is run
ie. I can issue the following commands, but when the machine reboots the settings are not automtically set. Typically I have been accustomed to editing /etc/sysconfig/network to establist a default route, but I need to configure multiple routing tables. I can edit /etc/iproute2/rt_tables to add the table names, but where do I put the config settings for the rules and routes.
[root@localhost]# ip route add default via 10.90.2.1 dev bond0.902 table 11 [root@localhost]# ip ru add from 10.90.2.244/32 table 11 priority 500
Am Sa, den 29.10.2005 schrieb Robin Mordasiewicz um 19:35:
How do I configure iproute2 rules and route tables to automatically start at boot time, or to be run when the network script is run
ie. I can issue the following commands, but when the machine reboots the settings are not automtically set. Typically I have been accustomed to editing /etc/sysconfig/network to establist a default route, but I need to configure multiple routing tables. I can edit /etc/iproute2/rt_tables to add the table names, but where do I put the config settings for the rules and routes.
[root@localhost]# ip route add default via 10.90.2.1 dev bond0.902 table 11 [root@localhost]# ip ru add from 10.90.2.244/32 table 11 priority 500
device specific routes: /etc/sysconfig/network-scripts/route-<device>
device independent routes: /etc/sysconfig/static-routes
Both take "ip route" syntax, only "static-routes" requires a leading "any" for each line. See /usr/share/doc/initscripts-*/sysconfig.txt for more.
Alexander
On Sun, 30 Oct 2005, Alexander Dalloz wrote:
Am Sa, den 29.10.2005 schrieb Robin Mordasiewicz um 19:35:
How do I configure iproute2 rules and route tables to automatically start at boot time, or to be run when the network script is run
ie. I can issue the following commands, but when the machine reboots the settings are not automtically set. Typically I have been accustomed to editing /etc/sysconfig/network to establist a default route, but I need to configure multiple routing tables. I can edit /etc/iproute2/rt_tables to add the table names, but where do I put the config settings for the rules and routes.
[root@localhost]# ip route add default via 10.90.2.1 dev bond0.902 table 11 [root@localhost]# ip ru add from 10.90.2.244/32 table 11 priority 500
device specific routes: /etc/sysconfig/network-scripts/route-<device>
device independent routes: /etc/sysconfig/static-routes
Both take "ip route" syntax, only "static-routes" requires a leading "any" for each line. See /usr/share/doc/initscripts-*/sysconfig.txt for more.
Ok, but what about the rules, ie. When issueing the following commands I understand how I can use the route-device file, but which file do edit to deal with the "ip rule add" line ?
/sbin/ip rule delete from ${IPADDR} lookup ${TABLE} /sbin/ip rule add from ${IPADDR} table ${TABLE} priority ${PRIORITY}
On Mon, Oct 31, 2005 at 08:28:44AM -0500, Robin Mordasiewicz wrote:
Ok, but what about the rules, ie. When issueing the following commands I understand how I can use the route-device file, but which file do edit to deal with the "ip rule add" line ?
/sbin/ip rule delete from ${IPADDR} lookup ${TABLE} /sbin/ip rule add from ${IPADDR} table ${TABLE} priority ${PRIORITY}
If you are willing to do some packaging work, you might want to look at /etc/net, which has been developed for the ALTLinux distribution:
/etc/net represents a new approach to Linux network configuration tasks. Inspired by the limitations of traditional configuration subsystems, /etc/net provides builtin support for:
* configuration profiles * interface name management * removable devices * full iproute2 command set * interface dependencies resolution * QoS configuration framework * firewall support
/etc/net provides support for the following interface types:
* Ethernet * WiFi (WEP) * IPv4/IPv6 tunnels * PSK IPSec tunnels * VLAN * PLIP * Ethernet bonding and bridging * traffic equalizer * usbnet * PPP (PPtP, PPPoE) * DVB (SkyStar-2, Pent@NET, Pent@VALUE)
Due to its modular design, support for new interface types can be added without overall design changes. /etc/net consists of core scripts (stable) and GUI configurator (development). Both parts are licensed under GPL.
To get this packaged properly under Fedora, you'll want to hack up the initscripts package spec file to split off the networking parts into a subpackage (call it netscripts or whatever) and then package up etcnet as a replacement. I filed an RFE for subpackage separation a while ago, but Buill Nottingham nixed the idea:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=145787
Regards,
Bill Rugolsky
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
On Mon, 31 Oct 2005, Bill Rugolsky Jr. wrote:
On Mon, Oct 31, 2005 at 08:28:44AM -0500, Robin Mordasiewicz wrote:
Ok, but what about the rules, ie. When issueing the following commands I understand how I can use the route-device file, but which file do edit to deal with the "ip rule add" line ?
/sbin/ip rule delete from ${IPADDR} lookup ${TABLE} /sbin/ip rule add from ${IPADDR} table ${TABLE} priority ${PRIORITY}
If you are willing to do some packaging work, you might want to look at /etc/net, which has been developed for the ALTLinux distribution:
/etc/net represents a new approach to Linux network configuration tasks. Inspired by the limitations of traditional configuration subsystems,
<snip>
That looks interesting, but I don't have any time for development on this. I need something that "Just Works".
What I have done is written a script in /sbin/ifup-local, which will add the rules I need. I don't like it, but it will get me by. I think that in the long run the /etc/net approach will be a better strategy, but for now I need somehting which is also supported by RedHat-AS