Weird Networking

Lab1: VETH in different subnet

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More β†’

Create Topology

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

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More β†’

After adding static routes

Add static routes

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

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More β†’

Tcpdump Result

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More β†’

Destroy

ip -n left link del eth-l
ip -n right link del eth-r

ip netns del left
ip netns del right