Add Route at Boot Time
+--+ | Firewall | | | .33.34.35.97 | vr0dhcpd | | | | | Wired Network | 172.24.10.21 |--+--+--+--+- 172.24.10/24 | | | | +-+ | vr1 | | Wireless Router | | 172.24.20.1 |---| 172.24.20.2 |Wireless Network | | | 192.168.2.1 |--- 192.168.2/24 | | | dhcpd | | | +-+ | vr2 | | 172.24.30.1 |- Future Use | | | | +-+ | vr3 dhclient |---| Cable Modem |--- Internet Cloud +--+ +-+ Problem. I need to manually do: route add -inet 192.168.2.0/24 172.24.20.2 How do I get this done automagically at boot time? What man pages do I need to (re-)read? Thanks, Ken
Re: Add Route at Boot Time
Thanks -Original Message- From: Fred Crowson [mailto:fred.crow...@gmail.com] Sent: Friday, January 20, 2012 9:51 AM To: Hendrickson, Kenneth Cc: misc@OpenBSD.org Subject: Re: Add Route at Boot Time On 20 January 2012 14:29, Hendrickson, Kenneth khend...@harris.com wrote: +--+ | Firewall | | | .33.34.35.97 | vr0dhcpd | | | | | Wired Network | 172.24.10.21 |--+--+--+--+- 172.24.10/24 | | | | +-+ | vr1 | | Wireless Router | | 172.24.20.1 |---| 172.24.20.2 |Wireless Network | | | 192.168.2.1 |--- 192.168.2/24 | | | dhcpd | | | +-+ | vr2 | | 172.24.30.1 |- Future Use | | | | +-+ | vr3 dhclient |---| Cable Modem |--- Internet Cloud +--+ +-+ Problem. I need to manually do: route add -inet 192.168.2.0/24 172.24.20.2 How do I get this done automagically at boot time? What man pages do I need to (re-)read? Thanks, Ken Add: !route add -inet 192.168.2.0/24 172.24.20.2 to the appropriate hostname.if See man hostname.if hth Fred
Re: Add Route at Boot Time
On 20 January 2012 14:29, Hendrickson, Kenneth khend...@harris.com wrote: +--+ | Firewall | | | .33.34.35.97 | vr0dhcpd | | | | | Wired Network | 172.24.10.21 |--+--+--+--+- 172.24.10/24 | | | | +-+ | vr1 | | Wireless Router | | 172.24.20.1 |---| 172.24.20.2 |Wireless Network | | | 192.168.2.1 |--- 192.168.2/24 | | | dhcpd | | | +-+ | vr2 | | 172.24.30.1 |- Future Use | | | | +-+ | vr3 dhclient |---| Cable Modem |--- Internet Cloud +--+ +-+ Problem. I need to manually do: route add -inet 192.168.2.0/24 172.24.20.2 How do I get this done automagically at boot time? What man pages do I need to (re-)read? Thanks, Ken Add: !route add -inet 192.168.2.0/24 172.24.20.2 to the appropriate hostname.if See man hostname.if hth Fred
Re: Add Route at Boot Time
add a line like !/sbin/route what via where to your /etc/hostname.vr1 file On 20. jan. 2012, at 15.29, Hendrickson, Kenneth wrote: +--+ | Firewall | | | .33.34.35.97 | vr0dhcpd | | | | | Wired Network | 172.24.10.21 |--+--+--+--+- 172.24.10/24 | | | | +-+ | vr1 | | Wireless Router | | 172.24.20.1 |---| 172.24.20.2 |Wireless Network | | | 192.168.2.1 |--- 192.168.2/24 | | | dhcpd | | | +-+ | vr2 | | 172.24.30.1 |- Future Use | | | | +-+ | vr3 dhclient |---| Cable Modem |--- Internet Cloud +--+ +-+ Problem. I need to manually do: route add -inet 192.168.2.0/24 172.24.20.2 How do I get this done automagically at boot time? What man pages do I need to (re-)read? Thanks, Ken
Re: Add Route at Boot Time
http://www.openbsd.org/cgi-bin/man.cgi?query=hostname.ifsektion=5 Check the command line section Le 20 janv. 2012 09:36, Hendrickson, Kenneth khend...@harris.com a icrit : +--+ | Firewall | | | .33.34.35.97 | vr0dhcpd | | | | | Wired Network | 172.24.10.21 |--+--+--+--+- 172.24.10/24 | | | | +-+ | vr1 | | Wireless Router | | 172.24.20.1 |---| 172.24.20.2 |Wireless Network | | | 192.168.2.1 |--- 192.168.2/24 | | | dhcpd | | | +-+ | vr2 | | 172.24.30.1 |- Future Use | | | | +-+ | vr3 dhclient |---| Cable Modem |--- Internet Cloud +--+ +-+ Problem. I need to manually do: route add -inet 192.168.2.0/24 172.24.20.2 How do I get this done automagically at boot time? What man pages do I need to (re-)read? Thanks, Ken
Re: Add Route at Boot Time
Thanks. But the !command-line option in hostname.if(5) seems more elegant. Ken -Original Message- From: Stuart VanZee [mailto:stua...@datalinesys.com] Sent: Friday, January 20, 2012 9:58 AM To: Hendrickson, Kenneth Subject: RE: Add Route at Boot Time Or you could just add the route command to your /etc/rc.local file and have done. :) s -Original Message- From: owner-m...@openbsd.org [mailto:owner-m...@openbsd.org] On Behalf Of Hendrickson, Kenneth Sent: Friday, January 20, 2012 9:30 AM To: misc@OpenBSD.org Subject: Add Route at Boot Time +--+ | Firewall | | | .33.34.35.97 | vr0dhcpd | | | | | Wired Network | 172.24.10.21 |--+--+--+--+- 172.24.10/24 | | | | +-+ | vr1 | | Wireless Router | | 172.24.20.1 |---| 172.24.20.2 |Wireless Network | | | 192.168.2.1 |--- 192.168.2/24 | | | dhcpd | | | +-+ | vr2 | | 172.24.30.1 |- Future Use | | | | +-+ | vr3 dhclient |---| Cable Modem |--- Internet Cloud +--+ +-+ Problem. I need to manually do: route add -inet 192.168.2.0/24 172.24.20.2 How do I get this done automagically at boot time? What man pages do I need to (re-)read? Thanks, Ken
Re: Add Route at Boot Time
Also add to search this one when i beggined on openbsd. I think that in route(8), it should be writen that persistent route must be add in hostname.if. No where in route(8) there a link to hostname.if(5), not even in files. Le 20 janv. 2012 09:57, Hendrickson, Kenneth khend...@harris.com a icrit : Thanks -Original Message- From: Fred Crowson [mailto:fred.crow...@gmail.com] Sent: Friday, January 20, 2012 9:51 AM To: Hendrickson, Kenneth Cc: misc@OpenBSD.org Subject: Re: Add Route at Boot Time On 20 January 2012 14:29, Hendrickson, Kenneth khend...@harris.com wrote: +--+ | Firewall | | | .33.34.35.97 | vr0dhcpd | | | | | Wired Network | 172.24.10.21 |--+--+--+--+- 172.24.10/24 | | | | +-+ | vr1 | | Wireless Router | | 172.24.20.1 |---| 172.24.20.2 |Wireless Network | | | 192.168.2.1 |--- 192.168.2/24 | | | dhcpd | | | +-+ | vr2 | | 172.24.30.1 |- Future Use | | | | +-+ | vr3 dhclient |---| Cable Modem |--- Internet Cloud +--+ +-+ Problem. I need to manually do: route add -inet 192.168.2.0/24 172.24.20.2 How do I get this done automagically at boot time? What man pages do I need to (re-)read? Thanks, Ken Add: !route add -inet 192.168.2.0/24 172.24.20.2 to the appropriate hostname.if See man hostname.if hth Fred