What does port1 and port2 mean in POX code for adding link

273 views Asked by At
self.addLink(h1, s1, port1=0, port2=hostlink, **lconfig)

Here, its creating a topology where host h1 and switch s1 are wired. I don't understand whats port1 and port2 here

1

There are 1 answers

0
Luciferian On

That part wires up clients in your topology,where port1 and port2:

Switch ports 1:uplink 2:hostlink 3:downlink
    uplink, hostlink, downlink = 1, 2, 3