#network #networking #ovn #virtual #cloud #dc #engineering #software #emulation #gateway #tunnel #tunneling #router #routing #switch #switching #ovs --- OVN is a software that enables the creation of virtual networks. Under the hood it uses OVS (virtual switch) and a tunneling protocol to emulate networking devices. These virtual networks run on top of the normal physical infrastructure. It is useful in a cloud environment with virtual machines because it is easy to scale because we can use the singular physical infrastructure and create many seperate virtual networks with string of simple commands or managed by a configuration management system. OVN complements features provided by [[OVS]] to enable defining networks entirely in software on top of and unaware of the underlaying physical network. This is achieved by using tunnels or other encapsulations. Therefore IP addresses and other addresses can overlap with the physical network as they are unaware of each other. A software defined network as described above is called an [[OVN Logical Network]]. A [[OVN Gateway]] extends a tunnel-based [[OVN Logical Network]] into the physical network by forwarding packets bi-directionally. This allows non-virtualized devices to participate in the logical network as well. --- OVN has two databases which act as interfaces for components. The NorthBound DB handles translation from higher level CMS concepts into intermediary OVN concepts with similar naming that are used to be translated to lower level flows stored in the SouthBound DB. Those flows **Why the NorthBound DB?** Probably it exists to make it easy to integrate OVN into cloud management systems such as OpenStack because the tables and structures match those of higher level cloud components. OVN is then responsible for doing the complicated work of translating those into the lower level flows. **There is more than one table in each of the databases, how can we show which ones are there and what they contain?** E.g the logical_switch_port table in nb db (nbctl list logical_switch_port) From `man ovn-nbctl` : "For a list of tables and their columns, see ovn-nb(5) or see the table listing from the --help option." **What are dhcpv4_options on a logical switch port?** A Logical Datapath is the lower level concept in the SB DB, which matches the higher level Logical Switch. It is implemented by flows dictacting how packets should flow. We can see the given datapaths via `ovn-sbctl list datapath_binding`. `ovs-dpctl` is the interface to OVS datapaths. With `ovs-dpctl dump-flows` we can get a glimpse of the in-kernel flow cache, e.g see what's going on. **What is the TTL (Time To Live) on an IP packet? Why is it decreased by a router?**