Try visualizing your ports as labels of your router node. First create the router node. Then create a circle node. Move the circle over the router, right-click the circle to open its context menu, and choose "Convert to Label". Finally, drag the new label to the desired location relative to the router node.
It is, however, not possible to connect an edge to a node label. Thus you need to connect the edge to the center of the router node first. Then select the edge and drag the small black square onto the desired port label. Alternatively, specify suitable coordinates for the edge's "Source Port X", "Source Port Y", "Target Port X", "Target Port Y" properties in the properties view in yEd's lower right corner.