如何将 VPCS 添加到 Cisco Packet Tracer 8.2.1?

如何将 VPCS 添加到 Cisco Packet Tracer 8.2.1?

我正在尝试自动执行数据包跟踪版本 8.2.1 中的任务,并尝试使用 chatGPT 描述的 Python 脚本在路由器组上运行一些命令。脚本如下:

# Define the list of routers and the command to run
routers = ["R01", "R02", "R03","R04", "R05", "R06", "R07"]
command1 = "config t" + "\n"
command2 = "no ip router eigrp 22" + "\n"
command3 = "do wr" + "\n"

commands = command1 + command2 + command3

# Define the username and password for the routers
username = ""
password = ""

# Loop through each router and run the command
for router in routers:
    print("Connecting to " + router + "...")
    os.system("vpcs " + router + " sendcmd 'enable\n" + password + "\n" + username + "\n" + password + "\n" + commands + "'")
    print("Command executed on " + router)

我将 Paython 和 Packet Tracer 文件夹都添加到 Windows 系统变量 PATH。

脚本输出:

C:\Program Files\Python311>C:\Users\Khaled\OneDrive\Documents\Training\Cisco\CCNA\Notes\PS4PT001.PY
Connecting to R01...
'vpcs' is not recognized as an internal or external command,
operable program or batch file.
Command executed on R01
Connecting to R02...
'vpcs' is not recognized as an internal or external command,
operable program or batch file.
Command executed on R02
Connecting to R03...
'vpcs' is not recognized as an internal or external command,
operable program or batch file.
Command executed on R03
Connecting to R04...
'vpcs' is not recognized as an internal or external command,
operable program or batch file.
Command executed on R04
Connecting to R05...
'vpcs' is not recognized as an internal or external command,
operable program or batch file.
Command executed on R05
Connecting to R06...
'vpcs' is not recognized as an internal or external command,
operable program or batch file.
Command executed on R06
Connecting to R07...
'vpcs' is not recognized as an internal or external command,
operable program or batch file.
Command executed on R07

C:\Program Files\Python311>

我知道这vpcs是帮助 Packet Tracer 运行虚拟 PC 的组件,但由于某种原因,它似乎无法从外部访问。

我在互联网上寻找启用它或将其添加到 Packet Tracer 的方法,但没有成功。

我尝试询问堆栈网络工程师,但是这种问题似乎是不可接受的,因为正如他们在关闭类似问题时所说的那样:“它不切实际或与实际生产问题无关”。

所以,我希望这是正确的地方,最终我能找到令人满意的答案。

如何让脚本运行?
如何将‘vpcs’与 Cisco Packet Tracer 结合使用?

相关内容