summaryrefslogtreecommitdiffstats
path: root/src/scripts/vnet/l2tp
blob: e9a73d579b70c35342ebc28543ad479266c03178 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
set int ip address GigabitEthernet2/1/0 1.2.3.4/24
set int state GigabitEthernet2/1/0 up 
set int state tuntap-0 down


cre sub GigabitEthernet2/1/0 1 dot1q 1 
cre sub GigabitEthernet2/1/0 2 dot1q 2 
cre sub GigabitEthernet2/1/0 3 dot1q 3
cre sub GigabitEthernet2/2/0 1 dot1q 1 
cre sub GigabitEthernet2/2/0 100 dot1q 100 


set int l2 tag-rewrite GigabitEthernet2/1/0.1 pop 1
set int l2 tag-rewrite GigabitEthernet2/1/0.2 pop 1


l2tp session add client 11::1 our 22::2 l2-interface GigabitEthernet2/1/0.1
l2tp session add client 11::1 our 22::3 l2-interface GigabitEthernet2/1/0.2 local-session-id 2 l2-sublayer-present

ip route 11::1/128 via GigabitEthernet2/2/0
set ip neighbor GigabitEthernet2/2/0 11::1 00:02:04:06:08:0a

enable ip6 interface GigabitEthernet2/2/0 

set int ip6 l2tpv3 GigabitEthernet2/2/0

set int state GigabitEthernet2/1/0 up
set int state GigabitEthernet2/1/0.1 up
set int state GigabitEthernet2/1/0.2 up
set int state GigabitEthernet2/1/0.3 up
set int state GigabitEthernet2/2/0 up


trace add pg-input 2

clear error
clear run
clear int

packet-generator new {
  name decap
  limit 10
  size 200-200
  node ethernet-input
  interface GigabitEthernet2/2/0
  data {
      IP6: 00:50:00:00:00:01 -> 00:50:56:b7:29:7a 
      L2TP: 11::1 -> 22::2 
      L2TP: session_id 1 cookie 0xffffffffffffffff 
      IP4: 00:55:55:55:00:01 -> 00:dd:dd:dd:00:01
      UDP: 1.2.3.4 -> 5.6.7.8
      incrementing 8
  }
}

packet-generator new {
  name decap_bad_sid
  limit 30
  size 200-200
  node ethernet-input
  interface GigabitEthernet2/2/0
  data {
      IP6: 00:50:00:00:00:01 -> 00:50:56:b7:29:7a 
      L2TP: 11::1 -> 22::2 
      L2TP: session_id 0x999 cookie 0xffffffffffffffff
      IP4: 00:55:55:55:00:01 -> 00:dd:dd:dd:00:01
      UDP: 1.2.3.4 -> 5.6.7.8
      incrementing 8
  }
}

packet-generator new {
  name decap_bad_cookie
  limit 50
  size 200-200
  node ethernet-input
  interface GigabitEthernet2/2/0
  data {
      IP6: 00:50:00:00:00:01 -> 00:50:56:b7:29:7a 
      L2TP: 11::1 -> 22::2 
      L2TP: session_id 1 cookie 0x3333ffffffffffff
      IP4: 00:55:55:55:00:01 -> 00:dd:dd:dd:00:01
      UDP: 1.2.3.4 -> 5.6.7.8
      incrementing 8
  }
}

packet-generator new {
  name encap
  limit 100
  node ethernet-input
  interface GigabitEthernet2/1/0
  data {
      IP4: 0000.5555.0002 -> 00:00:dd:dd:00:02 vlan 1
      UDP: 1.2.3.4 -> 5.6.7.8
      incrementing 8
  }
}

packet-generator new {
  name decap_sublayer
  limit 300
  size 200-200
  node ethernet-input
  interface GigabitEthernet2/2/0
  data {
      IP6: 00:50:00:00:00:01 -> 00:50:56:b7:29:7a 
      L2TP: 11::1 -> 22::3
      L2TP: session_id 2 cookie 0xffffffffffffffff l2_sublayer 0
      IP4: 00:55:55:55:00:01 -> 00:dd:dd:dd:00:01
      UDP: 1.2.3.4 -> 5.6.7.8
      incrementing 8
  }
}

packet-generator new {
  name encap_sublayer
  limit 700
  node ethernet-input
  interface GigabitEthernet2/1/0
  data {
      IP4: 0000.5555.0002 -> 00:00:dd:dd:00:02 vlan 2
      UDP: 1.2.3.4 -> 5.6.7.8
      incrementing 8
  }
}
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
# DISCLAIMER: BEFORE EDITING THIS FILE!
#
# This file has two closely related consequences. The common part is that this
# file defines the content of virtual Python environment used when Robot tests
# are running.
#
# But the virtual environment is also being created on containerized
# environment created by either Nomad cluster (Jenkins, vpp_device) or during
# execution on SUT machines, which might have specific restrictions.
#
# Complete package and setting snapshot (for all container images),
# with network being limited to local only. This implies pip currently being
# set to site-packages only. So if the "container image" applied on the machine
# does not reflect the edits, some installations might fail.
# Even if the failure may not directly impact execution, this leads into
# inconsistency between installed environment and the code base which may lead
# into fatal error or uncaught exceptions.
#
# CSIT Core dependencies
ecdsa==0.13.3
paramiko==2.6.0
pycrypto==2.6.1
pypcap==1.2.3
PyYAML==5.1.1
requests==2.25.1
robotframework==3.1.2
scapy==2.4.3
scp==0.13.2

# IaaC dependencies
ansible==2.10.7

# PLRsearch dependencies
dill==0.3.3
numpy==1.17.3
scipy==1.5.4

# PAL/DOC dependencies
boto3==1.17.78
botocore==1.20.78
hdrhistogram==0.6.1
pandas==0.25.3
plotly==4.1.1
PTable==0.9.2
Sphinx==3.5.4
sphinx-rtd-theme==0.5.2
sphinxcontrib-programoutput==0.17
sphinxcontrib-robotdoc==0.11.0

# VPP requirements
ply==3.11

# PIP freeze dependencies
alabaster==0.7.12
Babel==2.9.0
bcrypt==3.1.7
certifi==2020.12.5
cffi==1.13.2
chardet==4.0.0
cryptography==2.8
docutils==0.16
future==0.18.2
idna==2.10
imagesize==1.2.0
Jinja2==2.11.3
MarkupSafe==1.1.1
packaging==20.9
pbr==5.5.1
pycparser==2.19
Pygments==2.8.1
PyNaCl==1.3.0
pyparsing==2.4.7
python-dateutil==2.8.1
pytz==2021.1
retrying==1.3.3
six==1.15.0
snowballstemmer==2.1.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==1.0.3
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.4
urllib3==1.25.6