Adding routes

Below are some examples of when you might want to add a route:

  • You notice that a specific IP address or range is attacking your network. To prevent such attacks, you add a route to the Edge Router; this route’s source IP matches the attacking IP address or range. You specify the type as a Blackhole to configure the Edge Router to drop packets from this source.
  • If BGP dynamic routing is not available, you may configure static routes to forward traffic to the upstream router(s).

The attributes you specify are:

  • dst = destination IP address or network to match
  • src = source IP address or network to match
  • type = for example, "normal"
  • port = port to emit traffic over

To add a route using the MidoNet CLI:

  1. Enter the command to add a route:

    midonet> router router2 add route dst src type normal port router2:port2

    The above command contains the following instructions:

    • For traffic with the source any network ( with the destination network, forward this traffic over port2 on router2.


      Prior to adding the above route, a port was added to router2 using the following command:

      midonet> router router2 add port addresses
  2. Enter the command to list the routes on router2 to confirm the added route(s):

    midonet> router router2 list route
    route route0 type normal src dst port router2:port0 weight 0
    route route1 type normal src dst port router2:port1 weight 0
    route route2 type normal src dst port router2:port2 weight 0
    route route3 type normal src dst port router2:port2 weight 0
Questions? Discuss on Mailing Lists or Chat.
Found an error? Report a bug.

loading table of contents...