Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 1 | |
| 2 | |
| 3 | set int state tuntap-0 down |
| 4 | set int ip address GigabitEthernet2/1/0 1.2.3.4/24 |
| 5 | |
| 6 | set int state GigabitEthernet2/1/0 up |
| 7 | cre sub GigabitEthernet2/1/0 1 dot1q 7 |
| 8 | set int state GigabitEthernet2/1/0.1 up |
| 9 | |
| 10 | set int state GigabitEthernet2/2/0 up |
| 11 | cre sub GigabitEthernet2/2/0 1 dot1q 9 |
| 12 | set int state GigabitEthernet2/2/0.1 up |
| 13 | |
| 14 | |
| 15 | loop create |
| 16 | set int l2 bridge loop0 0 bvi |
| 17 | set int ip table loop0 0 |
| 18 | set int state loop0 up |
| 19 | |
| 20 | |
| 21 | set int l2 bridge GigabitEthernet2/1/0.1 0 |
| 22 | set int l2 bridge GigabitEthernet2/2/0.1 0 |
| 23 | |
| 24 | set int l2 tag-rewrite GigabitEthernet2/1/0.1 pop 1 |
| 25 | set int l2 tag-rewrite GigabitEthernet2/2/0.1 pop 1 |
| 26 | |
| 27 | l2fib add 00:22:44:06:08:0a 0 GigabitEthernet2/1/0.1 static |
| 28 | l2fib add 00:02:04:06:08:0a 0 GigabitEthernet2/2/0.1 static |
| 29 | |
| 30 | |
| 31 | ip route table 0 8.0.0.1/32 via loop0 |
ShivaShankarK | b0f956c | 2020-03-18 15:34:11 +0530 | [diff] [blame] | 32 | set ip neighbor loop0 8.0.0.1 00:02:04:06:08:0a |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 33 | |
| 34 | |
| 35 | ip 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 | |
| 37 | cle er |
| 38 | cle int |
| 39 | cle run |
| 40 | |
| 41 | packet-generator new { |
| 42 | name bvi_to_l2 |
| 43 | limit 100 |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 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 |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | packet-generator new { |
| 53 | name l2_to_bvi |
| 54 | limit 50 |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 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 | } |
| 61 | } |
| 62 | |
| 63 | packet-generator new { |
| 64 | name l2_to_bvi_via_flood |
| 65 | limit 25 |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 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 | } |
| 72 | } |
| 73 | |