> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/upg/2.17/llms.txt) (all documentation: [llms.txt](https://docs.cennso.com/llms.txt)). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cennso.com/components/upg/2.17/features/ueip-export.md).

# UE IP export

User Plane Gateway (UPG) allows you to export user equipment (UE) IP addresses to the Linux kernel for use in other software.
You can export both IPv4 and IPv6. Configure the `ueip.nsExport` section in the [`UPGConfig` object](https://docs.cennso.com/components/upg/2.17/crs.md#upgconfig) to enable this option.

See the configuration example:

```yaml
  ueip:
    nsExport:                          # Section that defines parameters used to export UE IPs
      enabled: true                    # Enables exporting UE IPs
      netnsPath: /var/vpptools/netns   # Filepath to the network namespace that contains both the interface and table
      ifName: lcp0                     # Name of the interface for routes
      tableID: 200                     # Linux kernel routing table ID
```

All parameters are required. Network namespace and interface must already exist.

After applying the configuration, VPP exports UE IPs to the specified Linux kernel table. You can see such an output:

```bash
root@upg:/# vppctl show upf ueip export as-ns-route
UEIP export as-ns-route status: enabled
  Network namespace: /run/vpptools/netns
  Interface: lcp0 (id 2)
  Table: 200
  Routes added: 20
[...]
root@upg:/# nsenter --net=/run/vpptools/netns ip route show table 200
10.0.94.232 dev lcp0 proto static scope link
10.1.120.132 dev lcp0 proto static scope link
10.4.65.223 dev lcp0 proto static scope link
```
