summaryrefslogtreecommitdiffstats
path: root/src/scripts
diff options
context:
space:
mode:
authorPablo Camarillo <pcamaril@cisco.com>2017-04-24 17:51:56 +0200
committerNeale Ranns <nranns@cisco.com>2017-05-05 11:38:39 +0000
commit5d73eecd63018db69b10bf56adeec9cc5cf92790 (patch)
tree5fc242e79737b2a95a75d44bfbde3d4d91db4c9f /src/scripts
parenta774b53623f60b5e8ea8ed634d6a41e847743715 (diff)
First commit SR MPLS
Change-Id: I961685a2a0e4c314049444c64eb6ccf877c278dd Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
Diffstat (limited to 'src/scripts')
-rwxr-xr-xsrc/scripts/vnet/sr/left-linux-ping.sh3
-rw-r--r--src/scripts/vnet/sr/leftpeer.conf27
-rw-r--r--src/scripts/vnet/sr/mcast58
-rwxr-xr-xsrc/scripts/vnet/sr/right-linux-ping.sh4
-rw-r--r--src/scripts/vnet/sr/rightpeer.conf22
-rw-r--r--src/scripts/vnet/sr/sr_mpls11
-rwxr-xr-xsrc/scripts/vnet/sr/srlocal.sh4
7 files changed, 11 insertions, 118 deletions
diff --git a/src/scripts/vnet/sr/left-linux-ping.sh b/src/scripts/vnet/sr/left-linux-ping.sh
deleted file mode 100755
index 55b835063c7..00000000000
--- a/src/scripts/vnet/sr/left-linux-ping.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-ifconfig eth2 inet6 add db02::1/64
-route -A inet6 add db04::1/128 gw db02::2
diff --git a/src/scripts/vnet/sr/leftpeer.conf b/src/scripts/vnet/sr/leftpeer.conf
deleted file mode 100644
index 9591d968b8b..00000000000
--- a/src/scripts/vnet/sr/leftpeer.conf
+++ /dev/null
@@ -1,27 +0,0 @@
-comment { test sr segment chunk-offset on }
-test sr hmac validate on
-
-comment { trunk to rightpeer }
-set int ip address GigabitEthernet2/3/0 db03::2/64
-enable ip6 interface GigabitEthernet2/3/0
-set int state GigabitEthernet2/3/0 up
-
-comment { subscriber left-linux-ping }
-set int ip address GigabitEthernet2/2/0 db02::2/64
-enable ip6 interface GigabitEthernet2/2/0
-set int state GigabitEthernet2/2/0 up
-
-sr hmac id 2 key Gozzer
-sr hmac id 3 key Hoser
-
-sr tunnel src db01::1 dst db04::1/128 next db03::1 next db04::1 tag db02::2 clean key Gozzer InPE 1
-
-comment { sr unaware service chaining to db03::5 }
-comment { sr tunnel src db01::1 dst db04::1/128 next db03::1 next db03::5 next db04::1 tag db02::2 clean key Gozzer InPE 1 }
-
-comment { tap connect srlocal hwaddr random }
-comment { set int ip6 table tap-0 1 }
-comment { set int ip address tap-0 db04::99/64 }
-comment { enable ip6 interface tap-0 }
-comment { set int state tap-0 up }
-comment { ip route add table 1 db02::0/64 lookup in table 0 }
diff --git a/src/scripts/vnet/sr/mcast b/src/scripts/vnet/sr/mcast
deleted file mode 100644
index 50e73efabb4..00000000000
--- a/src/scripts/vnet/sr/mcast
+++ /dev/null
@@ -1,58 +0,0 @@
-
-loop create
-loop create
-loop create
-loop create
-
-set int state loop0 up
-set int state loop1 up
-set int state loop2 up
-set int state loop3 up
-
-set int ip address loop0 2001::1/64
-set int ip address loop1 2001:1::1/64
-set int ip address loop2 2001:2::1/64
-set int ip address loop3 2001:3::1/64
-
-set ip6 neighbor loop1 2001:1::2 00:00:dd:ee:cc:d1
-set ip6 neighbor loop2 2001:2::2 00:00:dd:ee:cc:d2
-set ip6 neighbor loop3 2001:3::2 00:00:dd:ee:cc:d3
-
-ip route 3001::1/128 via 2001:1::2 loop1
-ip route 3001::2/128 via 2001:2::2 loop2
-ip route 3001::3/128 via 2001:3::2 loop3
-
-sr tunnel name SR1 src aaaa::2:1 dst ff19::1/128 next 3001::1 clean
-sr tunnel name SR2 src aaaa::2:2 dst ff19::2/128 next 3001::2 clean
-sr tunnel name SR3 src aaaa::2:3 dst ff19::3/128 next 3001::3 clean
-
-sr policy name MCAST1 tunnel SR1 tunnel SR2 tunnel SR3
-
-sr multicast-map address ff18::1 sr-policy MCAST1
-
-packet-generator new {
- name x
- limit 1
- node ethernet-input
- size 64-64
- no-recycle
- data {
- IP6: 1.2.3 -> 4.5.6
- ICMP: 3002::2 -> ff18::1
- ICMP echo_request
- incrementing 100
- }
-}
-trace add pg-input 100
-
-sr multicast-map del address ff18::1 sr-policy MCAST1
-sr policy del name MCAST1 tunnel SR1 tunnel SR2 tunnel SR3
-
-ip route del 3001::1/128 via 2001:1::2 loop1
-ip route del 3001::2/128 via 2001:2::2 loop2
-ip route del 3001::3/128 via 2001:3::2 loop3
-
-sr tunnel del name SR1 src aaaa::2:1 dst ff19::1/128 next 3001::1 clean
-sr tunnel del name SR2 src aaaa::2:2 dst ff19::2/128 next 3001::2 clean
-sr tunnel del name SR3 src aaaa::2:3 dst ff19::3/128 next 3001::3 clean
-
diff --git a/src/scripts/vnet/sr/right-linux-ping.sh b/src/scripts/vnet/sr/right-linux-ping.sh
deleted file mode 100755
index 029368dbb8b..00000000000
--- a/src/scripts/vnet/sr/right-linux-ping.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-ifconfig eth1 inet6 add db04::1/64
-route -A inet6 add db02::1/128 gw db04::2
diff --git a/src/scripts/vnet/sr/rightpeer.conf b/src/scripts/vnet/sr/rightpeer.conf
deleted file mode 100644
index 6da7a7afd05..00000000000
--- a/src/scripts/vnet/sr/rightpeer.conf
+++ /dev/null
@@ -1,22 +0,0 @@
-comment { trunk to leftpeer }
-set int ip address GigabitEthernet2/0/0 db03::1/64
-enable ip6 interface GigabitEthernet2/0/0
-set int state GigabitEthernet2/0/0 up
-
-comment { subscriber right-linux-ping }
-set int ip address GigabitEthernet2/2/0 db04::2/64
-
-comment { next address to fake out ND on shared LAN segment }
-set int ip address GigabitEthernet2/2/0 db02::13/64
-
-enable ip6 interface GigabitEthernet2/2/0
-set int state GigabitEthernet2/2/0 up
-
-sr tunnel src db04::1 dst db02::1/128 next db03::2 next db02::1 tag db04::2 clean
-
-tap connect srlocal hwaddr random
-set int ip6 table tap-0 1
-set int ip address tap-0 db04::99/64
-enable ip6 interface tap-0
-set int state tap-0 up
-ip route add table 1 db02::0/64 lookup in table 0
diff --git a/src/scripts/vnet/sr/sr_mpls b/src/scripts/vnet/sr/sr_mpls
new file mode 100644
index 00000000000..4646372a346
--- /dev/null
+++ b/src/scripts/vnet/sr/sr_mpls
@@ -0,0 +1,11 @@
+set interface mpls local0 enable
+sr mpls policy add bsid 20001 next 16001 next 16002 next 16003
+sr mpls steer l3 a::/112 via sr policy bsid 20001
+
+loop create
+set int state loop0 up
+
+set int ip address loop0 11.0.0.1/24
+set ip arp loop0 11.0.0.2 00:00:11:aa:bb:cc
+
+mpls local-label 16001 via 11.0.0.2 loop0 out-label 16001
diff --git a/src/scripts/vnet/sr/srlocal.sh b/src/scripts/vnet/sr/srlocal.sh
deleted file mode 100755
index 2f568408b94..00000000000
--- a/src/scripts/vnet/sr/srlocal.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-ifconfig srlocal inet6 add db04::1/64
-route -6 add db02::0/64 gw db04::99