|
| 1 | +--- |
| 2 | +title: Setup |
| 3 | +weight: 2 |
| 4 | + |
| 5 | +### FIXED, DO NOT MODIFY |
| 6 | +layout: learningpathall |
| 7 | +--- |
| 8 | + |
| 9 | +### Setup |
| 10 | + |
| 11 | +For this demonstration I will be using instances available from AWS within a virtual private cloud (VPC) |
| 12 | + |
| 13 | +Create 2 Arm-based linux instances, 1 to act as the server and the other to act as the client. In this tutorial I will be using two `t4g.xlarge` instance running Ubuntu 22.04 LTS. |
| 14 | + |
| 15 | + |
| 16 | +### Install dependencies |
| 17 | + |
| 18 | +Run the following command to install the microbenchmark tool, `iperf3`. |
| 19 | + |
| 20 | +```bash |
| 21 | +sudo apt update |
| 22 | +sudo apt install iperf3 -y |
| 23 | +``` |
| 24 | + |
| 25 | + |
| 26 | +### Update Security Rules |
| 27 | + |
| 28 | +Next, we need to update the default security rules to enable specific inbound and outbound protocols. From the AWS console, navigate to the security tab. Edit the inbound rules to enable `ICMP`, `UDP` and `TCP` traffic to enable communication between the client and server |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | +{{% notice Note %}} |
| 34 | +For security set the source and port ranges to those that are being used |
| 35 | +{{% /notice %}} |
| 36 | + |
| 37 | + |
| 38 | +### Update local DNS |
| 39 | + |
| 40 | +For readability, we will add the server IP address and an alias to the local DNS cache in `/etc/hosts`. The local IP address of the server and client can be found in the AWS dashboard. |
| 41 | + |
| 42 | +On the client, add the IP address of the server to the `/etc/hosts` file. Likewise on the server add the IP address of the client to the `/etc/hosts` file. |
| 43 | + |
| 44 | +. |
| 45 | + |
| 46 | +### Confirm server is reachable |
| 47 | + |
| 48 | +Finally, confirm the client can reach the server with the ping command below. As a reference we also ping the localhost. |
| 49 | + |
| 50 | +```bash |
| 51 | +ping SERVER -c 3 && ping 127.0.0.1 -c 3 |
| 52 | +``` |
| 53 | + |
| 54 | +The output below shows that both SERVER and localhost (127.0.0.1) are reachable. Naturally, on this system local host response tile is ~10x faster than the server. Your results will vary depending on geographic colocation and other networking factors. |
| 55 | + |
| 56 | +```output |
| 57 | +PING SERVER (10.248.213.104) 56(84) bytes of data. |
| 58 | +64 bytes from SERVER (10.248.213.104): icmp_seq=1 ttl=64 time=0.217 ms |
| 59 | +64 bytes from SERVER (10.248.213.104): icmp_seq=2 ttl=64 time=0.218 ms |
| 60 | +64 bytes from SERVER (10.248.213.104): icmp_seq=3 ttl=64 time=0.219 ms |
| 61 | +
|
| 62 | +--- SERVER ping statistics --- |
| 63 | +3 packets transmitted, 3 received, 0% packet loss, time 2056ms |
| 64 | +rtt min/avg/max/mdev = 0.217/0.218/0.219/0.000 ms |
| 65 | +PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. |
| 66 | +64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.022 ms |
| 67 | +64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.032 ms |
| 68 | +64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.029 ms |
| 69 | +
|
| 70 | +--- 127.0.0.1 ping statistics --- |
| 71 | +3 packets transmitted, 3 received, 0% packet loss, time 2046ms |
| 72 | +rtt min/avg/max/mdev = 0.022/0.027/0.032/0.004 ms |
| 73 | +
|
| 74 | +``` |
| 75 | + |
0 commit comments