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 |
| 32 | set ip arp loop0 8.0.0.1 00:02:04:06:08:0a |
| 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 |
| 44 | no-recycle |
| 45 | node ethernet-input |
| 46 | interface GigabitEthernet2/1/0 |
| 47 | data { |
| 48 | IP4: 0050.56b7.7c83 -> 0050.56b7.296d |
| 49 | GRE: 1.2.3.3 -> 8.0.0.1 mpls_unicast |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | packet-generator new { |
| 54 | name l2_to_bvi |
| 55 | limit 50 |
| 56 | no-recycle |
| 57 | node ethernet-input |
| 58 | interface GigabitEthernet2/2/0 |
| 59 | data { |
| 60 | IP4: 0050.56b7.7c83 -> dead.0000.0000 vlan 9 |
| 61 | GRE: 8.0.0.1 -> 1.2.3.3 mpls_unicast |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | packet-generator new { |
| 66 | name l2_to_bvi_via_flood |
| 67 | limit 25 |
| 68 | no-recycle |
| 69 | node ethernet-input |
| 70 | interface GigabitEthernet2/2/0 |
| 71 | data { |
| 72 | IP4: 0050.56b7.7c83 -> ffff.ffff.ffff vlan 9 |
| 73 | GRE: 8.0.0.1 -> 1.2.3.3 mpls_unicast |
| 74 | } |
| 75 | } |
| 76 | |