Hi,
I would like to model a veth pair in YANG, preferrably without proprietary 
models.
In Linux, these veth pairs are basically just this:

  +------+   +------+                                  
  |Socket|   |Socket|                                  
  +------+   +------+                                  
     |          |                                     
  +------+   +------+                                  
  |Stack |   |Stack |                                  
  +------+   +------+                                  
     |          |                                                               
                     
  +------+   +------+                                  
  |veth1 |   |veth2 |                                  
  +------+   +------+                                  
     |          |                                      
     +----------+                                      
 
So all packets that egress veth1, appear at the ingress of veth2 and vice versa,
i.e. similar to two physical interfaces of the same device directly connected 
via a cable.
Also see https://man7.org/linux/man-pages/man4/veth.4.html

The only thing I specifically found regarding veths and YANG was
https://doc.6wind.com/turbo-router-2.x/user-guide/cli/network-interface/types/veth.html
where they seem to use a proprietary model that provides "link-interface" to 
link
the two interfaces together.

The other option I thought about was to represent the "virtual cable" as
Internal LAN, i.e. IANA type 247 (ILAN). This would look like this:

  +------+   +------+                                  
  |Socket|   |Socket|                                  
  +------+   +------+                                  
     |          |                                     
  +------+   +------+                                  
  |Stack |   |Stack |                                  
  +------+   +------+                                  
     |          |                                                               
                     
  +------+   +------+                                  
  |veth1 |   |veth2 |                                  
  +------+   +------+                                  
     |          |                                      
  +-----------------+
  |      ilan0      |
  +-----------------+

However, that would still require to specify the link between the veth1 and 
ilan0
as well as veth2 and ilan0 with some kind of parent/child or higher/lower layer 
interface link.
The higher-layer-if and lower-layer-if of RFC 8343 is only ro and
while draft-ietf-netmod-intf-ext-yang provides "parent-interface", it would
not work here because ilan0 has two parents (i.e. we would need a 
"child-interface"
or a way to specify multiple parent interfaces).

Also, what could be the interface type of veth1 and veth2?

Any ideas on this? Or do we need to specify something new to support this?

Thanks,
Florian

_______________________________________________
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to