-
Notifications
You must be signed in to change notification settings - Fork 0
/
magw-show-dp.sh
executable file
·38 lines (31 loc) · 1.1 KB
/
magw-show-dp.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
# Display iptables NAT rules and routes for multiple active gateway POC
C1_GW1_NAME='cluster1-worker'
C1_GW2_NAME='cluster1-worker2'
C2_GW1_NAME='cluster2-worker'
C2_GW2_NAME='cluster2-worker2'
echo ""
echo "Cluster1 Gateway1 NAT Rules"
docker exec -it $C1_GW1_NAME iptables -t nat -n -L SM-GN-EGRESS-CLUSTER
echo ""
echo "Cluster1 Gateway2 NAT Rules"
docker exec -it $C1_GW2_NAME iptables -t nat -n -L SM-GN-EGRESS-CLUSTER
echo ""
echo "Cluster2 Gateway1 NAT Rules"
docker exec -it $C2_GW1_NAME iptables -t nat -n -L SM-GN-EGRESS-CLUSTER
echo ""
echo "Cluster2 Gateway2 NAT Rules"
docker exec -it $C2_GW2_NAME iptables -t nat -n -L SM-GN-EGRESS-CLUSTER
echo ""
echo ""
echo "Cluster 1 Gateway 1 vxlan-tunnel routes"
docker exec -it $C1_GW1_NAME ip -c route show table 100
echo ""
echo "Cluster 1 Gateway 1 vxlan-tunnel routes"
docker exec -it $C1_GW2_NAME ip -c route show table 100
echo ""
echo "Cluster 1 Gateway 1 vxlan-tunnel routes"
docker exec -it $C2_GW1_NAME ip -c route show table 100
echo ""
echo "Cluster 1 Gateway 1 vxlan-tunnel routes"
docker exec -it $C2_GW2_NAME ip -c route show table 100