- Mastering Python Networking
- Eric Chou
- 365字
- 2021-07-02 21:42:39
Data modeling for infrastructure as code
According to Wikipedia,
The data modeling process can be illustrated in the following graph:

When applied to networking, we can apply this concept as an abstract model that describes our network, be it datacenter, campus, or global Wide Area Network. If we take a closer look at a physical datacenter, a layer 2 Ethernet switch can be thought of as a device containing a table of Mac addresses mapped to each ports. Our switch data model describes how the Mac address should be kept in a table, which includes the keys, additional characteristics (think of VLAN and private VLAN), and more. Similarly, we can move beyond devices and map the datacenter in a model. We can start with the number of devices in each of the access, distribution, core layer, how they are connected, and how they should behave in a production environment. For example, if we have a Fat-Tree network, how many links should each of the spine routers have, how many routes they should contain, and how many next-hops should each of the prefixes have. These characteristics can be mapped out in a format that can be referenced against the ideal state that we should always check against.
One of the relatively new network data modeling language that is gaining traction is YANG. Yet Another Next Generation (YANG) (despite common belief, some of the IETF work group do have a sense of humor). It was first published in RFC 6020 in 2010, and has since gained traction among vendors and operators. At the time of writing this book, the support for YANG varied greatly from vendors to platforms. The adaptation rate in production is therefore relatively low. However, it is a technology worth keeping an eye out for.