Skip to content

Commit

Permalink
Added group option to local_ip_route script.
Browse files Browse the repository at this point in the history
  • Loading branch information
lsgunth committed Jul 6, 2017
1 parent 6b7f8ae commit ae8b028
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/local_ip_route
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

set -e

IFACE1=eth2
IFACE2=eth3
IFACE1=ntb0
IFACE2=ntb1

IFACE1_ADDR=172.18.1.1
IFACE1_VADDR=172.18.11.1
Expand All @@ -27,6 +27,9 @@ ip addr add $IFACE2_ADDR dev $IFACE2
ip link set dev $IFACE1 up
ip link set dev $IFACE2 up

ip link set dev $IFACE1 group 1
ip link set dev $IFACE2 group 1

# nat source IP 10.50.0.1 -> 10.60.0.1 when going to 10.60.1.1
iptables_add POSTROUTING -s $IFACE1_ADDR -d $IFACE2_VADDR -j SNAT \
--to-source $IFACE1_VADDR
Expand Down

0 comments on commit ae8b028

Please sign in to comment.