Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Mats2208/MCP-Packet-Tracer/llms.txt

Use this file to discover all available pages before exploring further.

MCP Packet Tracer eliminates the tedious step of choosing the right cable for every connection. When you build a topology plan the server automatically infers the correct cable from the two device categories on either end of each link — a router-to-switch connection always gets a straight-through, two routers get a crossover, and so on. The inference engine covers 88 directed category pairs. You only need to specify a cable explicitly for connection types the server cannot deduce from categories alone: serial WAN links, fiber uplinks, console management cables, and VoIP phone connections.
Most connections are auto-inferred and require no cable specification in your request. Only serial, fiber, console, and phone cables need to be set explicitly — and even serial is handled automatically when the orchestrator detects that a routing protocol requires WAN links.

Supported Cable Types

These are the eight validated cable types you can use in topology plans. The remaining seven PT link codes (see the full table below) are for reference only and are not emitted by the plan generator.
CablePT CodeTypical UseAuto-inferred?
straight8100Switch ↔ Router, Switch ↔ PC/Server/AP, Hub ↔ anyYes
cross8101Router ↔ Router, Switch ↔ Switch, Router ↔ FirewallYes
serial8106Router Serial ↔ Router Serial (requires HWIC/NIM module)No — specify explicitly
fiber8103Fiber optic connectionsNo — specify explicitly
console8108PC/Laptop management access to Router/SwitchNo — specify explicitly
phone8104VoIP phone connectionsNo — specify explicitly
coaxial8110Cable modems (Coaxial0 port)Yes (modem pairs)
auto8107PT auto-detects the correct cable type

Cable Inference Rules

The table below covers the primary category pairs the inference engine handles. Every rule is bidirectional — the server stores both (A, B) and (B, A) in the lookup table so direction does not matter.
Category ACategory BInferred Cable
routerswitchstraight
routerroutercross
routercloudstraight
routerfirewallcross
routerhubstraight
routerpccross
routerservercross
routermodemstraight
routermerakistraight
routeriotstraight
switchswitchcross
switchpcstraight
switchserverstraight
switchlaptopstraight
switchaccesspointstraight
switchfirewallstraight
switchwlcstraight
switchhubstraight
switchbridgestraight
switchrepeaterstraight
switchip_phonestraight
switchwireless_routerstraight
switchhome_gatewaystraight
switchtvstraight
switchvoipstraight
switchanalog_phonestraight
switchmerakistraight
switchpatch_panelstraight
switchwired_end_devicestraight
switchwireless_end_devicestraight
switchembedded_serverstraight
switchsnifferstraight
switchsbcstraight
switchiotstraight
hubpcstraight
hubserverstraight
hublaptopstraight
hubbridgestraight
hubrepeaterstraight
firewallpcstraight
wlcaccesspointstraight
modemcloudstraight
wireless_routermodemstraight
home_gatewaymodemstraight
ip_phonepcstraight
If a category pair is not found in the lookup table the server falls back to straight.

When to Specify Cable Explicitly

Use the cable field in a link definition for these cases:

Serial WAN links

Set cable: "serial" when connecting two routers via Serial interfaces (after installing HWIC-2T or NIM-2T modules). The orchestrator handles this automatically when routing: "static" with serial topology is requested.

Fiber uplinks

Set cable: "fiber" for connections that must traverse fiber ports on patch panels, wall mounts, or ISR uplinks. The server cannot infer fiber from categories alone.

Console management

Set cable: "console" for out-of-band management connections from a PC or Laptop to a Router or Switch console port.

VoIP phone lines

Set cable: "phone" when wiring an analog phone or VoIP device that uses the PT phone cable type rather than Ethernet.

Serial Cable Requirements

Serial cables require physical hardware modules installed on the router before the link can be created. The correct execution order is: addDevice()addModule()addLink(). The PTBuilder generator enforces this order automatically.
When the orchestrator detects a serial topology it selects the appropriate module per router model:
Router ModelAuto-selected ModuleSerial Ports Added
1941HWIC-2TSerial0/0/0, Serial0/0/1
2901HWIC-2TSerial0/0/0, Serial0/0/1
2911HWIC-2TSerial0/0/0, Serial0/0/1
ISR4321NIM-2TSerial0/1/0, Serial0/1/1
ISR4331NIM-2TSerial0/1/0, Serial0/1/1
The full set of 15 link type codes used internally by Packet Tracer’s IPC API. Codes 8100–8114 map to the createLink() call in the PT Script Engine.
CablePT CodeNotes
straight8100Straight-through Ethernet
cross8101Crossover Ethernet
roll8102Rollover cable
fiber8103Fiber optic
phone8104VoIP phone cable
cable8105Cable TV coax
serial8106Serial (DTE/DCE)
auto8107Auto-detect (PT default)
console8108Console / management
wireless8109Wireless link (implicit in AP connections)
coaxial8110Coaxial
octal8111Octal cable (async serial)
cellular8112Cellular connection
usb8113USB cable
custom_io8114Custom I/O (IoT)
The cable catalog is also available as a read-only MCP resource at pt://catalog/cables. See MCP Resources for details.

Build docs developers (and LLMs) love