Skip to content

Peering with AS203314 (Tunnel)

Establishing a peering connection with AS203314 can be done using various Layer 2/3 tunneling protocols such as WireGuard, GRE, GRETAP, and VxLAN.

In this guide, we'll show you how to configure each of these tunneling protocols to connect to AS203314.

Via Layer 2/3 Tunnel

You can use WireGuard, GRE, GRETAP, or VxLAN tunnels to connect to us.

WireGuard

Create a configuration file for your WireGuard tunnel:

sh
nano /etc/wireguard/{name}.conf

Add the following configuration, replacing the appropriate values:

conf
[Interface]
Address = {your tunnel ip cidr}
ListenPort = {yourside port}
PrivateKey = {your private key}
Table = off # add this line if you don't want to use WireGuard's routing table

[Peer]
PublicKey = {our public key}
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = {ourside ip}:{ourside port}
PersistentKeepalive = 25 # optional

Enable and start the WireGuard service:

sh
systemctl enable --now wg-quick@{name}

GRE

Configure a GRE tunnel using the following shell commands:

shell
ip tunnel add {name} mode gre local {yourside ip} remote {ourside ip} ttl 255
ip addr add {your tunnel ip cidr} dev {name}
ip link set dev {name} up

Alternatively, you can configure the GRE tunnel using Netplan:

yaml
tunnels:
  {interfaces name}:
    addresses: ["{your tunnel ip cidr}"]
    local: {yourside ip}
    remote: {ourside ip}
    mode: gre
    ttl: 255

GRETAP

Configure a GRETAP tunnel using the following shell commands:

shell
link add {name} type gretap local {yourside ip} remote {ourside ip} ttl 255
ip addr add {your tunnel ip cidr} dev {name}
ip link set dev {name} up

Alternatively, you can configure the GRETAP tunnel using Netplan:

yaml
tunnels:
  {interfaces name}:
    addresses: ["{your tunnel ip cidr}"]
    local: {yourside ip}
    remote: {ourside ip}
    mode: gretap
    ttl: 255

VxLAN

Configure a VxLAN tunnel using the following shell commands:

shell
ip link add {name} type vxlan local {yourside ip} remote {ourside ip} dstport 4789 id {vid} ttl 255
ip addr add {your tunnel ip cidr} dev {name}
ip link set dev {name} up

🎉Congratulations

Once you have successfully set up the tunnel using one of the above tunneling protocols, you can proceed with establishing a peering connection with AS203314.

CC BY-SA 4.0 license used