Note:

Follow the Packets in Hub and Spoke VCN Routing Architecture inside Oracle Cloud Infrastructure

Introduction

Instances, databases, and network services are the typical building blocks of the application inside Oracle Cloud Infrastructure (OCI). When we build an application on the network it is good practice to know if the traffic you are sending from a source is reaching the destination. OCI offers the Network Path Analyzer to verify the path, but sometimes you want to have a bit more information on what is happening on the endpoints itself on a hop-by-hop basis.

This tutorial will provide a few scenarios that you can use to follow your packets in a hub and spoke network architecture inside OCI.

image

Routing Flow Scenarios

Multiple routing flow scenarios are applicable in a hub and spoke VCN routing architecture.

We are only going to explain how you can follow the packet with Scenario 1. For the other scenarios, you can use the same method.

Objectives

Scenario 1: Follow the Packet from One Spoke VCN Instance to another Spoke VCN Instance

In this scenario, we are going to follow the packet from one spoke VCN instance to an instance in another spoke VCN.

The following diagram is shown with the hops specified. A to F points indicate the places where you can enable some form of logging or packet capturing. We will explore all these places one by one so we can follow the packet.

image

We need to determine our source, destination and the port that we are going to test with. This will ensure we have a targeted way of analyzing the packet without distraction.

In this example, we will use the following source, destination and port.

Source Destination Destination Port
172.16.1.93 172.16.2.88 TCP/80

To start this journey properly, the order of operations is important to be as effective as possible with setting up the logging, capturing and collecting the information properly.

Task 1: Note Down the Time

  1. In this tutorial, we are using a central computer to collect all the data.

  2. Note down the time when you start the analytics. For this example, it is 8:44 AM.

    image

Task 2: Open the First SSH Session on Instance A

Task 3: Open a Second SSH Session on Instance A

Task 4: Open an SSH Session on Instance B

Task 5: Open a Web Session on the pfSense Firewall

Task 6: Enable Logging (All Logs) on the Spoke A Private Subnet

Task 7: Enable Logging (All Logs) on the Spoke B Private Subnet

Task 8: Enable Logging (All Logs) on the Hub Private Subnet

Task 9: Start the tcpdump Session on the Second SSH Session of Instance A

Task 10: Start the tcpdump Session on the SSH Session on Instance B

Task 11: Start the Packet Capture on the pfSense Firewall

Task 12: Send HTTP Traffic to the Instance B Web Server from the first SSH Session of Instance A

Task 13: Look at all the Logging Points and Packet Captures and Follow the Path

We can start collecting the information so we can follow the packet.

Stop All Logging, Packet Captures and tcpdumps:

Before we start the collection information, stop all the logging, packet captures and tcpdumps to make sure we do not get too much information.

The following diagram shows all logging points A, B, C, D, E, and F

image

Logging Point A: tcpdump on Instance A

  1. Go to the second SSH session of Instance A.
  2. Note that the generated tcpdump output.

image

Logging Point B: Logging on the Spoke VCN A Private Subnet

Now, look at the subnet level logging to see if the packets are visible on the subnet of the VCN.

Logging Point C: Logging on the Hub VCN Private Subnet

Logging Point D: Packet Capture on the pfSense Firewall

Logging Point E: Logging on the Spoke VCN B Private Subnet

Logging Point F: Tcpdump on Instance B

  1. Go to the SSH session of Instance B.
  2. Note the generated tcpdump output.

image

Note: Collect the logs, packet captures and tcpdumps same as Scenario 1 for other scenarios.

Scenario 2: Follow the Packet from Spoke VCN Instance to Hub Instance

image

Scenario 3: Follow the Packet from Hub Instance to Spoke VCN Instance

image

Scenario 4: Follow the Packet from Spoke VCN Instance to Internet

image

Scenario 5: Follow the Packet from Spoke VCN Instance to OCI Service Network

image

Scenario 6: Follow the Packet from Hub Instance to Internet

image

Scenario 7: Follow the Packet from Internet to Hub Instance

image

Scenario 8: Follow the Packet from On-Premises to Spoke VCN Instance

image

Scenario 9: Follow the Packet from Spoke VCN Instance to On-Premises

image

Scenario 10: Follow the Packet from Remote Computer to Load Balancer to Spoke VCN Instance

image

Acknowledgments

More Learning Resources

Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.

For product documentation, visit Oracle Help Center.