Skip to content

Instantly share code, notes, and snippets.

@programmer131
Last active February 18, 2024 05:08
Show Gist options
  • Select an option

  • Save programmer131/ef0c46a124018fefbd4325617132e28e to your computer and use it in GitHub Desktop.

Select an option

Save programmer131/ef0c46a124018fefbd4325617132e28e to your computer and use it in GitHub Desktop.

Revisions

  1. farrukh revised this gist Jul 17, 2020. 1 changed file with 68 additions and 68 deletions.
    136 changes: 68 additions & 68 deletions Linux Virtualization using Iproute2.md
    Original file line number Diff line number Diff line change
    @@ -1,69 +1,69 @@
    **How to clear ip addr, link**\
    ip link delete vxlan2\
    ip addr del 192.168.0.55/24 dev vxlan2\
    **VxLAN setup**\
    **Machine 1**\
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.48 dstport 4789 dev wlp2s0\
    ip link set vxlan1 up\
    ip addr add 192.168.0.6/24 dev vxlan1\
    **Machine 2**\
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.24 dstport 4789 dev wlp3s0\
    ip link set vxlan1 up\
    ip addr add 192.168.0.2/24 dev vxlan1\
    **VxLAN in VxLAN**\
    **Machine 1**\
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.48 dstport 4789 dev wlp2s0\
    ip link set vxlan1 up\
    ip addr add 192.168.0.6/24 dev vxlan1\
    ip link add vxlan2 type vxlan id 55 remote 192.168.0.2 dstport 4789 dev vxlan1\
    ip link set vxlan2 up\
    ip addr add 192.168.12.55/24 dev vxlan2\
    **Machine 2**\
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.24 dstport 4789 dev wlp3s0\
    ip link set vxlan1 up\
    ip addr add 192.168.0.2/24 dev vxlan1\
    ip link add vxlan2 type vxlan id 55 remote 192.168.0.6 dstport 4789 dev vxlan1\
    ip link set vxlan2 up\
    ip addr add 192.168.12.77/24 dev vxlan2\
    \
    **VLAN setup**\
    **machine 1**\
    ip link add link wlp2s0 name eth0.100 type vlan id 100\
    ip addr add 192.168.100.1/24 brd 192.168.100.255 dev eth0.100\
    ip link set dev eth0.100 up\
    **Machine2**\
    ip link add link wlp3s0 name eth0.100 type vlan id 100\
    ip addr add 192.168.100.2/24 brd 192.168.100.255 dev eth0.100\
    ip link set dev eth0.100 up\
    **Stacked VLAN (VLAN in VLAN, 8100,8100)**\
    **Machine 1**\
    ip link add link wlp2s0 name eth0.100 type vlan id 100\
    ip addr add 192.168.100.1/24 brd 192.168.100.255 dev eth0.100\
    ip link set dev eth0.100 up\
    ip link add link eth0.100 name eth0.101 type vlan id 101\
    ip addr add 192.168.101.1/24 brd 192.168.101.255 dev eth0.101\
    ip link set dev eth0.101 up\
    **machine 2**\
    ip link add link wlp3s0 name eth0.100 type vlan id 100\
    ip addr add 192.168.100.2/24 brd 192.168.100.255 dev eth0.100\
    ip link set dev eth0.100 up\
    ip link add link eth0.100 name eth0.101 type vlan id 101\
    ip addr add 192.168.101.2/24 brd 192.168.101.255 dev eth0.101\
    ip link set dev eth0.101 up\
    **Stacked VLAN (S-tag, C-tag)**\
    **Machine 1**\
    ip link add link wlp2s0 eth0.11 type vlan proto 802.1ad id 11\
    ip addr add 192.168.125.1/24 brd 192.168.125.255 dev eth0.11\
    ip link set dev eth0.11 up\
    ip link add link eth0.11 eth0.11.46 type vlan proto 802.1Q id 46\
    ip addr add 192.168.116.1/24 brd 192.168.126.255 dev eth0.11.46\
    ip link set dev eth0.11.46 up\
    **machine 2**\
    ip link add link wlp3s0 eth0.11 type vlan proto 802.1ad id 11\
    ip addr add 192.168.125.2/24 brd 192.168.125.255 dev eth0.11\
    ip link set dev eth0.11 up\
    ip link add link eth0.11 eth0.11.46 type vlan proto 802.1Q id 46\
    ip addr add 192.168.116.2/24 brd 192.168.126.255 dev eth0.11.46\
    ip link set dev eth0.11.46 up\
    **Captured traffic in pcap format**\
    **How to clear ip addr, link**\
    ip link delete vxlan2\
    ip addr del 192.168.0.55/24 dev vxlan2\
    **VxLAN setup**\
    **Machine 1**\
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.48 dstport 4789 dev wlp2s0\
    ip link set vxlan1 up\
    ip addr add 192.168.0.6/24 dev vxlan1\
    **Machine 2**\
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.24 dstport 4789 dev wlp3s0\
    ip link set vxlan1 up\
    ip addr add 192.168.0.2/24 dev vxlan1\
    **VxLAN in VxLAN**\
    **Machine 1**\
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.48 dstport 4789 dev wlp2s0\
    ip link set vxlan1 up\
    ip addr add 192.168.0.6/24 dev vxlan1\
    ip link add vxlan2 type vxlan id 55 remote 192.168.0.2 dstport 4789 dev vxlan1\
    ip link set vxlan2 up\
    ip addr add 192.168.12.55/24 dev vxlan2\
    **Machine 2**\
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.24 dstport 4789 dev wlp3s0\
    ip link set vxlan1 up\
    ip addr add 192.168.0.2/24 dev vxlan1\
    ip link add vxlan2 type vxlan id 55 remote 192.168.0.6 dstport 4789 dev vxlan1\
    ip link set vxlan2 up\
    ip addr add 192.168.12.77/24 dev vxlan2\
    \
    **VLAN setup**\
    **machine 1**\
    ip link add link wlp2s0 name eth0.100 type vlan id 100\
    ip addr add 192.168.100.1/24 brd 192.168.100.255 dev eth0.100\
    ip link set dev eth0.100 up\
    **Machine2**\
    ip link add link wlp3s0 name eth0.100 type vlan id 100\
    ip addr add 192.168.100.2/24 brd 192.168.100.255 dev eth0.100\
    ip link set dev eth0.100 up\
    **Stacked VLAN (VLAN in VLAN, 8100,8100)**\
    **Machine 1**\
    ip link add link wlp2s0 name eth0.100 type vlan id 100\
    ip addr add 192.168.100.1/24 brd 192.168.100.255 dev eth0.100\
    ip link set dev eth0.100 up\
    ip link add link eth0.100 name eth0.101 type vlan id 101\
    ip addr add 192.168.101.1/24 brd 192.168.101.255 dev eth0.101\
    ip link set dev eth0.101 up\
    **machine 2**\
    ip link add link wlp3s0 name eth0.100 type vlan id 100\
    ip addr add 192.168.100.2/24 brd 192.168.100.255 dev eth0.100\
    ip link set dev eth0.100 up\
    ip link add link eth0.100 name eth0.101 type vlan id 101\
    ip addr add 192.168.101.2/24 brd 192.168.101.255 dev eth0.101\
    ip link set dev eth0.101 up\
    **Stacked VLAN (S-tag, C-tag)**\
    **Machine 1**\
    ip link add link wlp2s0 eth0.11 type vlan proto 802.1ad id 11\
    ip addr add 192.168.125.1/24 brd 192.168.125.255 dev eth0.11\
    ip link set dev eth0.11 up\
    ip link add link eth0.11 eth0.11.46 type vlan proto 802.1Q id 46\
    ip addr add 192.168.116.1/24 brd 192.168.126.255 dev eth0.11.46\
    ip link set dev eth0.11.46 up\
    **machine 2**\
    ip link add link wlp3s0 eth0.11 type vlan proto 802.1ad id 11\
    ip addr add 192.168.125.2/24 brd 192.168.125.255 dev eth0.11\
    ip link set dev eth0.11 up\
    ip link add link eth0.11 eth0.11.46 type vlan proto 802.1Q id 46\
    ip addr add 192.168.116.2/24 brd 192.168.126.255 dev eth0.11.46\
    ip link set dev eth0.11.46 up\
    **Captured traffic in pcap format**\
    https://drive.google.com/drive/folders/1ZRJZFUXvBkZbRkMTFwXPEXNwhIcw-xOC?usp=sharing
  2. farrukh revised this gist Jul 17, 2020. 1 changed file with 68 additions and 92 deletions.
    160 changes: 68 additions & 92 deletions Linux Virtualization using Iproute2.md
    Original file line number Diff line number Diff line change
    @@ -1,93 +1,69 @@
    **How to clear ip addr, link**

    ip link delete vxlan2\
    ip addr del 192.168.0.55/24 dev vxlan2

    **VxLAN setup**

    **Machine 1**

    ip link add vxlan1 type vxlan id 1 remote 192.168.18.48 dstport 4789 dev wlp2s0\
    ip link set vxlan1 up\
    ip addr add 192.168.0.6/24 dev vxlan1

    **Machine 2**

    ip link add vxlan1 type vxlan id 1 remote 192.168.18.24 dstport 4789 dev wlp3s0
    ip link set vxlan1 up\
    ip addr add 192.168.0.2/24 dev vxlan1

    **VxLAN in VxLAN**

    **Machine 1**

    ip link add vxlan1 type vxlan id 1 remote 192.168.18.48 dstport 4789 dev wlp2s0\
    ip link set vxlan1 up\
    ip addr add 192.168.0.6/24 dev vxlan1

    ip link add vxlan2 type vxlan id 55 remote 192.168.0.2 dstport 4789 dev vxlan1\
    ip link set vxlan2 up\
    ip addr add 192.168.12.55/24 dev vxlan2

    **Machine 2**\
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.24 dstport 4789 dev wlp3s0\
    ip link set vxlan1 up\
    ip addr add 192.168.0.2/24 dev vxlan1

    ip link add vxlan2 type vxlan id 55 remote 192.168.0.6 dstport 4789 dev vxlan1\
    ip link set vxlan2 up\
    ip addr add 192.168.12.77/24 dev vxlan2


    **VLAN setup**\
    **machine 1**\
    ip link add link wlp2s0 name eth0.100 type vlan id 100\
    ip addr add 192.168.100.1/24 brd 192.168.100.255 dev eth0.100\
    ip link set dev eth0.100 up

    **Machine2**\
    ip link add link wlp3s0 name eth0.100 type vlan id 100
    ip addr add 192.168.100.2/24 brd 192.168.100.255 dev eth0.100
    ip link set dev eth0.100 up

    **Stacked VLAN (VLAN in VLAN, 8100,8100)**
    **Machine 1**
    ip link add link wlp2s0 name eth0.100 type vlan id 100
    ip addr add 192.168.100.1/24 brd 192.168.100.255 dev eth0.100
    ip link set dev eth0.100 up

    ip link add link eth0.100 name eth0.101 type vlan id 101
    ip addr add 192.168.101.1/24 brd 192.168.101.255 dev eth0.101
    ip link set dev eth0.101 up

    **machine 2**
    ip link add link wlp3s0 name eth0.100 type vlan id 100
    ip addr add 192.168.100.2/24 brd 192.168.100.255 dev eth0.100
    ip link set dev eth0.100 up

    ip link add link eth0.100 name eth0.101 type vlan id 101
    ip addr add 192.168.101.2/24 brd 192.168.101.255 dev eth0.101
    ip link set dev eth0.101 up

    **Stacked VLAN (S-tag, C-tag)**
    **Machine 1**
    ip link add link wlp2s0 eth0.11 type vlan proto 802.1ad id 11
    ip addr add 192.168.125.1/24 brd 192.168.125.255 dev eth0.11
    ip link set dev eth0.11 up

    ip link add link eth0.11 eth0.11.46 type vlan proto 802.1Q id 46
    ip addr add 192.168.116.1/24 brd 192.168.126.255 dev eth0.11.46
    ip link set dev eth0.11.46 up

    **machine 2**

    ip link add link wlp3s0 eth0.11 type vlan proto 802.1ad id 11
    ip addr add 192.168.125.2/24 brd 192.168.125.255 dev eth0.11
    ip link set dev eth0.11 up

    ip link add link eth0.11 eth0.11.46 type vlan proto 802.1Q id 46
    ip addr add 192.168.116.2/24 brd 192.168.126.255 dev eth0.11.46
    ip link set dev eth0.11.46 up

    **Captured traffic in pcap format**
    **How to clear ip addr, link**\
    ip link delete vxlan2\
    ip addr del 192.168.0.55/24 dev vxlan2\
    **VxLAN setup**\
    **Machine 1**\
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.48 dstport 4789 dev wlp2s0\
    ip link set vxlan1 up\
    ip addr add 192.168.0.6/24 dev vxlan1\
    **Machine 2**\
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.24 dstport 4789 dev wlp3s0\
    ip link set vxlan1 up\
    ip addr add 192.168.0.2/24 dev vxlan1\
    **VxLAN in VxLAN**\
    **Machine 1**\
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.48 dstport 4789 dev wlp2s0\
    ip link set vxlan1 up\
    ip addr add 192.168.0.6/24 dev vxlan1\
    ip link add vxlan2 type vxlan id 55 remote 192.168.0.2 dstport 4789 dev vxlan1\
    ip link set vxlan2 up\
    ip addr add 192.168.12.55/24 dev vxlan2\
    **Machine 2**\
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.24 dstport 4789 dev wlp3s0\
    ip link set vxlan1 up\
    ip addr add 192.168.0.2/24 dev vxlan1\
    ip link add vxlan2 type vxlan id 55 remote 192.168.0.6 dstport 4789 dev vxlan1\
    ip link set vxlan2 up\
    ip addr add 192.168.12.77/24 dev vxlan2\
    \
    **VLAN setup**\
    **machine 1**\
    ip link add link wlp2s0 name eth0.100 type vlan id 100\
    ip addr add 192.168.100.1/24 brd 192.168.100.255 dev eth0.100\
    ip link set dev eth0.100 up\
    **Machine2**\
    ip link add link wlp3s0 name eth0.100 type vlan id 100\
    ip addr add 192.168.100.2/24 brd 192.168.100.255 dev eth0.100\
    ip link set dev eth0.100 up\
    **Stacked VLAN (VLAN in VLAN, 8100,8100)**\
    **Machine 1**\
    ip link add link wlp2s0 name eth0.100 type vlan id 100\
    ip addr add 192.168.100.1/24 brd 192.168.100.255 dev eth0.100\
    ip link set dev eth0.100 up\
    ip link add link eth0.100 name eth0.101 type vlan id 101\
    ip addr add 192.168.101.1/24 brd 192.168.101.255 dev eth0.101\
    ip link set dev eth0.101 up\
    **machine 2**\
    ip link add link wlp3s0 name eth0.100 type vlan id 100\
    ip addr add 192.168.100.2/24 brd 192.168.100.255 dev eth0.100\
    ip link set dev eth0.100 up\
    ip link add link eth0.100 name eth0.101 type vlan id 101\
    ip addr add 192.168.101.2/24 brd 192.168.101.255 dev eth0.101\
    ip link set dev eth0.101 up\
    **Stacked VLAN (S-tag, C-tag)**\
    **Machine 1**\
    ip link add link wlp2s0 eth0.11 type vlan proto 802.1ad id 11\
    ip addr add 192.168.125.1/24 brd 192.168.125.255 dev eth0.11\
    ip link set dev eth0.11 up\
    ip link add link eth0.11 eth0.11.46 type vlan proto 802.1Q id 46\
    ip addr add 192.168.116.1/24 brd 192.168.126.255 dev eth0.11.46\
    ip link set dev eth0.11.46 up\
    **machine 2**\
    ip link add link wlp3s0 eth0.11 type vlan proto 802.1ad id 11\
    ip addr add 192.168.125.2/24 brd 192.168.125.255 dev eth0.11\
    ip link set dev eth0.11 up\
    ip link add link eth0.11 eth0.11.46 type vlan proto 802.1Q id 46\
    ip addr add 192.168.116.2/24 brd 192.168.126.255 dev eth0.11.46\
    ip link set dev eth0.11.46 up\
    **Captured traffic in pcap format**\
    https://drive.google.com/drive/folders/1ZRJZFUXvBkZbRkMTFwXPEXNwhIcw-xOC?usp=sharing
  3. farrukh revised this gist Jul 17, 2020. 1 changed file with 16 additions and 14 deletions.
    30 changes: 16 additions & 14 deletions Linux Virtualization using Iproute2.md
    Original file line number Diff line number Diff line change
    @@ -18,32 +18,34 @@ ip link set vxlan1 up\
    ip addr add 192.168.0.2/24 dev vxlan1

    **VxLAN in VxLAN**

    **Machine 1**
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.48 dstport 4789 dev wlp2s0
    ip link set vxlan1 up

    ip link add vxlan1 type vxlan id 1 remote 192.168.18.48 dstport 4789 dev wlp2s0\
    ip link set vxlan1 up\
    ip addr add 192.168.0.6/24 dev vxlan1

    ip link add vxlan2 type vxlan id 55 remote 192.168.0.2 dstport 4789 dev vxlan1
    ip link set vxlan2 up
    ip link add vxlan2 type vxlan id 55 remote 192.168.0.2 dstport 4789 dev vxlan1\
    ip link set vxlan2 up\
    ip addr add 192.168.12.55/24 dev vxlan2

    **Machine 2**
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.24 dstport 4789 dev wlp3s0
    ip link set vxlan1 up
    **Machine 2**\
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.24 dstport 4789 dev wlp3s0\
    ip link set vxlan1 up\
    ip addr add 192.168.0.2/24 dev vxlan1

    ip link add vxlan2 type vxlan id 55 remote 192.168.0.6 dstport 4789 dev vxlan1
    ip link set vxlan2 up
    ip link add vxlan2 type vxlan id 55 remote 192.168.0.6 dstport 4789 dev vxlan1\
    ip link set vxlan2 up\
    ip addr add 192.168.12.77/24 dev vxlan2


    **VLAN setup**
    **machine 1**
    ip link add link wlp2s0 name eth0.100 type vlan id 100
    ip addr add 192.168.100.1/24 brd 192.168.100.255 dev eth0.100
    **VLAN setup**\
    **machine 1**\
    ip link add link wlp2s0 name eth0.100 type vlan id 100\
    ip addr add 192.168.100.1/24 brd 192.168.100.255 dev eth0.100\
    ip link set dev eth0.100 up

    **Machine2**
    **Machine2**\
    ip link add link wlp3s0 name eth0.100 type vlan id 100
    ip addr add 192.168.100.2/24 brd 192.168.100.255 dev eth0.100
    ip link set dev eth0.100 up
  4. farrukh revised this gist Jul 17, 2020. 1 changed file with 7 additions and 4 deletions.
    11 changes: 7 additions & 4 deletions Linux Virtualization using Iproute2.md
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,20 @@
    **How to clear ip addr, link**

    ip link delete vxlan2\
    ip addr del 192.168.0.55/24 dev vxlan2\
    ip addr del 192.168.0.55/24 dev vxlan2

    **VxLAN setup**

    **Machine 1**
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.48 dstport 4789 dev wlp2s0
    ip link set vxlan1 up

    ip link add vxlan1 type vxlan id 1 remote 192.168.18.48 dstport 4789 dev wlp2s0\
    ip link set vxlan1 up\
    ip addr add 192.168.0.6/24 dev vxlan1

    **Machine 2**

    ip link add vxlan1 type vxlan id 1 remote 192.168.18.24 dstport 4789 dev wlp3s0
    ip link set vxlan1 up
    ip link set vxlan1 up\
    ip addr add 192.168.0.2/24 dev vxlan1

    **VxLAN in VxLAN**
  5. farrukh revised this gist Jul 17, 2020. 1 changed file with 13 additions and 14 deletions.
    27 changes: 13 additions & 14 deletions Linux Virtualization using Iproute2.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    **How to clear ip addr, link**
    ip link delete vxlan2
    ip addr del 192.168.0.55/24 dev vxlan2
    ip link delete vxlan2\
    ip addr del 192.168.0.55/24 dev vxlan2\

    **VxLAN setup**

    @@ -34,19 +34,19 @@ ip link set vxlan2 up
    ip addr add 192.168.12.77/24 dev vxlan2


    VLAN setup
    machine1
    **VLAN setup**
    **machine 1**
    ip link add link wlp2s0 name eth0.100 type vlan id 100
    ip addr add 192.168.100.1/24 brd 192.168.100.255 dev eth0.100
    ip link set dev eth0.100 up

    Machine2
    **Machine2**
    ip link add link wlp3s0 name eth0.100 type vlan id 100
    ip addr add 192.168.100.2/24 brd 192.168.100.255 dev eth0.100
    ip link set dev eth0.100 up

    Stacked VLAN (VLAN in VLAN, 8100,8100)
    Machine 1
    **Stacked VLAN (VLAN in VLAN, 8100,8100)**
    **Machine 1**
    ip link add link wlp2s0 name eth0.100 type vlan id 100
    ip addr add 192.168.100.1/24 brd 192.168.100.255 dev eth0.100
    ip link set dev eth0.100 up
    @@ -55,7 +55,7 @@ ip link add link eth0.100 name eth0.101 type vlan id 101
    ip addr add 192.168.101.1/24 brd 192.168.101.255 dev eth0.101
    ip link set dev eth0.101 up

    machine 2:
    **machine 2**
    ip link add link wlp3s0 name eth0.100 type vlan id 100
    ip addr add 192.168.100.2/24 brd 192.168.100.255 dev eth0.100
    ip link set dev eth0.100 up
    @@ -64,9 +64,8 @@ ip link add link eth0.100 name eth0.101 type vlan id 101
    ip addr add 192.168.101.2/24 brd 192.168.101.255 dev eth0.101
    ip link set dev eth0.101 up

    Stacked VLAN (S-tag, C-tag)

    Machine 1
    **Stacked VLAN (S-tag, C-tag)**
    **Machine 1**
    ip link add link wlp2s0 eth0.11 type vlan proto 802.1ad id 11
    ip addr add 192.168.125.1/24 brd 192.168.125.255 dev eth0.11
    ip link set dev eth0.11 up
    @@ -75,7 +74,7 @@ ip link add link eth0.11 eth0.11.46 type vlan proto 802.1Q id 46
    ip addr add 192.168.116.1/24 brd 192.168.126.255 dev eth0.11.46
    ip link set dev eth0.11.46 up

    machine 2:
    **machine 2**

    ip link add link wlp3s0 eth0.11 type vlan proto 802.1ad id 11
    ip addr add 192.168.125.2/24 brd 192.168.125.255 dev eth0.11
    @@ -85,5 +84,5 @@ ip link add link eth0.11 eth0.11.46 type vlan proto 802.1Q id 46
    ip addr add 192.168.116.2/24 brd 192.168.126.255 dev eth0.11.46
    ip link set dev eth0.11.46 up

    Captured traffic in pcap format:
    https://drive.google.com/drive/folders/1ZRJZFUXvBkZbRkMTFwXPEXNwhIcw-xOC?usp=sharing
    **Captured traffic in pcap format**
    https://drive.google.com/drive/folders/1ZRJZFUXvBkZbRkMTFwXPEXNwhIcw-xOC?usp=sharing
  6. programmer131 revised this gist Jul 17, 2020. No changes.
  7. programmer131 renamed this gist Jul 17, 2020. 1 changed file with 7 additions and 8 deletions.
    Original file line number Diff line number Diff line change
    @@ -1,22 +1,21 @@
    How to clear ip addr, link

    **How to clear ip addr, link**
    ip link delete vxlan2
    ip addr del 192.168.0.55/24 dev vxlan2

    VxLAN setup
    **VxLAN setup**

    Machine 1
    **Machine 1**
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.48 dstport 4789 dev wlp2s0
    ip link set vxlan1 up
    ip addr add 192.168.0.6/24 dev vxlan1

    Machine 2
    **Machine 2**
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.24 dstport 4789 dev wlp3s0
    ip link set vxlan1 up
    ip addr add 192.168.0.2/24 dev vxlan1

    VxLAN in VxLAN
    Machine 1
    **VxLAN in VxLAN**
    **Machine 1**
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.48 dstport 4789 dev wlp2s0
    ip link set vxlan1 up
    ip addr add 192.168.0.6/24 dev vxlan1
    @@ -25,7 +24,7 @@ ip link add vxlan2 type vxlan id 55 remote 192.168.0.2 dstport 4789 dev vxlan1
    ip link set vxlan2 up
    ip addr add 192.168.12.55/24 dev vxlan2

    Machine 2
    **Machine 2**
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.24 dstport 4789 dev wlp3s0
    ip link set vxlan1 up
    ip addr add 192.168.0.2/24 dev vxlan1
  8. programmer131 revised this gist Jul 17, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Linux Virtualization using Iproute2
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@ How to clear ip addr, link
    ip link delete vxlan2
    ip addr del 192.168.0.55/24 dev vxlan2

    **VxLAN setup**
    VxLAN setup

    Machine 1
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.48 dstport 4789 dev wlp2s0
  9. programmer131 revised this gist Jul 17, 2020. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion Linux Virtualization using Iproute2
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,8 @@ How to clear ip addr, link
    ip link delete vxlan2
    ip addr del 192.168.0.55/24 dev vxlan2

    ## VxLAN setup ##
    **VxLAN setup**

    Machine 1
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.48 dstport 4789 dev wlp2s0
    ip link set vxlan1 up
  10. programmer131 revised this gist Jul 17, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Linux Virtualization using Iproute2
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@ How to clear ip addr, link
    ip link delete vxlan2
    ip addr del 192.168.0.55/24 dev vxlan2

    ##VxLAN setup##
    ## VxLAN setup ##
    Machine 1
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.48 dstport 4789 dev wlp2s0
    ip link set vxlan1 up
  11. programmer131 revised this gist Jul 17, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Linux Virtualization using Iproute2
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@ How to clear ip addr, link
    ip link delete vxlan2
    ip addr del 192.168.0.55/24 dev vxlan2

    *VxLAN setup*
    ##VxLAN setup##
    Machine 1
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.48 dstport 4789 dev wlp2s0
    ip link set vxlan1 up
  12. programmer131 revised this gist Jul 17, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Linux Virtualization using Iproute2
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@ How to clear ip addr, link
    ip link delete vxlan2
    ip addr del 192.168.0.55/24 dev vxlan2

    **VxLAN setup**
    *VxLAN setup*
    Machine 1
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.48 dstport 4789 dev wlp2s0
    ip link set vxlan1 up
  13. programmer131 revised this gist Jul 17, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Linux Virtualization using Iproute2
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@ How to clear ip addr, link
    ip link delete vxlan2
    ip addr del 192.168.0.55/24 dev vxlan2

    VxLAN setup
    **VxLAN setup**
    Machine 1
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.48 dstport 4789 dev wlp2s0
    ip link set vxlan1 up
  14. programmer131 revised this gist Jul 17, 2020. 1 changed file with 2 additions and 21 deletions.
    23 changes: 2 additions & 21 deletions Linux Virtualization using Iproute2
    Original file line number Diff line number Diff line change
    @@ -64,27 +64,6 @@ ip link add link eth0.100 name eth0.101 type vlan id 101
    ip addr add 192.168.101.2/24 brd 192.168.101.255 dev eth0.101
    ip link set dev eth0.101 up


    Stacked VLAN (S-tag, C-tag)

    Machine 1
    ip link add link wlp2s0 eth0.150 type vlan proto 802.1ad id 24
    ip addr add 192.168.105.1/24 brd 192.168.105.255 dev eth0.150
    ip link set dev eth0.150 up

    ip link add link eth0.150 eth0.150.55 type vlan proto 802.1Q id 55
    ip addr add 192.168.115.1/24 brd 192.168.115.255 dev eth0.150.55
    ip link set dev eth0.150.55 up

    machine 2:
    ip link add link wlp3s0 eth0.150 type vlan proto 802.1ad id 24
    ip addr add 192.168.105.2/24 brd 192.168.105.255 dev eth0.150
    ip link set dev eth0.150 up

    ip link add link eth0.150 eth0.150.55 type vlan proto 802.1Q id 55
    ip addr add 192.168.115.2/24 brd 192.168.115.255 dev eth0.150.55
    ip link set dev eth0.150.55 up

    Stacked VLAN (S-tag, C-tag)

    Machine 1
    @@ -106,3 +85,5 @@ ip link add link eth0.11 eth0.11.46 type vlan proto 802.1Q id 46
    ip addr add 192.168.116.2/24 brd 192.168.126.255 dev eth0.11.46
    ip link set dev eth0.11.46 up

    Captured traffic in pcap format:
    https://drive.google.com/drive/folders/1ZRJZFUXvBkZbRkMTFwXPEXNwhIcw-xOC?usp=sharing
  15. programmer131 created this gist Jul 17, 2020.
    108 changes: 108 additions & 0 deletions Linux Virtualization using Iproute2
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,108 @@
    How to clear ip addr, link

    ip link delete vxlan2
    ip addr del 192.168.0.55/24 dev vxlan2

    VxLAN setup
    Machine 1
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.48 dstport 4789 dev wlp2s0
    ip link set vxlan1 up
    ip addr add 192.168.0.6/24 dev vxlan1

    Machine 2
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.24 dstport 4789 dev wlp3s0
    ip link set vxlan1 up
    ip addr add 192.168.0.2/24 dev vxlan1

    VxLAN in VxLAN
    Machine 1
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.48 dstport 4789 dev wlp2s0
    ip link set vxlan1 up
    ip addr add 192.168.0.6/24 dev vxlan1

    ip link add vxlan2 type vxlan id 55 remote 192.168.0.2 dstport 4789 dev vxlan1
    ip link set vxlan2 up
    ip addr add 192.168.12.55/24 dev vxlan2

    Machine 2
    ip link add vxlan1 type vxlan id 1 remote 192.168.18.24 dstport 4789 dev wlp3s0
    ip link set vxlan1 up
    ip addr add 192.168.0.2/24 dev vxlan1

    ip link add vxlan2 type vxlan id 55 remote 192.168.0.6 dstport 4789 dev vxlan1
    ip link set vxlan2 up
    ip addr add 192.168.12.77/24 dev vxlan2


    VLAN setup
    machine1
    ip link add link wlp2s0 name eth0.100 type vlan id 100
    ip addr add 192.168.100.1/24 brd 192.168.100.255 dev eth0.100
    ip link set dev eth0.100 up

    Machine2
    ip link add link wlp3s0 name eth0.100 type vlan id 100
    ip addr add 192.168.100.2/24 brd 192.168.100.255 dev eth0.100
    ip link set dev eth0.100 up

    Stacked VLAN (VLAN in VLAN, 8100,8100)
    Machine 1
    ip link add link wlp2s0 name eth0.100 type vlan id 100
    ip addr add 192.168.100.1/24 brd 192.168.100.255 dev eth0.100
    ip link set dev eth0.100 up

    ip link add link eth0.100 name eth0.101 type vlan id 101
    ip addr add 192.168.101.1/24 brd 192.168.101.255 dev eth0.101
    ip link set dev eth0.101 up

    machine 2:
    ip link add link wlp3s0 name eth0.100 type vlan id 100
    ip addr add 192.168.100.2/24 brd 192.168.100.255 dev eth0.100
    ip link set dev eth0.100 up

    ip link add link eth0.100 name eth0.101 type vlan id 101
    ip addr add 192.168.101.2/24 brd 192.168.101.255 dev eth0.101
    ip link set dev eth0.101 up


    Stacked VLAN (S-tag, C-tag)

    Machine 1
    ip link add link wlp2s0 eth0.150 type vlan proto 802.1ad id 24
    ip addr add 192.168.105.1/24 brd 192.168.105.255 dev eth0.150
    ip link set dev eth0.150 up

    ip link add link eth0.150 eth0.150.55 type vlan proto 802.1Q id 55
    ip addr add 192.168.115.1/24 brd 192.168.115.255 dev eth0.150.55
    ip link set dev eth0.150.55 up

    machine 2:
    ip link add link wlp3s0 eth0.150 type vlan proto 802.1ad id 24
    ip addr add 192.168.105.2/24 brd 192.168.105.255 dev eth0.150
    ip link set dev eth0.150 up

    ip link add link eth0.150 eth0.150.55 type vlan proto 802.1Q id 55
    ip addr add 192.168.115.2/24 brd 192.168.115.255 dev eth0.150.55
    ip link set dev eth0.150.55 up

    Stacked VLAN (S-tag, C-tag)

    Machine 1
    ip link add link wlp2s0 eth0.11 type vlan proto 802.1ad id 11
    ip addr add 192.168.125.1/24 brd 192.168.125.255 dev eth0.11
    ip link set dev eth0.11 up

    ip link add link eth0.11 eth0.11.46 type vlan proto 802.1Q id 46
    ip addr add 192.168.116.1/24 brd 192.168.126.255 dev eth0.11.46
    ip link set dev eth0.11.46 up

    machine 2:

    ip link add link wlp3s0 eth0.11 type vlan proto 802.1ad id 11
    ip addr add 192.168.125.2/24 brd 192.168.125.255 dev eth0.11
    ip link set dev eth0.11 up

    ip link add link eth0.11 eth0.11.46 type vlan proto 802.1Q id 46
    ip addr add 192.168.116.2/24 brd 192.168.126.255 dev eth0.11.46
    ip link set dev eth0.11.46 up