# Weird Networking ## Lab1: VETH in different subnet ![image](https://hackmd.io/_uploads/ByyuxZQ9yx.png) > Create Topology ```shell ip netns add left ip netns add right ip link add eth-l type veth peer eth-r ip link set eth-l netns left ip link set eth-r netns right ip -n left addr add 10.10.0.1/24 dev eth-l ip -n right addr add 10.20.0.1/24 dev eth-r ip -n left link set eth-l up ip -n right link set eth-r up ``` ### Ping Failed: Network is unreachable ![Screenshot from 2025-02-19 14-59-56](https://hackmd.io/_uploads/B1sOW-m5kg.png) ### After adding static routes > Add static routes ```shell ip -n left route add 10.20.0.0/24 via 10.10.0.1 ip -n right route add 10.10.0.0/24 via 10.20.0.1 ``` > Ping Result ![Screenshot from 2025-02-19 15-05-19](https://hackmd.io/_uploads/Sk6hzWQqyx.png) > Tcpdump Result ![Screenshot from 2025-02-19 15-06-45](https://hackmd.io/_uploads/S1ffQbQ91x.png) ### Destroy ```shell ip -n left link del eth-l ip -n right link del eth-r ip netns del left ip netns del right ```