User Tools

Site Tools


network_stuff:linux_network_internals

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
network_stuff:linux_network_internals [2021/08/07 18:39] jotasandokunetwork_stuff:linux_network_internals [2023/11/02 14:38] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +LINUX KERNEL NETWORKING:
 +\\
 +
 Linux has Two main APIs for networking: Linux has Two main APIs for networking:
   * Ethtool is for physical link management (speed, duplex, buffers etc.)   * Ethtool is for physical link management (speed, duplex, buffers etc.)
   * Netlink is for the rest. Every network device is represented as a netdev object in the kernel.   * Netlink is for the rest. Every network device is represented as a netdev object in the kernel.
-    * **[[https://medium.com/@mdlayher/linux-netlink-and-go-part-1-netlink-4781aaeeaca8|NETLINK]]** (successor of ioctl): api (no restapi), system call. Is the way ip route talks to the kernel. socket family is a Linux kernel interface used for inter-process communication (IPC) between both the kernel and userspace processes, and between different userspace processes, in a way similar to the Unix domain sockets. NETLINK_ROUTE , NETLINK_ARPD , NETLINK_NETFILTER ... \\+    * **[[https://medium.com/@mdlayher/linux-netlink-and-go-part-1-netlink-4781aaeeaca8|NETLINK]]** (successor of ioctl): api (no restapi), system call. Is the way ip route talks to the kernel. socket family is a Linux kernel interface used for inter-process communication (IPC) between both the kernel and userspace processes, and between different userspace processes, in a way similar to the Unix domain sockets. NETLINK_ROUTE , NETLINK_ARPD , NETLINK_NETFILTER .. 
 +    * Netlink in python: [[https://pypi.org/project/pyroute2/|External Link]]
  
-\\+{{ :network_stuff:network_os_models.pdf |}}
  
-Do not confuse it with NETFILTER (~iptables). \\ +  * Do not confuse it with NETFILTER (~iptables). 
-Netlink in python: [[https://pypi.org/project/pyroute2/|External Link]]+  * iproute2 is more a set of **utililities** (arpd, bridge, devlink, ip, nstat, routef, rtacct, rtmon,  ss, tc)  
 + 
 + 
 +----
  
 Place to find all information about interface is this, they are netdev, not just dev:  Place to find all information about interface is this, they are netdev, not just dev: 
Line 16: Line 23:
 TODO\\ TODO\\
 ... kernel objects and udev, and details of implementing logical interfaces that are associated with ASIC front-panel physical ports. From this discussion: [[http://blog.ipspace.net/2018/03/linux-interfaces-on-software-gone-wild.html]]\\ ... kernel objects and udev, and details of implementing logical interfaces that are associated with ASIC front-panel physical ports. From this discussion: [[http://blog.ipspace.net/2018/03/linux-interfaces-on-software-gone-wild.html]]\\
 +
 +\\
 +
 Interface can or cannot be related to physical port.\\ Interface can or cannot be related to physical port.\\
 Linux labels them according to the PCI name, UUID can be used to rename them. udev, driver..\\ Linux labels them according to the PCI name, UUID can be used to rename them. udev, driver..\\
   CPU-PCI BUS (unique) driver enumerates > port1,2,3 ...   CPU-PCI BUS (unique) driver enumerates > port1,2,3 ...
- 
   Then udev/uuid is used to map the name/rename the port name on boot time   Then udev/uuid is used to map the name/rename the port name on boot time
-\\ 
  
 ---- ----
Line 47: Line 55:
  
   ovs-vswitchd --help   ovs-vswitchd --help
 +  
  
 +----
 +Kernel structs 
 +\\
 +  * ''net_device'' structure, which represents a network device,
 +  * ''sk_buff'' structure represents an incoming or outgoing packet, including its headers
network_stuff/linux_network_internals.1628361544.txt.gz · Last modified: (external edit)