This file contains 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 | |
brctl addbr br0 | |
ip netns add t1 | |
ip netns add t2 | |
ip netns add t3 | |
ip link add t1 type veth peer name t11 | |
ip link add t2 type veth peer name t22 | |
ip link add t3 type veth peer name t33 |
This file contains 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 | |
ip netns add t1 | |
ip netns add t2 | |
ip link add t1 type veth peer name t11 | |
ip link add t2 type veth peer name t22 | |
ip link set t11 netns t1 | |
ip link set t22 netns t2 |
This file contains 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
#!/usr/bin/env python3 | |
import paramiko | |
import asyncio | |
import time | |
import asyncssh | |
import sys | |
pubkey_str = '' | |
with open("/root/.ssh/id_rsa.pub") as f: |
This file contains 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 | |
#set -x | |
function usage() | |
{ | |
echo "Usage:" | |
echo " tc.sh -d <dev> -b <bandwidth> -m <mode> --src <src_ip>" | |
echo " <dev> is the device which tc be attached to" | |
echo " <bandwidth> unit is Mb" | |
echo " <mode> 0 contains class while 1 does not, default 0" | |
echo " <src_ip> match source ip default empty" |