Port

Media Type
[application/vnd.org.midonet.Port-v3+json]
Collection Media Type
[application/vnd.org.midonet.collection.Port-v3+json]
GET     /ports
GET     /ports/:portId
GET     /bridges/:bridgeId/ports
GET     /bridges/:bridgeId/peer_ports
GET     /routers/:routerId/ports
GET     /routers/:routerId/peer_ports
POST    /routers/:routerId/ports
POST    /bridges/:bridgeId/ports
PUT     /ports/:portId
DELETE  /ports/:portId

Port is an entity that represents a port on a virtual device (bridge or router) in MidoNet. It contains the following fields:

Field NameTypePOST/PUTRequiredDescription

uri

URI

  

A GET against this URI refreshes the representation of this resource.

device

URI

  

A GET against this URI retrieves the device resource to which this port belongs. If the port is a bridge port, it returns a bridge resource. If it is a router port, it returns a router resource.

host

URI

  

A GET against this URI returns the host where the port is bound. The request succeeds only if the port is an exterior port, bound to a host.

hostInterfacePort

URI

  

A GET against this URI returns the interface-binding information for this port.

inboundFilter

URI

  

A GET against this URI returns the inbound filter chain.

link

URI

  

A POST against this URI links two interior ports. A DELETE against this URI removes the link. The body of the request must contain a link resource. See the section called “Port Link”.

outboundFilter

URI

  

A GET against this URI returns the outbound filter chain.

peer

URI

  

A GET against this URI returns the peer port. It requires a port to be linked to another port.

portGroups

URI

  

A GET against this URI returns the port groups of which this port is a member.

id

UUID

POST

No

A unique identifier of the resource. If this field is omitted in the POST request, a random UUID is generated.

type

String

POST

Yes

Type of port. It must be one of the following:

* Bridge * Router

A new router or bridge port is unplugged. Depending on what it is later attached to, it is referred to as an exterior or interior port.

An exterior router port is a virtual port that plugs into the VIF of an entity, such as a VM. It can also be a virtual port connected to a host physical port, directly or after implementing tunnel encapsulation. Access to exterior ports is managed by OpenVSwitch (OpenFlow switch). Exterior bridge port is the same as exterior router port but it is a port on a virtual bridge. Upon being bound to an interface, the port becomes exterior and will have the hostId, host, and interfaceName fields be non-null. The peer and peerId fields will be null.

An interior router port is a virtual port that only exists in the MidoNet virtual router network abstraction. It refers to a logical connection to another virtual networking device such as another router. An interior bridge port is the equivalent on a virtual bridge. Upon being linked to a peer, a port will become interior and will have the peer and peerId fields be non-null. The hostId, host, and interfaceName fields will be null.

There is a third type of port, Vxlan, which is created automatically when binding a VTEP to a Neutron network. The only operations supported on a port of this type are GET.

adminStateUp

Boolean

POST/PUT

No

The administrative state of the port. If false (down), the port stops forwarding packets. If it is a router port, it additionally replies with a Communication administratively prohibited ICMP response. The default is true (up).

inboundFilterId

UUID

POST/PUT

No

The identifier of the filter chain to be applied for ingress packets.

inboundMirrorIds

Array of UUID

POST/PUT

No

The list of identifiers for the port mirrors to be applied for ingress packets.

insertionIds

Array of UUID

POST/PUT

No

The list of identifiers for the service insertions to be applied to this port.

outboundFilterId

UUID

POST/PUT

No

The identifier of the filter chain to be applied for egress packets.

outboundMirrorIds

Array of UUID

POST/PUT

No

The list of identifiers for the port mirrors to be applied for egress packets.

deviceId

UUID

  

The identifier of the device (bridge or router) to which this port belongs.

interfaceName

String

  

The interface name for a bound port. This will be set when binding a port to a host, becoming an exterior port. See the section called “Host Interface Port”.

hostId

UUID

 

No

The identifier of the host where this port is bound. This will be set when binding a port to a host, becoming an exterior port.

peerId

UUID

  

The identifier of the peer port to which this port is linked. This will be set when linking a port to another peer, becoming an interior port. See the section called “Port Link”.

tunnelKey

Integer

  

The port tunnel key.

vifId

UUID

  

The identifier of the VIF plugged into the port.

The ports of type Bridge include the following additional fields:

Field NameTypePOST/PUTRequiredDescription

vlanId

Integer

POST/PUT

No

The VLAN identifier assigned to this port. On a given bridge, the VLAN identifier can be present at most in one interior port.

The ports of type Router include the following additional fields:

Field NameTypePOST/PUTRequiredDescription

networkAddress

String

POST/PUT

Yes

The IP address of the network attached to this port.

networkLength

Integer

POST/PUT

Yes

The network prefix length of the network attached to this port. The value must belong to the interval [0, 32].

portAddress

String

POST/PUT

Yes

The IP address assigned to the port.

portMac

String

POST/PUT

No

The port physical (MAC) address.

bgpStatus

String

  

If the port is used to advertise routes to one or more BGP neighbors, this field includes the status of the BGP sessions.

The ports of type Vxlan include the following additional fields:

Field NameTypePOST/PUTRequiredDescription

vtepId

UUID

  

The identifier of the VTEP corresponding to this port.

Questions? Discuss on Mailing Lists or Chat.
Found an error? Report a bug.