Git Product home page Git Product logo

alibabacloud_demo_cen-sag's Introduction

AlibabaCloud_Demo_CEN-SAG

Purpose

It demos on how to setup CEN+VPC+SAG and connect to Dataworks IP for cross region network acceleration.

It aims to let Shanghai user can visit Alibaba Cloud managed service (e.g. Dataworks) via CEN with network speed accelerated.

alt text

CEN+SAG Configuration Steps:

  1. create a VPC in London region alt text
  2. create a VPC in Shanghai region alt text
  3. create a ECS in London region with London VPC attached (with EIP assigned) alt text
  4. create a ECS in Shanghai region with Shanghai VPC attached (with no EIP assigned) alt text
  5. create a CEN with one end connecting to London VPC alt text
  6. connect CEN the other end to Shanghai VPC alt text
  7. buy bandwidth to enable CEN alt text
  8. create regions connection between UK and Shanghai alt text
  9. setup London VPC to next jump into Dataworks IPV4 alt text
  10. ssh into London ECS and configure POSTROUTING SNAT. See bellow for ECS SNAT configuration. alt text
  11. ssh into Shanghai ECS from London ECS to test if can ping to Dataworks via IPV4 alt text
  12. buy SAG APP alt text
  13. buy CCN instance alt text
  14. bind CCN with CEN alt text
  15. bing CCN with SAG alt text
  16. create SAG APP connection account. You should receive a email for detailed connection configiration. alt text

SAG APP install and configuration

  1. download and install SAG app client (https://www.alibabacloud.com/help/doc-detail/102544.htm) alt text
  2. configure SAG with (SAG Instance ID, Username, Password) alt text
  3. Connect SAG alt text
  4. Try to ping ide-eu-west-1.data.aliyun.com and see if it return resolved ip
  5. You should be able to visit any UK traffic and will automatically direct to Datawork IP via CEN.

SNAT configuration for DataWork next jump in CEN and VPC

# from a freshly created ECS

# check if ipv4 ip_forwarding is enabled, 1 = enabled
more /proc/sys/net/ipv4/ip_forwarding
echo "1">/proc/sys/net/ipv4/ip_forwarding

# check if ip_forward is enabled, 1 = enabled
vim  /etc/sysctl.conf
net.ipv4.ip_forward = 1

# check if new configure has been effected, if it is enabled, you should see "net.ipv4.ip_forward = 1"
sysctl -p

# check if iptable POSTROUTING is clean, POSTROUTING rules may conflict SNAT.
iptables -t nat -v -L POSTROUTING -n --line-number

# delete incorrect POSTROUTING rule if any conflicts
iptables -t nat --delete POSTROUTING <line number, e.g. 1>

# add correct SNAT
iptables -t nat -I POSTROUTING -s <Dataworks internal IP, e.g. 8.208.18.3> -j SNAT --to-source <your london ECS internal IP, e.g. 172.16.10.44>

# if you have add correct SNAT, you should see bellow 
# $ iptables -t nat -v -L POSTROUTING -n --line-number
# Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
# num   pkts bytes target     prot opt in     out     source               destination
# 1        0     0 SNAT       all  --  *      *       8.208.18.3           0.0.0.0/0            to:172.16.10.44

# ping dataworks IP from Shanghai ECS, you can see IP have been forwarded to London ECS. 
# $ ping ide-eu-west-1.data.aliyun.com
# PING tyjr-eu-west-1.aliyun.com (8.208.18.3) 56(84) bytes of data.
# From 172.16.10.44 (172.16.10.44) icmp_seq=1 Time to live exceeded
# From 172.16.10.44 (172.16.10.44) icmp_seq=2 Time to live exceeded
# From 172.16.10.44 (172.16.10.44) icmp_seq=3 Time to live exceeded
# ...

alibabacloud_demo_cen-sag's People

Contributors

jhs2jhs avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.