What's new

bridge file when to call at boot

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

waeking

Regular Contributor
I have created a bridge event, when would be the best time to call this file. init-start? nat-start? wan-event with wan0-init?

Code:
#!/bin/sh

ifconfig br0:net10 10.255.255.254 netmask 255.0.0.0 broadcast 10.255.255.255 down &> /dev/null
ifconfig br0:net172 172.31.255.254 netmask 255.240.0.0 broadcast 172.31.255.255 down &> /dev/null
ifconfig br0:net10 10.255.255.254 netmask 255.0.0.0 broadcast 10.255.255.255 up
ifconfig br0:net172 172.31.255.254 netmask 255.240.0.0 broadcast 172.31.255.255 up

/sbin/route del -net 10.0.0.0 netmask 255.0.0.0 gw 0.0.0.0 &> /dev/null
/sbin/route del -net 172.16.0.0 netmask 255.240.0.0 gw 0.0.0.0 &> /dev/null
/sbin/route add -net 10.0.0.0 netmask 255.0.0.0 gw 192.168.1.241 metric 128
/sbin/route add -net 172.16.0.0 netmask 255.240.0.0 gw 192.168.1.241 metric 128

EDIT: doesn't work under init-start
 
Last edited:
Well part of the problem here is you're trying to handle two different types of events w/ a single event handler. The binding of additional networks *should* work from the init-start event, but the addition/deletion of routes will require waiting until the routing tables are established (wan-start I presume). Or else have both use the wan-start event.
 
Thanks,
routing works in the nat-start. Perfectly
The binding doesn't work in init-start.

Does nat-start work even when the wan is down?
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top