macvlan-net
Skill1 starsChanged 49 days agoMITView on GitHub
Macvlan networking topology, limitations, and troubleshooting. Use when deploying containers on macvlan networks, diagnosing connectivity, or choosing where to run services that need internet access.
In this repository113 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ac-ideateSkill
- ac-listSkill
- ac-roadmapSkill
- agentbridge-mcpSkill
- almanacSkill
- almquist-shellSkill
- ansible-fleetSkill
- apfsSkill
- apple-siliconSkill
- arena-actorsSkill
- asustor-nasSkill
- a-teamSkill
- atem-miniSkill
- at-tuiSkill
- autoresearchSkill
- babysitSkill
- bonzibuddySkill
- bop-brainstormSkill
- bop-catalogSkill
- bop-onSkill
- bop-teamSkill
- bop-workflowSkill
- bsd-portabilitySkill
- code-refactoringSkill
- codex-personasSkill
- context-graphSkill
- councilSkill
- datadog-backupSkill
- dd-tagsSkill
- delegateSkill
- deming-pdsaSkill
- deterministic-replaySkill
- dispatch-nuSkill
- durable-commitSkill
- elixir-gastown-opsSkill
- ergo-ircSkill
- esp32-tang-bridgeSkill
- fleet-evalSkill
- fleet-ircSkill
- freebsd-build-vmSkill
- freebsd-piSkill
- freebsdSkill
- ganttSkill
- gastown-opsSkill
- gastown-slingSkill
- gh-authSkill
- gitea-releaseSkill
- gitea-runnerSkill
- henshuSkill
- irclaw-cluster-opsSkill
- irclaw-research-teamSkill
- irc-taskSkill
- jail-factorySkill
- jjSkill
- jobcard-systemSkill
- kubernetesSkill
- leptosSkill
- loreSkill
- lower-bound-reviewSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 51
Use your container platform's macvlan driver.
- Distinctive: line 98
If you must keep a service in a macvlan-constrained environment but it needs internet:
- Distinctive: line 107
Run an nginx/caddy on the macvlan host (not in a container)
- Distinctive: line 114
Only works for static assets, not live API calls
- Distinctive: line 118
When a service on a real host needs to reach a service on macvlan (or vice versa):
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Macvlan Networking Skill
Generic macvlan topology, limitations, and troubleshooting. Deployment
topology (which hosts run macvlan, which services need internet) lives in
the ## Deployment-specific details footer.
The One Rule
Macvlan containers typically have NO outbound internet access. Services that need to reach external APIs, download models, or fetch remote data MUST run on a real host with host or bridge networking.
Why Macvlan Has No Internet
Docker macvlan gives each container its own MAC address and IP on the LAN. The container can talk to anything on the local network, but:
- The upstream gateway/router typically does not NAT traffic from the macvlan MAC addresses (no L3 NAT for new unknown MACs on many SOHO routers).
- The macvlan-host cannot communicate with its own macvlan children — this is a Linux kernel macvlan limitation: the host and its macvlan children are isolated at L2.
- DNS resolution for external domains fails (no upstream DNS forwarding).
Result: 100% packet loss to any IP outside the LAN.
Before Deploying a New Container
Ask these questions:
- Does this service need outbound internet?
- Calls external APIs (OpenAI, Anthropic, cloud services) → YES
- Downloads packages, models, updates at runtime → YES
- Purely LAN service (database, cache, message broker) → NO
- If YES → deploy on a real host with
--network host(or bridge networking that has a NATted route out). - If NO → macvlan is fine:
- Pick an unused IP in the macvlan subnet.
- Use your container platform's macvlan driver.
Diagnosing Connectivity Issues
From a macvlan container
# LAN connectivity — should SUCCEED
docker exec <container> ping -c 1 <LAN_PEER_IP>
# Internet connectivity — will FAIL on macvlan
docker exec <container> ping -c 1 8.8.8.8
# DNS resolution — will FAIL on macvlan
docker exec <container> ping -c 1 google.comFrom a real host (host/bridge networking)
# Reaching macvlan containers — should SUCCEED from any other real host
ping -c 1 <macvlan_container_ip>
# Reaching other real hosts — should SUCCEED
ping -c 1 <lan_peer_ip>From the macvlan host itself
# Host CANNOT reach its own macvlan containers directly.
# This is kernel-level macvlan isolation — not a misconfiguration.
ping -c 1 <macvlan_container_ip> # May FAILCommon symptoms and causes
| Symptom | Likely Cause |
| Container can't reach external API | Macvlan has no internet — move to host |
| Peer host can't reach LAN service on macvlan | Check Docker is running on macvlan host |
| Container-to-container works, internet not | Expected macvlan behavior |
| Host can't reach its own macvlan containers | Macvlan L2 isolation (kernel limit) |
| Service was on macvlan, now unreachable | Container may have restarted/stopped |
Workarounds for Internet-Dependent Services
If you must keep a service in a macvlan-constrained environment but it needs internet:
- Move to a host with
--network host(preferred)docker run -d --network host --name my-service ... - Reverse proxy on the physical host
- Run an nginx/caddy on the macvlan host (not in a container)
- Proxy external requests through the host, which HAS internet
- Fragile; adds complexity
- Pull-through cache
- Pre-download models, packages, data to a volume
- Mount into the macvlan container
- Only works for static assets, not live API calls
Cross-Subnet Service Dependencies
When a service on a real host needs to reach a service on macvlan (or vice versa):
- Real host → macvlan: Works.
- Macvlan → real host on LAN: Works.
- Macvlan → internet: FAILS. No NAT for macvlan MACs.
- Macvlan host → its own macvlan containers: May fail (L2 isolation).
Example connection string from a real host to a macvlan Postgres:
postgresql://user:pass@<macvlan_ip>:5432/dbname
Related
ansible-fleet— deploying across a fleetssh-fleet— SSH patterns for reaching macvlan hosts
Deployment-specific details
This skill is generic macvlan. Everything above applies to any Docker macvlan deployment. The concrete topology (which hosts run macvlan, which services need internet access and therefore must live on host networking, macvlan subnet layout) lives in that deployment's fleet-ops repo.
For the rust-town fleet:
/Users/studio/rust-town/fleet-ops/docs/macvlan-net.md— hosts, subnet, service placement
For a different deployment: substitute your own subnet layout and point this section at your own fleet docs.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

