version 1.2, 2014/09/15 19:06:52
|
version 1.3, 2017/02/13 16:52:47
|
Line 4 IFACE="gre0"
|
Line 4 IFACE="gre0"
|
|
|
TUNNEL="172.31.2.1 172.31.2.2" |
TUNNEL="172.31.2.1 172.31.2.2" |
|
|
OPT="" | OPTS="" |
IP="10.10.10.1/24 10.10.10.2" |
IP="10.10.10.1/24 10.10.10.2" |
|
|
|
[ -z "$IFACE" ] && exit |
|
|
echo "Config GRE network interface $IFACE ..." |
echo "Config GRE network interface $IFACE ..." |
ifconfig $IFACE create | |
| ifconfig $IFACE create || exit |
ifconfig $IFACE tunnel $TUNNEL |
ifconfig $IFACE tunnel $TUNNEL |
ifconfig $IFACE inet $IP $OPT up | if [ -n "$IP" ]; then |
| ifconfig $IFACE inet $IP |
| fi |
| ifconfig $IFACE $OPTS up |