Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to ONVM 19.07 #8

Merged
merged 14 commits into from
Feb 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
37 changes: 19 additions & 18 deletions openNetVM-dev/.gitignore → .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,16 @@
# build directories
**/build/**
**/x86_64-native-linuxapp-gcc/**

# dpdk built target
dpdk-1.8.0/x86_64-native-linuxapp-gcc/*

# ctags files
tags
.tags
.tags*
# Prerequisites
*.d

# Object files
*.o.cmd
*.o.d
*.map
*.o
*.ko
*.obj
*.elf
_install
_postbuild
_postinstall
_preinstall

# Linker output
*.ilk
*.map
*.exp

# Precompiled Headers
*.gch
Expand Down Expand Up @@ -49,3 +38,15 @@ _preinstall

# Debug files
*.dSYM/
*.su
*.idb
*.pdb

# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "openNetVM"]
path = openNetVM
url = https://github.com/sdnfv/openNetVM
102 changes: 42 additions & 60 deletions Install.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,79 +3,54 @@
This guide helps you build and install Snort.

---
1. Compile DPDK
1. Setup Repositories
---

1. Export correct target variable for your system as required by DPDK.

1. Download source code
```sh
export RTE_TARGET=x86_64-native-linuxapp-gcc
export DPDK_TARGET=x86_64-native-linuxapp-gcc
git clone https://github.com/sdnfv/onvm-snort
cd onvm-snort
```

2. Navigate to your DPDK source repository and set environment variable RTE_SDK to the path of the DPDK library.
2. Initialize openNetVM submodule
```sh
cd dpdk-stable-16.11.1
export RTE_SDK=$(pwd)
git submodule sync
git submodule update --init
```

3. Build DPDK.
```sh
make config T=x86_64-native-linuxapp-gcc O=x86_64-native-linuxapp-gcc
make -j7 T=$RTE_TARGET O=$RTE_TARGET
sudo make install T=x86_64-native-linuxapp-gcc
```
---
2. Compile ONVM
2. Compile DPDK and openNetVM
---

1. Navigate to openNetVM source directory.
```sh
cd openNetVM/
export ONVM_HOME=$(pwd)
```

2. Compile onvm.
```sh
cd onvm && make
```
Please follow [the openNetVM installation guide](https://github.com/sdnfv/openNetVM/blob/master/docs/Install.md).

---
3. Compile DAQ
---

1. Install dependencies.
```sh
sudo apt-get install -y libpcap-dev libpcre3-dev libdumbnet-dev zlib1g-dev liblzma-dev libssl-dev autoconf
sudo apt-get install -y libpcap-dev libpcre3-dev libdumbnet-dev zlib1g-dev liblzma-dev libssl-dev autoconf flex bison luajit libtool libglib2.0-dev pkg-config
```

2. Navigate to the DAQ source directory.
```sh
cd daq-2.0.6/
```

2. Clean the build.
```sh
make clean
```

3. Prepare for automake, then autocreate makefile.
3. Prepare for automake, then autocreate makefile.
```sh
autoreconf -ivf
aclocal
autoconf
autoheader
automake -a
```

4. Run the configuration script and include the dpdk and netvm libraries.
```sh
./configure --with-dpdk-includes=$RTE_SDK/$RTE_TARGET/include --with-dpdk-libraries=$RTE_SDK/$RTE_TARGET/lib --with-netvm-includes=$ONVM_HOME/onvm --with-netvm-libraries=$ONVM_HOME/onvm
./configure --enable-static --disable-shared --with-dpdk-includes=$RTE_SDK/$RTE_TARGET/include --with-dpdk-libraries=$RTE_SDK/$RTE_TARGET/lib --with-netvm-includes=$ONVM_HOME/onvm --with-netvm-libraries=$ONVM_HOME/onvm
```
User should see yes for both DPDK and NetVM DAQs
![onvm daq][onvm-daq]


5. Build the DAQ
```sh
make clean
make -j7
sudo make install
```
Expand All @@ -87,28 +62,26 @@ This guide helps you build and install Snort.
```sh
cd snort-2.9.8.3/
```

2. Run the configuration script.
2. Prepare for automake, then autocreate makefile.
```sh
./configure --enable-sourcefire
autoreconf -ivf
aclocal
autoconf
autoheader
automake -a
```
3. Run the configuration script.
archit-p marked this conversation as resolved.
Show resolved Hide resolved
```sh
./configure --enable-sourcefire --enable-static --disable-shared
```

3. Create Patch of Makefille
```sh
cd ../
./patching-Makefile.sh
```

4. Navigate to the src folder of snort and Make snort.
```sh
cd snort-2.9.8.3/src
make clean
cp ../../Makefile.patched Makefile
make -j7
sudo make install
```

5. Configure linker.
5. Configure linker.
```sh
sudo ldconfig
```
Expand All @@ -121,19 +94,27 @@ This guide helps you build and install Snort.
sudo cp -r snort-2.9.8.3/simple-etc /etc/snort
sudo mkdir /usr/local/lib/snort_dynamicrules
```

2. Run openNetVM manager. To install openNetVM, refer to this [guide][onvm-install].
2. Add snort to path (change /opt/snort if the install path is different)
```
export PATH=$PATH:/opt/snort/bin
```
3. Run openNetVM manager. To install openNetVM, refer to this [guide][onvm-install].
```sh
cd openNetVM-dev/onvm
./go.sh 0,1,2,3,4 3 -v 0x7f000000000
cd openNetVM/onvm
./go.sh 0,1,2,3 3 0xF0 -a 0x7f000000000 -s stdout
```
3. Run Snort.
4. Run Snort.
```sh
sudo snort -A console -Q -c /etc/snort/snort.conf -i dpdk0:dpdk1 -N --alert-before-pass --daq-var netvm_args="-l 5 -n 3 --proc-type=secondary -- -r 1 -- -d 4"
sudo snort -A console -Q -c /etc/snort/snort.conf -i dpdk0 -N --alert-before-pass --daq-var netvm_args="-l 5 -n 3 --proc-type=secondary -- -r 1 -- -d 4"
```
If the above does not work then try:
```
which snort
sudo `which snort` -A console -Q -c /etc/snort/snort.conf -i dpdk0:dpdk1 -N --alert-before-pass --daq-var netvm_args="-l 5 -n 3 --proc-type=secondary -- -r 1 -- -d 4"
archit-p marked this conversation as resolved.
Show resolved Hide resolved
```
![snort init][snort-init]

3. Run Bridge.
6. Run Bridge.
```sh
cd openNetVM-dev/examples/bridge/
./go.sh 6 4
Expand All @@ -142,3 +123,4 @@ This guide helps you build and install Snort.
[onvm-install]: https://github.com/sdnfv/openNetVM/blob/master/docs/Install.md
[onvm-daq]: https://github.com/sdnfv/onvm-snort/blob/master/onvm-daq.png "onvm daq"
[snort-init]: https://github.com/sdnfv/onvm-snort/blob/master/snort-initialization.png "snort initialization"

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Contributors
- Jean Tourrilhes -- Hewlett Packard Labs
- Grace Liu -- GWU (Contact: guyue at gwu.edu)
- Riley Kennedy -- GWU
- Archit Pandey -- WiNG, NITK

[snort-link]: https://www.snort.org/
[onvm]: http://sdnfv.github.io/onvm/
Expand Down
Loading