Skip to content

Instantly share code, notes, and snippets.

View rajeshrah22's full-sized avatar
๐ŸŒ„
vibing && coding

Rahul Rajesh rajeshrah22

๐ŸŒ„
vibing && coding
View GitHub Profile
@rajeshrah22
rajeshrah22 / setup-wifi.sh
Last active May 15, 2026 21:40
Setup wifi in a fedora VM with either wpa_supplicant or iwd backend and mac80211_hwsim for wifi hardware simulation. Assisted by claude. The python file acts as a secret agent like gnome-keyring or kde plama wallet
#!/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() {
#!/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:
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;
@rajeshrah22
rajeshrah22 / setup.sh
Created January 20, 2026 20:32
Setup simple geneve
#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
read -r -d '' ETH1 <<EOF
interfaces:
- name: eth1
type: ethernet
state: up
ipv4:
address:
- ip: 192.0.2.1
prefix-length: 24
dhcp: false
@rajeshrah22
rajeshrah22 / ip-addr-append-reproducer.sh
Last active July 22, 2025 19:04
Reproduces the ip address appending problem with nmstate.
read -r -d '' ETH1 <<EOF
interfaces:
- name: eth1
type: ethernet
state: up
ipv4:
address:
- ip: 192.0.2.1
prefix-length: 24
dhcp: false
@rajeshrah22
rajeshrah22 / verification-error-reproducer.sh
Last active July 13, 2025 21:14
Reproduces error on a particular issue I was working on -- replicating a CI test case that was failing because Linux bridge 'linux-br0' was not found.
read -r -d '' LINUX_BRIDGE <<EOF
interfaces:
- name: eth1
type: veth
state: up
- name: linux-br0
type: linux-bridge
state: up
bridge:
port: