"authoritative": true,
"eid": {
"address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
- "ipv4-prefix": "6.0.2.0/24"
+ "ipv4-prefix": "6.0.1.0/24"
},
"LocatorRecord": [
{
"authoritative": true,
"eid": {
"address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
- "ipv4-prefix": "6.0.4.0/24"
+ "ipv4-prefix": "6.0.2.0/24"
},
"LocatorRecord": [
{
"authoritative": true,
"eid": {
"address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
- "ipv4-prefix": "6.0.2.0/24"
+ "ipv4-prefix": "6.0.1.0/24"
},
"LocatorRecord": [
{
"authoritative": true,
"eid": {
"address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
- "ipv4-prefix": "6.0.4.0/24"
+ "ipv4-prefix": "6.0.2.0/24"
},
"LocatorRecord": [
{
"authoritative": true,
"eid": {
"address-type": "ietf-lisp-address-types:ipv6-prefix-afi",
- "ipv6-prefix": "6:0:2::0/64"
+ "ipv6-prefix": "6:0:1::0/64"
},
"LocatorRecord": [
{
"authoritative": true,
"eid": {
"address-type": "ietf-lisp-address-types:ipv6-prefix-afi",
- "ipv6-prefix": "6:0:4::0/64"
+ "ipv6-prefix": "6:0:2::0/64"
},
"LocatorRecord": [
{
"authoritative": true,
"eid": {
"address-type": "ietf-lisp-address-types:ipv6-prefix-afi",
- "ipv6-prefix": "6:0:2::0/64"
+ "ipv6-prefix": "6:0:1::0/64"
},
"LocatorRecord": [
{
"authoritative": true,
"eid": {
"address-type": "ietf-lisp-address-types:ipv6-prefix-afi",
- "ipv6-prefix": "6:0:4::0/64"
+ "ipv6-prefix": "6:0:2::0/64"
},
"LocatorRecord": [
{
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:source-dest-key-lcaf",
+ "source-dest-key": {
+ "source": "6.0.1.0/24",
+ "dest": "6.0.2.0/24"
+ }
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": false,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv4-afi",
+ "ipv4": "6.0.3.2"
+ }
+ }
+ ]
+ }
+ }
+}
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:source-dest-key-lcaf",
+ "source-dest-key": {
+ "source": "6.0.5.0/24",
+ "dest": "6.0.2.0/24"
+ }
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": true,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv4-afi",
+ "ipv4": "6.0.3.3"
+ }
+ }
+ ]
+ }
+ }
+}
+
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
+ "ipv4-prefix": "6.0.1.0/24"
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": true,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv4-afi",
+ "ipv4": "6.0.3.1"
+ }
+ }
+ ]
+ }
+ }
+}
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
+ "ipv4-prefix": "6.0.5.0/24"
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": true,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv4-afi",
+ "ipv4": "6.0.3.1"
+ }
+ }
+ ]
+ }
+ }
+}
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:source-dest-key-lcaf",
+ "source-dest-key": {
+ "source": "6:0:1::0/64",
+ "dest": "6:0:2::0/64"
+ }
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": false,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv6-afi",
+ "ipv6": "6:0:3::2"
+ }
+ }
+ ]
+ }
+ }
+}
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:source-dest-key-lcaf",
+ "source-dest-key": {
+ "source": "6:0:5::0/64",
+ "dest": "6:0:2::0/64"
+ }
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": true,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv6-afi",
+ "ipv6": "6:0:3::3"
+ }
+ }
+ ]
+ }
+ }
+}
+
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:ipv6-prefix-afi",
+ "ipv6-prefix": "6:0:1::0/64"
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": true,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv6-afi",
+ "ipv6": "6:0:3::1"
+ }
+ }
+ ]
+ }
+ }
+}
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:ipv6-prefix-afi",
+ "ipv6-prefix": "6:0:5::0/64"
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": true,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv6-afi",
+ "ipv6": "6:0:3::1"
+ }
+ }
+ ]
+ }
+ }
+}
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "virtual-network-id": 10,
+ "address-type": "ietf-lisp-address-types:source-dest-key-lcaf",
+ "source-dest-key": {
+ "source": "08:55:55:55:55:55",
+ "dest": "08:22:22:22:22:22"
+ }
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": false,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv4-afi",
+ "ipv4": "6.0.3.2"
+ }
+ }
+ ]
+ }
+ }
+}
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "virtual-network-id": 20,
+ "address-type": "ietf-lisp-address-types:source-dest-key-lcaf",
+ "source-dest-key": {
+ "source": "08:11:11:11:11:11",
+ "dest": "08:22:22:22:22:22"
+ }
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": true,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv4-afi",
+ "ipv4": "6.0.3.3"
+ }
+ }
+ ]
+ }
+ }
+}
+
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "virtual-network-id": 20,
+ "address-type": "ietf-lisp-address-types:mac-afi",
+ "mac": "08:11:11:11:11:11"
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": true,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv4-afi",
+ "ipv4": "6.0.3.1"
+ }
+ }
+ ]
+ }
+ }
+}
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "virtual-network-id": 10,
+ "address-type": "ietf-lisp-address-types:mac-afi",
+ "mac": "08:55:55:55:55:55"
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": true,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv4-afi",
+ "ipv4": "6.0.3.1"
+ }
+ }
+ ]
+ }
+ }
+}
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:source-dest-key-lcaf",
+ "source-dest-key": {
+ "source": "6.0.1.0/24",
+ "dest": "6.0.2.0/24"
+ }
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": false,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv4-afi",
+ "ipv4": "6.0.3.2"
+ }
+ }
+ ]
+ }
+ }
+}
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
+ "ipv4-prefix": "6.0.1.0/24"
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": true,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv4-afi",
+ "ipv4": "6.0.3.1"
+ }
+ }
+ ]
+ }
+ }
+}
+
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:source-dest-key-lcaf",
+ "source-dest-key": {
+ "source": "6.0.1.0/24",
+ "dest": "6.0.2.0/24"
+ }
+ }
+ }
+ }
+}
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:source-dest-key-lcaf",
+ "source-dest-key": {
+ "source": "6.0.1.0/24",
+ "dest": "6.0.2.0/24"
+ }
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": false,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv4-afi",
+ "ipv4": "6.0.3.2"
+ }
+ }
+ ]
+ }
+ }
+}
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:source-dest-key-lcaf",
+ "source-dest-key": {
+ "source": "6:0:1::0/64",
+ "dest": "6:0:2::0/64"
+ }
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": false,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv4-afi",
+ "ipv4": "6.0.3.2"
+ }
+ }
+ ]
+ }
+ }
+}
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:ipv6-prefix-afi",
+ "ipv6-prefix": "6:0:1::0/64"
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": true,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv4-afi",
+ "ipv4": "6.0.3.1"
+ }
+ }
+ ]
+ }
+ }
+}
+
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:source-dest-key-lcaf",
+ "source-dest-key": {
+ "source": "6:0:1::0/64",
+ "dest": "6:0:2::0/64"
+ }
+ }
+ }
+ }
+}
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:source-dest-key-lcaf",
+ "source-dest-key": {
+ "source": "6:0:1::0/64",
+ "dest": "6:0:2::0/64"
+ }
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": false,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv4-afi",
+ "ipv4": "6.0.3.2"
+ }
+ }
+ ]
+ }
+ }
+}
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:source-dest-key-lcaf",
+ "source-dest-key": {
+ "source": "6.0.1.0/24",
+ "dest": "6.0.2.0/24"
+ }
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": false,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv4-afi",
+ "ipv4": "6.0.3.2"
+ }
+ }
+ ]
+ }
+ }
+}
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
+ "ipv4-prefix": "6.0.1.0/24"
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": true,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv4-afi",
+ "ipv4": "6.0.3.1"
+ }
+ }
+ ]
+ }
+ }
+}
+
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:source-dest-key-lcaf",
+ "source-dest-key": {
+ "source": "6.0.0.0/16",
+ "dest": "6.0.2.0/24"
+ }
+ }
+ }
+ }
+}
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:source-dest-key-lcaf",
+ "source-dest-key": {
+ "source": "6.0.0.0/8",
+ "dest": "6.0.2.0/24"
+ }
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": false,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv4-afi",
+ "ipv4": "6.0.3.2"
+ }
+ }
+ ]
+ }
+ }
+}
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:source-dest-key-lcaf",
+ "source-dest-key": {
+ "source": "6:0:1::0/64",
+ "dest": "6:0:2::0/64"
+ }
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": false,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv4-afi",
+ "ipv4": "6.0.3.2"
+ }
+ }
+ ]
+ }
+ }
+}
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:ipv6-prefix-afi",
+ "ipv6-prefix": "6:0:1::0/64"
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": true,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv4-afi",
+ "ipv4": "6.0.3.1"
+ }
+ }
+ ]
+ }
+ }
+}
+
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:source-dest-key-lcaf",
+ "source-dest-key": {
+ "source": "6:0:1::0/64",
+ "dest": "6:0:2::0/64"
+ }
+ }
+ }
+ }
+}
--- /dev/null
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:source-dest-key-lcaf",
+ "source-dest-key": {
+ "source": "6:0:1::0/64",
+ "dest": "6:0:2::0/64"
+ }
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": false,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv4-afi",
+ "ipv4": "6.0.3.2"
+ }
+ }
+ ]
+ }
+ }
+}
-create_host_iface vpp1 6.0.2.1/24
-create_host_iface xtr_rtr1 6.0.3.1/24
+create_host_iface vpp1 6.0.1.1/24
+create_host_iface xtr1 6.0.3.1/24
lisp_state enable
-lisp_locator_set_with_locator ls1 host-xtr_rtr1 1 1
-lisp_local_eid eid 6.0.2.0/24 locator-set ls1
+lisp_locator_set_with_locator ls1 host-xtr1 1 1
+lisp_local_eid eid 6.0.1.0/24 locator-set ls1
lisp_map_resolver 6.0.3.100
-create_host_iface vpp2 6.0.4.1/24
-create_host_iface xtr_rtr3 6.0.3.2/24
+create_host_iface vpp2 6.0.2.1/24
+create_host_iface xtr2 6.0.3.2/24
lisp_state enable
-lisp_locator_set_with_locator ls1 host-xtr_rtr3 1 1
-lisp_local_eid eid 6.0.4.0/24 locator-set ls1
+lisp_locator_set_with_locator ls1 host-xtr2 1 1
+lisp_local_eid eid 6.0.2.0/24 locator-set ls1
lisp_map_resolver 6.0.3.100
-create_host_iface xtr_rtr2 6.0.3.3/24
+create_host_iface xtr3 6.0.3.3/24
lisp_state enable
-lisp_locator_set_with_locator ls1 host-xtr_rtr2 1 1
+lisp_locator_set_with_locator ls1 host-xtr3 1 1
lisp_pitr ls1
lisp_remote_mapping eid 6.0.0.0/16 action send-map-request
lisp_map_resolver 6.0.3.100
-create_host_iface vpp1 6.0.2.1/24
-create_host_iface xtr_rtr1 6:0:3::1/64
+create_host_iface vpp1 6.0.1.1/24
+create_host_iface xtr1 6:0:3::1/64
lisp_state enable
-lisp_locator_set_with_locator ls1 host-xtr_rtr1 1 1
-lisp_local_eid eid 6.0.2.0/24 locator-set ls1
+lisp_locator_set_with_locator ls1 host-xtr1 1 1
+lisp_local_eid eid 6.0.1.0/24 locator-set ls1
lisp_map_resolver 6:0:3::100
-create_host_iface vpp2 6.0.4.1/24
-create_host_iface xtr_rtr3 6:0:3::2/64
+create_host_iface vpp2 6.0.2.1/24
+create_host_iface xtr2 6:0:3::2/64
lisp_state enable
-lisp_locator_set_with_locator ls1 host-xtr_rtr3 1 1
-lisp_local_eid eid 6.0.4.0/24 locator-set ls1
+lisp_locator_set_with_locator ls1 host-xtr2 1 1
+lisp_local_eid eid 6.0.2.0/24 locator-set ls1
lisp_map_resolver 6:0:3::100
-create_host_iface xtr_rtr2 6:0:3::3/64
+create_host_iface xtr3 6:0:3::3/64
lisp_state enable
-lisp_locator_set_with_locator ls1 host-xtr_rtr2 1 1
+lisp_locator_set_with_locator ls1 host-xtr3 1 1
lisp_pitr ls1
lisp_remote_mapping eid 6.0.0.0/16 action send-map-request
lisp_map_resolver 6:0:3::100
-create_host_iface vpp1 6:0:2::1/64
-create_host_iface xtr_rtr1 6.0.3.1/24
+create_host_iface vpp1 6:0:1::1/64
+create_host_iface xtr1 6.0.3.1/24
lisp_state enable
-lisp_locator_set_with_locator ls1 host-xtr_rtr1 1 1
-lisp_local_eid eid 6:0:2::0/64 locator-set ls1
+lisp_locator_set_with_locator ls1 host-xtr1 1 1
+lisp_local_eid eid 6:0:1::0/64 locator-set ls1
lisp_map_resolver 6.0.3.100
-create_host_iface vpp2 6:0:4::1/64
-create_host_iface xtr_rtr3 6.0.3.2/24
+create_host_iface vpp2 6:0:2::1/64
+create_host_iface xtr2 6.0.3.2/24
lisp_state enable
-lisp_locator_set_with_locator ls1 host-xtr_rtr3 1 1
-lisp_local_eid eid 6:0:4::0/64 locator-set ls1
+lisp_locator_set_with_locator ls1 host-xtr2 1 1
+lisp_local_eid eid 6:0:2::0/64 locator-set ls1
lisp_map_resolver 6.0.3.100
-create_host_iface xtr_rtr2 6.0.3.3/24
+create_host_iface xtr3 6.0.3.3/24
lisp_state enable
-lisp_locator_set_with_locator ls1 host-xtr_rtr2 1 1
+lisp_locator_set_with_locator ls1 host-xtr3 1 1
lisp_pitr ls1
lisp_remote_mapping eid 6:0:0::0/32 action send-map-request
lisp_map_resolver 6.0.3.100
-create_host_iface vpp1 6:0:2::1/64
-create_host_iface xtr_rtr1 6:0:3::1/64
+create_host_iface vpp1 6:0:1::1/64
+create_host_iface xtr1 6:0:3::1/64
lisp_state enable
-lisp_locator_set_with_locator ls1 host-xtr_rtr1 1 1
-lisp_local_eid eid 6:0:2::0/64 locator-set ls1
+lisp_locator_set_with_locator ls1 host-xtr1 1 1
+lisp_local_eid eid 6:0:1::0/64 locator-set ls1
lisp_map_resolver 6:0:3::100
-create_host_iface vpp2 6:0:4::1/64
-create_host_iface xtr_rtr3 6:0:3::2/64
+create_host_iface vpp2 6:0:2::1/64
+create_host_iface xtr2 6:0:3::2/64
lisp_state enable
-lisp_locator_set_with_locator ls1 host-xtr_rtr3 1 1
-lisp_local_eid eid 6:0:4::0/64 locator-set ls1
+lisp_locator_set_with_locator ls1 host-xtr2 1 1
+lisp_local_eid eid 6:0:2::0/64 locator-set ls1
lisp_map_resolver 6:0:3::100
-create_host_iface xtr_rtr2 6:0:3::3/64
+create_host_iface xtr3 6:0:3::3/64
lisp_state enable
-lisp_locator_set_with_locator ls1 host-xtr_rtr2 1 1
+lisp_locator_set_with_locator ls1 host-xtr3 1 1
lisp_pitr ls1
lisp_remote_mapping eid 6:0:0::0/32 action send-map-request
lisp_map_resolver 6:0:3::100
--- /dev/null
+create_host_iface vpp1 6.0.1.1/24
+create_host_iface vpp3 6.0.5.1/24
+create_host_iface xtr1 6.0.3.1/24
+
+lisp_state enable
+lisp_map_request_mode src-dst
+lisp_locator_set_with_locator ls1 host-xtr1 1 1
+lisp_local_eid eid 6.0.1.0/24 locator-set ls1
+lisp_local_eid eid 6.0.5.0/24 locator-set ls1
+lisp_map_resolver 6.0.3.100
--- /dev/null
+create_host_iface vpp2 6.0.2.1/24
+create_host_iface xtr2 6.0.3.2/24
+
+lisp_state enable
+lisp_locator_set_with_locator ls1 host-xtr2 1 1
+lisp_local_eid eid 6.0.2.0/24 locator-set ls1
+lisp_map_resolver 6.0.3.100
--- /dev/null
+create_host_iface vpp4 6.0.2.1/24
+create_host_iface xtr3 6.0.3.3/24
+
+lisp_state enable
+lisp_locator_set_with_locator ls1 host-xtr3 1 1
+lisp_local_eid eid 6.0.2.0/24 locator-set ls1
+lisp_map_resolver 6.0.3.100
--- /dev/null
+create_host_iface vpp1 6:0:1::1/64
+create_host_iface vpp3 6:0:5::1/64
+create_host_iface xtr1 6:0:3::1/64
+
+lisp_state enable
+lisp_map_request_mode src-dst
+lisp_locator_set_with_locator ls1 host-xtr1 1 1
+lisp_local_eid eid 6:0:1::0/64 locator-set ls1
+lisp_local_eid eid 6:0:5::0/64 locator-set ls1
+lisp_map_resolver 6:0:3::100
--- /dev/null
+create_host_iface vpp2 6:0:2::1/64
+create_host_iface xtr2 6:0:3::2/64
+
+lisp_state enable
+lisp_locator_set_with_locator ls1 host-xtr2 1 1
+lisp_local_eid eid 6:0:2::0/64 locator-set ls1
+lisp_map_resolver 6:0:3::100
--- /dev/null
+create_host_iface vpp4 6:0:2::1/64
+create_host_iface xtr3 6:0:3::3/64
+
+lisp_state enable
+lisp_locator_set_with_locator ls1 host-xtr3 1 1
+lisp_local_eid eid 6:0:2::0/64 locator-set ls1
+lisp_map_resolver 6:0:3::100
--- /dev/null
+create_host_iface vpp5 6.0.10.11/24
+set_if_l2_bridge host-vpp5 20
+
+create_host_iface vpp8 6.0.10.15/24
+set_if_l2_bridge host-vpp8 10
+
+create_host_iface xtr1 6.0.3.1/24
+
+lisp_state enable
+lisp_map_request_mode src-dst
+lisp_locator_set_with_locator ls1 host-xtr1 1 1
+lisp_eid_map_bd 10 10
+lisp_eid_map_bd 20 20
+lisp_local_eid vni 10 eid 08:55:55:55:55:55 locator-set ls1
+lisp_local_eid vni 20 eid 08:11:11:11:11:11 locator-set ls1
+lisp_map_resolver 6.0.3.100
--- /dev/null
+create_host_iface vpp7 6.0.10.12/24
+set_if_l2_bridge host-vpp7 10
+create_host_iface xtr2 6.0.3.2/24
+
+lisp_state enable
+lisp_locator_set_with_locator ls1 host-xtr2 1 1
+lisp_eid_map_bd 10 10
+lisp_local_eid vni 10 eid 08:22:22:22:22:22 locator-set ls1
+lisp_map_resolver 6.0.3.100
--- /dev/null
+create_host_iface vpp6 6.0.10.12/24
+set_if_l2_bridge host-vpp6 20
+create_host_iface xtr3 6.0.3.3/24
+
+lisp_state enable
+lisp_locator_set_with_locator ls1 host-xtr3 1 1
+lisp_eid_map_bd 20 20
+lisp_local_eid vni 20 eid 08:22:22:22:22:22 locator-set ls1
+lisp_map_resolver 6.0.3.100
--- /dev/null
+create_host_iface vpp1 6.0.1.1/24
+create_host_iface intervpp1 6.0.3.1/24
+
+lisp_state enable
+lisp_map_request_mode src-dst
+lisp_locator_set_with_locator ls1 host-intervpp1 1 1
+lisp_local_eid eid 6.0.1.0/24 locator-set ls1
+lisp_map_resolver 6.0.3.100
--- /dev/null
+create_host_iface vpp2 6.0.2.1/24
+create_host_iface intervpp2 6.0.3.2/24
+
+lisp_state enable
+lisp_locator_set_with_locator ls1 host-intervpp2 1 1
+lisp_local_eid eid 6.0.2.0/24 locator-set ls1
+lisp_map_resolver 6.0.3.100
--- /dev/null
+create_host_iface vpp1 6:0:1::1/64
+create_host_iface intervpp1 6.0.3.1/24
+
+lisp_state enable
+lisp_map_request_mode src-dst
+lisp_locator_set_with_locator ls1 host-intervpp1 1 1
+lisp_local_eid eid 6:0:1::0/64 locator-set ls1
+lisp_map_resolver 6.0.3.100
--- /dev/null
+create_host_iface vpp2 6:0:2::1/64
+create_host_iface intervpp2 6.0.3.2/24
+
+lisp_state enable
+lisp_locator_set_with_locator ls1 host-intervpp2 1 1
+lisp_local_eid eid 6:0:2::0/64 locator-set ls1
+lisp_map_resolver 6.0.3.100
# assert_rc_ok rc cleanup_fcn error_msg
if [ $1 -ne 0 ] ; then
echo $3
+ maybe_pause
+ $2
+ exit $test_result
+ fi
+}
+
+function assert_rc_not_ok
+{
+ if [ $1 -eq 0 ] ; then
+ echo $3
+ maybe_pause
$2
exit $test_result
fi
# run the test case
base_name=`basename -a "$test_case"`
- printf "*** %2d/%d : %-45s" $count $test_num "$base_name"
+ printf "*** %2d/%d : %-48s" $count $test_num "$base_name"
if [ $verbose -ne 0 ] ; then
"$test_case"
class RepeatableLocators(SimpleMapping):
- def append_locs(self, locs):
- pass
-
def generate(self, mode, args):
name = args[:args.index(' ')] # first word is ls name
locs = args[args.index(' '):]
SimpleMapping('lisp_remote_mapping', 'lisp remote-mapping', 'lisp_add_del_remote_mapping')
SimpleMapping('lisp_pitr', 'lisp pitr ls', 'lisp_pitr_set_locator_set locator-set')
SimpleMapping('lisp_adjacency', 'lisp adjacency', 'lisp_add_del_adjacency')
+SimpleMapping('lisp_map_request_mode', 'lisp map-request mode', 'lisp_map_request_mode')
SimpleMapping('set_if_ip', 'set int ip address', 'sw_interface_add_del_address')
CustomMapping('lisp_eid_map_bd',
source config.sh
source odl_utils.sh
-source topologies/rtr_single_iface.sh
+source topologies/3_node_star.sh
# set odl config json file names; they are common among all rtr tests
ODL_CONFIG_FILE1="elp1.json"
ODL_CONFIG_FILE2="elp2.json"
if [ "$1" == "clean" ] ; then
- rtr_single_iface_clean
+ 3_node_star_topo_clean
exit 0
fi
fi
function test_rtr_single_iface {
- rtr_single_iface_setup
+ 3_node_star_topo_setup
maybe_pause
rc=$?
maybe_pause
- rtr_single_iface_clean
+ 3_node_star_topo_clean
print_status $rc "No ICMP response!"
exit $test_result
--- /dev/null
+source config.sh
+source odl_utils.sh
+source topologies/3_node_star.sh
+
+ODL_CONFIG_FILE1="map1.json"
+ODL_CONFIG_FILE2="map2.json"
+
+if [ "$1" == "clean" ] ; then
+ 3_node_star_topo_clean
+ exit 0
+fi
+
+if [[ $(id -u) != 0 ]]; then
+ echo "Error: run this as a root."
+ exit 1
+fi
+
+function send_ping_from_ns
+{
+ ip netns exec "${1}" "${2}" -w 20 -c 1 "${3}"
+ assert_rc_ok $? 3_node_star_topo_clean "No ICMP Response!"
+}
+
+function test_src_dst
+{
+ 3_node_star_topo_setup
+ post_curl "add-mapping" "map3.json"
+ post_curl "add-mapping" "map4.json"
+
+ maybe_pause
+
+ test_result=1
+
+ # send ping for first EID
+ send_ping_from_ns vpp-ns1 ${1} ${2}
+
+ # TODO assert counters
+
+ maybe_pause
+
+ # send ping for second EID
+ send_ping_from_ns vpp-ns3 ${1} ${2}
+
+ maybe_pause
+
+ # verify first tunnel still works
+ send_ping_from_ns vpp-ns1 ${1} ${2}
+
+ maybe_pause
+
+ # verify second tunnel still works
+ send_ping_from_ns vpp-ns3 ${1} ${2}
+ rc=$?
+
+ maybe_pause
+ 3_node_star_topo_clean
+ print_status $rc "No ICM response!"
+ exit $test_result
+}
+
+function test_src_dst_l2
+{
+ 3_node_star_topo_setup
+ post_curl "add-mapping" "map3.json"
+ post_curl "add-mapping" "map4.json"
+
+ maybe_pause
+
+ test_result=1
+
+ # send ping for first EID
+ send_ping_from_ns vpp-ns5 ${1} ${2}
+
+ # TODO assert counters
+
+ maybe_pause
+
+ # send ping for second EID
+ send_ping_from_ns vpp-ns8 ${1} ${2}
+
+ maybe_pause
+
+ # verify first tunnel still works
+ send_ping_from_ns vpp-ns5 ${1} ${2}
+
+ maybe_pause
+
+ # verify second tunnel still works
+ send_ping_from_ns vpp-ns8 ${1} ${2}
+ rc=$?
+
+ maybe_pause
+ 3_node_star_topo_clean
+ print_status $rc "No ICM response!"
+ exit $test_result
+}
--- /dev/null
+source config.sh
+source odl_utils.sh
+source topologies/2_node_topo.sh
+
+ODL_CONFIG_FILE1="map1.json"
+ODL_CONFIG_FILE2="map2.json"
+
+if [ "$1" == "clean" ] ; then
+ 2_node_topo_clean
+ exit 0
+fi
+
+if [[ $(id -u) != 0 ]]; then
+ echo "Error: run this as a root."
+ exit 1
+fi
+
+function send_ping_from_ns
+{
+ ip netns exec "${1}" "${2}" -w 20 -c 1 "${3}"
+ assert_rc_ok $? 2_node_topo_clean "No ICMP Response!"
+}
+
+function send_ping_from_ns_expect_failure
+{
+ ip netns exec "${1}" "${2}" -w 10 -c 1 "${3}"
+ assert_rc_not_ok $? 2_node_topo_clean "Reply received, but failure expected!"
+}
+
+function remove_sd_mapping {
+ curl -X POST -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "Postman-Token: 1e4f00f4-74eb-20d7-97da-89963f37713b" -d '{
+ "input": {
+ "eid": {
+ "address-type": "ietf-lisp-address-types:source-dest-key-lcaf",
+ "source-dest-key": {
+ "source": "'$1'",
+ "dest": "'$2'"
+ }
+ }
+ }
+}' "http://${ODL_IP}:8181/restconf/operations/odl-mappingservice:remove-mapping"
+}
+
+function remove_mapping1 {
+curl -X DELETE -H "Content-Type: application/json" -H "Cache-Control: no-cache" "http://${ODL_IP}:${ODL_PORT}/restconf/config/odl-mappingservice:mapping-database/virtual-network-identifier/0/mapping/${1}/northbound/"
+}
+
+function test_src_dst_overwrite
+{
+ 2_node_topo_setup
+
+ maybe_pause
+
+ test_result=1
+
+ # send ping request
+ send_ping_from_ns vppns1 ${1} ${2}
+
+ maybe_pause
+
+ # Replace ODL mapping with negative one
+ post_curl "add-mapping" "replace1.json"
+ remove_sd_mapping "6.0.1.0/24" "6.0.2.0/24"
+
+ # wait for SMR being resolved
+ sleep 2
+
+ maybe_pause
+
+ # now ping should fail
+ send_ping_from_ns_expect_failure vppns1 ${1} ${2}
+
+ maybe_pause
+
+ # Replace ODL mapping with positive one
+ post_curl "add-mapping" "replace2.json"
+ remove_sd_mapping "6.0.0.0/16" "6.0.2.0/24"
+
+ # wait for SMR being resolved
+ sleep 2
+
+ maybe_pause
+
+ # expect ping reply again
+ send_ping_from_ns vppns1 ${1} ${2}
+ rc=$?
+
+ maybe_pause
+ 2_node_topo_clean
+ print_status $rc "No ICM response!"
+ exit $test_result
+}
source test_driver/rtr_single_iface.sh
-test_rtr_single_iface ping "6.0.4.4"
+test_rtr_single_iface ping "6.0.2.2"
source test_driver/rtr_single_iface.sh
-test_rtr_single_iface ping "6.0.4.4"
+test_rtr_single_iface ping "6.0.2.2"
source test_driver/rtr_single_iface.sh
-test_rtr_single_iface ping6 "6:0:4::4"
+test_rtr_single_iface ping6 "6:0:2::2"
source test_driver/rtr_single_iface.sh
-test_rtr_single_iface ping6 "6:0:4::4"
+test_rtr_single_iface ping6 "6:0:2::2"
--- /dev/null
+#!/usr/bin/env bash
+
+# Test LISP source/destination feature (ip4 over ip4)
+
+VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/sd/4o4
+ODL_CONFIG_DIR=`pwd`/../configs/odl/sd/4o4
+
+source test_driver/src_dst.sh
+
+test_src_dst ping "6.0.2.2"
--- /dev/null
+#!/usr/bin/env bash
+
+# Test LISP source/destination feature (ip4 over ip4)
+
+VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/sd/6o6
+ODL_CONFIG_DIR=`pwd`/../configs/odl/sd/6o6
+
+source test_driver/src_dst.sh
+
+test_src_dst ping6 "6:0:2::2"
--- /dev/null
+#!/usr/bin/env bash
+
+# Test for overwriting remote mappings from the LISP map-cache
+
+VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/sd/overwrite/4o4
+ODL_CONFIG_DIR=`pwd`/../configs/odl/sd/overwrite/4o4
+
+source test_driver/src_dst_overwrite.sh
+
+test_src_dst_overwrite ping "6.0.2.2"
--- /dev/null
+#!/usr/bin/env bash
+
+# Test for overwriting remote mappings from the LISP map-cache
+
+VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/sd/overwrite/6o4
+ODL_CONFIG_DIR=`pwd`/../configs/odl/sd/overwrite/6o4
+
+source test_driver/src_dst_overwrite.sh
+
+test_src_dst_overwrite ping6 "6:0:2::2"
--- /dev/null
+#!/usr/bin/env bash
+
+# Test LISP source/destination feature (ip4 over ip4)
+
+VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/sd/l2o4
+ODL_CONFIG_DIR=`pwd`/../configs/odl/sd/l2o4
+
+source test_driver/src_dst.sh
+
+test_src_dst_l2 ping "6.0.10.22"
--- /dev/null
+#!/usr/bin/env bash
+
+# Test for overwriting remote mappings from the LISP map-cache
+
+VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/sd/overwrite/4o4
+ODL_CONFIG_DIR=`pwd`/../configs/odl/sd/overwrite_superset/4o4
+
+source test_driver/src_dst_overwrite.sh
+
+test_src_dst_overwrite ping "6.0.2.2"
--- /dev/null
+#!/usr/bin/env bash
+
+# Test for overwriting remote mappings from the LISP map-cache
+
+VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/sd/overwrite/6o4
+ODL_CONFIG_DIR=`pwd`/../configs/odl/sd/overwrite_superset/6o4
+
+source test_driver/src_dst_overwrite.sh
+
+test_src_dst_overwrite ping6 "6:0:2::2"
--- /dev/null
+#!/usr/bin/env bash
+
+# +--------+
+# | |
+# 6.0.10.25 | MR |
+# 08:55:55:55:55:55 | |
+# + +--------+
+# | |6.0.3.100
+# 6:0:1::2 |vpp8 |6:0:3::100
+# 6.0.1.2 vpp1 +-+------+ | +--------+
+# +---------+ |xtr1 | xtr2 | |vpp2
+# | VPP1 +----------+---------+ VPP2 +---------+
+# +---------+ | | | | 6.0.2.2
+# 6.0.5.5 vpp3 +-+------+ | +-----+--+ 6:0:2::2
+# 6:0:5::5 |vpp5 |xtr3 |vpp7
+# | +--------+ |
+# + | | + 6.0.10.22
+# 6.0.10.21 | VPP3 | 08:22:22:22:22:22
+# 08:11:11:11:11:11 | |
+# +-+----+-+
+# vpp6| |vpp4
+# | |
+# | +6.0.2.2
+# + 6:0:2::2
+# 6.0.10.22
+# 08:22:22:22:22:22
+#
+
+
+function 3_node_star_topo_clean
+{
+ echo "Clearing all VPP instances.."
+ pkill vpp --signal 9
+
+ rm /dev/shm/*
+
+ echo "Cleaning 3 node star topology..."
+ ip netns exec xtr-ns ifconfig vppbr1 down
+ ip netns exec xtr-ns brctl delbr vppbr1
+ ip link del dev vpp1 &> /dev/null
+ ip link del dev vpp2 &> /dev/null
+ ip link del dev vpp3 &> /dev/null
+ ip link del dev vpp4 &> /dev/null
+ ip link del dev vpp5 &> /dev/null
+ ip link del dev vpp6 &> /dev/null
+ ip link del dev vpp7 &> /dev/null
+ ip link del dev vpp8 &> /dev/null
+ ip link del dev xtr1 &> /dev/null
+ ip link del dev xtr2 &> /dev/null
+ ip link del dev xtr3 &> /dev/null
+ ip link del dev odl &> /dev/null
+
+ ip netns del vpp-ns1 &> /dev/null
+ ip netns del vpp-ns2 &> /dev/null
+ ip netns del vpp-ns3 &> /dev/null
+ ip netns del vpp-ns4 &> /dev/null
+ ip netns del vpp-ns5 &> /dev/null
+ ip netns del vpp-ns6 &> /dev/null
+ ip netns del vpp-ns7 &> /dev/null
+ ip netns del vpp-ns8 &> /dev/null
+ ip netns del xtr-ns &> /dev/null
+
+ odl_clear_all
+}
+
+function set_arp
+{
+ mac1=`ip netns exec vpp-ns5 ip a show dev veth_vpp5 | grep "link/ether" | awk '{print $2}'`
+ ip netns exec vpp-ns6 arp -s 6.0.10.21 $mac1
+
+ mac2=`ip netns exec vpp-ns8 ip a show dev veth_vpp8 | grep "link/ether" | awk '{print $2}'`
+ ip netns exec vpp-ns7 arp -s 6.0.10.25 $mac2
+
+ mac3=`ip netns exec vpp-ns7 ip a show dev veth_vpp7 | grep "link/ether" | awk '{print $2}'`
+ ip netns exec vpp-ns5 arp -s 6.0.10.22 $mac3
+ ip netns exec vpp-ns8 arp -s 6.0.10.22 $mac3
+}
+
+function 3_node_star_topo_setup
+{
+ ip netns add vpp-ns1
+ ip netns add vpp-ns2
+ ip netns add vpp-ns3
+ ip netns add vpp-ns4
+ ip netns add vpp-ns5
+ ip netns add vpp-ns6
+ ip netns add vpp-ns7
+ ip netns add vpp-ns8
+ ip netns add xtr-ns
+
+ ip link add veth_xtr1 type veth peer name xtr1
+ ip link add veth_xtr2 type veth peer name xtr2
+ ip link add veth_xtr3 type veth peer name xtr3
+ ip link add veth_odl type veth peer name odl
+ ip link set dev xtr1 up
+ ip link set dev xtr2 up
+ ip link set dev xtr3 up
+ ip link set dev odl up
+
+ ip link set dev veth_xtr1 up netns xtr-ns
+ ip link set dev veth_xtr2 up netns xtr-ns
+ ip link set dev veth_xtr3 up netns xtr-ns
+ ip link set dev veth_odl up netns xtr-ns
+
+ ip netns exec xtr-ns brctl addbr vppbr1
+ ip netns exec xtr-ns brctl addif vppbr1 veth_xtr1
+ ip netns exec xtr-ns brctl addif vppbr1 veth_xtr2
+ ip netns exec xtr-ns brctl addif vppbr1 veth_xtr3
+ ip netns exec xtr-ns brctl addif vppbr1 veth_odl
+ ip netns exec xtr-ns ifconfig vppbr1 up
+
+ ip link add veth_vpp1 type veth peer name vpp1
+ ip link set dev vpp1 up
+ ip link set dev veth_vpp1 up netns vpp-ns1
+
+ ip netns exec vpp-ns1 \
+ bash -c "
+ ip link set dev lo up
+ ip addr add 6.0.1.2/24 dev veth_vpp1
+ ip addr add 6:0:1::2/64 dev veth_vpp1
+ ip route add 6.0.2.0/24 via 6.0.1.1
+ ip route add 6:0:2::0/64 via 6:0:1::1
+ "
+
+ ip link add veth_vpp2 type veth peer name vpp2
+ ip link set dev vpp2 up
+ ip link set dev veth_vpp2 up netns vpp-ns2
+
+ ip netns exec vpp-ns2 \
+ bash -c "
+ ip link set dev lo up
+ ip addr add 6.0.2.2/24 dev veth_vpp2
+ ip addr add 6:0:2::2/64 dev veth_vpp2
+ ip route add 6.0.1.0/24 via 6.0.2.1
+ ip route add 6:0:1::0/64 via 6:0:2::1
+ "
+
+ ip link add veth_vpp3 type veth peer name vpp3
+ ip link set dev vpp3 up
+ ip link set dev veth_vpp3 up netns vpp-ns3
+
+ ip netns exec vpp-ns3 \
+ bash -c "
+ ip link set dev lo up
+ ip addr add 6.0.5.5/24 dev veth_vpp3
+ ip addr add 6:0:5::5/64 dev veth_vpp3
+ ip route add 6.0.2.0/24 via 6.0.5.1
+ ip route add 6:0:2::0/64 via 6:0:5::1
+ "
+
+ ip link add veth_vpp4 type veth peer name vpp4
+ ip link set dev vpp4 up
+ ip link set dev veth_vpp4 up netns vpp-ns4
+
+ ip netns exec vpp-ns4 \
+ bash -c "
+ ip link set dev lo up
+ ip addr add 6.0.2.2/24 dev veth_vpp4
+ ip addr add 6:0:2::2/64 dev veth_vpp4
+ ip route add 6.0.5.0/24 via 6.0.2.1
+ ip route add 6:0:5::0/64 via 6:0:2::1
+ "
+
+ ip link add veth_vpp5 type veth peer name vpp5
+ ip link set dev vpp5 up
+ ip link set dev veth_vpp5 address 08:11:11:11:11:11
+ ip link set dev veth_vpp5 up netns vpp-ns5
+
+ ip netns exec vpp-ns5 \
+ bash -c "
+ ip link set dev lo up
+ ip addr add 6.0.10.21/24 dev veth_vpp5
+ "
+
+ ip link add veth_vpp6 type veth peer name vpp6
+ ip link set dev vpp6 up
+ ip link set dev veth_vpp6 address 08:22:22:22:22:22
+ ip link set dev veth_vpp6 up netns vpp-ns6
+
+ ip netns exec vpp-ns6 \
+ bash -c "
+ ip link set dev lo up
+ ip addr add 6.0.10.22/24 dev veth_vpp6
+ "
+
+ ip link add veth_vpp7 type veth peer name vpp7
+ ip link set dev vpp7 up
+ ip link set dev veth_vpp7 address 08:22:22:22:22:22
+ ip link set dev veth_vpp7 up netns vpp-ns7
+
+ ip netns exec vpp-ns7 \
+ bash -c "
+ ip link set dev lo up
+ ip addr add 6.0.10.22/24 dev veth_vpp7
+ "
+
+ ip link add veth_vpp8 type veth peer name vpp8
+ ip link set dev vpp8 up
+ ip link set dev veth_vpp8 address 08:55:55:55:55:55
+ ip link set dev veth_vpp8 up netns vpp-ns8
+
+ ip netns exec vpp-ns8 \
+ bash -c "
+ ip link set dev lo up
+ ip addr add 6.0.10.25/24 dev veth_vpp8
+ "
+
+ ip addr add 6.0.3.100/24 dev odl
+ ip addr add 6:0:3::100/64 dev odl
+ ethtool --offload odl rx off tx off
+maybe_pause
+ # generate config files
+ ./scripts/generate_config.py ${VPP_LITE_CONF} ${CFG_METHOD}
+
+ start_vpp 5002 vpp1
+ start_vpp 5003 vpp2
+ start_vpp 5004 vpp3
+
+ echo "* Selected configuration method: $CFG_METHOD"
+ if [ "$CFG_METHOD" == "cli" ] ; then
+ echo "exec ${VPP_LITE_CONF}/vpp1.cli" | nc 0 5002
+ echo "exec ${VPP_LITE_CONF}/vpp2.cli" | nc 0 5003
+ echo "exec ${VPP_LITE_CONF}/vpp3.cli" | nc 0 5004
+ elif [ "$CFG_METHOD" == "vat" ] ; then
+ sleep 2
+ ${VPP_API_TEST} chroot prefix vpp1 script in ${VPP_LITE_CONF}/vpp1.vat
+ ${VPP_API_TEST} chroot prefix vpp2 script in ${VPP_LITE_CONF}/vpp2.vat
+ ${VPP_API_TEST} chroot prefix vpp3 script in ${VPP_LITE_CONF}/vpp3.vat
+ else
+ echo "=== WARNING:"
+ echo "=== Invalid configuration method selected!"
+ echo "=== To resolve this set env variable CFG_METHOD to vat or cli."
+ echo "==="
+ fi
+
+ post_curl "add-mapping" ${ODL_CONFIG_FILE1}
+ post_curl "add-mapping" ${ODL_CONFIG_FILE2}
+
+ set_arp
+}
start_vpp 5002 vpp1
start_vpp 5003 vpp2
+ maybe_pause
+
echo "* Selected configuration method: $CFG_METHOD"
if [ "$CFG_METHOD" == "cli" ] ; then
echo "exec ${VPP_LITE_CONF}/vpp1.cli" | nc 0 5002
+++ /dev/null
-#!/usr/bin/env bash
-
-function rtr_single_iface_clean {
- echo "Clearing all VPP instances.."
- pkill vpp --signal 9
-
- rm /dev/shm/*
-
- echo "Cleaning RTR topology.."
- ip netns exec xtr-rtr-ns ifconfig vppbr1 down
- ip netns exec xtr-rtr-ns brctl delbr vppbr1
- ip link del dev vpp1 &> /dev/null
- ip link del dev vpp2 &> /dev/null
- ip link del dev xtr_rtr1 &> /dev/null
- ip link del dev xtr_rtr2 &> /dev/null
- ip link del dev xtr_rtr3 &> /dev/null
- ip link del dev odl &> /dev/null
-
- ip netns del vpp-ns1 &> /dev/null
- ip netns del vpp-ns2 &> /dev/null
- ip netns del xtr-rtr-ns &> /dev/null
-
- odl_clear_all
-}
-
-function rtr_single_iface_setup {
- ip netns add vpp-ns1
- ip netns add vpp-ns2
- ip netns add xtr-rtr-ns
-
- ip link add veth_xtr_rtr1 type veth peer name xtr_rtr1
- ip link add veth_xtr_rtr2 type veth peer name xtr_rtr2
- ip link add veth_xtr_rtr3 type veth peer name xtr_rtr3
- ip link add veth_odl type veth peer name odl
- ip link set dev xtr_rtr1 up
- ip link set dev xtr_rtr2 up
- ip link set dev xtr_rtr3 up
- ip link set dev odl up
-
- ip link set dev veth_xtr_rtr1 up netns xtr-rtr-ns
- ip link set dev veth_xtr_rtr2 up netns xtr-rtr-ns
- ip link set dev veth_xtr_rtr3 up netns xtr-rtr-ns
- ip link set dev veth_odl up netns xtr-rtr-ns
-
- ip netns exec xtr-rtr-ns brctl addbr vppbr1
- ip netns exec xtr-rtr-ns brctl addif vppbr1 veth_xtr_rtr1
- ip netns exec xtr-rtr-ns brctl addif vppbr1 veth_xtr_rtr2
- ip netns exec xtr-rtr-ns brctl addif vppbr1 veth_xtr_rtr3
- ip netns exec xtr-rtr-ns brctl addif vppbr1 veth_odl
- ip netns exec xtr-rtr-ns ifconfig vppbr1 up
-
- ip link add veth_vpp1 type veth peer name vpp1
- ip link set dev vpp1 up
- ip link set dev veth_vpp1 up netns vpp-ns1
-
- ip netns exec vpp-ns1 \
- bash -c "
- ip link set dev lo up
- ip addr add 6.0.2.2/24 dev veth_vpp1
- ip addr add 6:0:2::2/64 dev veth_vpp1
- ip route add 6.0.4.0/24 via 6.0.2.1
- ip route add 6:0:4::0/64 via 6:0:2::1
- "
-
- ip link add veth_vpp2 type veth peer name vpp2
- ip link set dev vpp2 up
- ip link set dev veth_vpp2 up netns vpp-ns2
-
- ip netns exec vpp-ns2 \
- bash -c "
- ip link set dev lo up
- ip addr add 6.0.4.4/24 dev veth_vpp2
- ip addr add 6:0:4::4/64 dev veth_vpp2
- ip route add 6.0.2.0/24 via 6.0.4.1
- ip route add 6:0:2::0/64 via 6:0:4::1
- "
-
- ip addr add 6.0.3.100/24 dev odl
- ip addr add 6:0:3::100/64 dev odl
- ethtool --offload odl rx off tx off
-
- # generate config files
- ./scripts/generate_config.py ${VPP_LITE_CONF} ${CFG_METHOD}
-
- start_vpp 5002 vpp1
- start_vpp 5003 vpp2
- start_vpp 5004 vpp3
-
- echo "* Selected configuration method: $CFG_METHOD"
- if [ "$CFG_METHOD" == "cli" ] ; then
- echo "exec ${VPP_LITE_CONF}/vpp1.cli" | nc 0 5002
- echo "exec ${VPP_LITE_CONF}/vpp2.cli" | nc 0 5003
- echo "exec ${VPP_LITE_CONF}/vpp3.cli" | nc 0 5004
- elif [ "$CFG_METHOD" == "vat" ] ; then
- sleep 2
- ${VPP_API_TEST} chroot prefix vpp1 script in ${VPP_LITE_CONF}/vpp1.vat
- ${VPP_API_TEST} chroot prefix vpp2 script in ${VPP_LITE_CONF}/vpp2.vat
- ${VPP_API_TEST} chroot prefix vpp3 script in ${VPP_LITE_CONF}/vpp3.vat
- else
- echo "=== WARNING:"
- echo "=== Invalid configuration method selected!"
- echo "=== To resolve this set env variable CFG_METHOD to vat or cli."
- echo "==="
- fi
-
- post_curl "add-mapping" ${ODL_CONFIG_FILE1}
- post_curl "add-mapping" ${ODL_CONFIG_FILE2}
-}