Re: NetworkManager and special routing [not solved]
On Tue, Aug 26, 2008 at 10:01 AM, Alan Evans [EMAIL PROTECTED] wrote: Is there any way to get NetworkManager to configure a special route to a particular host while still getting the rest from DHCP as it always does? On my old desktop (without NetworkManager), I just used system-config-network and added the rule on the Route tab for the connection. Now, Fedora9, I do that and NetworkManager stops managing the connection. Ugh. If NetworkManager is the way of the future, then I really want to adopt it. But I really can't have packets to my own server travelling through our default gateway, out over the wide internet through servers hundreds of miles from here, just to be routed back into the server room next door to my office. Can this be done? Or is it time to give up (again) on NetworkManager and fall back to the static configurations which, while bothersome, at least work? Thanks for all the help from Phil Meyer. I'd like to get the new method working, but unfortunately I don't have time to dink with it an longer. *sigh* I simply disabled NetworkManager, enabled the classic network service, and configured my static route from the convenient GUI. Done. Hopefully, NM will allow this simple configuration explicitly in the future, rather than requiring expert intervention and editing of config files (some of which don't exist in the install and must be created from scratch!) still coming to no solution. Later. Thanks again... -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: NetworkManager and special routing
On Tue, Aug 26, 2008 at 3:08 PM, Phil Meyer [EMAIL PROTECTED] wrote: Alan Evans wrote: On Tue, Aug 26, 2008 at 1:40 PM, Phil Meyer [EMAIL PROTECTED] 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. Still nothing at this point. 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) ;; Well, this produces at least an error in /var/log/messages: Aug 28 08:01:02 localhost nm-dispatcher.action: Script '/etc/NetworkManager/dispatcher.d/static' exited with error status 2. So that's something, anyway. I don't see any errors in the script, but I confess that I'm a second-rate bash scripter. -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: NetworkManager and special routing
Alan Evans wrote: Is there any way to get NetworkManager to configure a special route to a particular host while still getting the rest from DHCP as it always does? On my old desktop (without NetworkManager), I just used system-config-network and added the rule on the Route tab for the connection. Now, Fedora9, I do that and NetworkManager stops managing the connection. Ugh. If NetworkManager is the way of the future, then I really want to adopt it. But I really can't have packets to my own server travelling through our default gateway, out over the wide internet through servers hundreds of miles from here, just to be routed back into the server room next door to my office. Can this be done? Or is it time to give up (again) on NetworkManager and fall back to the static configurations which, while bothersome, at least work? If you use the system-config-network tool to manage the config, you may need to edit the config by hand afterwards. You need to check: /etc/sysconfig/network-scripts/ifcfg-eth0 and /etc/sysconfig/network-scripts/ifcfg-wlan0 to make sure that they include: NM_CONTROLLED=yes However, the system-config-network tool also edits /etc/sysconfig/static-routes which is obeyed by NetworkManager (I believe). Let us know if you get it working. We have some systems here that use cell cards to dial out, but still need access to internal networks via dhcp. We use /etc/sysconfig/static-routes to manage that. These systems do NOT use NetworkManager, but the principle should be the same. Good Luck! -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Re: NetworkManager and special routing
On Tue, Aug 26, 2008 at 10:14 AM, Phil Meyer [EMAIL PROTECTED] wrote: However, the system-config-network tool also edits /etc/sysconfig/static-routes which is obeyed by NetworkManager (I believe). I don't have /etc/sysconfig/static-routes. What's supposed to be in that file? Or how do I coax system-config-network (or whatever) to create it? When I set up the route, system-config-network created /etc/sysconfig/network-scripts/route-eth0. The file is still there, but NetworkManager apparently doesn't care about that one. Let us know if you get it working. We have some systems here that use cell cards to dial out, but still need access to internal networks via dhcp. We use /etc/sysconfig/static-routes to manage that. These systems do NOT use NetworkManager, but the principle should be the same. Good Luck! Thanks! -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list