Force-Ipv6

These scenarios demonstrate how to use telnet with IPv6 addresses and the force-ipv6 parameter to establish connections using IPv6 protocol. The tests validate that IPv6 telnet connections work correctly when the address family matches the forced protocol, and show proper error handling for mismatches.

Telnet Force IPv6 with IPv6 Address Success

Description

This test demonstrates that using force-ipv6 parameter with an IPv6 address works correctly and establishes a successful telnet connection. After forcing IPv6 protocol with a matching IPv6 address, the connection proceeds normally through the standard login flow and authentication.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address '11::2/64'
set service telnet
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 address '11::3/64'
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping IP address 11::2 from DUT1:

admin@DUT1$ ping 11::2 count 1 size 56 timeout 1
Show output
PING 11::2(11::2) 56 data bytes
64 bytes from 11::2: icmp_seq=1 ttl=64 time=427 ms

--- 11::2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 426.575/426.575/426.575/0.000 ms

Step 4: Init a Telnet connection from DUT1 to IP address 11::2 using force-ipv6 :

admin@DUT1$ telnet 11::2 force-ipv6
Show output
Trying 11::2...
Connected to 11::2.
Escape character is '^]'.

Linux 6.1.140 (osdx) (pts/0)

osdx login:
Password:

Welcome to Teldat OSDx v4.2.8.1

This system includes free software.
Contact Teldat for licenses information and source code.

Last login: Thu Dec 11 18:33:29 UTC 2025 from ::ffff:10.215.168.21 on pts/0
admin@osdx$

Telnet Force IPv4 with IPv6 Address Should Fail

Description

This test demonstrates that using force-ipv4 parameter with an IPv6 address results in a “Server lookup failure” error due to address family mismatch. The telnet command attempts to force IPv4 protocol but the provided address is IPv6, causing the connection to fail as expected.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address '11::2/64'
set service telnet
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 address '11::3/64'
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping IP address 11::2 from DUT1:

admin@DUT1$ ping 11::2 count 1 size 56 timeout 1
Show output
PING 11::2(11::2) 56 data bytes
64 bytes from 11::2: icmp_seq=1 ttl=64 time=452 ms

--- 11::2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 452.462/452.462/452.462/0.000 ms

Step 4: Init a Telnet connection from DUT1 to IP address 11::2 which is going to fail using force-ipv4 :

admin@DUT1$ telnet 11::2 force-ipv4
Show output
Server lookup failure:  11::2:telnet, Address family for hostname not supported
  CLI Error: Command error
admin@osdx$