Configures globalConfig, staticRouting, OSPF, and BGP.

Using the Advanced Networking Services API, you can configure area definitions and area-to-interface mapping for OSPF dynamic routing and neighbors for BGP dynamic routing.

Note

VMware recommends you issue a GET request to retrieve the routing configuration, modify the configuration, then submit the changes by sending a PUT request.

1

Log in to vCloud Air as an administrator. See Log in to vCloud Air for information.

2

Create a login session with vCloud Director. See Create a Session for a Virtual Data Center in a Service for information.

3

Using the vCloud API, query vCloud Director for the ID of the edge gateway that requires routing configuration. See Querying the vCloud API for information.

1

(Optional) Request the current routing configuration for the edge gateway. See List Routing Configuration.

2

Examine the response and update the required elements.

For a description of each element of the routing schema, see Schema for Routing Configuration.

3

Submit the updated configuration using the following request header and request body:

PUT https://vchs.vmware.com/hybridity/api/gateways/gatewayId/routing/config

In the request header, include the OATH token and the Accept header that you obtained when creating a login session:

Accept: application/json
Content-Type: application/json
X-Vcloud-Authorization: "vcloud-auth-token"

In the request body, include the schema elements you retrieved and updated from the GET request.

The server returns status 204 NO CONTENT in the response header. The server does not return a response body.

Request Header – Get the Routing Configuration

GET https://vchs.vmware.com/hybridity/api/gateways/gw-5/routing/config
Accept: application/json
Content-Type: application/json
X-Vcloud-Authorization: "d6eFLOqQYfuEn2MJTp7BQ2ISEO+ZYaEgTcqBy8wZQ6js="

Request body not required.

Response Body – Get the Routing Configuration

{
"featureType": "routing_4.0",
"version": 11,
"enabled": true,
"routingGlobalConfig": {
    "routerId": "10.112.200.3",
    "ecmp": false,
    "logging": {
        "enable": false,
        "logLevel": "info"
    }
},
"staticRouting": {
    "defaultRoute": {
        "vnic": "0",
        "mtu": 1500,
        "gatewayAddress": "10.112.200.1"
    },
    "staticRoutes": {
        "staticRoutes": [
            {
                "mtu": 1500,
                "description": "",
                "type": "user",
                "network": "176.10.0.0/24",
                "nextHop": "172.0.0.10"
            }
        ]
    }
},
"ospf": {
    "enabled": false,
    "ospfAreas": {
        "ospfAreas": [
            {
                "areaId": 51,
                "type": "nssa",
                "authentication": {
                    "type": "none"
                }
            },
            {
                "areaId": 0,
                "type": "normal",
                "authentication": {
                    "type": "none"
                }
            }
        ]
    },
    "ospfInterfaces": {
        "ospfInterfaces": []
    },
    "redistribution": {
        "enabled": false,
        "rules": {
            "rules": []
        }
    },
    "gracefulRestart": true,
    "defaultOriginate": false
},
"bgp": {
    "enabled": true,
    "localAS": 10,
    "bgpNeighbours": {
        "bgpNeighbours": [
            {
                "ipAddress": "192.168.10.1",
                "remoteAS": 20,
                "weight": 60,
                "holdDownTimer": 180,
                "keepAliveTimer": 60,
                "password": "********",
                "bgpFilters": {
                    "bgpFilters": []
                }
            }
        ]
    },
    "redistribution": {
        "enabled": false,
        "rules": {
            "rules": []
        }
    },
    "gracefulRestart": true,
    "defaultOriginate": false
  }
}

Request Header – Add a Static Route

PUT https://vchs.vmware.com/hybridity/api/gateways/gw-5/routing/config
Accept: application/json
Content-Type: application/json
X-Vcloud-Authorization: "d6eFLOqQYfuEn2MJTp7BQ2ISEO+ZYaEgTcqBy8wZQ6js="

Request Body – Add a Static Route

{
"featureType": "routing_4.0",
"version": 11,
"enabled": true,
"routingGlobalConfig": {
    "routerId": "10.112.200.3",
    "ecmp": false,
    "logging": {
        "enable": false,
        "logLevel": "info"
    }
},
"staticRouting": {
    "defaultRoute": {
        "vnic": "0",
        "mtu": 1500,
        "gatewayAddress": "10.112.200.1"
    },
    "staticRoutes": {
        "staticRoutes": [ {
                "mtu": 1500,
                "description": "",
                "type": "user",
                "network": "176.10.0.0/24",
                "nextHop": "172.0.0.10"
            }, {
                "mtu": 1500,
                "description": "",
                "type": "user",
                "network": "176.10.0.10/24",
                "nextHop": "172.0.0.10"
         } ]
    }
},
"ospf": {
    "enabled": false,
    "ospfAreas": {
        "ospfAreas": [ {
                "areaId": 51,
                "type": "nssa",
                "authentication": {
                    "type": "none"
                }
            },
            {
                "areaId": 0,
                "type": "normal",
                "authentication": {
                    "type": "none"
                }
            }
        ]
    },
    "ospfInterfaces": {
        "ospfInterfaces": []
    },
    "redistribution": {
        "enabled": false,
        "rules": {
            "rules": []
        }
    },
    "gracefulRestart": true,
    "defaultOriginate": false
},
"bgp": {
    "enabled": true,
    "localAS": 10,
    "bgpNeighbours": {
        "bgpNeighbours": [ {
                "ipAddress": "192.168.10.1",
                "remoteAS": 20,
                "weight": 60,
                "holdDownTimer": 180,
                "keepAliveTimer": 60,
                "password": "********",
                "bgpFilters": {
                    "bgpFilters": []
                }
            }
        ]
    },
    "redistribution": {
        "enabled": false,
        "rules": {
            "rules": []
        }
    },
    "gracefulRestart": true,
    "defaultOriginate": false
  }
}

If you configured dynamic routing, configure OSPF or BGP, respectively, on the other edge gateways in vCloud Air or on-premises that you want to exchange routing information with.

Add a firewall rule that allows traffic between the edge gateways in vCloud Air or on-premises that you are configuring routing for (static and dynamic). See Configure the Edge Gateway Firewall.