Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for comments: static routing configuration #20

Closed
adrienthebo opened this issue Jan 6, 2013 · 4 comments
Closed

Request for comments: static routing configuration #20

adrienthebo opened this issue Jan 6, 2013 · 4 comments

Comments

@adrienthebo
Copy link
Member

One of the features that has been asked for frequently is support for static network routes. This is a feature I hope to add, but I would like feedback on how the type should be implemented - that is, what are the types of information needed in the type. For example:

network_route { 'default':
  family  => 'inet',
  type    => 'network',
  netmask => '0/0',
  device  => 'eth0',
  gateway => '1.2.3.4',
  metric  => '0',
}

This is one suggested interface for the network_route type. What I need are example types like this and the expected output, so I can get an idea of what attributes need to be handled and how.

@vjanelle
Copy link

vjanelle commented Jan 6, 2013

Looks about right.. The RHEL init scripts have the format:

any net ...

and passes that as

/sbin/route add -<entry from static-routes s/^any //>

If that makes sense.

@adrienthebo
Copy link
Member Author

#23 adds in an implementation of network_route for Debian; if people could take a look at that and give opinions on that it would be great. I think it's a good implementation but there are a few edge cases around multiple routes with the same destination on multiple interfaces that could use some thought.

@codec
Copy link
Contributor

codec commented Jan 22, 2013

The bad thing about #23 is that it isn't possible to implement support for multiple interfaces with the same route / metrics as the if-up.d script doesn't support any kind of options passing. The lines are passed almost as-is to netstat (:shit:).

Maybe implementing an iproute2 provider might be more flexible across multiple distro? That would involve coming up with a solution to persist across reboots (i.e. write a if-up style helper) though.

@adrienthebo
Copy link
Member Author

Since we have Redhat and Debian route implementations I'm going to consider this solved. Thanks all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants