Skip to content

Commit 750e015

Browse files
committed
Fix routing
1 parent 6f82293 commit 750e015

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

npi/multinic/routing.dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ RUN apk add --no-cache \
1515

1616
# 1. Get Gateway IP from eth1
1717
# 2. Route Private Google Access VIPs through eth1
18-
CMD ["/bin/bash", "-c", "GW_IP=$(ip -4 addr show eth1 | grep -oP '(?<=inet\\s)\\d+(\\.\\d+){3}' | awk -F. '{print $1\".\"$2\".\"$3\".1\"}') && ip route add 199.36.153.8/30 via $GW_IP dev eth1"]
18+
19+
CMD ["/bin/bash", "-c", "IP_ETH1=$(ip -4 addr show eth1 | grep -oP '(?<=inet\\s)\\d+(\\.\\d+){3}') && GW_ETH1=$(echo $IP_ETH1 | awk -F. '{print $1\".\"$2\".\"$3\".1\"}') && ip route add default via $GW_ETH1 dev eth1 table 100 && ip rule add from $IP_ETH1 lookup 100"]

0 commit comments

Comments
 (0)