diff --git a/rackspace/lb/v1/vips/requests.go b/rackspace/lb/v1/vips/requests.go
index 92bd0b2..ffdc74c 100644
--- a/rackspace/lb/v1/vips/requests.go
+++ b/rackspace/lb/v1/vips/requests.go
@@ -1,10 +1,13 @@
 package vips
 
 import (
+	"errors"
+
 	"github.com/racker/perigee"
 
 	"github.com/rackspace/gophercloud"
 	"github.com/rackspace/gophercloud/pagination"
+	"github.com/rackspace/gophercloud/rackspace/lb/v1"
 )
 
 // List is the operation responsible for returning a paginated collection of
@@ -27,11 +30,15 @@
 // CreateOpts is the common options struct used in this package's Create
 // operation.
 type CreateOpts struct {
+	// Optional - the ID of an existing virtual IP. By doing this, you are
+	// allowing load balancers to share IPV6 addresses.
 	ID string
 
-	Type string
+	// Optional - the type of address.
+	Type Type
 
-	Version string
+	// Optional - the version of address.
+	Version Version
 }
 
 // ToVIPCreateMap casts a CreateOpts struct to a map.
@@ -51,6 +58,9 @@
 	return lb, nil
 }
 
+// Create is the operation responsible for assigning a new Virtual IP to an
+// existing load balancer resource. Currently, only version 6 IP addresses may
+// be added.
 func Create(c *gophercloud.ServiceClient, lbID int, opts CreateOptsBuilder) CreateResult {
 	var res CreateResult
 
@@ -69,3 +79,35 @@
 
 	return res
 }
+
+// BulkDelete is the operation responsible for batch deleting multiple VIPs in
+// a single operation. It accepts a slice of integer IDs and will remove them
+// from the load balancer. The maximum limit is 10 VIP removals at once.
+func BulkDelete(c *gophercloud.ServiceClient, loadBalancerID int, vipIDs []int) DeleteResult {
+	var res DeleteResult
+
+	if len(vipIDs) > 10 || len(vipIDs) == 0 {
+		res.Err = errors.New("You must provide a minimum of 1 and a maximum of 10 VIP IDs")
+		return res
+	}
+
+	url := rootURL(c, loadBalancerID)
+	url += v1.IDSliceToQueryString("id", vipIDs)
+
+	_, res.Err = perigee.Request("DELETE", url, perigee.Options{
+		MoreHeaders: c.AuthenticatedHeaders(),
+		OkCodes:     []int{202},
+	})
+
+	return res
+}
+
+// Delete is the operation responsible for permanently deleting a VIP.
+func Delete(c *gophercloud.ServiceClient, lbID, vipID int) DeleteResult {
+	var res DeleteResult
+	_, res.Err = perigee.Request("DELETE", resourceURL(c, lbID, vipID), perigee.Options{
+		MoreHeaders: c.AuthenticatedHeaders(),
+		OkCodes:     []int{200},
+	})
+	return res
+}
diff --git a/rackspace/lb/v1/vips/requests_test.go b/rackspace/lb/v1/vips/requests_test.go
index 762b139..74ac461 100644
--- a/rackspace/lb/v1/vips/requests_test.go
+++ b/rackspace/lb/v1/vips/requests_test.go
@@ -9,8 +9,9 @@
 )
 
 const (
-	lbID  = 12345
-	vipID = 67890
+	lbID   = 12345
+	vipID  = 67890
+	vipID2 = 67891
 )
 
 func TestList(t *testing.T) {
@@ -62,3 +63,25 @@
 
 	th.CheckDeepEquals(t, expected, vip)
 }
+
+func TestBulkDelete(t *testing.T) {
+	th.SetupHTTP()
+	defer th.TeardownHTTP()
+
+	ids := []int{vipID, vipID2}
+
+	mockBatchDeleteResponse(t, lbID, ids)
+
+	err := BulkDelete(client.ServiceClient(), lbID, ids).ExtractErr()
+	th.AssertNoErr(t, err)
+}
+
+func TestDelete(t *testing.T) {
+	th.SetupHTTP()
+	defer th.TeardownHTTP()
+
+	mockDeleteResponse(t, lbID, vipID)
+
+	err := Delete(client.ServiceClient(), lbID, vipID).ExtractErr()
+	th.AssertNoErr(t, err)
+}
diff --git a/rackspace/lb/v1/vips/results.go b/rackspace/lb/v1/vips/results.go
index aa5ef37..678b2af 100644
--- a/rackspace/lb/v1/vips/results.go
+++ b/rackspace/lb/v1/vips/results.go
@@ -9,12 +9,32 @@
 
 // VIP represents a Virtual IP API resource.
 type VIP struct {
-	Address string `json:"address,omitempty"`
-	ID      int    `json:"id,omitempty"`
-	Type    string `json:"type,omitempty"`
-	Version string `json:"ipVersion,omitempty" mapstructure:"ipVersion"`
+	Address string  `json:"address,omitempty"`
+	ID      int     `json:"id,omitempty"`
+	Type    Type    `json:"type,omitempty"`
+	Version Version `json:"ipVersion,omitempty" mapstructure:"ipVersion"`
 }
 
+// Version represents the version of a VIP.
+type Version string
+
+// Convenient constants to use for type
+const (
+	IPV4 Version = "IPV4"
+	IPV6 Version = "IPV6"
+)
+
+// Type represents the type of a VIP.
+type Type string
+
+const (
+	// PUBLIC indicates a VIP type that is routable on the public Internet.
+	PUBLIC Type = "PUBLIC"
+
+	// PRIVATE indicates a VIP type that is routable only on ServiceNet.
+	PRIVATE Type = "SERVICENET"
+)
+
 // VIPPage is the page returned by a pager when traversing over a collection
 // of VIPs.
 type VIPPage struct {
@@ -58,6 +78,12 @@
 	return resp, err
 }
 
+// CreateResult represents the result of a create operation.
 type CreateResult struct {
 	commonResult
 }
+
+// DeleteResult represents the result of a delete operation.
+type DeleteResult struct {
+	gophercloud.ErrResult
+}
