In this article, we are going to make a fake router using OpenvSwitch without the help of SDN controllers.
Two OVS-specific actions are used: move and load.
Assume the IP and MAC address of the router are 10.0.0.254 and 01:23:45:67:89:ab respectively.
Following are the detail steps:
- Set ARP opcode to 0x2 (ARP reply)
- Destination MAC := Source MAC
- Source MAC := MAC address of router (01:23:45:67:89:ab)
- ARP destination hardware address := ARP source hardware address
- ARP source hardware address := MAC address of router (01:23:45:67:89:ab)
- ARP destination network address := ARP source network address
- ARP source network address := IP address of router (10.0.0.254)
- Send the packet back to its input port
We can test the it by following commands:
We should see the MAC address of 10.0.0.254