Route Multiple Subnets
Mattz last edited by
I have used PFsense for a long time and need to convert a Debian router to Pfsense with Failover.
The config that I have now is routing a multiple subnet that I need to setup in Pfsense, the question is what the best way is.
My config is as follow where the virtual interfaces are routed over eth0 using IPv6:
auto eth0 iface eth0 inet static address 62.xxx.xxx.xxx netmask 255.255.255.128 network 62.xxx.xxx.x broadcast 62.xxx.xxx.xxx post-up /sbin/iptables-restore < /etc/iptables post-up ip -6 addr add 2001:7b8:3eb::1/64 dev eth0 post-up sleep 40 && /etc/init.d/aiccu start post-up sleep 120 && ip -6 route add 2001:7b8:3eb:1::/64 via 2001:7b8:3eb::2 post-up sleep 120 && ip -6 route add 2001:7b8:3eb:2::/64 via 2001:7b8:3eb::5 post-up sleep 125 && echo "1"> /proc/sys/net/ipv6/conf/all/forwarding auto eth0:198 iface eth0:198 inet static address 62.xxx.xxx.xxx netmask 255.255.255.128 network 62.xxx.xxx.x broadcast 62.xxx.xxx.xxx auto eth0:32 iface eth0:32 inet static address 62.xxx.xxx.xxx netmask 255.255.255.224 network 62.xxx.xxx.xxx broadcast 62.xxx.xxx.xxx auto eth1 iface eth1 inet static address 87.xxx.xxx.xx1 netmask 255.255.255.252 gateway 87.xxx.xxx.10 post-up /usr/sbin/ethtool -s eth1 speed 100 autoneg off duplex full post-up ip6tables-restore < /etc/ip6tables
Is there a special way to do best or just add the subnets and make the routes ?
podilarius last edited by
I just setup the IPs and create the routes. I am not as familiar with IP6 routing as I should be, but I would imagine it works similarly. The eth0:XXX is an IP Alias in pfsense 2.0 and higher. You just have to translate a bit from Linux to BSD style of rules.