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

RE: post-up in interfaces doesn't work



Hi Mojtaba,

> Van: Mojtaba [mailto:kernel@rp2.org] 

> I have a brand new jessie setup in a KVM VPS.
> The server is in OVH network which needs manual routing applied.
> However the post-up and setting in the /etc/network/interfaces is not executed This is my interfaces file

> auto eth0
> iface eth0 inet static
> address         198.50.210.32
> netmask         255.255.255.255
> broadcast       198.50.210.32
> #gateway                192.99.39.254
> post-up route add 192.99.39.254 dev eth0 post-up route add default gw 192.99.39.254 post-down route del 192.99.39.254 dev eth0 post-down route del default gw 192.99.39.254

> I've tried a simple 'echo working > /testfile.txt' line but the post-up or pre-up is not executed Is there anything I'm missing?

It might be reformatting due to the email posting but... Did you proper indent the lines below the iface eth0 ... line?
Also, my post-up lines look similar but I use the ip route add <network> via <router ip> command.

Lastly, I do not understand how your routing is supposed to work. Unless... read on.
Eth0 connects to a network where the host ip number = the network ip number = the network broadcast ip number. This looks like an illegal config.
If you want to tell your system that 192.99.39.254 is also behind eth0 then how is your system supposed to communicate with it? They have no common network address?
Unless....
If they are on the same LAN / line (dial up PPP, etc) and should communicate using layer 2 then the pointopoint config is indeed what you want.


Bonno Bloksma


Reply to: