Check Accessibility Control
This scenario shows how to configure a cellular interface, enabling the accessibility control mechanism that triggers reconnections when network connectivity is lost.
Test Reconnection By Accessibility Control
Description
In DUT0, the cell0 cellular interface is configured with a cellular profile for which accessibility control is enabled. Once connectivity with Google’s DNS public server has been verified, a situation where 100% of the packets received by the network are lost is emulated to verify that the accessibility control mechanism triggers a reconnection.
Scenario
Step 1: Set the following configuration in DUT0 :
set cellular logging level info set cellular profile CELPROFILE accessibility-control ping address 8.8.8.8 set cellular profile CELPROFILE accessibility-control ping interval 10 set cellular profile CELPROFILE apn movistar.es set interfaces cellular cell0 address dhcp set interfaces cellular cell0 encrypted-pin U2FsdGVkX18ox+MjgJJ6hrgXFnYA9x4h6iQ6cHzFQZY= set interfaces cellular cell0 profile CELPROFILE set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Note
Once the cellular interface is configured, it can be verified that there is network connectivity by pinging Google’s DNS public server.
Step 2: Ping IP address 8.8.8.8 from DUT0:
admin@DUT0$ ping 8.8.8.8 count 1 size 56 timeout 1Show output
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=116 time=40.5 ms --- 8.8.8.8 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 40.532/40.532/40.532/0.000 ms
Note
The accessibility control is a mechanism where pings are sent at an interval, and to the IP address, configured by the user. The mechanism then waits for a response within this interval. If no response is received before it times out, a second ping is sent and a response is expected within 10 seconds. If there is still no response, two more pings are sent at 5-second intervals. Finally, if there is still no response, the device reconnects to the network.
Note
As a result, you can verify that no reconnection has been recorded in the system logs if you wait long enough.
Step 3: Run command system journal clear at DUT0.
Step 4: Run command system journal show | cat at DUT0 and check if output does not contain the following tokens:
[Core/cell0] Info: Signal '12' received to reconnect device [Device/cell0] Info: Stopping network connection [Device/cell0] Info: Establishing network connectionShow output
Nov 12 12:57:28.258552 osdx systemd-journald[1889]: Runtime Journal (/run/log/journal/66618607d34347599ce4ba4fda545c32) is 4.9M, max 38.4M, 33.4M free. Nov 12 12:57:28.263342 osdx systemd-journald[1889]: Received client request to rotate journal, rotating. Nov 12 12:57:28.263542 osdx systemd-journald[1889]: Vacuuming done, freed 0B of archived journals from /run/log/journal/66618607d34347599ce4ba4fda545c32. Nov 12 12:57:28.365934 osdx OSDxCLI[95501]: User 'admin' executed a new command: 'system journal clear'.
Note
However, when traffic control is applied, it is possible to prove the ‘ping’ command is failing because ICMP packets are being dropped.
Step 5: Modify the following configuration lines in DUT0 :
set interfaces cellular cell0 traffic control in PLOSS set traffic control PLOSS type network-emulator packet-loss 100
Step 6: Expect a failure in the following command:
Ping IP address 8.8.8.8 from DUT0:
admin@DUT0$ ping 8.8.8.8 count 1 size 56 timeout 1Show output
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. --- 8.8.8.8 ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms
Note
You can verify that a reconnection has been recorded in the system logs if you wait long enough.
Step 7: Run command system journal clear at DUT0.
Step 8: Run command system journal show | cat at DUT0 and check if output does not contain the following tokens:
[Core/cell0] Info: Signal '12' received to reconnect device [Device/cell0] Info: Stopping network connection [Device/cell0] Info: Establishing network connectionShow output
Nov 12 12:58:12.878304 osdx systemd-journald[1889]: Runtime Journal (/run/log/journal/66618607d34347599ce4ba4fda545c32) is 4.8M, max 38.4M, 33.6M free. Nov 12 12:58:12.883249 osdx systemd-journald[1889]: Received client request to rotate journal, rotating. Nov 12 12:58:12.883448 osdx systemd-journald[1889]: Vacuuming done, freed 0B of archived journals from /run/log/journal/66618607d34347599ce4ba4fda545c32. Nov 12 12:58:12.973892 osdx OSDxCLI[95501]: User 'admin' executed a new command: 'system journal clear'.
Step 9: Run command system journal show | cat at DUT0 and check if output contains the following tokens:
[Core/cell0] Info: Signal '12' received to reconnect device [Device/cell0] Info: Stopping network connection [Device/cell0] Info: Establishing network connectionShow output
Nov 12 12:58:12.878304 osdx systemd-journald[1889]: Runtime Journal (/run/log/journal/66618607d34347599ce4ba4fda545c32) is 4.8M, max 38.4M, 33.6M free. Nov 12 12:58:12.883249 osdx systemd-journald[1889]: Received client request to rotate journal, rotating. Nov 12 12:58:12.883448 osdx systemd-journald[1889]: Vacuuming done, freed 0B of archived journals from /run/log/journal/66618607d34347599ce4ba4fda545c32. Nov 12 12:58:12.973892 osdx OSDxCLI[95501]: User 'admin' executed a new command: 'system journal clear'. Nov 12 12:58:33.155930 osdx OSDxCLI[95501]: User 'admin' executed a new command: 'system journal show | cat'. Nov 12 12:58:33.347929 osdx OSDxCLI[95501]: User 'admin' executed a new command: 'system journal show | cat'. Nov 12 12:58:34.547959 osdx OSDxCLI[95501]: User 'admin' executed a new command: 'system journal show | cat'. Nov 12 12:58:35.747927 osdx OSDxCLI[95501]: User 'admin' executed a new command: 'system journal show | cat'. Nov 12 12:58:36.991934 osdx OSDxCLI[95501]: User 'admin' executed a new command: 'system journal show | cat'. Nov 12 12:58:38.223934 osdx OSDxCLI[95501]: User 'admin' executed a new command: 'system journal show | cat'. Nov 12 12:58:39.455930 osdx OSDxCLI[95501]: User 'admin' executed a new command: 'system journal show | cat'. Nov 12 12:58:40.695948 osdx OSDxCLI[95501]: User 'admin' executed a new command: 'system journal show | cat'. Nov 12 12:58:42.007941 osdx OSDxCLI[95501]: User 'admin' executed a new command: 'system journal show | cat'. Nov 12 12:58:42.940608 osdx wwan-module[99048]: [Core/cell0] Info: Signal '12' received to reconnect device. Nov 12 12:58:42.940659 osdx wwan-module[99048]: [Device/cell0] Info: Stopping network connection... Nov 12 12:58:42.958678 osdx wwan-module[99654]: Network cancelled... releasing resources Nov 12 12:58:43.095543 osdx wwan-module[99654]: [/dev/cdc-wdm0] Network stopped Nov 12 12:58:43.095543 osdx wwan-module[99654]: [/dev/cdc-wdm0] Client ID not released: Nov 12 12:58:43.095543 osdx wwan-module[99654]: Service: 'wds' Nov 12 12:58:43.095543 osdx wwan-module[99654]: CID: '21' Nov 12 12:58:43.097319 osdx wwan-module[99048]: [Device/cell0] Info: Network connection was stopped! Nov 12 12:58:43.099506 osdx wwan-module[99048]: [Network/cell0] Info: Stopping accessibility control... Nov 12 12:58:43.099758 osdx wwan-module[99048]: [Network/cell0] Info: Accessibility control was stopped! Nov 12 12:58:43.103957 osdx kernel: net cell0: link_state 0x1 -> 0x0 Nov 12 12:58:43.114527 osdx dhclient[99357]: receive_packet failed on cell0: Network is down Nov 12 12:58:43.115484 osdx modulelauncher[99662]: stop DHCP client for cell0 Nov 12 12:58:43.116628 osdx wwan-module[99048]: [Device/cell0] Info: Checking registration state... Nov 12 12:58:43.126133 osdx dhclient[99667]: Killed old client process Nov 12 12:58:43.223914 osdx wwan-module[99048]: [Device/cell0] Info: Device registered and PS attached successfully Nov 12 12:58:43.223940 osdx wwan-module[99048]: [Device/cell0] Info: Establishing network connection... Nov 12 12:58:43.271077 osdx dhclient[99667]: DHCPRELEASE of 88.31.93.95 on cell0 to 88.31.93.96 port 67 Nov 12 12:58:43.271105 osdx dhclient[99667]: send_packet: Network is down Nov 12 12:58:43.271117 osdx dhclient[99667]: dhclient.c:3146: Failed to send 300 byte long packet over cell0 interface. Nov 12 12:58:43.436163 osdx OSDxCLI[95501]: User 'admin' executed a new command: 'system journal show | cat'. Nov 12 12:58:43.549028 osdx wwan-module[99048]: [Device/cell0] Info: Network connection was successfully started: PDH=[2175556032] Nov 12 12:58:43.674640 osdx kernel: net cell0: link_state 0x0 -> 0x1 Nov 12 12:58:43.675933 osdx wwan-module[99048]: [Network/cell0] Info: Starting accessibility control... Nov 12 12:58:43.676238 osdx wwan-module[99048]: [Network/cell0] Info: Accessibility control was started! Nov 12 12:58:43.903975 osdx modulelauncher[99720]: start DHCP client for cell0 Nov 12 12:58:44.106667 osdx kernel: IPv6: ADDRCONF(NETDEV_CHANGE): cell0: link becomes ready Nov 12 12:58:44.427067 osdx dhclient[99729]: DHCPDISCOVER on cell0 to 255.255.255.255 port 67 interval 3 Nov 12 12:58:44.432420 osdx dhclient[99729]: DHCPOFFER of 88.31.84.29 from 88.31.84.30 Nov 12 12:58:44.432522 osdx dhclient[99729]: DHCPREQUEST for 88.31.84.29 on cell0 to 255.255.255.255 port 67 Nov 12 12:58:44.434176 osdx dhclient[99729]: DHCPACK of 88.31.84.29 from 88.31.84.30