Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion sysconfig.txt
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,12 @@ Files in /etc/sysconfig/network-scripts/
"mode=active-backup arp_interval=60 arp_ip_target=192.168.1.1,192.168.1.2"

Tunnel-specific items:
TYPE=GRE|IPIP|IPIP6
TYPE=GRE|IPIP|IPIP6|EXTERNAL
External is a mode for ip6_tunnel interfaces (that cannot be set on
the primary ip6tnl0 interface), which permits unwrapping encapsulated
packets regardless of their internal IP (v4 or v6) provided the inner
address is on the interface. Use $MY_INNER_IPADDR for v4 addresses. Use
$IPV6ADDR and $IPV6ADDR_SECONDARIES as usual for v6 addresses.
MY_INNER_IPADDR=local IP address of the tunnel interface
PEER_OUTER_IPADDR=IP address of the remote tunnel endpoint
MY_OUTER_IPADDR=IP address of the local tunnel endpoint
Expand Down
14 changes: 9 additions & 5 deletions sysconfig/network-scripts/ifup-tunnel
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ IPIP)
proto=-4
/sbin/modprobe ipip
;;
IPIP6)
IPIP6|EXTERNAL)
MODE=ipip6
proto=-6
/sbin/modprobe ip6_tunnel
Expand All @@ -66,10 +66,14 @@ fi

# Create the tunnel
# The outer addresses are those of the underlying (public) network.
/sbin/ip $proto tunnel add "$DEVICE" mode "$MODE" \
${MY_OUTER_IPADDR:+local "$MY_OUTER_IPADDR"} \
${PEER_OUTER_IPADDR:+remote "$PEER_OUTER_IPADDR"} \
${KEY:+key "$KEY"} ${TTL:+ttl "$TTL"}
if [ "$TYPE" = 'EXTERNAL' ]; then
/sbin/ip link add "$DEVICE" type ip6tnl external
else
/sbin/ip $proto tunnel add "$DEVICE" mode "$MODE" \
${MY_OUTER_IPADDR:+local "$MY_OUTER_IPADDR"} \
${PEER_OUTER_IPADDR:+remote "$PEER_OUTER_IPADDR"} \
${KEY:+key "$KEY"} ${TTL:+ttl "$TTL"}
fi

if [ -n "$MTU" ]; then
/sbin/ip link set "$DEVICE" mtu "$MTU"
Expand Down