You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at the instructions for manually adding and deleting rules and table entries I see that there is a disagreement. Here is what I ended up doing for the mptcp_up. Note that I did not touch the PPP case:
#!/bin/sh
# A script for setting up routing tables for MPTCP in the N950.
# Copy this script into /etc/network/if-up.d/
set -e
env > /etc/network/if_up_env
if [ "$IFACE" = lo -o "$MODE" != start ]; then
exit 0
fi
if [ -z $DEVICE_IFACE ]; then
exit 0
fi
\# FIRST, make a table-alias
if [ `grep $DEVICE_IFACE /etc/iproute2/rt_tables | wc -l` -eq 0 ]; then
NUM=`cat /etc/iproute2/rt_tables | wc -l`
echo "$NUM $DEVICE_IFACE" >> /etc/iproute2/rt_tables
else
NUM=`cat /etc/iproute2/rt_tables | grep $DEVICE_IFACE | cut -d\ -f 1`
fi
if [ -n $DHCP4_IP_ADDRESS ]; then
SUBNET=`echo $IP4_ADDRESS_0 | cut -d \ -f 1 | cut -d / -f 2`
ip route add $DHCP4_NETWORK_NUMBER/$SUBNET dev $DEVICE_IFACE scope link table $NUM
ip route add default via $DHCP4_ROUTERS dev $DEVICE_IFACE table $NUM
ip rule add from $DHCP4_IP_ADDRESS table $NUM
else
# PPP-interface
IPADDR=`echo $IP4_ADDRESS_0 | cut -d \ -f 1 | cut -d / -f 1`
ip route add table $DEVICE_IFACE default dev $DEVICE_IP_IFACE scope link
ip rule add from $IPADDR table $DEVICE_IFACE
fi
This script uses the first field of the line on which it finds the interface as the table number.
The text was updated successfully, but these errors were encountered:
Hello
I was trying to use for both up and down.I copied inside /etc/network/if-up.d/. Then When I try to save and exit, it doesn't work. what is my mistake and how can I make it excitable as said on the guide?
Looking at the instructions for manually adding and deleting rules and table entries I see that there is a disagreement. Here is what I ended up doing for the mptcp_up. Note that I did not touch the PPP case:
This script uses the first field of the line on which it finds the interface as the table number.
The text was updated successfully, but these errors were encountered: