Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions data_center/adc/collapsed_dc_fabric/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ Validated configurations for the Juniper Validated Design *"Collapsed Data Cente

<img width="678" alt="Collapsed Data Center Fabric architecture" src="https://github.com/user-attachments/assets/52e20a5a-127e-4947-97ea-0f7ded3f5431" />

## Documentation

In-repo design corpus — faithful markdown conversions of the published JVD PDFs:

| Doc | Contents |
|---|---|
| [Datasheet](documentation/datasheet.md) | One-page quick reference |
| [Solution overview](documentation/solution-overview.md) | Executive summary, use cases, platforms |
| [Design guide](documentation/design-guide.md) | Architecture, direct leaf-to-leaf peering, config walkthrough |
| [Test report brief](documentation/test-report-brief.md) | Platforms, features, convergence, scale |

## Hardware

| Juniper Product | Role | Hostnames |
Expand Down
59 changes: 59 additions & 0 deletions data_center/adc/collapsed_dc_fabric/configuration/snips/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Collapsed Data Center Fabric — Configuration Snippets

Reusable, templated config fragments extracted from the sanitized JVD
configurations under [conf/](../conf/). Each snippet contains:

- A structured header (Topic, Variant, Seen on, Highlights, Pair with, Variables).
- `$VARIABLE` placeholders for tunable values; see [_variables.md](_variables.md)
for the master glossary.

The collapsed fabric is a **two-switch** EVPN-VXLAN fabric — the two leaves *are*
the fabric and peer directly (no spine tier). Both switches run **Junos OS**
(baseline QFX5120-48Y), so every snip lives under `junos/`.

## Layout

```
snips/
├── _variables.md
└── junos/
├── transport/ # Direct leaf-to-leaf eBGP underlay + EVPN overlay
├── services/ # VLAN-aware MAC-VRF EVPN-VXLAN
└── interfaces/ # ESI-LAG access, anycast IRB gateway, loopback
```

## Snippet headers — `Seen on:` and `Pair with:`

- **`Seen on:`** — every device in [`../conf/`](../conf/) that contains this exact
pattern. Both devices are Junos, so the `EVO:` line is always `(none)`.
- **`Pair with:`** — other snippets in this library that work together. All
`Pair with:` references are reciprocal.

## Snip index

### Transport (direct leaf-to-leaf)

| Snip | Purpose |
|---|---|
| [junos/transport/collapsed-underlay-ebgp.conf](junos/transport/collapsed-underlay-ebgp.conf) | eBGP underlay directly between the two collapsed leaves (l3clos-l) |
| [junos/transport/collapsed-evpn-overlay.conf](junos/transport/collapsed-evpn-overlay.conf) | eBGP EVPN overlay directly between the two leaves over loopbacks (l3clos-l-evpn) |

### Services

| Snip | Purpose |
|---|---|
| [junos/services/mac-vrf-evpn-vxlan.conf](junos/services/mac-vrf-evpn-vxlan.conf) | VLAN-aware MAC-VRF (evpn-1), 1 VNI per VLAN, per-VNI route targets |

### Interfaces

| Snip | Purpose |
|---|---|
| [junos/interfaces/esi-lag-access.conf](junos/interfaces/esi-lag-access.conf) | All-active ESI-LAG for multihomed server / access switch |
| [junos/interfaces/irb-anycast-gateway.conf](junos/interfaces/irb-anycast-gateway.conf) | Distributed anycast IRB L3 gateway for a fabric VLAN |
| [junos/interfaces/loopback.conf](junos/interfaces/loopback.conf) | lo0 router-id / VTEP / per-VRF loopbacks |

## Related

- Design corpus: [`../../documentation/`](../../documentation/) (design guide, solution overview, test report brief, datasheet).
- BYOAI assistant: [byoai/README.md](byoai/README.md).
- Scale up: [3-stage data center snips](../../../3stage_dc/configuration/snips/).
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Snip Variable Reference — Collapsed Data Center Fabric

Variables used across the `collapsed_dc_fabric` snip library. Replace `$VARIABLE`
placeholders with site-specific values when adapting snips to a new deployment.
JVD-wide constants (group names `l3clos-l` / `l3clos-l-evpn`, policy names
`BGP-AOS-Policy` / `EVPN_EXPORT`, the `evpn-1` MAC-VRF instance) are left literal
because they *are* the abstraction the JVD documents.

Both collapsed switches run **Junos OS** (baseline QFX5120-48Y), so every snip
lives under `junos/` — there is no `evo/` tree.

## Transport (direct leaf-to-leaf)

| Variable | Example | Used in |
|----------|---------|---------|
| `$UNDERLAY_BFD_MS` | `1000` | collapsed-underlay-ebgp |
| `$OVERLAY_BFD_MS` | `3000` | collapsed-evpn-overlay |
| `$BFD_MULTIPLIER` | `3` | both |
| `$PEER_LINK_IP` | `10.0.3.0` | collapsed-underlay-ebgp |
| `$LOCAL_LINK_IP` | `10.0.3.1` | collapsed-underlay-ebgp |
| `$PEER_LOOPBACK` | `192.168.253.1` | collapsed-evpn-overlay |
| `$LOCAL_LOOPBACK` | `192.168.253.0` | collapsed-evpn-overlay |
| `$PEER_DESCRIPTION` | `facing_dc3-rack-001-leaf2` | both |
| `$PEER_AS` | `64801` | both |

## Services

| Variable | Example | Used in |
|----------|---------|---------|
| `$VNI` | `10400` | mac-vrf-evpn-vxlan |
| `$VNI_RT` | `target:10400:1` | mac-vrf-evpn-vxlan |

## Interfaces

| Variable | Example | Used in |
|----------|---------|---------|
| `$AE_IFD` | `ae1` | esi-lag-access |
| `$AE_DESCRIPTION` | `to.dc3-rack-001-sys001` | esi-lag-access |
| `$ESI_VALUE` | `00:02:00:00:00:00:01:00:00:01` | esi-lag-access |
| `$LACP_SYSTEM_ID` | `02:00:00:00:00:01` | esi-lag-access |
| `$VLAN_MEMBERS` | `vn400 vn401` | esi-lag-access |
| `$IRB_UNIT` | `400` | irb-anycast-gateway |
| `$IRB_ADDRESS` | `10.0.0.1/24` | irb-anycast-gateway |
| `$ANYCAST_MAC` | `00:1c:73:00:00:01` | irb-anycast-gateway |
| `$LO_UNIT` | `0` | loopback |
| `$LO_IPV4` | `192.168.253.0/32` | loopback |
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Auto-Fill Defaults

This file is part of the [BYOAI](README.md) corpus. It gives the deterministic JVD lab-default values the AI uses in `auto` mode (or when the user short-circuits with `all defaults` / `use defaults` / `skip`). It is bundled into [`jvd-collapsed-snips.md`](jvd-collapsed-snips.md) by `regenerate-bundle.sh`.

Use these values EXACTLY. Do not invent alternative defaults. Every value the AI auto-fills MUST be listed in the output's `Inputs used:` block so the user can rerun with edits. Addresses below are the JVD lab's actual values (from each device `.conf`, generated by Juniper Apstra) — substitute site values when deploying.

---

## Device inventory (the collapsed topology)

| Device | Platform | OS | Role | Loopback | AS |
|--------|----------|----|------|----------|----|
| `leaf1_qfx5120-48y` | QFX5120-48Y | Junos | Collapsed-spine leaf 1 | `192.168.253.0` | `64800` |
| `leaf2_qfx5120-48y` | QFX5120-48Y | Junos | Collapsed-spine leaf 2 | `192.168.253.1` | `64801` |
| `external router` | MX204 | Junos | External gateway | — | — |

> The JVD validates five collapsed-spine platforms (QFX5120-48Y, QFX5130-32CD, QFX5700, ACX7100-48L, PTX10001-36MR); the configs use the QFX5120-48Y baseline. The two leaves are eBGP peers with each other — leaf1 peer-as toward leaf2 is `64801` and vice-versa.

**Device-choice shortcut** (offered in the clarifying question):
- `LEAF-PAIR` → `leaf1_qfx5120-48y` + `leaf2_qfx5120-48y`

---

## Feature defaults

| Variable | Default | Notes |
|----------|---------|-------|
| `$UNDERLAY_BFD_MS` | `1000` | direct underlay BFD |
| `$OVERLAY_BFD_MS` | `3000` | direct EVPN overlay BFD (multihop) |
| `$BFD_MULTIPLIER` | `3` | both |
| `$PEER_AS` | `64801` (from leaf1) / `64800` (from leaf2) | the *other* collapsed switch |
| `$LOCAL_LOOPBACK` | `192.168.253.0` (leaf1) / `192.168.253.1` (leaf2) | overlay local-address |
| `$PEER_LOOPBACK` | `192.168.253.1` (from leaf1) | overlay peer (other leaf) |
| `$PEER_LINK_IP` / `$LOCAL_LINK_IP` | `10.0.3.x` /31 | direct underlay p2p link |
| `$VNI` | `10400` | first fabric VNI |
| `$VNI_RT` | `target:10400:1` | per-VNI route target |
| `$IRB_UNIT` | `400` | first routed VLAN IRB unit |
| `$IRB_ADDRESS` | `10.0.0.1/24` | anycast gateway address (identical on both switches) |
| `$ANYCAST_MAC` | `00:1c:73:00:00:01` | anycast gateway MAC (identical on both switches) |
| `$ESI_VALUE` | `00:02:00:00:00:00:01:00:00:01` | ESI-LAG ESI (identical on both switches) |
| `$LACP_SYSTEM_ID` | `02:00:00:00:00:01` | ESI-LAG LACP system-id (identical on both switches) |

---

## Literal constants (never templated)

- Fabric BGP groups: `l3clos-l` (direct underlay), `l3clos-l-evpn` (direct overlay).
- Policies: `BGP-AOS-Policy`, `EVPN_EXPORT`.
- MAC-VRF instance: `evpn-1` (VLAN-aware, `default-gateway do-not-advertise`).
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
{
"schema_version": 1,
"description": "BYOAI snip manifest. Fetch the entries you need from raw_url; do NOT fetch every snip. See byoai/SYSTEM_PROMPT.md for the selection rules.",
"raw_url_base": "https://raw.githubusercontent.com/Juniper/jvd/main/data_center/adc/collapsed_dc_fabric/configuration/snips",
"snip_count": 6,
"snips": [
{
"path": "junos/interfaces/esi-lag-access.conf",
"os": "junos",
"category": "interfaces",
"name": "esi-lag-access",
"topic": "ESI-LAG all-active access (multihomed server / access switch)",
"seen_on": [
"leaf1_qfx5120-48y",
"leaf2_qfx5120-48y"
],
"size_bytes": 1466,
"raw_url": "https://raw.githubusercontent.com/Juniper/jvd/main/data_center/adc/collapsed_dc_fabric/configuration/snips/junos/interfaces/esi-lag-access.conf"
},
{
"path": "junos/interfaces/irb-anycast-gateway.conf",
"os": "junos",
"category": "interfaces",
"name": "irb-anycast-gateway",
"topic": "Anycast IRB gateway for a fabric VLAN",
"seen_on": [
"leaf1_qfx5120-48y",
"leaf2_qfx5120-48y"
],
"size_bytes": 1002,
"raw_url": "https://raw.githubusercontent.com/Juniper/jvd/main/data_center/adc/collapsed_dc_fabric/configuration/snips/junos/interfaces/irb-anycast-gateway.conf"
},
{
"path": "junos/interfaces/loopback.conf",
"os": "junos",
"category": "interfaces",
"name": "loopback",
"topic": "Loopback lo0 addressing (router-id / VTEP / per-VRF)",
"seen_on": [
"leaf1_qfx5120-48y",
"leaf2_qfx5120-48y"
],
"size_bytes": 895,
"raw_url": "https://raw.githubusercontent.com/Juniper/jvd/main/data_center/adc/collapsed_dc_fabric/configuration/snips/junos/interfaces/loopback.conf"
},
{
"path": "junos/services/mac-vrf-evpn-vxlan.conf",
"os": "junos",
"category": "services",
"name": "mac-vrf-evpn-vxlan",
"topic": "VLAN-aware MAC-VRF EVPN-VXLAN instance",
"seen_on": [
"leaf1_qfx5120-48y",
"leaf2_qfx5120-48y"
],
"size_bytes": 1484,
"raw_url": "https://raw.githubusercontent.com/Juniper/jvd/main/data_center/adc/collapsed_dc_fabric/configuration/snips/junos/services/mac-vrf-evpn-vxlan.conf"
},
{
"path": "junos/transport/collapsed-evpn-overlay.conf",
"os": "junos",
"category": "transport",
"name": "collapsed-evpn-overlay",
"topic": "Direct leaf-to-leaf eBGP EVPN overlay (collapsed spine)",
"seen_on": [
"leaf1_qfx5120-48y",
"leaf2_qfx5120-48y"
],
"size_bytes": 1991,
"raw_url": "https://raw.githubusercontent.com/Juniper/jvd/main/data_center/adc/collapsed_dc_fabric/configuration/snips/junos/transport/collapsed-evpn-overlay.conf"
},
{
"path": "junos/transport/collapsed-underlay-ebgp.conf",
"os": "junos",
"category": "transport",
"name": "collapsed-underlay-ebgp",
"topic": "Direct leaf-to-leaf eBGP underlay (collapsed spine)",
"seen_on": [
"leaf1_qfx5120-48y",
"leaf2_qfx5120-48y"
],
"size_bytes": 1652,
"raw_url": "https://raw.githubusercontent.com/Juniper/jvd/main/data_center/adc/collapsed_dc_fabric/configuration/snips/junos/transport/collapsed-underlay-ebgp.conf"
}
],
"reference_files": [
{
"path": "_variables.md",
"kind": "glossary",
"topic": "Glossary of $VAR placeholders used across all snips",
"raw_url": "https://raw.githubusercontent.com/Juniper/jvd/main/data_center/adc/collapsed_dc_fabric/configuration/snips/_variables.md"
},
{
"path": "byoai/TIERS.md",
"kind": "reference",
"topic": "Per-service snip lists for `minimum` vs `as-deployed` configuration form",
"raw_url": "https://raw.githubusercontent.com/Juniper/jvd/main/data_center/adc/collapsed_dc_fabric/configuration/snips/byoai/TIERS.md"
},
{
"path": "byoai/DEFAULTS.md",
"kind": "reference",
"topic": "Auto-fill rules: lab-default loopbacks, AS numbers, VNIs, RD/RT, ESI shape",
"raw_url": "https://raw.githubusercontent.com/Juniper/jvd/main/data_center/adc/collapsed_dc_fabric/configuration/snips/byoai/DEFAULTS.md"
},
{
"path": "byoai/OUTPUT_FORMAT.md",
"kind": "reference",
"topic": "Required output format: YAML Inputs block, per-device fenced blocks, Notes section",
"raw_url": "https://raw.githubusercontent.com/Juniper/jvd/main/data_center/adc/collapsed_dc_fabric/configuration/snips/byoai/OUTPUT_FORMAT.md"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Collapsed Data Center Fabric BYOAI — Full Query Menu

The always-current catalog of generation asks for the **Collapsed Data Center Fabric** JVD — a two-switch EVPN-VXLAN collapsed-spine fabric (no separate spine tier) built with Juniper Apstra for small data centers. All items render on the chosen device(s) with the chosen form tier (`minimum` / `as-deployed`).

## Fabric transport (direct leaf-to-leaf)

- `Generate the direct leaf-to-leaf underlay for <leaf>` — eBGP underlay between the two collapsed switches (l3clos-l)
- `Generate the direct EVPN overlay for <leaf>` — eBGP EVPN overlay over loopbacks (l3clos-l-evpn)

## Services (L2 / L3)

- `Generate a VLAN-aware MAC-VRF` — evpn-1, 1 VNI per VLAN, per-VNI route targets
- `Add a VLAN with an anycast IRB gateway` — MAC-VRF VNI + anycast IRB (identical mac + address on both switches)

## Access / multihoming

- `Add an ESI-LAG to <leaf-pair>` — all-active multihomed access (AE + ESI + LACP, matched on both switches)

## Interfaces

- `Generate the loopback for <leaf>` — lo0 router-id / VTEP / per-VRF loopbacks

## Greenfield / turn-up

- `Build a full collapsed two-switch turn-up` — direct underlay + overlay + loopback + MAC-VRF + anycast IRB + ESI-LAG

## Audit / explain

- `Explain the collapsed-spine architecture (why no spine tier)`
- `Explain direct leaf-to-leaf eBGP underlay + EVPN overlay`
- `Explain the VLAN-aware MAC-VRF and anycast IRB gateway model`
- `Explain ESI-LAG all-active multihoming across two collapsed switches`
- `When should I use collapsed vs 3-stage?`

---

Don't see what you need? Describe it and the assistant will tell you whether the Collapsed Data Center Fabric JVD covers it (and point you to the Access-Switches JVDE or 3-stage DC JVD for scale-out).
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Output Format

This file is part of the [BYOAI](README.md) corpus. It defines the exact shape every generation must take. Bundled into [`jvd-collapsed-snips.md`](jvd-collapsed-snips.md) by `regenerate-bundle.sh`.

## 1. `Inputs used:` block (always first)

Every generation begins with a YAML comment block listing **every** value picked or accepted:

```yaml
# Inputs used:
# mode: auto # or "interview"
# form: as-deployed # or "minimum"
# devices:
# leaf1: { name: <hostname>, os: junos, role: collapsed-leaf, loopback4: <addr>, as: <asn> }
# leaf2: { ... }
# features:
# - { kind: <collapsed-fabric|mac-vrf|esi-access>,
# vni: <int>, # MAC-VRF VNI
# vni_rt: <target:...>, # per-VNI route target
# irb_unit: <int>, # anycast IRB unit
# irb_address: <addr/len>, # anycast gateway (same on both switches)
# anycast_mac: <mac>, # anycast gateway MAC (same on both switches)
# esi: <hex>, # ESI-LAG ESI (same on both switches)
# lacp_system_id: <mac> } # ESI-LAG LACP system-id (same on both switches)
# snips_used:
# - junos/services/mac-vrf-evpn-vxlan.conf
# - junos/interfaces/irb-anycast-gateway.conf
# - ...
```

This block makes every generation reproducible — the user can paste it back to regenerate the same output.

## 2. One fenced `text` block per device

Each device block starts with a `# device:` label and groups its snips with `/* snips/<path> */` section comments:

```text
# device: <hostname>
/* snips/<path-to-snip>.conf */
<rendered config block>

/* snips/<path-to-next-snip>.conf */
<rendered config block>
```

Drop the leading C-style `/* … */` documentation header from each snip when emitting. Keep one `/* snips/<path> */` line as the section comment.

## 3. `Notes:` section (always last)

Bullets covering:

- Snips intentionally omitted (and why).
- Inputs defaulted because the user did not provide them.
- Cross-device consistency the user must verify:
- ESI-LAG **ESI value** and **LACP system-id** MUST be identical on both collapsed switches for the same AE bundle (that is what makes it all-active).
- The anycast IRB **`mac`** and gateway **address** MUST be identical on both switches for the same VLAN.
- MAC-VRF **per-VNI route-targets** MUST match across both switches.
- The two leaves are eBGP peers with each other; each has its own loopback and AS.
- Anything by-pattern rather than validated on that exact device (e.g., a user-supplied hostname not in any snip's `Seen on:` list).
- Collapsed reminders: the VLAN-aware MAC-VRF uses `default-gateway do-not-advertise` (each switch owns its anycast gateway locally); the direct EVPN overlay (`l3clos-l-evpn`) runs over loopbacks and the underlay (`l3clos-l`) over the point-to-point links between the two switches.

## Refusal

If the request cannot be fulfilled from the snip library, do not apologise. Say exactly:

```
I cannot generate this from the snip library because <one reason>.
```

…and stop.
Loading
Loading