summaryrefslogtreecommitdiffstats
path: root/src/scripts/vnet/rewrite
blob: d05ce89e6b824fbb3374b80ee120aa7f036359de (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
comment { test ipv4 port/vlan/qinq rewrites by generating arps }

set int state tuntap-0 down

set int ip address GigabitEthernet2/2/0 1.2.5.4/24

cre sub GigabitEthernet2/2/0 1 dot1q 6 exact-match
set int ip address GigabitEthernet2/2/0.1 1.2.6.4/24

cre sub GigabitEthernet2/2/0 2 dot1ad 7 inner-dot1q 8 exact-match
set int ip address GigabitEthernet2/2/0.2 1.2.7.4/24

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

trace add pg-input 2

cle er
cle int
cle run

packet-generator new {
  name toport
  limit 2
  node ethernet-input
  interface GigabitEthernet2/1/0
  data {
      IP4: 0050.56b7.7c83 -> 0050.56b7.296d 
      GRE: 8.0.0.1 -> 1.2.5.6 mpls_unicast 
  }
}

packet-generator new {
  name tovlan
  limit 2
  node ethernet-input
  interface GigabitEthernet2/1/0
  data {
      IP4: 0050.56b7.7c83 -> 0050.56b7.296d 
      GRE: 8.0.0.1 -> 1.2.6.6 mpls_unicast 
  }
}

packet-generator new {
  name toqinq
  limit 2
  node ethernet-input
  interface GigabitEthernet2/1/0
  data {
      IP4: 0050.56b7.7c83 -> 0050.56b7.296d 
      GRE: 8.0.0.1 -> 1.2.7.6 mpls_unicast 
  }
}