Linux network duplication
Linux network duplication injects chaos to disrupt network connectivity on a Linux machine by duplicating network packets.
Use cases
- Induces network duplication on the target Linux machines.
- Simulates packet duplication in the network.
note
- This fault can be executed on Ubuntu 16 or higher, Debian 10 or higher, CentOS 7 or higher, RHEL 7 or higher, Fedora 30 or higher, and openSUSE LEAP 15.4 or higher.
- The
linux-chaos-infrastructure
systemd service should be in an active state, and the infrastructure should be inCONNECTED
state.
Fault permissions
The fault uses the root
Linux user and root
user group.
Fault tunables
Mandatory tunables
Tunable | Description | Notes |
---|---|---|
networkInterface | Network interface to target. | For example: eth0 |
Optional tunables
Tunable | Description | Notes |
---|---|---|
destinationHosts | List of the target host names or keywords. For example, ["google.com","litmuschaos.io"] | If neither destinationHosts nor destinationIPs is provided, all host names/domains are targeted |
destinationIPs | List of the target IPs. For example, ["1.1.1.1","8.8.8.8"] | If neither destinationHosts nor destinationIPs is provided, all host names/domains are targeted |
packetDuplicationPercentage | Percentage of packet to duplicate. For example 50 . | Default: 100% |
duration | Duration through which chaos is injected into the target resource (in seconds). | Default: 30s |
rampTime | Period to wait before and after injecting chaos (in seconds). | Default: 0s |
Destination hosts
The destinationHosts
input variable subjects the comma-separated names of the target hosts to chaos.
The following YAML snippet illustrates the use of this environment variable:
apiVersion: litmuchaos.io/v1alpha1
kind: LinuxFault
metadata:
name: linux-network-duplication
labels:
name: network-duplication
spec:
networkChaos/inputs:
destinationHosts: '["google.com"]'
networkInterface: "eth0"
Destination IPs
The destinationIPs
input variable subjects the comma-separated names of the target IPs to chaos.
The following YAML snippet illustrates the use of this environment variable:
apiVersion: litmuchaos.io/v1alpha1
kind: LinuxFault
metadata:
name: linux-network-duplication
labels:
name: network-duplication
spec:
networkChaos/inputs:
destinationIPs: '["1.1.1.1"]'
networkInterface: "eth0"
Packet duplication percentage
The packetDuplicationPercentage
input variable duplicates a specific percentage of the data packets.
The following YAML snippet illustrates the use of this environment variable:
apiVersion: litmuchaos.io/v1alpha1
kind: LinuxFault
metadata:
name: linux-network-duplication
labels:
name: network-duplication
spec:
networkChaos/inputs:
packetDuplicationPercentage: '50'
networkInterface: "eth0"