Application Hosting Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

PDF

Application Hosting Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

Send and receive traffic through a Linux socket

Want to summarize with AI?

Log in

Send traffic from an external server to an open Linux socket on the router to verify that the Packet I/O infrastructure correctly delivers packets to hosted Linux applications.


Use this procedure to confirm end-to-end traffic delivery through the Packet I/O infrastructure after opening a Linux socket. Connect from an external server to the netcat socket that was started in the vrf-default network namespace, using an interface in the same VRF.

Before you begin

Before you begin, complete the steps in Open Linux sockets to start a listening socket on the router.

Procedure

From an external server, connect to the netcat socket on the router.

Example:

[root@localhost ~]#nc -vz 192.168.122.22 5000
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Connected to 192.168.122.22:5000.
Ncat: 0 bytes sent, 0 bytes received in 0.01 seconds.

The successful connection confirms that the Packet I/O infrastructure is delivering traffic from the external server to the Linux application running on the router. Connect over an interface that is in the same VRF as the socket (vrf-default) to ensure reachability.

Traffic sent from the external server reaches the Linux socket on the router, confirming that the Packet I/O infrastructure is correctly routing packets to the hosted application.