pub struct Network {
pub cidr: String,
pub internet: bool,
pub gateway: Option<String>,
pub docker: Option<NetworkDocker>,
pub vlans: IndexMap<u16, Vlan>,
pub switch: Option<String>,
pub vlan: Option<(String, u16)>,
pub tc: Option<Tc>,
pub ipv6: Option<Ipv6>,
pub external: Option<String>,
pub bridged: Option<Bridged>,
pub mtu: Option<u16>,
}Expand description
A network: an address block, whether it reaches the internet, and what routes it.
Fields§
§cidr: StringThe network’s private IPv4 block (inside 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16),
a /24 to a /29, e.g. 10.20.0.0/24. A LAN split into vlans may be larger, from /8.
internet: boolWhether machines on it may reach the internet (default true).
gateway: Option<String>A machine of the environment that routes this network (an edge firewall): it takes the
gateway address, and its own configuration decides what crosses it. Isoloom adds no
router of its own here, so reach and internet on this network become expected
behavior for the checks to verify.
docker: Option<NetworkDocker>How the Docker target lays this network out, when it differs from the other targets.
vlans: IndexMap<u16, Vlan>The VLANs this LAN is split into, by id (1-4094), each with its own block inside the
LAN’s. Machines join one as <lan>.vlan<id> (office.vlan10); a reach rule naming
the LAN covers all of its VLANs. Each VLAN becomes a network of its own,
<lan>-vlan<id>; the LAN itself stays a network only when a machine joins it directly.
switch: Option<String>On a LAN split into vlans: a switch appliance of the environment (docker.appliance: cisco-iol-l2 or cisco-vios-l2) that switches it, instead of Isoloom’s own Linux switch.
Its ports are derived, so the machine lists no networks: an access port per VLAN, then
a trunk per machine on several of the LAN’s VLANs. Docker targets only.
vlan: Option<(String, u16)>Set by parsing on the networks a LAN’s VLANs become: that LAN and the VLAN’s id, so a target can carry them on one 802.1Q segment (a machine on several of them gets a trunk).
tc: Option<Tc>Link impairment on traffic entering this network through Isoloom’s router (a slow or
lossy link): delay, jitter, loss, rate. Needs the router on the network (a reach rule
touching it, no gateway machine).
ipv6: Option<Ipv6>The network’s IPv6 block: dual-stack beside cidr, or IPv6-only (only: true).
Machines get an IPv6 address on it (derived from their octet, or handed out by the
target) and routes to the other IPv6 blocks the reach rules open.
external: Option<String>An existing network, by its name on the target (a Docker network, a Proxmox bridge, an
ESXi port group): the machines join it, and Isoloom never creates or deletes it. cidr
is its block, and the machines keep fixed addresses in it.
bridged: Option<Bridged>Bridged to an interface of the host, so the machines sit on the host’s own LAN (fixed
addresses in cidr, or DHCP from the LAN).
mtu: Option<u16>The largest packet the network carries, in bytes (576 to 9216): smaller to mimic a tunnel or a VPN link, jumbo frames (9000) for a storage network. A LAN’s VLANs carry the LAN’s. Default: the target’s own (1500 on most).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Network
impl<'de> Deserialize<'de> for Network
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Network
impl JsonSchema for Network
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more