oxidecomputer / oxidecomputer/omicron
Communication Analyzer
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 572
- Forks
- 97
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 96
Description
When an instance running on Oxide is communicating with another entity, there are a number of hops that communication goes through, each of which does some sort of processing on the individual packets that comprise the communication. This is true whether the instance is communicating with another instance within the rack, or some host outside the rack. Along the way a number of actions are taken on packets such as source address selection, firewall rule application, nexthop or boundary tunnel selection, etc. For users and operators that are not intimately familiar with the design and implementation of the Oxide platform this can feel opaque and when communications are not working, there is no clear direction of where to look.
Providing a communication analyzer could really help here. Allowing users to ask questions like
Tell me everything you know about a packet going from
myproject/myinstancetohttps://example.com/api/foo.
This would result in something like this.
example.comresolves to203.0.113.5When packets first leave
myproject/myinstancea source address will be selected from the instance.
The addresses assigned to the instance are the following
- 198.51.100.23 (floating IP)
- 198.51.100.12 (ephemeral)
- 198.51.100.87 (SNAT)
These addresses all come from the same IP pool
default. There is a single default route in the
myprojectVPC that points to the internet gatewaydefault. Thedefaultinternet gateway
is linked to thedefaultIP pool. That means any of these source addresses may be used. When
multiple source IP addresses are available, floating IPs are used first. In this case198.51.100.23
will be the source address used for the communication.Now that the source address has been selected, the packet will undergo network address translation
NAT which will set198.51.100.23as the source address of the packet leaving the VM in place of the
VMs internal VPC address172.30.0.3.The next thing that will happen to this packet is firewall rule application. The following VPC firewall
rules apply to this packet
<firewall rules listed here>None of these firewall rules will prevent packets from reaching
example.comon port443. When
response traffic returns fromexample.comtomyproject/myinstance, even though there are no
specific ingress rules allowing the traffic to come through, because this traffic is a part of a session
initiated from within the rack to an external host, the responses will be allowed through for this
established connection. It looks like there is currently an established session toexample.comfrom
myproject/myinstance, with the following statistics
<stats go here>Next this packet will be encapsulated onto an overlay network for this project's VPC and sent to one
of the rack switches for egress to the upstream network.Both of the switches on this rack have routes that provide a path to
example.com. When the first
packet is sent as a part of a TCP session toexample.comthe Oxide Packet Transformation Engine
(OPTE) will select one of the switches as a gateway router. All subsequent packets that are a part of
that TCP session will use that switch as an exit point from the rack, assuming that switch keeps a route
to198.51.100.23. In the event that a route to198.51.100.23is lost, or the selected switch becomes
unavailable, the path will shift to the other switch.<Insert warning here for non-HA configurations involving only one switch as an exit point>. It looks like there is currently a TCP session going from
myproject/myinstancetoexample.com. That traffic is currently pinned toswitch1.
This is just a starting point. There is actually a lot more information that could be provided that would give users potentially useful insights into how the Oxide platform works and how that relates to the applications they've deployed.
This is also already quite wordy, and perhaps a flow diagram with annotations would be better.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by defining a scoped analyzer design and its user-facing entry point from the proposed packet-flow questions; done should include agreed requirements and acceptance criteria for the information and paths it must report.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100