This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # WiFi simulation setup script supporting both IWD and wpa_supplicant backends | |
| # Usage: ./setup-wifi.sh [iwd|wpa] | |
| # Idempotent - safe to run multiple times | |
| set -e | |
| BACKEND="${1:-iwd}" | |
| usage() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # What are the prerequesites for this reproduction? | |
| # - OVS bridge connection with internal interface, which has L2 connectivity to | |
| # a DHCP server. | |
| # - ipv4.dhcp-send-release is enabled. | |
| # NOTE: Global config in /etc/NetworkManager/conf.d/ does not accept `yes/no` `true/false` as values | |
| # in the configuration. You must use numerical values. See CONNECTION section in man NetworkManager.conf. | |
| # | |
| # How to reproduce: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| setup_local_underlay() { | |
| sudo ip netns add hostA; | |
| sudo ip netns add hostB; | |
| sudo ip link add name vethA type veth peer name vethB; | |
| sudo ip link set vethA netns hostA; | |
| sudo ip link set vethB netns hostB; | |
| # create underlay network "physical" | |
| sudo ip netns exec hostA ip addr add 192.178.0.1/24 dev vethA; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #properties for geneve | |
| remote="192.168.122.198" | |
| vid="1000" | |
| overlay_node_ip="10.200.1.1/32" | |
| overlay_node_ip_other="10.200.2.1/32" | |
| geneve_0="geneve0" | |
| setup_geneve() { | |
| sudo ip link add name $geneve_0 type geneve id $vid remote $remote | |
| sudo ip link set $geneve_0 up |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| read -r -d '' ETH1 <<EOF | |
| interfaces: | |
| - name: eth1 | |
| type: ethernet | |
| state: up | |
| ipv4: | |
| address: | |
| - ip: 192.0.2.1 | |
| prefix-length: 24 | |
| dhcp: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| read -r -d '' ETH1 <<EOF | |
| interfaces: | |
| - name: eth1 | |
| type: ethernet | |
| state: up | |
| ipv4: | |
| address: | |
| - ip: 192.0.2.1 | |
| prefix-length: 24 | |
| dhcp: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| read -r -d '' LINUX_BRIDGE <<EOF | |
| interfaces: | |
| - name: eth1 | |
| type: veth | |
| state: up | |
| - name: linux-br0 | |
| type: linux-bridge | |
| state: up | |
| bridge: | |
| port: |