-
Notifications
You must be signed in to change notification settings - Fork 140
TunnelingOpenFlowNetFPGA100ICMP
-- Main.RaviKerur - 09 Sep 2010
Status
- Complete
- OpenFlow spec1.0 v1.00
- NetFPGA Base Package 2.1.3
- Adam Covington, Tatsuya Yabe, Ravi Kerur
- Ravi Kerur
- Install the NetFPGA Base Package
- Install NetFPGA tunneling OpenFlow switch
yum install netfpga-tunneling_openflow_icmp_arp
This design has a icmp reply module for port reachability tests in addition to tunneling capability and the functions of regular OpenFlow reference switch. It consists of following functions in addition to the functions described in OpenFlow reference switch wiki.
- Encapsulate ethernet frame in IP packet with IP protocol number which you can specify via a register.
- Decapsulate ethernet frame from IP packet above
- Reply to ARP request
- Reply to ICMP request
- Wire format (encapsulation header format) is the same as our software tunneling implementation's.
The regression tests verify the icmp_reply functionality in addition to encap/decap functionalities and the functionality of the packet forwarding with both exact and wildcard match entries. In order to run the tests, you need to have the machine connected for the regression tests as stated in the Run Regression Tests section of the Guide.
After connecting the cables, perform the following command to run the regression tests.
nf_regress_test.pl --project tunneling_openflow_icmp_arp
Test 1-1
- Name :
- Description :
- Initialize NetFPGA hardware
- Populate an exact table
- Send packets from eth2
- Receive packets on eth1
- Check exact/wildcard table counters and per-port counters, and verify it the values are correct.
- Verify the packets
- Location :
- Output :
SUCCESS!
Test 1-2
- Name :
- Description :
- Location :
- Output :
SUCCESS!
Test 2-1
- Name :
- Description :
# Initialize NetFPGA hardware
# Populate an wildcard table and its mask field.
# Send packets from eth2
# Receive packets on eth1
# Check exact/wildcard table counters, per-port counters and verify if the values are correct.
# Verify the packets
- Location :
- Output :
SUCCESS!
Test 2-2
- Name :
- Description :
- Location :
- Output :
SUCCESS!
Test 3-1
- Name :
- Description :
- Initialize netfpga hardware
- Setup PHY for loopback
- Set encapsulation parameters
- Populate an wildcard table and its mask field
- Send packets from nf2c0-DMA. Feed un-capsulated packet
- Receive loopbacked packets on nf2c0, expecting it is encapsulated
- Check exact/wildcard table counters, per-port counters and verify the values are correct.
- Verify the packet
- Test all the NetFPGA ports
- Location
- Output :
SUCCESS!
Test 3-2
- Name :
- Description :
- Initialize netfpga hardware
- Setup PHY for loopback
- Set decapsulation parameters
- Populate an wildcard table and its mask field
- Send packets from nf2c0-DMA. Feed capsulated packet
- Receive loopbacked packets on nf2c0, expecting it is not capsulated
- Check exact/wildcard table counters, per-port counters and verify the values are correct.
- Verify the packet# Test all the NetFPGA ports
- Location :
- Output :
SUCCESS!
Test 4-1
- Name :
- Description : It tests the ICMP reply functionality.
- Initialize netfpga hardware
- Start virtual hosts
- Register router and host interface(s)
- Send ICMP echo request packets from host to router interface
- Expect ARP exchange
- Receive ICMP echo reply from the router to host interface
- Verify the packet
- Test all the NetFPGA ports
- Location
- Output :
SUCCESS!
Please consult The OpenFlow Switch Consortium web site to learn about it including how you can use the switch.
- We assume you are using NetFPGA on CentOS 5.4 and on the environment mentioned in chapters 2 to 4 of NetFPGA Guide.
- Copy following two shell script files on your home directory; of_start.sh, of_stop.sh
cp (your NF2 directory)/projects/tunneling_openflow_switch/sw/*.sh ~/.
Please refer to CentOS NetFPGA installation guide on OpenFlow wiki page.
The basic idea of installations are:
- Obtain required packages and install them.
- Stop avahi-daemon and IPv6 service.
- Obtain OpenFlow archives via git and install it, also install a wireshark utility tool.
- Modify OpenFlow environment files.
cp (your netfpga directory)/bitfiles/<strong>tunneling_openflow_icmp_arp.bit</strong> (your openflow directory)/hw-lib/nf2/. cp (your netfpga directory)/projects/tunneling_openflow_icmp_arp/lib/C/<strong>reg_defines_tunneling_openflow_icmp_arp.h</strong> (your openflow directory)/hw-lib/nf2/.
Assume you want to create a topology below for example:
Following is what you will need to do for setting up NetFPGA1 machine above. Other machines can be setup in a same way.
Find of_start.sh file in your home directory and open it for editing.
vi of_start.sh
Find the section mentioned below on the very top part of the file:
### User dependent settings
You will find one global setting and six variables for each interface from nf2c0 to nf2c3.
First, point your openflow directory.
OF_ROOT=/home/openflow/openflow --- Point your openflow directory
Then modify the variables for interfaces which you want to use as tunneling ports. In this sample case, you want to change variables for nf2c0 and nf2c1.
Following are the example modification for nf2c0. Change variables for other tunneling ports (in this case, nf2c1) in the same way.
TUNIF0_ENABLE=0 --- Change it to 1 if you want to use this interface as a tunneling port SRCIP0=xxx.xxx.xxx.xxx --- Setup IP address for nf2c0 SRCMAC0=00:AA:BB:CC:DD:01 --- You don't need to change it but you can change it as you wish. DSTIP0=xxx.xxx.xxx.xxx --- Setup destination IP address. NetFPGA2-nf2c0, in this case. DSTMAC0=xx:xx:xx:xx:xx:xx -- Setup your gateway MAC address to NetFPGA2 ENCAP_TAG=0 -- TAG value to be attached inside an encapsulation header. You need to set the same values between the two tunneling ends.
Modify the configuration for opponent machines in a same way. (In this case, NetFPGA2 and NetFPGA3.)
To start the switch, prepare a OpenFlow Switch controller such as NOX. Once you have IP address or host name of your controller, run of_start.sh, which you have modified above, as follows:
./of_start.sh xxx.xxx.xxx.xxx:yyyy(xxx.xxx.xxx.xxx : IP address or hostname of your controller
yyyy : Port number which your controller uses (by default it is 6633))
It sets up a datapath and associated interfaces, then connects Secure Channel of the switch to the controller.
To stop the switch, first kill the switch process pressing "CTRL" key and "C" at the same time, then run of_stop.sh as follows:
./of_stop.sh