From 7e55d364fd88bb462c7211209f5cbb5bbae3a68c Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Sat, 14 May 2016 18:38:48 -0400 Subject: VPP-63: clean up config scripts, remove specific hostnames Change-Id: Ifb77256fa691b1a90045a10448835c09b764e74f Signed-off-by: Dave Barach --- vnet/etc/scripts/leftpeer/leftpeer-classify | 8 ++++++++ vnet/etc/scripts/leftpeer/leftpeer-classify6 | 5 +++++ vnet/etc/scripts/leftpeer/leftpeer-classifyl2 | 8 ++++++++ vnet/etc/scripts/leftpeer/leftpeer-dhcp | 23 +++++++++++++++++++++++ vnet/etc/scripts/leftpeer/leftpeer-ioam.conf | 15 +++++++++++++++ vnet/etc/scripts/leftpeer/leftpeer-l3vxlan.conf | 12 ++++++++++++ vnet/etc/scripts/leftpeer/leftpeer-lisp.conf | 18 ++++++++++++++++++ vnet/etc/scripts/leftpeer/leftpeer-mpls.conf | 17 +++++++++++++++++ vnet/etc/scripts/leftpeer/leftpeer-nsh.conf | 18 ++++++++++++++++++ vnet/etc/scripts/leftpeer/leftpeer-sr.conf | 24 ++++++++++++++++++++++++ vnet/etc/scripts/leftpeer/leftpeer-vxlan.conf | 17 +++++++++++++++++ vnet/etc/scripts/leftpeer/leftpeer-vxnsh.conf | 18 ++++++++++++++++++ vnet/etc/scripts/leftpeer/leftpeer.script | 9 +++++++++ 13 files changed, 192 insertions(+) create mode 100755 vnet/etc/scripts/leftpeer/leftpeer-classify create mode 100644 vnet/etc/scripts/leftpeer/leftpeer-classify6 create mode 100644 vnet/etc/scripts/leftpeer/leftpeer-classifyl2 create mode 100644 vnet/etc/scripts/leftpeer/leftpeer-dhcp create mode 100644 vnet/etc/scripts/leftpeer/leftpeer-ioam.conf create mode 100644 vnet/etc/scripts/leftpeer/leftpeer-l3vxlan.conf create mode 100644 vnet/etc/scripts/leftpeer/leftpeer-lisp.conf create mode 100644 vnet/etc/scripts/leftpeer/leftpeer-mpls.conf create mode 100644 vnet/etc/scripts/leftpeer/leftpeer-nsh.conf create mode 100644 vnet/etc/scripts/leftpeer/leftpeer-sr.conf create mode 100644 vnet/etc/scripts/leftpeer/leftpeer-vxlan.conf create mode 100644 vnet/etc/scripts/leftpeer/leftpeer-vxnsh.conf create mode 100644 vnet/etc/scripts/leftpeer/leftpeer.script (limited to 'vnet/etc/scripts/leftpeer') diff --git a/vnet/etc/scripts/leftpeer/leftpeer-classify b/vnet/etc/scripts/leftpeer/leftpeer-classify new file mode 100755 index 00000000000..74285912aeb --- /dev/null +++ b/vnet/etc/scripts/leftpeer/leftpeer-classify @@ -0,0 +1,8 @@ +classify table mask l2 src l3 ip4 src buckets 2 miss-next local + +comment { classify table mask l3 ip4 src buckets 2 miss-next local } +set ip classify intfc GigabitEthernet2/2/0 table-index 0 +set int ip address GigabitEthernet2/2/0 192.168.1.1/24 +set int state GigabitEthernet2/2/0 up + +classify session hit-next local table-index 0 match l2 src 00:50:56:b7:05:bb l3 ip4 src 192.168.1.2 diff --git a/vnet/etc/scripts/leftpeer/leftpeer-classify6 b/vnet/etc/scripts/leftpeer/leftpeer-classify6 new file mode 100644 index 00000000000..6579d50d3c5 --- /dev/null +++ b/vnet/etc/scripts/leftpeer/leftpeer-classify6 @@ -0,0 +1,5 @@ +classify table mask l3 ip6 src buckets 2 miss-next local +set ip6 classify intfc GigabitEthernet2/2/0 table-index 0 +set int ip address GigabitEthernet2/2/0 db01::1/64 +set int state GigabitEthernet2/2/0 up +classify session hit-next local table-index 0 match l3 ip6 src db01::2 diff --git a/vnet/etc/scripts/leftpeer/leftpeer-classifyl2 b/vnet/etc/scripts/leftpeer/leftpeer-classifyl2 new file mode 100644 index 00000000000..6be4b1e52cf --- /dev/null +++ b/vnet/etc/scripts/leftpeer/leftpeer-classifyl2 @@ -0,0 +1,8 @@ +set int ip address GigabitEthernet2/2/0 192.168.1.1/24 +set int state GigabitEthernet2/2/0 up + +classify table mask l3 ip4 src buckets 2 l2-miss-next ethernet + +classify session advance 14 l2-hit-next ip4 table-index 0 match l3 ip4 src 192.168.1.2 + +set int l2 class intfc GigabitEthernet2/2/0 ip4-table 0 diff --git a/vnet/etc/scripts/leftpeer/leftpeer-dhcp b/vnet/etc/scripts/leftpeer/leftpeer-dhcp new file mode 100644 index 00000000000..c13a8f3aa5e --- /dev/null +++ b/vnet/etc/scripts/leftpeer/leftpeer-dhcp @@ -0,0 +1,23 @@ +loop cre +set int ip table loop0 12 +set int ip address loop0 192.168.1.1/24 +set int state loop0 up + +set int ip table GigabitEthernet2/2/0 12 +comment { set int ip address GigabitEthernet2/2/0 192.168.1.1/24 } +set int unnumbered GigabitEthernet2/2/0 use loop0 +set int state GigabitEthernet2/2/0 up + +set int ip table GigabitEthernet2/7/0 11 +set int ip address GigabitEthernet2/7/0 192.168.2.1/24 +set int state GigabitEthernet2/7/0 up + +uncomment { set dhcp proxy server 1.2.3.4 src-address 1.2.3.5 add-option-82 rx-fib-id 0 server-fib-id 0 } + +uncomment { set dhcp proxy server 192.168.2.2 src-address 192.168.2.1 add-option-82 rx-fib-id 12 server-fib-id 11 } + +ip route add 0.0.0.0/24 table 11 via local +ip route add 255.255.255.255/24 table 11 via local + +ip route add 0.0.0.0/24 table 12 via local +ip route add 255.255.255.255/24 table 12 via local diff --git a/vnet/etc/scripts/leftpeer/leftpeer-ioam.conf b/vnet/etc/scripts/leftpeer/leftpeer-ioam.conf new file mode 100644 index 00000000000..6c1b502c2f7 --- /dev/null +++ b/vnet/etc/scripts/leftpeer/leftpeer-ioam.conf @@ -0,0 +1,15 @@ +comment { connects to linux ping source eth1 addr db02::2/64 } +set int ip address GigabitEthernet2/2/0 db02::1/64 +set int state GigabitEthernet2/2/0 up + +comment { connects to ioam domain rightpeer eth2 addr db03::3/64 } +set int ip address GigabitEthernet2/3/0 db03::1/64 +set int state GigabitEthernet2/3/0 up + +ioam set rewrite trace-elts 2 pow + +set ip6 neighbor GigabitEthernet2/3/0 db03::3 00:50:56:b7:05:cb + +ip route add db04::0/64 via db03::3 + +ioam set destination db04::0/64 add diff --git a/vnet/etc/scripts/leftpeer/leftpeer-l3vxlan.conf b/vnet/etc/scripts/leftpeer/leftpeer-l3vxlan.conf new file mode 100644 index 00000000000..a75f9b4c8ae --- /dev/null +++ b/vnet/etc/scripts/leftpeer/leftpeer-l3vxlan.conf @@ -0,0 +1,12 @@ +comment { tunnel to rightpeer 6.0.3.3 on vlan 101 } + +set int ip address GigabitEthernet2/3/0 6.0.3.1/24 +set int state GigabitEthernet2/3/0 up + +comment { configure lc2 eth1 at e.g. 6.0.2.2/24 } + +set int ip address GigabitEthernet2/2/0 6.0.2.1/24 +set int state GigabitEthernet2/2/0 up + +vxlan tunnel src 6.0.3.1 peer 6.0.3.3 vni 123 adj 6.0.4.4/24 + diff --git a/vnet/etc/scripts/leftpeer/leftpeer-lisp.conf b/vnet/etc/scripts/leftpeer/leftpeer-lisp.conf new file mode 100644 index 00000000000..cb3180b711d --- /dev/null +++ b/vnet/etc/scripts/leftpeer/leftpeer-lisp.conf @@ -0,0 +1,18 @@ +comment { vpe_phase2 configuration } + +comment { local client facing interface on vlan 100 } +comment { configure lc2 eth1 at e.g. 6.0.2.2/24 } + +set int ip address GigabitEthernet2/2/0 6.0.2.1/24 +set int state GigabitEthernet2/2/0 up + +comment { tunnel to rightpeer on vlan 101 } +set int ip address GigabitEthernet2/3/0 6.0.3.1/24 +set int state GigabitEthernet2/3/0 up + +lisp gpe tunnel src 6.0.3.1 dst 6.0.3.3 next-ip4 decap-next ip4 iid 1133 +set int ip address lisp_gpe_tunnel0 6.0.4.1/24 +set int state lisp_gpe_tunnel0 up + +lisp gpe tunnel src 6.0.3.3 dst 6.0.3.1 next-ip4 decap-next ip4 iid 3311 +set int stat lisp_gpe_tunnel1 up diff --git a/vnet/etc/scripts/leftpeer/leftpeer-mpls.conf b/vnet/etc/scripts/leftpeer/leftpeer-mpls.conf new file mode 100644 index 00000000000..74bce81b190 --- /dev/null +++ b/vnet/etc/scripts/leftpeer/leftpeer-mpls.conf @@ -0,0 +1,17 @@ +comment { vpe_phase2 configuration } + +comment { local client facing interface on vlan 100 } +comment { configure lc2 eth1 at e.g. 6.0.2.2/24 } + +set int ip table GigabitEthernet2/2/0 1 +set int ip address GigabitEthernet2/2/0 6.0.2.1/24 +set int state GigabitEthernet2/2/0 up + +comment { tunnel to rightpeer on vlan 101 } +set int ip address GigabitEthernet2/3/0 6.0.3.1/24 +set int state GigabitEthernet2/3/0 up + +mpls encap add label 30 fib 1 dest 6.0.3.3 +mpls decap add label 30 fib 1 + +create mpls gre tunnel src 6.0.3.1 dst 6.0.3.3 intfc 6.0.4.1/24 inner-fib-id 1 outer-fib-id 0 diff --git a/vnet/etc/scripts/leftpeer/leftpeer-nsh.conf b/vnet/etc/scripts/leftpeer/leftpeer-nsh.conf new file mode 100644 index 00000000000..6397a3816dd --- /dev/null +++ b/vnet/etc/scripts/leftpeer/leftpeer-nsh.conf @@ -0,0 +1,18 @@ +comment { vpe_phase2 configuration } + +comment { local client facing interface on vlan 100 } +comment { configure lc2 eth1 at e.g. 6.0.2.2/24 } + +set int ip address GigabitEthernet2/2/0 6.0.2.1/24 +set int state GigabitEthernet2/2/0 up + +comment { tunnel to rightpeer on vlan 101 } +set int ip address GigabitEthernet2/3/0 6.0.3.1/24 +set int state GigabitEthernet2/3/0 up + +nsh gre tunnel src 6.0.3.1 dst 6.0.3.3 c1 1 c2 2 c3 3 c4 4 spi 1133 si 0 next-ip4 +set int ip address nsh_gre_tunnel0 6.0.4.1/24 +set int state nsh_gre_tunnel0 up + +nsh gre tunnel src 6.0.3.3 dst 6.0.3.1 c1 1 c2 2 c3 3 c4 4 spi 3311 si 0 next-ip4 +set int stat nsh_gre_tunnel1 up diff --git a/vnet/etc/scripts/leftpeer/leftpeer-sr.conf b/vnet/etc/scripts/leftpeer/leftpeer-sr.conf new file mode 100644 index 00000000000..a7b962d3aba --- /dev/null +++ b/vnet/etc/scripts/leftpeer/leftpeer-sr.conf @@ -0,0 +1,24 @@ +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 linux-ping-source } +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 + +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/vnet/etc/scripts/leftpeer/leftpeer-vxlan.conf b/vnet/etc/scripts/leftpeer/leftpeer-vxlan.conf new file mode 100644 index 00000000000..d50e8bf49f3 --- /dev/null +++ b/vnet/etc/scripts/leftpeer/leftpeer-vxlan.conf @@ -0,0 +1,17 @@ +comment { tunnel to rightpeer 6.0.3.3 on vlan 101 } + +set int ip address GigabitEthernet2/3/0 6.0.3.1/24 +set int state GigabitEthernet2/3/0 up + +comment { tunnel to thirdpeer 6.0.5.5 on vlan 105 } +set int ip address GigabitEthernet2/7/0 6.0.5.1/24 +set int state GigabitEthernet2/7/0 up + +comment { configure lc2 eth1 at e.g. 6.0.2.2/24 } + +set int ip address GigabitEthernet2/2/0 6.0.2.1/24 +set int state GigabitEthernet2/2/0 up + +vxlan tunnel src 6.0.3.1 peer 6.0.3.3 peer 6.0.3.5 vni 123 +vxlan l2 GigabitEthernet2/2/0 vni 123 + diff --git a/vnet/etc/scripts/leftpeer/leftpeer-vxnsh.conf b/vnet/etc/scripts/leftpeer/leftpeer-vxnsh.conf new file mode 100644 index 00000000000..69bd9d9de20 --- /dev/null +++ b/vnet/etc/scripts/leftpeer/leftpeer-vxnsh.conf @@ -0,0 +1,18 @@ +comment { vpe_phase2 configuration } + +comment { local client facing interface on vlan 100 } +comment { configure lc2 eth1 at e.g. 6.0.2.2/24 } + +set int ip address GigabitEthernet2/2/0 6.0.2.1/24 +set int state GigabitEthernet2/2/0 up + +comment { tunnel to rightpeer on vlan 101 } +set int ip address GigabitEthernet2/3/0 6.0.3.1/24 +set int state GigabitEthernet2/3/0 up + +nsh vxlan tunnel src 6.0.3.1 dst 6.0.3.3 c1 1 c2 2 c3 3 c4 4 vni 11 spi 1133 si 0 next-ip4 +set int ip address nsh_vxlan_gpe_tunnel0 6.0.4.1/24 +set int state nsh_vxlan_gpe_tunnel0 up + +nsh vxlan tunnel src 6.0.3.3 dst 6.0.3.1 c1 1 c2 2 c3 3 c4 4 vni 33 spi 3311 si 0 next-ip4 +set int stat nsh_vxlan_gpe_tunnel1 up diff --git a/vnet/etc/scripts/leftpeer/leftpeer.script b/vnet/etc/scripts/leftpeer/leftpeer.script new file mode 100644 index 00000000000..f08c809012c --- /dev/null +++ b/vnet/etc/scripts/leftpeer/leftpeer.script @@ -0,0 +1,9 @@ +l2tp_set_lookup_key lookup_v6_src + +sw_interface_add_del_address GigabitEthernet2/3/0 db03::2/64 +sw_interface_set_flags GigabitEthernet2/3/0 admin-up + +comment sw_interface_add_del_address GigabitEthernet2/2/0 db02::2/64 +sw_interface_set_flags GigabitEthernet2/2/0 admin-up + +l2tp_session_add_del client_address db03::1 our_address db03::2 GigabitEthernet2/2/0 local_session_id 1 remote_session_id 3 local_cookie 11 remote_cookie 33 -- cgit 1.2.3-korg