Re: NetworkManager and special routing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alan Evans wrote:
[adding fedora-list back into the reply chain]

On Tue, Aug 26, 2008 at 1:40 PM, Phil Meyer <pmeyer@xxxxxxxxxxxxxxxx> wrote:
The file: /etc/sysconfig/static-routes is optional, and does not exist by
default.

#This line forces multicast out of eth1
# any: net 224.0.0.0 netmask 240.0.0.0 dev eth1
# for the lab, uncomment the next two lines
# This line forces a route to the local network
# any: net 10.0.0.0 netmask 255.0.0.0 dev eth0
# This line will force a specific network over the primary interface
# any: net NNN.NNN.0.0 netmask 255.255.0.0 dev eth0

Still no joy. But I'm still not sure I got it right. All of the
examples seem to demonstrate routing a particular network through a
particular interface. I only have one interface on this machine; what
I wish to do is specify a particular gateway for use for a particular
address. I tried:

any: net NNN.NNN.NNN.NNN netmask 255.255.255.255 gateway 192.168.0.3

as a guess, but nothing changed. Nothing in any log that I could find
seemed to indicate whether NetworkManager was even trying to read this
file.


Well, for a single host, it would be something like this:

any: host 10.10.10.10 gateway 192.168.1.1

But the question is still whether or not NetworkManager will obey this file.

Worst case scenerio we can write a NM dispatcher script to do it:

in: /etc/NetworkManager/dispatcher.d/

create a file called static, chmod 755 static, and add: (NOT tested):  I ripped the section from /etc/init.d/network.

#!/bin/sh

interface=$1
state=$2

case $state in
	up)
       # Add non interface-specific static-routes.
       if [ -f /etc/sysconfig/static-routes ]; then
          grep "^any" /etc/sysconfig/static-routes | while read ignore args ; do
             /sbin/route add -$args
          done
       fi
	;;

       down) ;;



--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux