1006 lines
No EOL
41 KiB
HTML
1006 lines
No EOL
41 KiB
HTML
|
||
<!DOCTYPE html>
|
||
|
||
|
||
<html lang="fr" data-content_root="../" >
|
||
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
|
||
<title>Modes réseau — Documentation two 0.1.0</title>
|
||
|
||
|
||
|
||
<script data-cfasync="false">
|
||
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
|
||
document.documentElement.dataset.theme = localStorage.getItem("theme") || "";
|
||
</script>
|
||
<!--
|
||
this give us a css class that will be invisible only if js is disabled
|
||
-->
|
||
<noscript>
|
||
<style>
|
||
.pst-js-only { display: none !important; }
|
||
|
||
</style>
|
||
</noscript>
|
||
|
||
<!-- Loaded before other Sphinx assets -->
|
||
<link href="../_static/styles/theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||
<link href="../_static/styles/pydata-sphinx-theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||
|
||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=8f2a1f02" />
|
||
<link rel="stylesheet" type="text/css" href="../_static/styles/sphinx-book-theme.css?v=3c74b3bc" />
|
||
|
||
<!-- So that users can add custom icons -->
|
||
<script src="../_static/scripts/fontawesome.js?digest=8878045cc6db502f8baf"></script>
|
||
<!-- Pre-loaded scripts that we'll load fully later -->
|
||
<link rel="preload" as="script" href="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf" />
|
||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
|
||
|
||
<script src="../_static/documentation_options.js?v=57395fb6"></script>
|
||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||
<script src="../_static/scripts/sphinx-book-theme.js?v=fab101a9"></script>
|
||
<script src="../_static/translations.js?v=e6b791cb"></script>
|
||
<script src="https://cdn.jsdelivr.net/npm/d3@7.9.0/dist/d3.min.js"></script>
|
||
<script type="module">import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@11.12.1/dist/mermaid.esm.min.mjs";
|
||
|
||
|
||
|
||
|
||
|
||
const initStyles = () => {
|
||
const defaultStyle = document.createElement('style');
|
||
defaultStyle.textContent = `pre.mermaid {
|
||
/* Same as .mermaid-container > pre */
|
||
display: block;
|
||
width: 100%;
|
||
}
|
||
|
||
pre.mermaid > svg {
|
||
/* Same as .mermaid-container > pre > svg */
|
||
height: 500px;
|
||
width: 100%;
|
||
max-width: 100% !important;
|
||
}`;
|
||
document.head.appendChild(defaultStyle);
|
||
|
||
const fullscreenStyle = document.createElement('style');
|
||
fullscreenStyle.textContent = `.mermaid-container {
|
||
display: flex;
|
||
flex-direction: row;
|
||
width: 100%;
|
||
}
|
||
|
||
.mermaid-container > pre {
|
||
display: block;
|
||
width: 100%;
|
||
}
|
||
|
||
.mermaid-container > pre > svg {
|
||
height: 500px;
|
||
width: 100%;
|
||
max-width: 100% !important;
|
||
}
|
||
|
||
.mermaid-fullscreen-btn {
|
||
width: 28px;
|
||
height: 28px;
|
||
background: rgba(255, 255, 255, 0.95);
|
||
border: 1px solid rgba(0, 0, 0, 0.3);
|
||
border-radius: 4px;
|
||
cursor: pointer;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
transition: all 0.2s;
|
||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
||
font-size: 14px;
|
||
line-height: 1;
|
||
padding: 0;
|
||
color: #333;
|
||
}
|
||
|
||
.mermaid-fullscreen-btn:hover {
|
||
opacity: 100% !important;
|
||
background: rgba(255, 255, 255, 1);
|
||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
||
transform: scale(1.1);
|
||
}
|
||
|
||
.mermaid-fullscreen-btn.dark-theme {
|
||
background: rgba(50, 50, 50, 0.95);
|
||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||
color: #e0e0e0;
|
||
}
|
||
|
||
.mermaid-fullscreen-btn.dark-theme:hover {
|
||
background: rgba(60, 60, 60, 1);
|
||
box-shadow: 0 3px 10px rgba(255, 255, 255, 0.2);
|
||
}
|
||
|
||
.mermaid-fullscreen-modal {
|
||
display: none;
|
||
position: fixed !important;
|
||
top: 0 !important;
|
||
left: 0 !important;
|
||
width: 95vw;
|
||
height: 100vh;
|
||
background: rgba(255, 255, 255, 0.98);
|
||
z-index: 9999;
|
||
padding: 20px;
|
||
overflow: auto;
|
||
}
|
||
|
||
.mermaid-fullscreen-modal.dark-theme {
|
||
background: rgba(0, 0, 0, 0.98);
|
||
}
|
||
|
||
.mermaid-fullscreen-modal.active {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.mermaid-container-fullscreen {
|
||
position: relative;
|
||
width: 95vw;
|
||
height: 90vh;
|
||
max-width: 95vw;
|
||
max-height: 90vh;
|
||
background: white;
|
||
border-radius: 8px;
|
||
padding: 20px;
|
||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
|
||
overflow: auto;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.mermaid-container-fullscreen.dark-theme {
|
||
background: #1a1a1a;
|
||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
|
||
}
|
||
|
||
.mermaid-container-fullscreen pre.mermaid {
|
||
width: 100%;
|
||
height: 100%;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.mermaid-container-fullscreen .mermaid svg {
|
||
height: 100% !important;
|
||
width: 100% !important;
|
||
cursor: grab;
|
||
}
|
||
|
||
.mermaid-fullscreen-close {
|
||
position: fixed !important;
|
||
top: 20px !important;
|
||
right: 20px !important;
|
||
width: 40px;
|
||
height: 40px;
|
||
background: rgba(255, 255, 255, 0.95);
|
||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||
border-radius: 50%;
|
||
cursor: pointer;
|
||
z-index: 10000;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||
transition: all 0.2s;
|
||
font-size: 24px;
|
||
line-height: 1;
|
||
color: #333;
|
||
}
|
||
|
||
.mermaid-fullscreen-close:hover {
|
||
background: white;
|
||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
|
||
transform: scale(1.1);
|
||
}
|
||
|
||
.mermaid-fullscreen-close.dark-theme {
|
||
background: rgba(50, 50, 50, 0.95);
|
||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||
color: #e0e0e0;
|
||
}
|
||
|
||
.mermaid-fullscreen-close.dark-theme:hover {
|
||
background: rgba(60, 60, 60, 1);
|
||
box-shadow: 0 6px 16px rgba(255, 255, 255, 0.2);
|
||
}
|
||
|
||
.mermaid-fullscreen-modal .mermaid-fullscreen-btn {
|
||
display: none !important;
|
||
}`;
|
||
document.head.appendChild(fullscreenStyle);
|
||
}
|
||
|
||
// Detect if page has dark background
|
||
const isDarkTheme = () => {
|
||
// We use a set of heuristics:
|
||
// 1. Check for common dark mode classes or attributes
|
||
// 2. Check computed background color brightness
|
||
if (document.documentElement.classList.contains('dark') ||
|
||
document.documentElement.getAttribute('data-theme') === 'dark' ||
|
||
document.body.classList.contains('dark') ||
|
||
document.body.getAttribute('data-theme') === 'dark') {
|
||
// console.log("Dark theme detected via class/attribute");
|
||
return true;
|
||
}
|
||
if (document.documentElement.classList.contains('light') ||
|
||
document.documentElement.getAttribute('data-theme') === 'light' ||
|
||
document.body.classList.contains('light') ||
|
||
document.body.getAttribute('data-theme') === 'light') {
|
||
// console.log("Light theme detected via class/attribute");
|
||
return false;
|
||
}
|
||
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||
// console.log("Dark theme detected via prefers-color-scheme");
|
||
return true;
|
||
}
|
||
const bgColor = window.getComputedStyle(document.body).backgroundColor;
|
||
const match = bgColor.match(/rgb\((\d+),\s*(\d+),\s*(\d+)/);
|
||
if (match) {
|
||
const r = parseInt(match[1]);
|
||
const g = parseInt(match[2]);
|
||
const b = parseInt(match[3]);
|
||
const brightness = (r * 299 + g * 587 + b * 114) / 1000;
|
||
// console.log("Background color brightness:", brightness);
|
||
return brightness < 128;
|
||
}
|
||
// console.log("No dark or light theme detected, defaulting to light theme");
|
||
return false;
|
||
};
|
||
|
||
let darkTheme = isDarkTheme();
|
||
let modal = null;
|
||
let modalContent = null;
|
||
let previousScrollOffset = [window.scrollX, window.scrollY];
|
||
|
||
const runMermaid = async (rerun) => {
|
||
console.log("Running mermaid diagrams, rerun =", rerun);
|
||
// clear all existing mermaid charts
|
||
let all_mermaids = document.querySelectorAll(".mermaid");
|
||
|
||
if (rerun) {
|
||
all_mermaids.forEach((el) => {
|
||
if(!el.hasAttribute("data-original-code")) {
|
||
// store original code
|
||
// console.log(`Storing original code for first run: `, el.innerHTML);
|
||
el.setAttribute('data-original-code', el.innerHTML);
|
||
}
|
||
if(el.getAttribute("data-processed") === "true") {
|
||
// remove and restore original
|
||
el.removeAttribute("data-processed");
|
||
// console.log(`Restoring original code for re-run: `, el.getAttribute('data-original-code'));
|
||
el.innerHTML = el.getAttribute('data-original-code');
|
||
} else {
|
||
// store original code
|
||
// console.log(`Storing original code for re-run: `, el.innerHTML);
|
||
el.setAttribute('data-original-code', el.innerHTML);
|
||
}
|
||
});
|
||
await mermaid.run();
|
||
}
|
||
|
||
all_mermaids = document.querySelectorAll(".mermaid");
|
||
const mermaids_processed = document.querySelectorAll(".mermaid[data-processed='true']");
|
||
|
||
if ("False" === "True") {
|
||
const mermaids_to_add_zoom = -1 === -1 ? all_mermaids.length : -1;
|
||
if(mermaids_to_add_zoom > 0) {
|
||
var svgs = d3.selectAll("");
|
||
if(all_mermaids.length !== mermaids_processed.length) {
|
||
setTimeout(() => runMermaid(false), 200);
|
||
return;
|
||
} else if(svgs.size() !== mermaids_to_add_zoom) {
|
||
setTimeout(() => runMermaid(false), 200);
|
||
return;
|
||
} else {
|
||
svgs.each(function() {
|
||
var svg = d3.select(this);
|
||
svg.html("<g class='wrapper'>" + svg.html() + "</g>");
|
||
var inner = svg.select("g");
|
||
var zoom = d3.zoom().on("zoom", function(event) {
|
||
inner.attr("transform", event.transform);
|
||
});
|
||
svg.call(zoom);
|
||
});
|
||
}
|
||
}
|
||
} else if(all_mermaids.length !== mermaids_processed.length) {
|
||
// Wait for mermaid to process all diagrams
|
||
setTimeout(() => runMermaid(false), 200);
|
||
return;
|
||
}
|
||
|
||
// Stop here if not adding fullscreen capability
|
||
if ("True" !== "True") return;
|
||
|
||
if (modal !== null ) {
|
||
// Destroy existing modal
|
||
modal.remove();
|
||
modal = null;
|
||
modalContent = null;
|
||
}
|
||
|
||
modal = document.createElement('div');
|
||
modal.className = 'mermaid-fullscreen-modal' + (darkTheme ? ' dark-theme' : '');
|
||
modal.setAttribute('role', 'dialog');
|
||
modal.setAttribute('aria-modal', 'true');
|
||
modal.setAttribute('aria-label', 'Fullscreen diagram viewer');
|
||
modal.innerHTML = `
|
||
<button class="mermaid-fullscreen-close${darkTheme ? ' dark-theme' : ''}" aria-label="Close fullscreen">✕</button>
|
||
<div class="mermaid-container-fullscreen${darkTheme ? ' dark-theme' : ''}"></div>
|
||
`;
|
||
document.body.appendChild(modal);
|
||
|
||
modalContent = modal.querySelector('.mermaid-container-fullscreen');
|
||
const closeBtn = modal.querySelector('.mermaid-fullscreen-close');
|
||
|
||
const closeModal = () => {
|
||
modal.classList.remove('active');
|
||
modalContent.innerHTML = '';
|
||
document.body.style.overflow = ''
|
||
window.scrollTo({left: previousScrollOffset[0], top: previousScrollOffset[1], behavior: 'instant'});
|
||
};
|
||
|
||
closeBtn.addEventListener('click', closeModal);
|
||
modal.addEventListener('click', (e) => {
|
||
if (e.target === modal) closeModal();
|
||
});
|
||
document.addEventListener('keydown', (e) => {
|
||
if (e.key === 'Escape' && modal.classList.contains('active')) {
|
||
closeModal();
|
||
}
|
||
});
|
||
|
||
document.querySelectorAll('.mermaid').forEach((mermaidDiv) => {
|
||
if (mermaidDiv.parentNode.classList.contains('mermaid-container') ||
|
||
mermaidDiv.closest('.mermaid-fullscreen-modal')) {
|
||
// Already processed, adjust button class if needed
|
||
const existingBtn = mermaidDiv.parentNode.querySelector('.mermaid-fullscreen-btn');
|
||
if (existingBtn) {
|
||
existingBtn.className = 'mermaid-fullscreen-btn' + (darkTheme ? ' dark-theme' : '');
|
||
}
|
||
return;
|
||
}
|
||
|
||
const container = document.createElement('div');
|
||
container.className = 'mermaid-container';
|
||
mermaidDiv.parentNode.insertBefore(container, mermaidDiv);
|
||
container.appendChild(mermaidDiv);
|
||
|
||
const fullscreenBtn = document.createElement('button');
|
||
fullscreenBtn.className = 'mermaid-fullscreen-btn' + (darkTheme ? ' dark-theme' : '');
|
||
fullscreenBtn.setAttribute('aria-label', 'View diagram in fullscreen');
|
||
fullscreenBtn.textContent = '⛶';
|
||
fullscreenBtn.style.opacity = '50%';
|
||
|
||
// Calculate dynamic position based on diagram's margin and padding
|
||
const diagramStyle = window.getComputedStyle(mermaidDiv);
|
||
const marginTop = parseFloat(diagramStyle.marginTop) || 0;
|
||
const marginRight = parseFloat(diagramStyle.marginRight) || 0;
|
||
const paddingTop = parseFloat(diagramStyle.paddingTop) || 0;
|
||
const paddingRight = parseFloat(diagramStyle.paddingRight) || 0;
|
||
fullscreenBtn.style.top = `${marginTop + paddingTop + 4}px`;
|
||
fullscreenBtn.style.right = `${marginRight + paddingRight + 4}px`;
|
||
|
||
fullscreenBtn.addEventListener('click', () => {
|
||
previousScrollOffset = [window.scroll, window.scrollY];
|
||
const clone = mermaidDiv.cloneNode(true);
|
||
modalContent.innerHTML = '';
|
||
modalContent.appendChild(clone);
|
||
|
||
const svg = clone.querySelector('svg');
|
||
if (svg) {
|
||
svg.removeAttribute('width');
|
||
svg.removeAttribute('height');
|
||
svg.style.width = '100%';
|
||
svg.style.height = 'auto';
|
||
svg.style.maxWidth = '100%';
|
||
svg.style.sdisplay = 'block';
|
||
|
||
if ("False" === "True") {
|
||
setTimeout(() => {
|
||
const g = svg.querySelector('g');
|
||
if (g) {
|
||
var svgD3 = d3.select(svg);
|
||
svgD3.html("<g class='wrapper'>" + svgD3.html() + "</g>");
|
||
var inner = svgD3.select("g");
|
||
var zoom = d3.zoom().on("zoom", function(event) {
|
||
inner.attr("transform", event.transform);
|
||
});
|
||
svgD3.call(zoom);
|
||
}
|
||
}, 100);
|
||
}
|
||
}
|
||
|
||
modal.classList.add('active');
|
||
document.body.style.overflow = 'hidden';
|
||
});
|
||
container.appendChild(fullscreenBtn);
|
||
});
|
||
};
|
||
|
||
const load = async () => {
|
||
initStyles();
|
||
|
||
await runMermaid(true);
|
||
|
||
const reRunIfThemeChanges = async () => {
|
||
const newDarkTheme = isDarkTheme();
|
||
if (newDarkTheme !== darkTheme) {
|
||
darkTheme = newDarkTheme;
|
||
console.log("Theme change detected, re-running mermaid with", darkTheme ? "dark" : "default", "theme");
|
||
await mermaid.initialize(
|
||
{...JSON.parse(
|
||
`{"startOnLoad": false}`
|
||
),
|
||
...{ darkMode: darkTheme, theme: darkTheme ? 'dark' : 'default' },
|
||
}
|
||
);
|
||
await runMermaid(true);
|
||
}
|
||
};
|
||
|
||
// Update theme classes when theme changes
|
||
const themeObserver = new MutationObserver(reRunIfThemeChanges);
|
||
themeObserver.observe(document.documentElement, {
|
||
attributes: true,
|
||
attributeFilter: ['class', 'style', 'data-theme']
|
||
});
|
||
themeObserver.observe(document.body, {
|
||
attributes: true,
|
||
attributeFilter: ['class', 'style', 'data-theme']
|
||
});
|
||
};
|
||
|
||
|
||
|
||
|
||
|
||
console.log("Initializing mermaid with", darkTheme ? "dark" : "default", "theme");
|
||
mermaid.initialize(
|
||
{...JSON.parse(
|
||
`{"startOnLoad": false}`
|
||
),
|
||
...{ darkMode: darkTheme, theme: darkTheme ? 'dark' : 'default' },
|
||
}
|
||
);
|
||
|
||
window.addEventListener("load", load);
|
||
window.runMermaid = runMermaid;</script>
|
||
<script>DOCUMENTATION_OPTIONS.pagename = 'concepts/modes-reseau';</script>
|
||
<script>
|
||
DOCUMENTATION_OPTIONS.theme_version = '0.16.1';
|
||
DOCUMENTATION_OPTIONS.theme_switcher_json_url = '../switcher.json';
|
||
DOCUMENTATION_OPTIONS.theme_switcher_version_match = 'main';
|
||
DOCUMENTATION_OPTIONS.show_version_warning_banner =
|
||
false;
|
||
</script>
|
||
<link rel="index" title="Index" href="../genindex.html" />
|
||
<link rel="search" title="Recherche" href="../search.html" />
|
||
<link rel="next" title="Cycle de vie des ressources" href="cycle-de-vie.html" />
|
||
<link rel="prev" title="VPC, subnet et VM" href="vpc-subnet-vm.html" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||
<meta name="docsearch:language" content="fr"/>
|
||
<meta name="docsearch:version" content="0.1" />
|
||
</head>
|
||
|
||
|
||
<body data-bs-spy="scroll" data-bs-target=".bd-toc-nav" data-offset="180" data-bs-root-margin="0px 0px -60%" data-default-mode="">
|
||
|
||
|
||
|
||
<div id="pst-skip-link" class="skip-link d-print-none"><a href="#main-content">Passer au contenu principal</a></div>
|
||
|
||
<div id="pst-scroll-pixel-helper"></div>
|
||
|
||
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
|
||
<i class="fa-solid fa-arrow-up"></i>Haut de page</button>
|
||
|
||
|
||
<dialog id="pst-search-dialog">
|
||
|
||
<form class="bd-search d-flex align-items-center"
|
||
action="../search.html"
|
||
method="get">
|
||
<i class="fa-solid fa-magnifying-glass"></i>
|
||
<input type="search"
|
||
class="form-control"
|
||
name="q"
|
||
placeholder="Search..."
|
||
aria-label="Search..."
|
||
autocomplete="off"
|
||
autocorrect="off"
|
||
autocapitalize="off"
|
||
spellcheck="false"/>
|
||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
|
||
</form>
|
||
</dialog>
|
||
|
||
<div class="pst-async-banner-revealer d-none">
|
||
<aside id="bd-header-version-warning" class="d-none d-print-none" aria-label="Alerte de version"></aside>
|
||
</div>
|
||
|
||
|
||
<header class="bd-header navbar navbar-expand-lg bd-navbar d-print-none">
|
||
</header>
|
||
|
||
|
||
<div class="bd-container">
|
||
<div class="bd-container__inner bd-page-width">
|
||
|
||
|
||
|
||
<dialog id="pst-primary-sidebar-modal"></dialog>
|
||
<div id="pst-primary-sidebar" class="bd-sidebar-primary bd-sidebar">
|
||
|
||
|
||
|
||
<div class="sidebar-header-items sidebar-primary__section">
|
||
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="sidebar-primary-items__start sidebar-primary__section">
|
||
<div class="sidebar-primary-item">
|
||
|
||
|
||
|
||
|
||
|
||
<a class="navbar-brand logo" href="../index.html">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p class="title logo__title">Documentation two 0.1.0</p>
|
||
|
||
</a></div>
|
||
<div class="sidebar-primary-item"><ul class="navbar-icon-links"
|
||
aria-label="Icon Links">
|
||
<li class="nav-item">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<a href="https://git.g3e.fr/syonad/two" title="Dépôt" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-solid fa-code-branch fa-lg" aria-hidden="true"></i>
|
||
<span class="sr-only">Dépôt</span></a>
|
||
</li>
|
||
</ul></div>
|
||
<div class="sidebar-primary-item">
|
||
<div class="version-switcher__container dropdown pst-js-only">
|
||
<button id="pst-version-switcher-button-2"
|
||
type="button"
|
||
class="version-switcher__button btn btn-sm dropdown-toggle"
|
||
data-bs-toggle="dropdown"
|
||
aria-haspopup="listbox"
|
||
aria-controls="pst-version-switcher-list-2"
|
||
aria-label="Version switcher list"
|
||
>
|
||
Choose version <!-- this text may get changed later by javascript -->
|
||
<span class="caret"></span>
|
||
</button>
|
||
<div id="pst-version-switcher-list-2"
|
||
class="version-switcher__menu dropdown-menu list-group-flush py-0"
|
||
role="listbox" aria-labelledby="pst-version-switcher-button-2">
|
||
<!-- dropdown will be populated by javascript on page load -->
|
||
</div>
|
||
</div></div>
|
||
<div class="sidebar-primary-item">
|
||
|
||
<button class="btn search-button-field search-button__button pst-js-only" title="Recherche" aria-label="Recherche" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||
<i class="fa-solid fa-magnifying-glass"></i>
|
||
<span class="search-button__default-text">Recherche</span>
|
||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||
</button></div>
|
||
<div class="sidebar-primary-item"><nav class="bd-links bd-docs-nav" aria-label="Main">
|
||
<div class="bd-toc-item navbar-nav active">
|
||
|
||
<ul class="nav bd-sidenav bd-sidenav__home-link">
|
||
<li class="toctree-l1">
|
||
<a class="reference internal" href="../index.html">
|
||
two
|
||
</a>
|
||
</li>
|
||
</ul>
|
||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Mise en œuvre</span></p>
|
||
<ul class="nav bd-sidenav">
|
||
<li class="toctree-l1 has-children"><a class="reference internal" href="../demarrage/index.html">Démarrage</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="../demarrage/installation.html">Installation d’un hyperviseur</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../demarrage/premier-vpc.html">Premier VPC, premier subnet, première VM</a></li>
|
||
</ul>
|
||
</details></li>
|
||
<li class="toctree-l1 has-children"><a class="reference internal" href="../deploiement/index.html">Déploiement d’un cluster</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="../deploiement/architecture-cluster.html">Architecture du cluster</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../deploiement/image-qcow2.html">Construction de l’image qcow2</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../deploiement/routeurs.html">Routeurs</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../deploiement/premier-hyperviseur.html">Premier hyperviseur</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../deploiement/route-reflector.html">VM route reflector</a></li>
|
||
</ul>
|
||
</details></li>
|
||
</ul>
|
||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Exploitation</span></p>
|
||
<ul class="nav bd-sidenav">
|
||
<li class="toctree-l1 has-children"><a class="reference internal" href="../exploitation/index.html">Exploitation</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="../exploitation/configuration.html">Configuration</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../exploitation/services.html">Services systemd</a></li>
|
||
<li class="toctree-l2 has-children"><a class="reference internal" href="../exploitation/api-agent/index.html">API de l’agent</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
|
||
<li class="toctree-l3"><a class="reference internal" href="../exploitation/api-agent/asynchronisme.html">Modèle asynchrone et codes de retour</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="../exploitation/api-agent/reference.html">Référence</a></li>
|
||
</ul>
|
||
</details></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../exploitation/observabilite.html">Observabilité</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../exploitation/diagnostic.html">Diagnostic</a></li>
|
||
</ul>
|
||
</details></li>
|
||
</ul>
|
||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Développement</span></p>
|
||
<ul class="nav bd-sidenav">
|
||
<li class="toctree-l1 has-children"><a class="reference internal" href="../developpement/index.html">Développement</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="../developpement/lab.html">Lab de test multi-nœud</a></li>
|
||
</ul>
|
||
</details></li>
|
||
</ul>
|
||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Interne</span></p>
|
||
<ul class="current nav bd-sidenav">
|
||
<li class="toctree-l1 current active has-children"><a class="reference internal" href="index.html">Concepts</a><details open="open"><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul class="current">
|
||
<li class="toctree-l2"><a class="reference internal" href="vpc-subnet-vm.html">VPC, subnet et VM</a></li>
|
||
<li class="toctree-l2 current active"><a class="current reference internal" href="#">Modes réseau</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="cycle-de-vie.html">Cycle de vie des ressources</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="metadata-cloud-init.html">Metadata et cloud-init</a></li>
|
||
</ul>
|
||
</details></li>
|
||
<li class="toctree-l1 has-children"><a class="reference internal" href="../architecture/index.html">Architecture</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="../architecture/vue-densemble.html">Vue d’ensemble</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../architecture/stockage.html">Schéma des clés</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../architecture/contraintes.html">Invariants et pièges</a></li>
|
||
</ul>
|
||
</details></li>
|
||
<li class="toctree-l1 has-children"><a class="reference internal" href="../versions/index.html">Versions</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="../versions/0.2.0.html">Bael</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../versions/0.1.0.html">Michael</a></li>
|
||
</ul>
|
||
</details></li>
|
||
</ul>
|
||
|
||
</div>
|
||
</nav></div>
|
||
</div>
|
||
|
||
|
||
<div class="sidebar-primary-items__end sidebar-primary__section">
|
||
<div class="sidebar-primary-item">
|
||
<div id="ethical-ad-placement"
|
||
class="flat"
|
||
data-ea-publisher="readthedocs"
|
||
data-ea-type="readthedocs-sidebar"
|
||
data-ea-manual="true">
|
||
</div></div>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
|
||
<main id="main-content" class="bd-main" role="main">
|
||
|
||
|
||
|
||
<div class="sbt-scroll-pixel-helper"></div>
|
||
|
||
<div class="bd-content">
|
||
<div class="bd-article-container">
|
||
|
||
<div class="bd-header-article d-print-none">
|
||
<div class="header-article-items header-article__inner">
|
||
|
||
<div class="header-article-items__start">
|
||
|
||
<div class="header-article-item"><button class="sidebar-toggle primary-toggle btn btn-sm" title="Toggle primary sidebar" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||
<span class="fa-solid fa-bars"></span>
|
||
</button></div>
|
||
|
||
</div>
|
||
|
||
|
||
<div class="header-article-items__end">
|
||
|
||
<div class="header-article-item">
|
||
|
||
<div class="article-header-buttons">
|
||
|
||
|
||
|
||
<button onclick="toggleFullScreen()"
|
||
class="btn btn-sm btn-fullscreen-button pst-navbar-icon"
|
||
title="Mode plein écran"
|
||
data-bs-placement="bottom" data-bs-toggle="tooltip"
|
||
>
|
||
|
||
|
||
<span class="btn__icon-container">
|
||
<i class="fas fa-expand"></i>
|
||
</span>
|
||
|
||
</button>
|
||
|
||
|
||
|
||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Thème" data-bs-title="Thème" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Clair"></i>
|
||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Sombre"></i>
|
||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="Paramètres système"></i>
|
||
</button>
|
||
|
||
|
||
<button class="btn btn-sm pst-navbar-icon search-button search-button__button pst-js-only" title="Recherche" aria-label="Recherche" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||
<i class="fa-solid fa-magnifying-glass fa-lg"></i>
|
||
</button>
|
||
<button class="sidebar-toggle secondary-toggle btn btn-sm pst-navbar-icon" title="Toggle secondary sidebar" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||
<span class="fa-solid fa-list"></span>
|
||
</button>
|
||
</div></div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
<div id="jb-print-docs-body" class="onlyprint">
|
||
<h1>Modes réseau</h1>
|
||
<!-- Table of contents -->
|
||
<div id="print-main-content">
|
||
<div id="jb-print-toc">
|
||
|
||
<div>
|
||
<h2> Contenu </h2>
|
||
</div>
|
||
<nav aria-label="Page">
|
||
<ul class="visible nav section-nav flex-column">
|
||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#vxlan">vxlan</a></li>
|
||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#bridge">bridge</a></li>
|
||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#routes-annoncees-aux-vm">Routes annoncées aux VM</a></li>
|
||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#route-par-defaut-default-route-et-gateway">Route par défaut : <code class="docutils literal notranslate"><span class="pre">default_route</span></code> et <code class="docutils literal notranslate"><span class="pre">gateway</span></code></a></li>
|
||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#pourquoi-la-route-32-vers-le-serveur-de-metadata-est-indispensable">Pourquoi la route <code class="docutils literal notranslate"><span class="pre">/32</span></code> vers le serveur de metadata est indispensable</a></li>
|
||
</ul>
|
||
</nav>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
<div id="searchbox"></div>
|
||
<article class="bd-article">
|
||
|
||
<section id="modes-reseau">
|
||
<h1>Modes réseau<a class="headerlink" href="#modes-reseau" title="Lien vers cette rubrique">#</a></h1>
|
||
<p>Le champ <code class="docutils literal notranslate"><span class="pre">mode</span></code> d’un subnet détermine la façon dont il est raccordé à l’host, et les routes
|
||
annoncées aux VM.</p>
|
||
<div class="pst-scrollable-table-container"><table class="table">
|
||
<colgroup>
|
||
<col style="width: 15.0%" />
|
||
<col style="width: 45.0%" />
|
||
<col style="width: 40.0%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>Mode</p></th>
|
||
<th class="head"><p>Raccordement</p></th>
|
||
<th class="head"><p>État</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">vxlan</span></code></p></td>
|
||
<td><p>tunnel VXLAN (<code class="docutils literal notranslate"><span class="pre">vxlan_id</span></code>) + bridge dans le netns du VPC</p></td>
|
||
<td><p>défaut</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">bridge</span></code></p></td>
|
||
<td><p>rattachement direct à un bridge existant de l’host, résolu depuis <code class="docutils literal notranslate"><span class="pre">iface_type</span></code></p></td>
|
||
<td><p>disponible</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">public_ip</span></code></p></td>
|
||
<td><p>routé comme <code class="docutils literal notranslate"><span class="pre">vxlan</span></code> côté DHCP</p></td>
|
||
<td><p><strong>mise en place host non implémentée</strong> — la création échoue à l’exécution</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">vlan</span></code></p></td>
|
||
<td><p>—</p></td>
|
||
<td><p>réservé, non implémenté</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="admonition warning">
|
||
<p class="admonition-title">Avertissement</p>
|
||
<p><code class="docutils literal notranslate"><span class="pre">public_ip</span></code> est accepté par l’API et traité comme <code class="docutils literal notranslate"><span class="pre">vxlan</span></code> pour le DHCP, mais sa
|
||
configuration réseau côté host n’existe pas encore : la création part en <code class="docutils literal notranslate"><span class="pre">error</span></code> dans
|
||
<code class="docutils literal notranslate"><span class="pre">Execute</span></code>. Ne pas s’appuyer dessus en production.</p>
|
||
</div>
|
||
<section id="vxlan">
|
||
<h2>vxlan<a class="headerlink" href="#vxlan" title="Lien vers cette rubrique">#</a></h2>
|
||
<pre class="mermaid">
|
||
graph LR
|
||
VM --- TAP[tap] --- BR["br-&lt;subnet&gt;<br/>interface_ip"]
|
||
BR --- VX["vxlan&lt;vni&gt;"] --- HBR["bridge host<br/>(iface_type)"] --- UP[uplink]
|
||
</pre><p>Le subnet vit dans le netns du VPC. La VM n’est donc <strong>pas joignable depuis l’host</strong> sans route
|
||
explicite — point à connaître avant de câbler un outil externe dessus.</p>
|
||
</section>
|
||
<section id="bridge">
|
||
<h2>bridge<a class="headerlink" href="#bridge" title="Lien vers cette rubrique">#</a></h2>
|
||
<p>Le subnet est rattaché directement à un bridge existant de l’host. Pas de tunnel, pas de route
|
||
VPC : le trafic sort par le bridge, et la VM est joignable depuis l’host.</p>
|
||
</section>
|
||
<section id="routes-annoncees-aux-vm">
|
||
<h2>Routes annoncées aux VM<a class="headerlink" href="#routes-annoncees-aux-vm" title="Lien vers cette rubrique">#</a></h2>
|
||
<p>Les routes sont poussées par DHCP, dans l”<strong>option 121</strong> (routes statiques sans classe,
|
||
RFC 3442). Trois entrées y figurent :</p>
|
||
<ol class="arabic simple">
|
||
<li><p>la route <code class="docutils literal notranslate"><span class="pre">/32</span></code> vers <code class="docutils literal notranslate"><span class="pre">169.254.169.254</span></code>, le serveur de metadata ;</p></li>
|
||
<li><p>la route vers le CIDR du VPC ;</p></li>
|
||
<li><p>la route par défaut <code class="docutils literal notranslate"><span class="pre">0.0.0.0/0</span></code>.</p></li>
|
||
</ol>
|
||
<div class="admonition important">
|
||
<p class="admonition-title">Important</p>
|
||
<p><strong>Un client qui lit l’option 121 ignore l’option 3.</strong> Toute route par défaut doit donc figurer
|
||
dans l’option 121 ; l’option 3 ne sert que les clients qui n’implémentent pas la 121.</p>
|
||
</div>
|
||
</section>
|
||
<section id="route-par-defaut-default-route-et-gateway">
|
||
<h2>Route par défaut : <code class="docutils literal notranslate"><span class="pre">default_route</span></code> et <code class="docutils literal notranslate"><span class="pre">gateway</span></code><a class="headerlink" href="#route-par-defaut-default-route-et-gateway" title="Lien vers cette rubrique">#</a></h2>
|
||
<p>Une route par défaut est <strong>toujours</strong> annoncée. Le champ <code class="docutils literal notranslate"><span class="pre">default_route</span></code> ne choisit que son
|
||
next-hop :</p>
|
||
<dl class="simple">
|
||
<dt><code class="docutils literal notranslate"><span class="pre">default_route:</span> <span class="pre">false</span></code> (défaut)</dt><dd><p>next-hop = <code class="docutils literal notranslate"><span class="pre">interface_ip</span></code> du subnet.</p>
|
||
</dd>
|
||
<dt><code class="docutils literal notranslate"><span class="pre">default_route:</span> <span class="pre">true</span></code></dt><dd><p>next-hop = le champ <code class="docutils literal notranslate"><span class="pre">gateway</span></code> s’il est fourni, sinon la gateway lue dans la table de routage
|
||
de l’host.</p>
|
||
</dd>
|
||
</dl>
|
||
<p><code class="docutils literal notranslate"><span class="pre">gateway</span></code> n’est <strong>pas validé</strong> par l’agent : sa joignabilité et sa cohérence avec le CIDR du
|
||
subnet relèvent de l’appelant. Fourni avec <code class="docutils literal notranslate"><span class="pre">default_route:</span> <span class="pre">false</span></code>, il est ignoré.</p>
|
||
<p>Dans tous les modes sauf <code class="docutils literal notranslate"><span class="pre">bridge</span></code>, la route vers le CIDR du VPC garde <code class="docutils literal notranslate"><span class="pre">interface_ip</span></code> comme
|
||
next-hop : sur un subnet à IP publique, le trafic interne ne doit pas sortir par la gateway
|
||
publique.</p>
|
||
</section>
|
||
<section id="pourquoi-la-route-32-vers-le-serveur-de-metadata-est-indispensable">
|
||
<h2>Pourquoi la route <code class="docutils literal notranslate"><span class="pre">/32</span></code> vers le serveur de metadata est indispensable<a class="headerlink" href="#pourquoi-la-route-32-vers-le-serveur-de-metadata-est-indispensable" title="Lien vers cette rubrique">#</a></h2>
|
||
<p>Elle paraît redondante avec la route par défaut. Elle ne l’est pas.</p>
|
||
<p>La DNAT vers le serveur de metadata est posée dans le netns du VPC, en <code class="docutils literal notranslate"><span class="pre">PREROUTING</span></code>. Le paquet
|
||
n’y est traité en L3 que si son next-hop est <code class="docutils literal notranslate"><span class="pre">interface_ip</span></code>, portée par le bridge du netns.
|
||
Avec un autre next-hop, la trame est commutée en <strong>L2</strong> sans traverser <code class="docutils literal notranslate"><span class="pre">PREROUTING</span></code> : le
|
||
serveur de metadata devient injoignable et tout le provisionnement cloud-init échoue,
|
||
silencieusement.</p>
|
||
<div class="admonition danger">
|
||
<p class="admonition-title">Danger</p>
|
||
<p>Ne jamais retirer cette route de l’option 121, quelle que soit l’apparence de redondance.</p>
|
||
</div>
|
||
</section>
|
||
</section>
|
||
|
||
|
||
</article>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<footer class="prev-next-footer d-print-none">
|
||
|
||
<div class="prev-next-area">
|
||
<a class="left-prev"
|
||
href="vpc-subnet-vm.html"
|
||
title="page précédente">
|
||
<i class="fa-solid fa-angle-left"></i>
|
||
<div class="prev-next-info">
|
||
<p class="prev-next-subtitle">précédent</p>
|
||
<p class="prev-next-title">VPC, subnet et VM</p>
|
||
</div>
|
||
</a>
|
||
<a class="right-next"
|
||
href="cycle-de-vie.html"
|
||
title="page suivante">
|
||
<div class="prev-next-info">
|
||
<p class="prev-next-subtitle">suivant</p>
|
||
<p class="prev-next-title">Cycle de vie des ressources</p>
|
||
</div>
|
||
<i class="fa-solid fa-angle-right"></i>
|
||
</a>
|
||
</div>
|
||
</footer>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
<dialog id="pst-secondary-sidebar-modal"></dialog>
|
||
<div id="pst-secondary-sidebar" class="bd-sidebar-secondary bd-toc"><div class="sidebar-secondary-items sidebar-secondary__inner">
|
||
|
||
|
||
<div class="sidebar-secondary-item"><div
|
||
id="pst-page-navigation-heading-2"
|
||
class="page-toc tocsection onthispage">
|
||
<i class="fa-solid fa-list"></i> Contenu
|
||
</div>
|
||
<nav id="pst-page-toc-nav" class="page-toc" aria-labelledby="pst-page-navigation-heading-2">
|
||
<ul class="visible nav section-nav flex-column">
|
||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#vxlan">vxlan</a></li>
|
||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#bridge">bridge</a></li>
|
||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#routes-annoncees-aux-vm">Routes annoncées aux VM</a></li>
|
||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#route-par-defaut-default-route-et-gateway">Route par défaut : <code class="docutils literal notranslate"><span class="pre">default_route</span></code> et <code class="docutils literal notranslate"><span class="pre">gateway</span></code></a></li>
|
||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#pourquoi-la-route-32-vers-le-serveur-de-metadata-est-indispensable">Pourquoi la route <code class="docutils literal notranslate"><span class="pre">/32</span></code> vers le serveur de metadata est indispensable</a></li>
|
||
</ul>
|
||
</nav></div>
|
||
|
||
</div></div>
|
||
|
||
|
||
</div>
|
||
<footer class="bd-footer-content">
|
||
|
||
<div class="bd-footer-content__inner container">
|
||
|
||
<div class="footer-item">
|
||
|
||
<p class="component-author">
|
||
Par Nicolas Boufidjeline
|
||
</p>
|
||
|
||
</div>
|
||
|
||
<div class="footer-item">
|
||
|
||
|
||
<p class="copyright">
|
||
|
||
© Copyright 2026, Nicolas Boufidjeline.
|
||
<br/>
|
||
|
||
</p>
|
||
|
||
</div>
|
||
|
||
<div class="footer-item">
|
||
|
||
</div>
|
||
|
||
<div class="footer-item">
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</footer>
|
||
|
||
|
||
</main>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Scripts loaded after <body> so the DOM is not blocked -->
|
||
<script defer src="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf"></script>
|
||
<script defer src="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf"></script>
|
||
|
||
<footer class="bd-footer">
|
||
</footer>
|
||
</body>
|
||
</html> |