Connecting two routers

You can easily connect two virtual routers via virtual ports on each router.

Make sure you create the router ports on the two routers and assign the ports to the same subnet. See Chapter 4, Device abstractions for information about creating routers and adding router ports.

To connect two routers:

  1. Enter the command to list the routers on the current tenant:

    midonet> list router
    router router3 name test-router2 state up
    router router1 name test-router state up
  2. Enter the command to list the ports on one of the routers you want to connect:

    midonet> router router1 list port
    port port0 device router1 state up mac 02:a6:81:08:ab:5d addresses 10.100.1.1/24 peer bridge1:port0
    port port1 device router1 state up mac 02:fa:5f:87:bb:d2 addresses 10.100.1.2/24
  3. Enter the command to list the ports on the router you want to connect it to:

    midonet> router router3 list port
    port port0 device router3 state up mac 02:df:24:5b:19:9b addresses 10.100.1.128/24
  4. Enter the command to bind the port on one router (for example, port 1 on router1) to the port on another router (for example, port0 on router3):

    midonet> router router1 port port1 set peer router3:port0
  5. Enter the command to list the ports on one of the routers:

    midonet> router router1 list port
    port port0 device router1 state up mac 02:a6:81:08:ab:5d addresses 10.100.1.1/24 peer bridge1:port0
    port port1 device router1 state up mac 02:fa:5f:87:bb:d2 addresses 10.100.1.2/24 peer router3:port0

    The above output shows that port1 on router1 is connected to port0 on router3.

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


loading table of contents...