Skip to content

Commit c467f0d

Browse files
Update vrnetlab.py (#427)
Updated monitor and serial to use chardev sockets rather than legacy tcp and telnet mechanisms. This allows connections using both IPv4 and IPv6 rather than the IPv4 connections supported by tcp and telnet. It also makes management connections faster as the IPv6 connection will just connect rather than failing and requiring a follow-up IPv4 connection.
1 parent ca17783 commit c467f0d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

common/vrnetlab.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,10 @@ def __init__(
312312
"none",
313313
"-machine",
314314
"pc",
315-
"-monitor",
316-
f"tcp:0.0.0.0:40{self.num:02d},server,nowait",
317-
"-serial",
318-
f"telnet:0.0.0.0:50{self.num:02d},server,nowait",
315+
f"-chardev socket,id=monitor0,host=::,port=40{self.num:02d},server=on,wait=off",
316+
"-monitor chardev:monitor0",
317+
f"-chardev socket,id=serial0,host=::,port=50{self.num:02d},server=on,wait=off,telnet=on",
318+
"-serial chardev:serial0",
319319
"-m", # memory
320320
str(self.ram),
321321
"-cpu", # cpu type

0 commit comments

Comments
 (0)