@@ -77,14 +77,13 @@ Before trying to add a port, let's use the ``polycubectl`` help to get the info
7777
7878 Other parameters:
7979 peer=value string Peer name, such as a network interfaces (e.g., 'veth0') or another cube (e.g., 'br1:port2')
80- ip=value string IP address of the port
81- netmask=value string Netmask of the port
80+ ip=value string IP address and prefix of the port
8281 mac=value string MAC address of the port
8382 Example:
84- polycubectl r1 ports add port1 peer=r0:port1 ip=207.46.130.1 netmask=255.255.255.0 mac=B3:23:45:F5:3A
83+ polycubectl r1 ports add port1 peer=r0:port1 ip=207.46.130.1/24 mac=B3:23:45:F5:3A
8584
8685
87- The output indicates that a port name is expected ``Keyword ``, and following it the ``peer ``, ``ip ``, `` netmask `` and ``mac `` are supported parameters.
86+ The output indicates that a port name is expected ``Keyword ``, and following it the ``peer ``, ``ip `` and ``mac `` are supported parameters.
8887
8988
9089**Connect ** ``veth1 `` **to ** ``r1 ``
@@ -93,7 +92,7 @@ The output indicates that a port name is expected ``Keyword``, and following it
9392::
9493
9594 # create new port on r1 and set the IP parameters
96- polycubectl r1 ports add to_veth1 ip=10.0.1.254 netmask=255.255.255.0
95+ polycubectl r1 ports add to_veth1 ip=10.0.1.254/24
9796 # connect port to netdev
9897 polycubectl connect r1:to_veth1 veth1
9998
@@ -102,8 +101,8 @@ The router automatically adds a new local entry in the routing table.
102101::
103102
104103 polycubectl r1 show route
105- interface netmask network nexthop pathcost
106- to_veth1 255.255.255.0 10.0.1.0 local 0
104+ interface network nexthop pathcost
105+ to_veth1 10.0.1.0/24 local 0
107106
108107
109108
@@ -112,7 +111,7 @@ The router automatically adds a new local entry in the routing table.
112111::
113112
114113 # create new port on r1 and set the IP parameters
115- polycubectl r1 ports add to_veth2 ip=10.0.2.254 netmask=255.255.255.0
114+ polycubectl r1 ports add to_veth2 ip=10.0.2.254/24
116115
117116 # connect router port to netdev interface
118117 polycubectl r1 ports to_veth2 set peer=veth2
@@ -126,7 +125,7 @@ The router automatically adds a new local entry in the routing table.
126125
127126 # create new port on r1 and set the IP parameters
128127 # notice that in this case 'peer' is also set so the port is also connected to the netdev
129- polycubectl r1 ports add to_veth3 ip=10.0.3.254 netmask=255.255.255.0 peer=veth3
128+ polycubectl r1 ports add to_veth3 ip=10.0.3.254/24 peer=veth3
130129
131130
132131Step 3: Check configuration
@@ -144,16 +143,16 @@ You should see an output similar to the next one, where ports are ``up`` and hav
144143 loglevel: info
145144
146145 ports:
147- name uuid status peer ip netmask mac
148- to_veth3 c51bb0ed-9e6f-44ed-a096-b13bc1011331 up veth3 10.0.3.254 255.255.255.0 72:59:a8:c2:c2:44
149- to_veth2 48f8d130-aa32-4354-a1b5-105df9a8ad7b up veth2 10.0.2.254 255.255.255.0 d6:42:7f:65:b4:40
150- to_veth1 46c685b9-4c80-4466-9d81-985598a07444 up veth1 10.0.1.254 255.255.255.0 52:f0:5f:2c:a5:a7
146+ name uuid status peer ip mac
147+ to_veth3 c51bb0ed-9e6f-44ed-a096-b13bc1011331 up veth3 10.0.3.254/24 72:59:a8:c2:c2:44
148+ to_veth2 48f8d130-aa32-4354-a1b5-105df9a8ad7b up veth2 10.0.2.254/24 d6:42:7f:65:b4:40
149+ to_veth1 46c685b9-4c80-4466-9d81-985598a07444 up veth1 10.0.1.254/24 52:f0:5f:2c:a5:a7
151150
152151 route:
153- network netmask nexthop interface pathcost
154- 10.0.1.0 255.255.255.0 local to_veth1 0
155- 10.0.2.0 255.255.255.0 local to_veth2 0
156- 10.0.3.0 255.255.255.0 local to_veth3 0
152+ network nexthop interface pathcost
153+ 10.0.1.0/24 local to_veth1 0
154+ 10.0.2.0/24 local to_veth2 0
155+ 10.0.3.0/24 local to_veth3 0
157156
158157
159158Step 4: Test the connectivity between the namespaces and the router
0 commit comments