LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   IPv4 and IPv6 Dual Stack issue with routes in /etc/network/interfaces (https://www.linuxquestions.org/questions/linux-networking-3/ipv4-and-ipv6-dual-stack-issue-with-routes-in-etc-network-interfaces-4175497812/)

darkmode 03-11-2014 09:49 AM

IPv4 and IPv6 Dual Stack issue with routes in /etc/network/interfaces
 
Hi there,

Im configuring dual-stack on a Debian machine and as soon as I uncomment "post-up and "pre-down" lines in the configuration file I get the following error:

RTNETLINK answers: File exists
Failed to bring up eth1.

This is how my configuration file looks, as soon as I comment out the "post-up" and "pre-down" lines then my eth1 gets the IPv6 address. If I comment out the inet6 interface then my configure works perfectly adding the routes to the appropriate network.

auto eth1
iface eth1 inet static
address 172.12.0.1
netmask 255.255.255.0
post-up ip route add 172.16.0.0/24 via 172.12.0.50
pre-down ip route add 172.16.0.0/24 via 172.12.0.50

iface eth1 inet6 static
address 2001:23::207:129
netmask 112

Please advise as I need these routes to be added on startup.

Thanks
Darkmode

darkmode 03-12-2014 06:18 AM

Needed to add pre-up modprobe ipv6 into my /etc/network/interfaces file, I assume this is because I am currently using an old disto.


All times are GMT -5. The time now is 05:23 AM.