Skip to content

Instantly share code, notes, and snippets.

@smooker
Created March 16, 2024 06:40
Show Gist options
  • Save smooker/700c735bde49b8c8629db74f98ab8af2 to your computer and use it in GitHub Desktop.
Save smooker/700c735bde49b8c8629db74f98ab8af2 to your computer and use it in GitHub Desktop.
postup() {
ewarn "postup entry for interface ${IFACE}"
# This function could be used, for example, to register with a
# dynamic DNS service. Another possibility would be to
# send/receive mail once the interface is brought up.
# /etc/init.d/named restart
# if [ "${IFACE}"="eth1.3" ]
# then
# sysctl net.ipv6.conf.eth1.3.disable_ipv6=1
# echo 1 > /proc/sys/net/ipv6/conf/eth1.3/disable_ipv6
# fi
if [[ "${IFACE}" == "br1" ]];
then
ewarn "postup of interface ${IFACE}"
#sysctl net.ipv6.conf.br1.disable_ipv6=0
ip link set br1 up
fi
if [[ "${IFACE}" == "br0" ]];
then
ewarn "postup of interface ${IFACE}"
# sysctl net.ipv6.conf.br0.disable_ipv6=1
# route del -net 192.168.99.0/24 dev br0
# echo "si e maikata ibalo"
fi
return 0
}
preup()
{
ewarn "preup entry for interface ${IFACE}"
# if [ "${IFACE}"="br1" ]
# then
# #sysctl net.ipv6.conf.br1.disable_ipv6=0
# ip link set br1 up
# echo "preup() of ${IFACE}"
# fi
return 0
}
predown() {
ewarn "predown entry for interface ${IFACE}"
# This function is mostly here for completeness... I haven't
# thought of anything nifty to do with it yet ;-)
# /etc/init.d/named stop
if [ "${IFACE}" == "br1" ]
then
ewarn "predown of interface ${IFACE}"
#sysctl net.ipv6.conf.br1.disable_ipv6=0
ip link set br1 down
fi
if [ "${IFACE}" == "br0" ]
then
ewarn "predown of interface ${IFACE}"
#sysctl net.ipv6.conf.br1.disable_ipv6=0
ip link set br1 down
fi
return 0
}
postdown() {
ewarn "postdown entry for interface ${IFACE}"
return 0
}
tuntap_tap7="tap"
tunctl_tap7="-u root"
mtu_tap7="1414"
config_tap7="null"
config_eth0="null"
ethtool_change_eth0="wol g"
ethtool_change_eth1="wol g"
bridge_br0="eth0"
mac_br0="00:19:99:e3:51:9f"
rc_net_br0_need="net.eth0"
bridge_br1="eth1"
mac_br1="00:19:99:fe:1d:c7"
rc_net_br1_need="net.eth1"
config_br1="192.168.111.37/24"
routes_br1="default via 192.168.111.1 dev br1 metric 1"
config_br0="192.168.111.36/24"
rc_net_br0_provide="!net"
mtu_br0="1500"
bridge_forward_delay_br0=0
bridge_hello_time_br0=1000
#rc_net_br1_provide="net"
#mtu_br1="1500"
#bridge_forward_delay_br1=0
#bridge_hello_time_br1=1000
config_usb0="dhcp"
#config_br0="192.168.100.4/24 192.168.11.4/24"
#config_br0="192.168.99.6/24"
config_br0="dhcp"
#routes_br0="192.168.100.0/24 metric 10"
#routes_br0="default via 192.168.100.129"
# 10.11.0.0/24 via 192.168.11.129"
#config_br1="192.168.100.7/24"
#routes_br1="default via 192.168.100.129"
#vlans_eth1="3 4"
config_eth1="null"
#config_eth1_3="null"
#config_eth1_3="192.168.100.7/24"
#routes_eth1_3="default via 192.168.100.129"
#config_br1="192.168.99.7/24"
#routes_br1="default via 192.168.99.129"
#config_br1="dhcp"
#config_eth1_4="0.0.0.0/24"
#mtu_eth1_3="1500"
#mtu_eth1_4="1500"
#mtu_eth1="1504"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment