blob: cf55d63c2f279abab7ca152c3fa2df8c758877e6 [file] [log] [blame]
Ed Warnickecb9cada2015-12-08 15:45:58 -07001
2
3set int state tuntap-0 down
4set int ip address GigabitEthernet2/1/0 1.2.3.4/24
5
Damjan Marion3153f002022-05-14 00:14:02 +02006set int state GigabitEthernet2/1/0 up
7cre sub GigabitEthernet2/1/0 1 dot1q 7
Ed Warnickecb9cada2015-12-08 15:45:58 -07008set int state GigabitEthernet2/1/0.1 up
9
10set int state GigabitEthernet2/2/0 up
Damjan Marion3153f002022-05-14 00:14:02 +020011cre sub GigabitEthernet2/2/0 1 dot1q 9
Ed Warnickecb9cada2015-12-08 15:45:58 -070012set int state GigabitEthernet2/2/0.1 up
13
14
15loop create
16set int l2 bridge loop0 0 bvi
17set int ip table loop0 0
18set int state loop0 up
19
20
21set int l2 bridge GigabitEthernet2/1/0.1 0
22set int l2 bridge GigabitEthernet2/2/0.1 0
23
24set int l2 tag-rewrite GigabitEthernet2/1/0.1 pop 1
Damjan Marion3153f002022-05-14 00:14:02 +020025set int l2 tag-rewrite GigabitEthernet2/2/0.1 pop 1
Ed Warnickecb9cada2015-12-08 15:45:58 -070026
27l2fib add 00:22:44:06:08:0a 0 GigabitEthernet2/1/0.1 static
28l2fib add 00:02:04:06:08:0a 0 GigabitEthernet2/2/0.1 static
29
30
31ip route table 0 8.0.0.1/32 via loop0
ShivaShankarKb0f956c2020-03-18 15:34:11 +053032set ip neighbor loop0 8.0.0.1 00:02:04:06:08:0a
Ed Warnickecb9cada2015-12-08 15:45:58 -070033
34
35ip route add 1.2.3.3/32 via GigabitEthernet2/1/0 IP4: 00:15:17:61:73:47 -> 00:15:17:61:73:46
36
37cle er
38cle int
39cle run
40
Damjan Marion3153f002022-05-14 00:14:02 +020041packet-generator new { \
42 name bvi_to_l2 \
43 limit 100 \
44 node ethernet-input \
45 interface GigabitEthernet2/1/0 \
46 data { \
47 IP4: 0050.56b7.7c83 -> 0050.56b7.296d \
48 GRE: 1.2.3.3 -> 8.0.0.1 mpls_unicast \
Ed Warnickecb9cada2015-12-08 15:45:58 -070049 }
50}
51
Damjan Marion3153f002022-05-14 00:14:02 +020052packet-generator new { \
53 name l2_to_bvi \
54 limit 50 \
55 node ethernet-input \
56 interface GigabitEthernet2/2/0 \
57 data { \
58 IP4: 0050.56b7.7c83 -> dead.0000.0000 vlan 9 \
59 GRE: 8.0.0.1 -> 1.2.3.3 mpls_unicast \
60 } \
Ed Warnickecb9cada2015-12-08 15:45:58 -070061}
62
Damjan Marion3153f002022-05-14 00:14:02 +020063packet-generator new { \
64 name l2_to_bvi_via_flood \
65 limit 25 \
66 node ethernet-input \
67 interface GigabitEthernet2/2/0 \
68 data { \
69 IP4: 0050.56b7.7c83 -> ffff.ffff.ffff vlan 9 \
70 GRE: 8.0.0.1 -> 1.2.3.3 mpls_unicast \
71 } \
Ed Warnickecb9cada2015-12-08 15:45:58 -070072}
73