Difference between revisions of "NSH SFC/Build, Install, and Test Images"
From fd.io
< NSH SFC
(Created page with "=== 1. Build A VPP Package === Please follow below link to build a VPP package: https://wiki.fd.io/view/VPP/Build,_install,_and_test_images") |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
https://wiki.fd.io/view/VPP/Build,_install,_and_test_images | https://wiki.fd.io/view/VPP/Build,_install,_and_test_images | ||
+ | |||
+ | === 2. Clone Code and Build NSH_SFC Plugin === | ||
+ | |||
+ | Step 1) Clone Code: | ||
+ | |||
+ | git clone https://gerrit.fd.io/r/nsh_sfc | ||
+ | |||
+ | Step 2) Build NSH_SFC Plugin: | ||
+ | |||
+ | cd nsh_sfc/nsh-plugin/ | ||
+ | rm -fr build | ||
+ | ./build.sh | ||
+ | |||
+ | Step 3) Start VPP: | ||
+ | |||
+ | systemctl start vpp | ||
+ | |||
+ | Step 4) Check NSH_SFC plugins is loaded: | ||
+ | |||
+ | show plugins | ||
+ | |||
+ | === 3. Configure NSH_SFC as a SFF === | ||
+ | |||
+ | Step 1) Configure two physical interfaces: | ||
+ | |||
+ | set int state TenGigabitEthernet5/0/0 up | ||
+ | set int ip table TenGigabitEthernet5/0/0 0 | ||
+ | set int ip address TenGigabitEthernet5/0/0 192.168.50.72/24 | ||
+ | |||
+ | set int state TenGigabitEthernet5/0/1 up | ||
+ | set int ip table TenGigabitEthernet5/0/1 0 | ||
+ | set int ip address TenGigabitEthernet5/0/1 192.168.50.73/24 | ||
+ | |||
+ | ip route add 192.168.50.74/24 via 192.168.50.73 | ||
+ | set ip arp TenGigabitEthernet5/0/1 192.168.50.74 02fe.8629.b438 | ||
+ | |||
+ | Step 2) Create two VxLAN-GPE tunnels: | ||
+ | |||
+ | create vxlan-gpe tunnel local 192.168.50.72 remote 192.168.50.71 vni 9 next-nsh encap-vrf-id 0 decap-vrf-id 0 | ||
+ | create vxlan-gpe tunnel local 192.168.50.73 remote 192.168.50.74 vni 9 next-nsh encap-vrf-id 0 decap-vrf-id 0 | ||
+ | |||
+ | Step 3) Create two NSH entries and One NSH map: | ||
+ | create nsh entry nsp 185 nsi 255 md-type 1 c1 1 c2 2 c3 3 c4 4 next-ethernet | ||
+ | create nsh entry nsp 185 nsi 254 md-type 1 c1 11 c2 12 c3 13 c4 14 next-ethernet | ||
+ | create nsh map nsp 185 nsi 255 mapped-nsp 185 mapped-nsi 254 nsh_action swap encap-vxlan-gpe-intf 4 | ||
+ | |||
+ | === 4. Test SFF === | ||
+ | |||
+ | Send NSH packets with transport layer VxLAN-GPE to TenGigabitEthernet5/0/0 to see if SFF works. | ||
+ | |||
+ | Please refer to https://wiki.fd.io/view/NSH_SFC/Docs/Designs for design and unit test output. |
Latest revision as of 07:02, 10 August 2017
Contents
1. Build A VPP Package
Please follow below link to build a VPP package:
https://wiki.fd.io/view/VPP/Build,_install,_and_test_images
2. Clone Code and Build NSH_SFC Plugin
Step 1) Clone Code:
git clone https://gerrit.fd.io/r/nsh_sfc
Step 2) Build NSH_SFC Plugin:
cd nsh_sfc/nsh-plugin/ rm -fr build ./build.sh
Step 3) Start VPP:
systemctl start vpp
Step 4) Check NSH_SFC plugins is loaded:
show plugins
3. Configure NSH_SFC as a SFF
Step 1) Configure two physical interfaces:
set int state TenGigabitEthernet5/0/0 up set int ip table TenGigabitEthernet5/0/0 0 set int ip address TenGigabitEthernet5/0/0 192.168.50.72/24 set int state TenGigabitEthernet5/0/1 up set int ip table TenGigabitEthernet5/0/1 0 set int ip address TenGigabitEthernet5/0/1 192.168.50.73/24 ip route add 192.168.50.74/24 via 192.168.50.73 set ip arp TenGigabitEthernet5/0/1 192.168.50.74 02fe.8629.b438
Step 2) Create two VxLAN-GPE tunnels:
create vxlan-gpe tunnel local 192.168.50.72 remote 192.168.50.71 vni 9 next-nsh encap-vrf-id 0 decap-vrf-id 0 create vxlan-gpe tunnel local 192.168.50.73 remote 192.168.50.74 vni 9 next-nsh encap-vrf-id 0 decap-vrf-id 0
Step 3) Create two NSH entries and One NSH map:
create nsh entry nsp 185 nsi 255 md-type 1 c1 1 c2 2 c3 3 c4 4 next-ethernet create nsh entry nsp 185 nsi 254 md-type 1 c1 11 c2 12 c3 13 c4 14 next-ethernet create nsh map nsp 185 nsi 255 mapped-nsp 185 mapped-nsi 254 nsh_action swap encap-vxlan-gpe-intf 4
4. Test SFF
Send NSH packets with transport layer VxLAN-GPE to TenGigabitEthernet5/0/0 to see if SFF works. Please refer to https://wiki.fd.io/view/NSH_SFC/Docs/Designs for design and unit test output.