- Fix: avoid infinite loop on mulitcast read thread if no data to read

Pre-ci test passed

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4000 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
Cedric Roux
2013-06-25 09:05:02 +00:00
commit 56c66c09aa
4111 changed files with 2133103 additions and 0 deletions
+217
View File
@@ -0,0 +1,217 @@
# Doxyfile 1.3.8
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = OPENAIR
PROJECT_NUMBER =
OUTPUT_DIRECTORY =
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = YES
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF =
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = YES
MULTILINE_CPP_IS_BRIEF = YES
DETAILS_AT_TOP = YES
INHERIT_DOCS = NO
DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 8
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = YES
OPTIMIZE_OUTPUT_JAVA = NO
SUBGROUPING = YES
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = YES
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = YES
HIDE_UNDOC_MEMBERS = YES
HIDE_UNDOC_CLASSES = YES
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = NO
INLINE_INFO = YES
SORT_MEMBER_DOCS = NO
SORT_BRIEF_DOCS = NO
SORT_BY_SCOPE_NAME = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = NO
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= NO
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = $(OPENAIR3_DIR)/MESH/L3_rrc_interface.h \
$(OPENAIR3_DIR)/MESH/L3_rrc_defs.h \
$(OPENAIR3_DIR)/MESH/cmm_rrm_interface.h \
$(OPENAIR3_DIR)/MESH/cmm_ral_interface.h \
FILE_PATTERNS = *.h
RECURSIVE = NO
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH = images
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = NO
REFERENCES_RELATION = NO
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = YES
CHM_FILE = irs_openair.chm
HHC_LOCATION =
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = YES
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES = amsmath amssymb
LATEX_HEADER =
PDF_HYPERLINKS = YES
USE_PDFLATEX = YES
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = YES
RTF_HYPERLINKS = YES
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = NO
HIDE_UNDOC_RELATIONS = NO
HAVE_DOT = NO
CLASS_GRAPH = NO
COLLABORATION_GRAPH = NO
UML_LOOK = NO
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = NO
INCLUDED_BY_GRAPH = NO
CALL_GRAPH = NO
GRAPHICAL_HIERARCHY = NO
DOT_IMAGE_FORMAT = jpg
DOT_PATH =
DOTFILE_DIRS = ../docs/dotfiles
+340
View File
@@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
+231
View File
@@ -0,0 +1,231 @@
# Doxyfile 1.5.3
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = OpenAirInterface
PROJECT_NUMBER = V1.0
OUTPUT_DIRECTORY =
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF =
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 8
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
DISTRIBUTE_GROUP_DOC = NO
SUBGROUPING = YES
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = NO
EXTRACT_ANON_NSPACES = NO
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
SORT_BY_SCOPE_NAME = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_DIRECTORIES = NO
FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = example_doxy.h
INPUT_ENCODING = UTF-8
FILE_PATTERNS =
RECURSIVE = NO
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH = images/
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
REFERENCES_LINK_SOURCE = YES
USE_HTAGS = NO
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
HTML_DYNAMIC_SECTIONS = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = YES
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = YES
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
MSCGEN_PATH =
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = NO
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
CALLER_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
DOT_PATH = /usr/bin/dot
DOTFILE_DIRS =
DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 0
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
+149
View File
@@ -0,0 +1,149 @@
/*******************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 1999 - 2010 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fsr/openairinterface
Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
*******************************************************************************/
/*! \file doxy_template.h
* \brief explain how this block is organized, and how it works
* \author Navid Nikaein
* \date 2006-2010
* \version 4.0
* \company Eurecom
* \email: navid.nikaein@eurecom.fr
* \note this a note
* \bug this is a bug
* \warning this is a warning
*/
//-----------------------------------begin group-----------------------------
/** @defgroup _oai System definitions
There is different modules:
- OAI Address
- OAI Components
- \ref _frame
The following diagram is based on graphviz (http://www.graphviz.org/), you need to install the package to view the diagram.
* \dot
* digraph group_frame {
* node [shape=rect, fontname=Helvetica, fontsize=8,style=filled,fillcolor=lightgrey];
* a [ label = " address"];
* b [ label = " component"];
* c [ label = " frame",URL="\ref _frame"];
* a->b;
* a->c;
* b->d;
* label="Architecture"
*
* }
* \enddot
\section _doxy Doxygen Help
You can use the provided Doxyfile as the configuration file or alternatively run "doxygen -g Doxyfile" to generat the file.
You need at least to set the some variables in the Doxyfile including "PROJECT_NAME","PROJECT_NUMBER","INPUT","IMAGE_PATH".
Doxygen help and commands can be found at http://www.stack.nl/~dimitri/doxygen/commands.html#cmdprotocol
\section _arch Architecture
You need to set the IMAGE_PATH in your Doxyfile
\image html arch.png "Architecture"
\image latex arch.eps "Architecture"
\subsection _mac MAC
thisis the mac
\subsection _rlc RLC
this is the rlc
\subsection _impl Implementation
what about the implementation
*@{*/
/*!\brief OAI protocol verion */
#define OAI_PROTOCOL_Version 0x00
/*!\brief Length in bytes of the OAI address */
#define OAI_ADDR_LEN 6
/*!\brief OAI snode type */
enum NodeType {
/*!\brief mesh routers are */
meshrouter = 1,
/*!\brief relay nodes are */
relaynode = 2,
/*!\brief clusterheads are */
clusterhead = 3
};
/*@}*/
// --------------------------end group ------------------------------
//---------------------------begin group------------------------------
/** @defgroup _frame Frame Structure
* @ingroup _oai
The Frame is composed of ....
*@{*/
/*! \brief the frame structure is ... */
struct frame {
u_short duration; /*!< \brief Duration in us (2 bytes) */
u_char da[OAI_ADDR_LEN];/*!< \brief Destination MAC@ (OAI_ADDR_LEN bytes) */
u_char sa[OAI_ADDR_LEN];/*!< \brief Source MAC@ (OAI_ADDR_LEN bytes)*/
u_char body[0]; /*!< \brief Body of the frame */
};
/*! \brief Broadcast ID is ... */
#define BROADCAST_ID 15
/*@}*/
//--------------------------end group-----------------------
//-----------------------begin func proto-------------------
/*! \fn int init(int,int)
* \brief this function initializes and allocates memories and etc.
* \param[in] src the memory area to copy frrm
* \param[out] dst the memory area to copy to
* \return 0 on success, otherwise -1
* \note
* @ingroup _oai
*/
int init(int src, int dst);
//-----------------------end func proto-------------------
@@ -0,0 +1,785 @@
%!PS-Adobe-2.0 EPSF-2.0
%%Title: /homes/nikaeinn/templates/dev/arch.dia
%%Creator: Dia v0.95
%%CreationDate: Fri Dec 11 12:31:01 2009
%%For: nikaeinn
%%Orientation: Portrait
%%Magnification: 1.0000
%%BoundingBox: 0 0 355 138
%%BeginSetup
%%EndSetup
%%EndComments
%%BeginProlog
[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright
/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one
/two /three /four /five /six /seven /eight /nine /colon /semicolon
/less /equal /greater /question /at /A /B /C /D /E
/F /G /H /I /J /K /L /M /N /O
/P /Q /R /S /T /U /V /W /X /Y
/Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c
/d /e /f /g /h /i /j /k /l /m
/n /o /p /q /r /s /t /u /v /w
/x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright
/ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior
/acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf
/threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla
/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde
/Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex
/Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring
/ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis
/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave
/uacute /ucircumflex /udieresis /yacute /thorn /ydieresis] /isolatin1encoding exch def
/cp {closepath} bind def
/c {curveto} bind def
/f {fill} bind def
/a {arc} bind def
/ef {eofill} bind def
/ex {exch} bind def
/gr {grestore} bind def
/gs {gsave} bind def
/sa {save} bind def
/rs {restore} bind def
/l {lineto} bind def
/m {moveto} bind def
/rm {rmoveto} bind def
/n {newpath} bind def
/s {stroke} bind def
/sh {show} bind def
/slc {setlinecap} bind def
/slj {setlinejoin} bind def
/slw {setlinewidth} bind def
/srgb {setrgbcolor} bind def
/rot {rotate} bind def
/sc {scale} bind def
/sd {setdash} bind def
/ff {findfont} bind def
/sf {setfont} bind def
/scf {scalefont} bind def
/sw {stringwidth pop} bind def
/tr {translate} bind def
/ellipsedict 8 dict def
ellipsedict /mtrx matrix put
/ellipse
{ ellipsedict begin
/endangle exch def
/startangle exch def
/yrad exch def
/xrad exch def
/y exch def
/x exch def /savematrix mtrx currentmatrix def
x y tr xrad yrad sc
0 0 1 startangle endangle arc
savematrix setmatrix
end
} def
/mergeprocs {
dup length
3 -1 roll
dup
length
dup
5 1 roll
3 -1 roll
add
array cvx
dup
3 -1 roll
0 exch
putinterval
dup
4 2 roll
putinterval
} bind def
/dpi_x 300 def
/dpi_y 300 def
/conicto {
/to_y exch def
/to_x exch def
/conic_cntrl_y exch def
/conic_cntrl_x exch def
currentpoint
/p0_y exch def
/p0_x exch def
/p1_x p0_x conic_cntrl_x p0_x sub 2 3 div mul add def
/p1_y p0_y conic_cntrl_y p0_y sub 2 3 div mul add def
/p2_x p1_x to_x p0_x sub 1 3 div mul add def
/p2_y p1_y to_y p0_y sub 1 3 div mul add def
p1_x p1_y p2_x p2_y to_x to_y curveto
} bind def
/start_ol { gsave 1.1 dpi_x div dup scale} bind def
/end_ol { closepath fill grestore } bind def
28.346000 -28.346000 scale
-4.400000 -8.150000 translate
%%EndProlog
1.000000 1.000000 1.000000 srgb
n 4.450000 3.350000 m 4.450000 8.100000 l 16.850000 8.100000 l 16.850000 3.350000 l f
0.100000 slw
[] 0 sd
[] 0 sd
0 slj
0.000000 0.000000 0.000000 srgb
n 4.450000 3.350000 m 4.450000 8.100000 l 16.850000 8.100000 l 16.850000 3.350000 l cp s
gsave 8.875000 4.300000 translate 0.035278 -0.035278 scale
start_ol
1762 3044 moveto
1276 3044 990 2673 conicto
704 2303 704 1663 conicto
704 1025 990 654 conicto
1276 284 1762 284 conicto
2248 284 2532 654 conicto
2816 1025 2816 1663 conicto
2816 2303 2532 2673 conicto
2248 3044 1762 3044 conicto
1762 3392 moveto
2446 3392 2855 2922 conicto
3264 2453 3264 1664 conicto
3264 876 2855 406 conicto
2446 -64 1762 -64 conicto
1077 -64 666 405 conicto
256 874 256 1664 conicto
256 2453 666 2922 conicto
1077 3392 1762 3392 conicto
end_ol grestore
gsave 9.330083 4.300000 translate 0.035278 -0.035278 scale
start_ol
1536 2838 moveto
935 1180 lineto
2140 1180 lineto
1536 2838 lineto
1286 3282 moveto
1789 3282 lineto
3038 0 lineto
2577 0 lineto
2278 832 lineto
801 832 lineto
503 0 lineto
35 0 lineto
1286 3282 lineto
end_ol grestore
gsave 9.736483 4.300000 translate 0.035278 -0.035278 scale
start_ol
448 3328 moveto
874 3328 lineto
874 0 lineto
448 0 lineto
448 3328 lineto
end_ol grestore
gsave 9.914283 4.300000 translate 0.035278 -0.035278 scale
start_ol
end_ol grestore
gsave 10.100550 4.300000 translate 0.035278 -0.035278 scale
start_ol
1536 2838 moveto
935 1180 lineto
2140 1180 lineto
1536 2838 lineto
1286 3282 moveto
1789 3282 lineto
3038 0 lineto
2577 0 lineto
2278 832 lineto
801 832 lineto
503 0 lineto
35 0 lineto
1286 3282 lineto
end_ol grestore
gsave 10.506950 4.300000 translate 0.035278 -0.035278 scale
start_ol
1842 2133 moveto
1776 2174 1696 2193 conicto
1616 2212 1519 2212 conicto
1177 2212 993 1983 conicto
810 1755 810 1328 conicto
810 0 lineto
384 0 lineto
384 2496 lineto
810 2496 lineto
810 2129 lineto
937 2347 1141 2453 conicto
1345 2560 1638 2560 conicto
1680 2560 1730 2554 conicto
1781 2548 1842 2536 conicto
1842 2133 lineto
end_ol grestore
gsave 10.752483 4.300000 translate 0.035278 -0.035278 scale
start_ol
2176 2404 moveto
2176 2020 lineto
2008 2116 1838 2164 conicto
1669 2212 1496 2212 conicto
1109 2212 895 1958 conicto
682 1705 682 1248 conicto
682 791 895 537 conicto
1109 284 1496 284 conicto
1669 284 1838 332 conicto
2008 380 2176 476 conicto
2176 97 lineto
2009 17 1830 -23 conicto
1652 -64 1449 -64 conicto
902 -64 579 291 conicto
256 646 256 1248 conicto
256 1859 582 2209 conicto
909 2560 1476 2560 conicto
1660 2560 1835 2521 conicto
2011 2482 2176 2404 conicto
end_ol grestore
gsave 11.074217 4.300000 translate 0.035278 -0.035278 scale
start_ol
2474 1509 moveto
2474 0 lineto
2048 0 lineto
2048 1502 lineto
2048 1858 1913 2035 conicto
1778 2212 1509 2212 conicto
1185 2212 997 1999 conicto
810 1786 810 1419 conicto
810 0 lineto
384 0 lineto
384 3456 lineto
810 3456 lineto
810 2120 lineto
954 2343 1152 2451 conicto
1350 2560 1609 2560 conicto
2037 2560 2255 2293 conicto
2474 2027 2474 1509 conicto
end_ol grestore
1.000000 1.000000 1.000000 srgb
n 4.900000 6.250000 m 4.900000 7.500000 l 8.250000 7.500000 l 8.250000 6.250000 l f
0.100000 slw
[] 0 sd
[] 0 sd
0 slj
0.000000 0.000000 0.000000 srgb
n 4.900000 6.250000 m 4.900000 7.500000 l 8.250000 7.500000 l 8.250000 6.250000 l cp s
1.000000 1.000000 1.000000 srgb
n 8.900000 6.200000 m 8.900000 7.495000 l 12.500000 7.495000 l 12.500000 6.200000 l f
0.100000 slw
[] 0 sd
[] 0 sd
0 slj
0.000000 0.000000 0.000000 srgb
n 8.900000 6.200000 m 8.900000 7.495000 l 12.500000 7.495000 l 12.500000 6.200000 l cp s
1.000000 1.000000 1.000000 srgb
n 13.090000 6.195000 m 13.090000 7.495000 l 16.400000 7.495000 l 16.400000 6.195000 l f
0.100000 slw
[] 0 sd
[] 0 sd
0 slj
0.000000 0.000000 0.000000 srgb
n 13.090000 6.195000 m 13.090000 7.495000 l 16.400000 7.495000 l 16.400000 6.195000 l cp s
gsave 5.400000 7.100000 translate 0.035278 -0.035278 scale
start_ol
1536 2838 moveto
935 1180 lineto
2140 1180 lineto
1536 2838 lineto
1286 3282 moveto
1789 3282 lineto
3038 0 lineto
2577 0 lineto
2278 832 lineto
801 832 lineto
503 0 lineto
35 0 lineto
1286 3282 lineto
end_ol grestore
gsave 5.795817 7.100000 translate 0.035278 -0.035278 scale
start_ol
2048 2116 moveto
2048 3456 lineto
2474 3456 lineto
2474 0 lineto
2048 0 lineto
2048 380 lineto
1922 154 1727 45 conicto
1533 -64 1261 -64 conicto
816 -64 536 297 conicto
256 659 256 1248 conicto
256 1837 536 2198 conicto
816 2560 1260 2560 conicto
1532 2560 1726 2450 conicto
1921 2341 2048 2116 conicto
682 1248 moveto
682 798 864 541 conicto
1046 284 1364 284 conicto
1683 284 1865 541 conicto
2048 798 2048 1248 conicto
2048 1699 1865 1955 conicto
1683 2212 1364 2212 conicto
1046 2212 864 1955 conicto
682 1699 682 1248 conicto
end_ol grestore
gsave 6.176817 7.100000 translate 0.035278 -0.035278 scale
start_ol
2048 2116 moveto
2048 3456 lineto
2474 3456 lineto
2474 0 lineto
2048 0 lineto
2048 380 lineto
1922 154 1727 45 conicto
1533 -64 1261 -64 conicto
816 -64 536 297 conicto
256 659 256 1248 conicto
256 1837 536 2198 conicto
816 2560 1260 2560 conicto
1532 2560 1726 2450 conicto
1921 2341 2048 2116 conicto
682 1248 moveto
682 798 864 541 conicto
1046 284 1364 284 conicto
1683 284 1865 541 conicto
2048 798 2048 1248 conicto
2048 1699 1865 1955 conicto
1683 2212 1364 2212 conicto
1046 2212 864 1955 conicto
682 1699 682 1248 conicto
end_ol grestore
gsave 6.557817 7.100000 translate 0.035278 -0.035278 scale
start_ol
1842 2133 moveto
1776 2174 1696 2193 conicto
1616 2212 1519 2212 conicto
1177 2212 993 1983 conicto
810 1755 810 1328 conicto
810 0 lineto
384 0 lineto
384 2496 lineto
810 2496 lineto
810 2129 lineto
937 2347 1141 2453 conicto
1345 2560 1638 2560 conicto
1680 2560 1730 2554 conicto
1781 2548 1842 2536 conicto
1842 2133 lineto
end_ol grestore
gsave 6.790121 7.100000 translate 0.035278 -0.035278 scale
start_ol
2538 1329 moveto
2538 1124 lineto
682 1124 lineto
682 714 908 499 conicto
1134 284 1537 284 conicto
1772 284 1991 340 conicto
2211 396 2432 509 conicto
2432 128 lineto
2216 34 1988 -15 conicto
1760 -64 1526 -64 conicto
940 -64 598 284 conicto
256 633 256 1226 conicto
256 1839 582 2199 conicto
909 2560 1463 2560 conicto
1960 2560 2249 2229 conicto
2538 1898 2538 1329 conicto
2112 1472 moveto
2112 1809 1931 2010 conicto
1751 2212 1453 2212 conicto
1116 2212 914 2018 conicto
712 1824 682 1472 conicto
2112 1472 lineto
end_ol grestore
gsave 7.154187 7.100000 translate 0.035278 -0.035278 scale
start_ol
2021 2424 moveto
2021 2034 lineto
1818 2123 1638 2167 conicto
1459 2212 1267 2212 conicto
975 2212 828 2119 conicto
682 2026 682 1838 conicto
682 1696 784 1615 conicto
887 1535 1196 1461 conicto
1327 1430 lineto
1748 1337 1930 1166 conicto
2112 995 2112 690 conicto
2112 342 1839 139 conicto
1566 -64 1089 -64 conicto
891 -64 675 -25 conicto
460 14 222 94 conicto
222 519 lineto
481 402 692 343 conicto
903 284 1110 284 conicto
1387 284 1536 383 conicto
1686 482 1686 661 conicto
1686 829 1580 917 conicto
1475 1006 1118 1088 conicto
985 1121 lineto
620 1201 438 1367 conicto
256 1533 256 1823 conicto
256 2176 507 2368 conicto
758 2560 1219 2560 conicto
1448 2560 1649 2526 conicto
1851 2492 2021 2424 conicto
end_ol grestore
gsave 7.458988 7.100000 translate 0.035278 -0.035278 scale
start_ol
2021 2424 moveto
2021 2034 lineto
1818 2123 1638 2167 conicto
1459 2212 1267 2212 conicto
975 2212 828 2119 conicto
682 2026 682 1838 conicto
682 1696 784 1615 conicto
887 1535 1196 1461 conicto
1327 1430 lineto
1748 1337 1930 1166 conicto
2112 995 2112 690 conicto
2112 342 1839 139 conicto
1566 -64 1089 -64 conicto
891 -64 675 -25 conicto
460 14 222 94 conicto
222 519 lineto
481 402 692 343 conicto
903 284 1110 284 conicto
1387 284 1536 383 conicto
1686 482 1686 661 conicto
1686 829 1580 917 conicto
1475 1006 1118 1088 conicto
985 1121 lineto
620 1201 438 1367 conicto
256 1533 256 1823 conicto
256 2176 507 2368 conicto
758 2560 1219 2560 conicto
1448 2560 1649 2526 conicto
1851 2492 2021 2424 conicto
end_ol grestore
gsave 9.020000 7.095000 translate 0.035278 -0.035278 scale
start_ol
2880 3094 moveto
2880 2615 lineto
2656 2831 2402 2937 conicto
2149 3044 1864 3044 conicto
1301 3044 1002 2689 conicto
704 2334 704 1663 conicto
704 993 1002 638 conicto
1301 284 1864 284 conicto
2149 284 2402 390 conicto
2656 497 2880 713 conicto
2880 238 lineto
2649 87 2390 11 conicto
2132 -64 1845 -64 conicto
1106 -64 681 399 conicto
256 863 256 1664 conicto
256 2466 681 2929 conicto
1106 3392 1845 3392 conicto
2137 3392 2395 3317 conicto
2654 3243 2880 3094 conicto
end_ol grestore
gsave 9.434867 7.095000 translate 0.035278 -0.035278 scale
start_ol
1377 2212 moveto
1055 2212 868 1954 conicto
682 1696 682 1248 conicto
682 800 867 542 conicto
1053 284 1377 284 conicto
1697 284 1883 543 conicto
2070 802 2070 1248 conicto
2070 1692 1883 1952 conicto
1697 2212 1377 2212 conicto
1376 2560 moveto
1899 2560 2197 2212 conicto
2496 1864 2496 1248 conicto
2496 635 2197 285 conicto
1899 -64 1376 -64 conicto
851 -64 553 285 conicto
256 635 256 1248 conicto
256 1864 553 2212 conicto
851 2560 1376 2560 conicto
end_ol grestore
gsave 9.798933 7.095000 translate 0.035278 -0.035278 scale
start_ol
2339 2028 moveto
2493 2302 2705 2431 conicto
2918 2560 3204 2560 conicto
3591 2560 3800 2286 conicto
4010 2013 4010 1509 conicto
4010 0 lineto
3584 0 lineto
3584 1502 lineto
3584 1862 3460 2037 conicto
3336 2212 3082 2212 conicto
2771 2212 2590 1999 conicto
2410 1786 2410 1419 conicto
2410 0 lineto
1984 0 lineto
1984 1502 lineto
1984 1865 1860 2038 conicto
1736 2212 1477 2212 conicto
1171 2212 990 1998 conicto
810 1784 810 1419 conicto
810 0 lineto
384 0 lineto
384 2496 lineto
810 2496 lineto
810 2120 lineto
947 2344 1141 2452 conicto
1335 2560 1602 2560 conicto
1871 2560 2060 2423 conicto
2249 2287 2339 2028 conicto
end_ol grestore
gsave 10.383133 7.095000 translate 0.035278 -0.035278 scale
start_ol
810 380 moveto
810 -960 lineto
384 -960 lineto
384 2496 lineto
810 2496 lineto
810 2116 lineto
937 2339 1131 2449 conicto
1325 2560 1595 2560 conicto
2042 2560 2322 2198 conicto
2602 1837 2602 1248 conicto
2602 659 2322 297 conicto
2043 -64 1595 -64 conicto
1325 -64 1131 45 conicto
938 155 810 380 conicto
2176 1248 moveto
2176 1699 1994 1955 conicto
1812 2212 1493 2212 conicto
1175 2212 992 1955 conicto
810 1699 810 1248 conicto
810 798 992 541 conicto
1175 284 1493 284 conicto
1812 284 1994 541 conicto
2176 798 2176 1248 conicto
end_ol grestore
gsave 10.755667 7.095000 translate 0.035278 -0.035278 scale
start_ol
1377 2212 moveto
1055 2212 868 1954 conicto
682 1696 682 1248 conicto
682 800 867 542 conicto
1053 284 1377 284 conicto
1697 284 1883 543 conicto
2070 802 2070 1248 conicto
2070 1692 1883 1952 conicto
1697 2212 1377 2212 conicto
1376 2560 moveto
1899 2560 2197 2212 conicto
2496 1864 2496 1248 conicto
2496 635 2197 285 conicto
1899 -64 1376 -64 conicto
851 -64 553 285 conicto
256 635 256 1248 conicto
256 1864 553 2212 conicto
851 2560 1376 2560 conicto
end_ol grestore
gsave 11.119733 7.095000 translate 0.035278 -0.035278 scale
start_ol
2474 1509 moveto
2474 0 lineto
2048 0 lineto
2048 1502 lineto
2048 1858 1913 2035 conicto
1778 2212 1509 2212 conicto
1185 2212 997 1999 conicto
810 1786 810 1419 conicto
810 0 lineto
384 0 lineto
384 2496 lineto
810 2496 lineto
810 2120 lineto
954 2340 1152 2450 conicto
1350 2560 1609 2560 conicto
2037 2560 2255 2293 conicto
2474 2027 2474 1509 conicto
end_ol grestore
gsave 11.500733 7.095000 translate 0.035278 -0.035278 scale
start_ol
2538 1329 moveto
2538 1124 lineto
682 1124 lineto
682 714 908 499 conicto
1134 284 1537 284 conicto
1772 284 1991 340 conicto
2211 396 2432 509 conicto
2432 128 lineto
2216 34 1988 -15 conicto
1760 -64 1526 -64 conicto
940 -64 598 284 conicto
256 633 256 1226 conicto
256 1839 582 2199 conicto
909 2560 1463 2560 conicto
1960 2560 2249 2229 conicto
2538 1898 2538 1329 conicto
2112 1472 moveto
2112 1809 1931 2010 conicto
1751 2212 1453 2212 conicto
1116 2212 914 2018 conicto
712 1824 682 1472 conicto
2112 1472 lineto
end_ol grestore
gsave 11.864800 7.095000 translate 0.035278 -0.035278 scale
start_ol
2474 1509 moveto
2474 0 lineto
2048 0 lineto
2048 1502 lineto
2048 1858 1913 2035 conicto
1778 2212 1509 2212 conicto
1185 2212 997 1999 conicto
810 1786 810 1419 conicto
810 0 lineto
384 0 lineto
384 2496 lineto
810 2496 lineto
810 2120 lineto
954 2340 1152 2450 conicto
1350 2560 1609 2560 conicto
2037 2560 2255 2293 conicto
2474 2027 2474 1509 conicto
end_ol grestore
gsave 12.245800 7.095000 translate 0.035278 -0.035278 scale
start_ol
832 3213 moveto
832 2524 lineto
1664 2524 lineto
1664 2176 lineto
832 2176 lineto
832 826 lineto
832 521 914 434 conicto
997 348 1249 348 conicto
1664 348 lineto
1664 0 lineto
1242 0 lineto
768 0 587 179 conicto
406 359 406 826 conicto
406 2176 lineto
128 2176 lineto
128 2524 lineto
406 2524 lineto
406 3213 lineto
832 3213 lineto
end_ol grestore
gsave 13.945000 6.995000 translate 0.035278 -0.035278 scale
start_ol
448 3328 moveto
2313 3328 lineto
2313 2980 lineto
874 2980 lineto
874 1948 lineto
2173 1948 lineto
2173 1600 lineto
874 1600 lineto
874 27 lineto
448 27 lineto
448 3328 lineto
end_ol grestore
gsave 14.239614 6.995000 translate 0.035278 -0.035278 scale
start_ol
1842 2133 moveto
1776 2174 1696 2193 conicto
1616 2212 1519 2212 conicto
1177 2212 993 1983 conicto
810 1755 810 1328 conicto
810 0 lineto
384 0 lineto
384 2496 lineto
810 2496 lineto
810 2129 lineto
937 2347 1141 2453 conicto
1345 2560 1638 2560 conicto
1680 2560 1730 2554 conicto
1781 2548 1842 2536 conicto
1842 2133 lineto
end_ol grestore
gsave 14.485147 6.995000 translate 0.035278 -0.035278 scale
start_ol
1528 1252 moveto
1050 1252 866 1139 conicto
682 1026 682 754 conicto
682 538 820 411 conicto
958 284 1196 284 conicto
1523 284 1721 523 conicto
1920 763 1920 1161 conicto
1920 1252 lineto
1528 1252 lineto
2346 1426 moveto
2346 0 lineto
1920 0 lineto
1920 383 lineto
1785 154 1579 45 conicto
1374 -64 1076 -64 conicto
701 -64 478 154 conicto
256 373 256 739 conicto
256 1166 543 1383 conicto
830 1600 1367 1600 conicto
1920 1600 lineto
1920 1639 lineto
1920 1913 1740 2062 conicto
1561 2212 1238 2212 conicto
1032 2212 836 2162 conicto
641 2113 448 2014 conicto
448 2386 lineto
670 2473 879 2516 conicto
1088 2560 1285 2560 conicto
1819 2560 2082 2279 conicto
2346 1998 2346 1426 conicto
end_ol grestore
gsave 14.849214 6.995000 translate 0.035278 -0.035278 scale
start_ol
2339 2028 moveto
2493 2302 2705 2431 conicto
2918 2560 3204 2560 conicto
3591 2560 3800 2286 conicto
4010 2013 4010 1509 conicto
4010 0 lineto
3584 0 lineto
3584 1502 lineto
3584 1862 3460 2037 conicto
3336 2212 3082 2212 conicto
2771 2212 2590 1999 conicto
2410 1786 2410 1419 conicto
2410 0 lineto
1984 0 lineto
1984 1502 lineto
1984 1865 1860 2038 conicto
1736 2212 1477 2212 conicto
1171 2212 990 1998 conicto
810 1784 810 1419 conicto
810 0 lineto
384 0 lineto
384 2496 lineto
810 2496 lineto
810 2120 lineto
947 2344 1141 2452 conicto
1335 2560 1602 2560 conicto
1871 2560 2060 2423 conicto
2249 2287 2339 2028 conicto
end_ol grestore
gsave 15.433414 6.995000 translate 0.035278 -0.035278 scale
start_ol
2538 1329 moveto
2538 1124 lineto
682 1124 lineto
682 714 908 499 conicto
1134 284 1537 284 conicto
1772 284 1991 340 conicto
2211 396 2432 509 conicto
2432 128 lineto
2216 34 1988 -15 conicto
1760 -64 1526 -64 conicto
940 -64 598 284 conicto
256 633 256 1226 conicto
256 1839 582 2199 conicto
909 2560 1463 2560 conicto
1960 2560 2249 2229 conicto
2538 1898 2538 1329 conicto
2112 1472 moveto
2112 1809 1931 2010 conicto
1751 2212 1453 2212 conicto
1116 2212 914 2018 conicto
712 1824 682 1472 conicto
2112 1472 lineto
end_ol grestore
showpage
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

+112
View File
@@ -0,0 +1,112 @@
/*******************************************************************************
OPENAIRINTERFACE 0/1/2/3
Copyright(c) 1999 - 2010 EURECOM
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information:
Openair Admin <openair_admin@eurecom.fr>
Mailing List <openair_tech@eurecom.fr>
Forums http://forums.eurecom.fr/openairinterface
Eurecom, 2229, route des cretes, 06560 Valbonne Sophia Antipolis, France
*******************************************************************************/
/*! \file Readme.doxy
* \brief explain how this block is organized, and how it works
* \author Navid Nikaein
* \date 2009
* \version 0.1
* \company Eurecom
* \note This conde is under GNU GENERAL PUBLIC LICENSE, version 2, June 1991
* \email: navid.nikaein@eurecom.fr
* \warning
*/
/*! \mainpage Table of contents
The content of this readme is the following:
-# What is this block about in OpenAirInterface
-# Folders and files description
-# Organization of the folders and their dependancies
-# Makefile targets and how to build
-# How to use through a tutorial: run a simple experimentation
\section _block What is this block about in OpenAirInterface ?
It essentially means "the hardware part" located at openair0.
Explain through the figures:
\image html image.png "caption" width=3cm
\image latex image.pdf "caption"
More information about ??? can be found on the Twiki:
https://twiki.eurecom.fr/twiki/bin/view/OpenAirInterface/WebHome
\section _folders Folders and files description
The structure is the following:
<table>
<tr><td>File/Folder</td> <td> Description </td> </tr>
</table>
- Folder1: Contains this and that
- Folder2: Contains this and that
- init.bash: A simple script file, that any user SHOULD source from its environment personal set-up script (this is typically ~/.bashrc) by adding the following lines to it:
This is my ~/.bashrc file or equivalent export OPENAIRX=path/to/my/openairX/folder source $OPENAIRX/init.bash. The file includes variable definitions & path settings to access softwares, sources & Makefiles, software distribution in openair, and so on.
YOU DEFINETELY NEED TO SOURCE THIS FILE. Description
\section _organization Organization of the folders and their dependancies
The 3 folders have the following structures
- Folder1/subfolder1/: contains any ressource related to the design
- Folder2/subfolder2/: contains
- Folder2/src/
- Folder2/lib/
- Folder2/bin/
Explain where are the source files.
Explain the relationship with other Blocks.
\section _makefile Makefile targets and how to build
Explain whether you are using symbolic links or not,
how to backup/archive
how to generate the tags
how to print the vars
how to create the documentation
\section _howto How to use through a tutorial: run a simple experimentation
...
*/
+120
View File
@@ -0,0 +1,120 @@
/*******************************************************************************
OPENAIRINTERFACE 0/1/2/3
Copyright(c) 1999 - 2010 EURECOM
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information:
Openair Admin <openair_admin@eurecom.fr>
Mailing List <openair_tech@eurecom.fr>
Forums http://forums.eurecom.fr/openairinterface
Eurecom, 2229, route des cretes, 06560 Valbonne Sophia Antipolis, France
*******************************************************************************/
/*________________________OEPNAIR/OPENAIR0/________________________
File : Readme.txt
Authors : navid nikaein
Company : EURECOM
Emails : navid.nikaein@eurecom.fr
________________________________________________________________*/
-------------------------
Table of contents
-------------------------
The content of this readme is the following:
1) What is this block about in OpenAirInterface
2) Folders and files description
3) Organization of the folders and their dependancies
4) Makefile targets and how to build
5) How to use through a tutorial: run a simple experimentation
------------------------------------------------
1) What is this block about in OpenAirInterface ?
-----------------------------------------------
It essentially means "the hardware part" located at openair0.
More information about ??? can be found on the Twiki:
https://twiki.eurecom.fr/twiki/bin/view/OpenAirInterface/WebHome
-----------------------------------------
2) Folders and files description
-----------------------------------------
File/Folder Description
----------- -----------
- Folder1/ contains
- Folder2/ contains
- init.bash A simple script file, that any user SHOULD source from
its environment personal set-up script (this is typically ~/.bashrc)
by adding the following lines to it:
# This is my ~/.bashrc file or equivalent
export OPENAIRX=path/to/my/openairX/folder
source $OPENAIRX/init.bash
The file includes variable definitions & path settings to
access softwares, sources & Makefiles, software
distribution in openair, and so on.
YOU DEFINETELY NEED TO SOURCE THIS FILE.
----------------------------------------------------
3) Organization of the folders and their dependancies
----------------------------------------------------
The 3 folders have the following structures
- Folder1/subfolder1/ contains any ressource related to the design
- Folder2/subfolder2/ contains
- Folder2/src/
- Folder2/lib/
- Folder2/bin/
Explain where are the source files.
Explain the relationship with other Blocks.
-----------------------------------------
4) Makefile targets and how to build
-----------------------------------------
Explain whether you are using symbolic links or not,
how to backup/archive
how to generate the tags
how to print the vars
how to create the documentation
----------------------------------------------------------------
6) How to use through a tutorial: run a simple experimentation
----------------------------------------------------------------
...
+34
View File
@@ -0,0 +1,34 @@
# cat /etc/radvd.conf
interface eth0
{
AdvSendAdvert on;
AdvIntervalOpt on;
AdvHomeAgentFlag on;
MinRtrAdvInterval 0.1;
MaxRtrAdvInterval 0.3;
AdvReachableTime 30000;
AdvRetransTimer 500;
prefix 2001:1::1/64
{
AdvOnLink on;
AdvValidLifetime 20;
AdvPreferredLifetime 15;
AdvAutonomous on;
AdvRouterAddr on;
};
prefix fec0:1000::1/64
{
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
AdvValidLifetime 5;
AdvPreferredLifetime 1;
};
};
+34
View File
@@ -0,0 +1,34 @@
# cat /etc/radvd.conf
interface eth0
{
AdvSendAdvert on;
AdvIntervalOpt on;
AdvHomeAgentFlag on;
MinRtrAdvInterval 0.1;
MaxRtrAdvInterval 0.3;
AdvReachableTime 30000;
AdvRetransTimer 500;
prefix 2001:1::1/64
{
AdvValidLifetime 20;
AdvPreferredLifetime 15;
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
};
prefix fec0:2000::1/64
{
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
AdvValidLifetime 10;
AdvPreferredLifetime 1;
};
};
+113
View File
@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--DOCTYPE vnuml SYSTEM "/usr/local/share/xml/vnuml/vnuml.dtd"-->
<!DOCTYPE vnuml SYSTEM "/packages/vnuml_1.8.3/share/xml/vnuml/vnuml.dtd">
<!--
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE vnuml SYSTEM "/packages/vnuml_1.8.3/share/xml/vnuml/vnuml.dtd">
This file describe the Wireless Mesh Network topology for Chorist Project
Author:
Huu-Nghia.Nguyen@eurecom.fr
Christian.Bonnet@eurecom.fr
-->
<vnuml>
<global>
<version>1.8</version>
<simulation_name>chorist_inter</simulation_name>
<automac/>
<vm_mgmt type="none" />
<vm_defaults exec_mode="mconsole">
<filesystem type="cow">/home/Local_Data/nguyenhn/airnet/root_fs.fc6</filesystem>
<kernel>/home/Local_Data/nguyenhn/airnet/linux</kernel>
<!--
<filesystem type="cow">/home/all/root_fs.fc6</filesystem>
<kernel>/home/all/linux</kernel>
-->
<console id="0">xterm</console>
<console id="1">pts</console>
<console id="2">pts</console>
<console id="3">pts</console>
<console id="4">pts</console>
<console id="5">pts</console>
</vm_defaults>
</global>
<net name="C1" mode="uml_switch" hub="no" />
<net name="C2" mode="uml_switch" hub="no" />
<net name="MR1.0" mode="uml_switch" hub="yes" />
<net name="MR2.0" mode="uml_switch" hub="yes" />
<net name="MN1.0" mode="uml_switch" hub="yes" />
<net name="MN2.0" mode="uml_switch" hub="yes" />
<!-- Correspondent Node -->
<vm name="RELAY">
<if id="0" net="C1">
<ipv6>2001:100::3/64</ipv6>
</if>
<if id="1" net="C2">
<ipv6>2001:200::3/64</ipv6>
</if>
</vm>
<!-- Cluster Heads -->
<vm name="CH1">
<if id="0" net="C1">
<ipv6>2001:100::1/64</ipv6>
</if>
<route type="ipv6" gw="2001:100::3">2001:200::/64</route> <!-- forward to RELAY to Cluster2-->
<route type="ipv6" gw="2001:100::2">2001:1::1/128</route> <!-- forward to MR1 to MR1.IF0 -->
<forwarding type="ip"/>
</vm>
<vm name="CH2">
<if id="0" net="C2">
<ipv6>2001:200::1/64</ipv6>
</if>
<route type="ipv6" gw="2001:200::3">2001:100::/64</route> <!-- forward to RELAY to Cluster1-->
<route type="ipv6" gw="2001:200::2">2001:1::2/128</route> <!-- forward to MR1 to MR2.IF0 -->
<forwarding type="ip"/>
</vm>
<!-- Mobile Routers-->
<vm name="MR1">
<if id="1" net="C1">
<ipv6>2001:100::2/64</ipv6>
</if>
<if id="0" net="MR1.0">
<ipv6>2001:1::1/64</ipv6>
</if>
<route type="ipv6" gw="2001:100::1">default</route> <!-- default gateway is CH1.IF0 -->
<forwarding type="ip"/>
</vm>
<vm name="MR2">
<if id="1" net="C2">
<ipv6>2001:200::2/64</ipv6>
</if>
<if id="0" net="MR2.0">
<ipv6>2001:1::2/64</ipv6>
</if>
<route type="ipv6" gw="2001:200::1">default</route> <!-- default gateway is CH2.IF0 -->
<forwarding type="ip"/>
</vm>
<!-- Mobile Nodes -->
<vm name="MN1">
<if id="0" net="MN1.0">
</if>
</vm>
<vm name="MN2">
<if id="0" net="MN2.0">
</if>
</vm>
</vnuml>
+371
View File
@@ -0,0 +1,371 @@
#
# Utilities for Proxy Mobile IPv6
# Author Huu-Nghia.Nguyen@eurecom.fr
#
#==========================================================================
proc progress { start end } {
global ns
set now [$ns now]
if {$now <= $end && $now >= $start} {
set percent [expr floor(($now-$start)*100/($end-$start))]
puts "Progress: $percent%"
$ns at [expr $now + 1] "progress $start $end"
} else {
puts "Progres: 100% Completed!"
}
}
#==========================================================================
#Install radvd.conf in to the virtual machine <vmid> = {MN, AR1, AR2, CN, Router}
#You need to create the file <vmid>_radvd.conf first (Attention: No check for file existence)
#
proc install-radvd vmid {
global vms
exec cp $vmid\_radvd.conf [$vms($vmid) set opt(uml_dir)]/hostfs/radvd.conf
job $vmid cp /mnt/hostfs/radvd.conf /etc/radvd.conf
}
#==========================================================================
proc start-all-pmip6d { options } {
job CH1 /mnt/hostfs/pmip6d $options -i -c -L 2001:100::1 -A 2001:200::1
job MR1 /mnt/hostfs/pmip6d $options -i -m -s -L 2001:100::1 -E 2001:100::2 -N 2001:1::1
job CH2 /mnt/hostfs/pmip6d $options -i -c -L 2001:200::1 -A 2001:100::1
job MR2 /mnt/hostfs/pmip6d $options -i -m -s -L 2001:200::1 -E 2001:200::2 -N 2001:1::2
}
#==========================================================================
proc stop-all-pmip6d {} {
job CH1 killall -INT pmip6d
job CH2 killall -INT pmip6d
job MR1 killall -INT pmip6d
job MR2 killall -INT pmip6d
job MN1 ifconfig eth0 down
job MN2 ifconfig eth0 down
}
#==========================================================================
proc config-chorist {} {
job RELAY sysctl -w net.ipv6.conf.all.forwarding=1
install-radvd MR1
install-radvd MR2
job MR1 sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
job MR2 sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
job MR1 service radvd restart
job MR2 service radvd restart
global vms
exec cp /usr/bin/telnet [$vms(CH1) set opt(uml_dir)]/hostfs/
exec cp /usr/bin/telnet [$vms(CH2) set opt(uml_dir)]/hostfs/
exec cp /usr/bin/telnet [$vms(MR1) set opt(uml_dir)]/hostfs/
exec cp /usr/bin/telnet [$vms(MR2) set opt(uml_dir)]/hostfs/
}
#==========================================================================
proc progress { start end } {
global ns
set now [$ns now]
if {$now <= $end && $now >= $start} {
set percent [expr floor(($now-$start)*100/($end-$start))]
puts "Progress: $percent%"
$ns at [expr $now + 1] "progress $start $end"
} else {
puts "Progres: 100% Completed!"
}
}
#==========================================================================
proc start-test-ro { options {filename "ro.log"} } {
global ns
set now [$ns now]
#Step 1:
progress $now [expr $now + 25]
setdest_1 150 100 100
setdest_2 450 100 100
job MN1 ifconfig eth0 down
job MN2 ifconfig eth0 down
#Start pmip6d
$ns at [expr $now+5] "start-all-pmip6d $options"
#MN1 joins the network
$ns at [expr $now+10] "job MN1 ifconfig eth0 up"
$ns at [expr $now +11] "job MN2 ifconfig eth0 up"
$ns at [expr $now+25] "job MN2 ping6 2001:1::fcfd:ff:fe00:600"
}
#==========================================================================
proc stop-test-ro {} {
global ns
set now [$ns now]
progress $now [expr $now + 6]
$ns at [expr $now+5] "job MN1 ifconfig eth0 down"
$ns at [expr $now+5] "job MN2 ifconfig eth0 down"
#Finish
$ns at [expr $now+5] "puts \"Finish, stop all processes and services\""
$ns at [expr $now+5] "stop-all-pmip6d"
$ns at [expr $now+6] "job MN2 killall -INT ping6"
}
#==========================================================================
proc chorist-mobility { {filename "mobility.log"} } {
global ns
set now [$ns now]
#Step 1:
progress $now [expr $now + 200]
setdest_1 150 100 100
setdest_2 450 100 100
job MN1 ifconfig eth0 down
job MN2 ifconfig eth0 down
#Observation
$ns at [expr $now+5] "start-all-pmip6d"
#MN1 joins the network
$ns at [expr $now+10] "job MN1 ifconfig eth0 up"
$ns at [expr $now +10] "job MN2 ifconfig eth0 up"
#MN1 is moving to MR2
$ns at [expr $now+25] "setdest_1 450 100 100"
#MN1 is moving back MR1
$ns at [expr $now+100] "setdest_1 100 100 100"
#MN1 power off
$ns at [expr $now+175] "job MN1 ifconfig eth0 down"
#Finish
$ns at [expr $now+200] "puts \"Finish, stop all processes and services\""
#$ns at [expr $now+150] "stop-all-pmip6d"
$ns at [expr $now+201] "puts \"chorist-mobility: DONE!\""
}
#==========================================================================
proc chorist-basic { {filename "basic.log"} } {
global ns
set now [$ns now]
#Step 1:
progress $now [expr $now + 150]
setdest_1 150 100 100
job MN1 ifconfig eth0 down
#Observation
$ns at [expr $now+5] "start-all-pmip6d"
$ns at [expr $now+5] "job CH tcpdump -s 256 -i eth1 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+5] "job MR1 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+5] "job MR2 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
#MN1 joins the network & CN start to ping down; MN1 ping up
$ns at [expr $now+10] "job MN1 ifconfig eth0 up"
$ns at [expr $now+15] "job CN ping6 2001:1::fcfd:ff:fe00:500"
$ns at [expr $now+15] "job MN1 ping6 2000::1"
#MN1 is moving to MR2
$ns at [expr $now+25] "setdest_1 450 100 100"
#MN1 is moving back MR1
$ns at [expr $now+75] "setdest_1 100 100 100"
#MN1 power off
$ns at [expr $now+125] "job MN1 ifconfig eth0 down"
#Finish
$ns at [expr $now+150] "puts \"Finish, stop all processes and services\""
$ns at [expr $now+150] "job CN killall -INT ping6"
$ns at [expr $now+150] "job MN1 killall -INT ping6"
$ns at [expr $now+150] "job CH killall -INT tcpdump"
$ns at [expr $now+150] "job MR1 killall -INT tcpdump"
$ns at [expr $now+150] "job MR2 killall -INT tcpdump"
#$ns at [expr $now+150] "stop-all-pmip6d"
$ns at [expr $now+151] "puts \"chorist-basic: DONE!\""
}
proc chorist-tcp-basic { {filename "tcp_basic.log"} {copt "-l 4M"} {options ""} } {
global ns
set now [$ns now]
#Step 1:
progress $now [expr $now + 150]
setdest_1 150 100 100
job MN1 ifconfig eth0 down
job CN ifconfig eth0 mtu 1300
#Observation
$ns at [expr $now+5] "start-all-pmip6d"
$ns at [expr $now+5] "job CN iperf -V -s $options"
$ns at [expr $now+5] "job CH tcpdump -s 256 -i eth1 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+5] "job MR1 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+5] "job MR2 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+5] "job CN tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
#MN1 joins the network & send tcp traffic to CN
$ns at [expr $now+10] "job MN1 ifconfig eth0 up mtu 1300"
$ns at [expr $now+20] "job MN1 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+20] "job MN1 iperf -V -c 2000::1 $copt $options"
#MN1 is moving to MR2
$ns at [expr $now+45] "setdest_1 450 100 100"
#MN1 is moving back MR1
$ns at [expr $now+75] "setdest_1 100 100 100"
#MN1 power off
$ns at [expr $now+124] "job MN1 killall -INT tcpdump"
$ns at [expr $now+125] "job MN1 ifconfig eth0 down"
#Finish
$ns at [expr $now+150] "puts \"Finish, stop all processes and services\""
$ns at [expr $now+150] "job CN killall -INT iperf"
$ns at [expr $now+149] "job MN1 killall -INT iperf"
$ns at [expr $now+150] "job CH killall -INT tcpdump"
$ns at [expr $now+150] "job MR1 killall -INT tcpdump"
$ns at [expr $now+150] "job MR2 killall -INT tcpdump"
$ns at [expr $now+150] "job CN killall -INT tcpdump"
#$ns at [expr $now+150] "stop-all-pmip6d"
$ns at [expr $now+151] "puts \"chorist-basic: DONE!\""
}
proc chorist-udp-basic { {filename "udp_basic.log"} {copt "-t 100"} {options "-u"} } {
global ns
set now [$ns now]
#Step 1:
progress $now [expr $now + 150]
setdest_1 150 100 100
job MN1 ifconfig eth0 down
job CN ifconfig eth0 mtu 1300
#Observation
$ns at [expr $now+5] "start-all-pmip6d"
$ns at [expr $now+5] "job CH tcpdump -s 256 -i eth1 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+5] "job MR1 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+5] "job MR2 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+5] "job CN tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
#MN1 joins the network & send tcp traffic to CN
$ns at [expr $now+10] "job MN1 ifconfig eth0 up mtu 1300"
$ns at [expr $now+20] "job MN1 iperf -V -s $options"
$ns at [expr $now+20] "job MN1 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+25] "job CN iperf -V -c 2001:1::fcfd:ff:fe00:500 $copt $options"
#MN1 is moving to MR2
$ns at [expr $now+45] "setdest_1 450 100 100"
#MN1 is moving back MR1
$ns at [expr $now+75] "setdest_1 100 100 100"
#MN1 power off
$ns at [expr $now+124] "job MN1 killall -INT tcpdump"
$ns at [expr $now+125] "job MN1 ifconfig eth0 down"
#Finish
$ns at [expr $now+150] "puts \"Finish, stop all processes and services\""
$ns at [expr $now+150] "job CN killall -INT iperf"
$ns at [expr $now+149] "job MN1 killall -INT iperf"
$ns at [expr $now+150] "job CH killall -INT tcpdump"
$ns at [expr $now+150] "job MR1 killall -INT tcpdump"
$ns at [expr $now+150] "job MR2 killall -INT tcpdump"
$ns at [expr $now+150] "job CN killall -INT tcpdump"
#$ns at [expr $now+150] "stop-all-pmip6d"
$ns at [expr $now+151] "puts \"chorist-udp-basic: DONE!\""
}
#==========================================================================
proc chorist-intra { {filename "intra.log"} } {
global ns stdout
set now [$ns now]
#Step 1:
progress $now [expr $now + 201]
setdest_1 150 100 100
job MN1 ifconfig eth0 down
job MN2 ifconfig eth0 down
#Observation
set stdout "/mnt/hostfs/pmip6d.log"
$ns at [expr $now+5] "start-all-pmip6d"
$ns at [expr $now+5] "job CH tcpdump -s 256 -i eth1 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+5] "job MR1 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+5] "job MR2 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
set stdout "/dev/null"
#MN1 & MN2 joins the network
$ns at [expr $now+10] "job MN1 ifconfig eth0 up"
$ns at [expr $now+10] "job MN2 ifconfig eth0 up"
#MN1 & MN2 ping each other
set stdout "/mnt/hostfs/ping6.log"
$ns at [expr $now+20] "job MN2 ping6 2001:1::fcfd:ff:fe00:500"
$ns at [expr $now+20] "job MN1 ping6 2001:1::fcfd:ff:fe00:600"
#MN1 is moving to MR2
$ns at [expr $now+35] "setdest_1 450 100 100"
#MN1 is moving back MR1
$ns at [expr $now+100] "setdest_1 100 100 100"
#MN1 & MN2 power off
set stdout "/dev/null"
$ns at [expr $now+175] "job MN1 ifconfig eth0 down"
$ns at [expr $now+175] "job MN2 ifconfig eth0 down"
#Finish
$ns at [expr $now+200] "puts \"Finish, stop all processes and services\""
$ns at [expr $now+200] "job MN2 killall -INT ping6"
$ns at [expr $now+200] "job MN1 killall -INT ping6"
$ns at [expr $now+200] "job CH killall -INT tcpdump"
$ns at [expr $now+200] "job MR1 killall -INT tcpdump"
$ns at [expr $now+200] "job MR2 killall -INT tcpdump"
#$ns at [expr $now+200] "stop-all-pmip6d"
$ns at [expr $now+200] "puts \"chorist-intra: DONE!\""
set stdout "/mnt/hostfs/stdout"
}
proc chorist-tcp-intra { {filename "tcp_intra.log"} {copt "-l 4M"} {options ""} } {
global ns
set now [$ns now]
#Step 1:
progress $now [expr $now + 150]
setdest_1 150 100 100
setdest_2 450 100 100
job MN1 ifconfig eth0 down
job MN2 ifconfig eth0 down
#Observation
$ns at [expr $now+5] "start-all-pmip6d"
$ns at [expr $now+5] "job CH tcpdump -s 256 -i eth1 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+5] "job MR1 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+5] "job MR2 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
#MN1 joins the network & CN start to ping down; MN1 ping up
$ns at [expr $now+10] "job MN1 ifconfig eth0 up mtu 1300"
$ns at [expr $now+10] "job MN2 ifconfig eth0 up mtu 1300"
$ns at [expr $now+20] "job MN2 iperf -V -s $options"
$ns at [expr $now+20] "job MN2 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+25] "job MN1 iperf -V -c 2001:1::fcfd:ff:fe00:600 $copt $options"
#MN1 is moving to MR2
$ns at [expr $now+35] "setdest_1 450 100 100"
#MN1 is moving back MR1
$ns at [expr $now+75] "setdest_1 100 100 100"
#MN1 MN2 power off
$ns at [expr $now+124] "job MN2 killall -INT tcpdump"
$ns at [expr $now+125] "job MN1 ifconfig eth0 down"
$ns at [expr $now+125] "job MN2 ifconfig eth0 down"
#Finish
$ns at [expr $now+150] "puts \"Finish, stop all processes and services\""
$ns at [expr $now+150] "job MN2 killall -INT iperf"
$ns at [expr $now+149] "job MN1 killall -INT iperf"
$ns at [expr $now+150] "job CH killall -INT tcpdump"
$ns at [expr $now+150] "job MR1 killall -INT tcpdump"
$ns at [expr $now+150] "job MR2 killall -INT tcpdump"
#$ns at [expr $now+150] "stop-all-pmip6d"
$ns at [expr $now+151] "puts \"chorist-basic: DONE!\""
}
@@ -0,0 +1,66 @@
#http://wiki.tcl.tk/1968
#from Jeffrey Hobbs
puts -nonewline "vnman (0) % "
if {!$tcl_interactive} {
set long_command ""
set verbose_history 0
if {![catch {rename unknown tcl_unknown}]} {
proc unknown {cmdname args} {
if {[regexp "^!..*" $cmdname]} {
banghist [string range $cmdname 1 end]
} else {
tcl_unknown $cmdname $args
}
}
}
proc banghist {val} {
global verbose_history
if {![string compare $val "!"]} {set val ""}
if {$verbose_history} {puts "[history event $val]"}
history redo $val
}
if {![info exists tcl_prompt1]} {
set tcl_prompt1 {puts -nonewline "vnman ([history nextid]) % "}
}
proc read_stdin {} {
global eventLoop tcl_prompt1 long_command
set l [gets stdin]
if {[eof stdin]} {
set eventLoop "done" ;# terminate the vwait eventloop
} else {
if {[string compare $l {}]} {
append long_command "\n$l"
set l $long_command
if {[info complete $l]} {
if {[catch {uplevel \#0 history add [list $l] exec} err]} {
puts stderr $err
} elseif {[string compare $err {}]} {
puts $err
}
set long_command ""
catch $tcl_prompt1
} else {
puts -nonewline "> "
}
} elseif {![string compare $long_command {}]} {
catch $tcl_prompt1
} else {
puts -nonewline "> "
}
flush stdout
}
}
# set up our keyboard read event handler:
# Vector stdin data to the socket
fileevent stdin readable read_stdin
catch $tcl_prompt1
flush stdout
# wait for and handle or stdin events...
#vwait eventLoop
}
+161
View File
@@ -0,0 +1,161 @@
#
# Management Script for Virtual Networking User-Mode-Linux
# Author: Huu-Nghia Nguyen
# Email: Huu-Nghia.Nguyen@eurecom.fr
# Eurecom Institute
#
Class VirtualMachine
proc flatten list {return [string map {\{ "" \} ""} $list]}
VirtualMachine instproc init {vm_opt_list} {
$self instvar opt sname
array set sname {}
array set opt $vm_opt_list
set dir [split $opt(uml_dir) "/"]
set len [llength $dir]
set opt(vmid) [lindex $dir [expr $len-2]]
set opt(scenario) [lindex $dir [expr $len-4]]
puts "VM ($opt(scenario).$opt(vmid)) running in $opt(uml_dir) is created"
}
VirtualMachine instproc mconsole args {
$self instvar opt
set dir $opt(uml_dir)$opt(umid)
set cmdline "cd $dir && uml_mconsole mconsole [flatten $args]"
puts "execute the command: $cmdline"
set result [exec sh -c "cd $dir && uml_mconsole mconsole [flatten $args]" 2>/dev/null]
return $result
}
VirtualMachine instproc getinfo {param idx} {
$self instvar opt
return [lindex [split $opt($param) ","] $idx]
}
########################################################################
#
# PARSE THE ENVIRONMENT
#
########################################################################
set vm_cmds [exec ps -ef | grep linux | sed s/.*linux//g | sort | uniq ]
## Split into vm_cmd_lines
set vm_cmd_lines [split $vm_cmds "\n"]
array unset vms
set stdout "/mnt/hostfs/stdout"
set stderr "/mnt/hostfs/stdout"
set filestdout ""
## Iterate over the vm_cmd_lines
foreach cmd $vm_cmd_lines {
#puts "---------\nAnalyse the command line:"
#puts $cmd
set params [split $cmd " "]
array unset opt
foreach param $params {
set fields [split $param "="]
set optname [lindex $fields 0]
set optval [lindex $fields 1]
if {$optval != ""} {
set opt($optname) $optval
}
}
if {[array size opt] > 0} {
set vm [new VirtualMachine [array get opt]]
set vms([$vm set opt(vmid)]) $vm
}
}
########################################################################
#
# COMMAND IMPLEMENTATION
#
########################################################################
set helpstr "Command list:\n\
\tconfig <vm> <device\[=options\]>: querry/add a new device to <vm>\n\
\tjob <vm> <command>: execute a command in <vm> using sh -c\n\
\tresult <vm>: return result of last job\n\
\tterm <vm> <conid>: open the console <conid> of <vm>\n\
\tmconsole <vm> <args>: run uml_mconsole for <vm>\n\
\tsetdest <x> <y> <speed>: \n\t\tset destination (<x>, <y>) for the MN with the speed of <speed> m/s\n"
proc help {} {
global helpstr
puts $helpstr
}
proc config {vmid args} {
global vms
set vm $vms($vmid)
return [$vm mconsole config $args]
}
proc job {vmid args} {
global vms filestdout
global stdout stderr
set vm $vms($vmid)
catch { exec rm opt(uml_dir)]/hostfs/$stdout }
return [$vm mconsole exec "'" $args ">$stdout 2>$stderr '"]
regsub {(.*)/(.*)} $stdout {\2} filename
set filestdout [$vm set opt(uml_dir)]/hostfs/$filename
exec cat $filestdout
}
proc lastresult {} {
exec cat $filestdout
}
proc result {vmid} {
global vms
global stdout stderr
set vm $vms($vmid)
regsub {(.*)/(.*)} $stdout {\2} filename
set filestdout [$vm set opt(uml_dir)]/hostfs/$filename
exec cat $filestdout
}
proc term {vmid conid} {
global vms
set vm $vms($vmid)
#Create screen name
set result [$vm mconsole config $conid]
regsub {(.*):(.*)} $result {\2} device
regsub {(.*)/(\d+)} $device {\2} devid
set screenname "$conid$devid$vmid"
#Try to look up in the env if the screen exist?
set filename /tmp/vnman-screen-[pid].cfg
catch { exec screen -ls > $filename } {}
set output [split [exec cat $filename] "\n"]
if {[lsearch -regex $output ".*$screenname.*"] < 0} {exec screen -d -m -S $screenname $device}
catch { exec rm -f $filename}
#Show the terminal
exec konsole -e screen -d -r $screenname &
}
proc mconsole {vmid args} {
global vms
set vm $vms($vmid)
return [$vm mconsole $args]
}
########################################################################
#
# COMMAND LINE INTERFACE
#
########################################################################
puts "VM lists: [array names vms]"
help
source vninteractive.tcl
source wirelesstopo.tcl
stop
+171
View File
@@ -0,0 +1,171 @@
#! /bin/nse
# An example script for the usage of ns-2 in emulation mode:
# Uses:
# 1. Network/Daemon agents (by Huu-Nghia.Nguyen@eurecom.fr) to access to a uml_switch at level II
# 2. Tap/Raw agents to map between real MAC addresses and NS-2 IP addresses
# 3. In-memory compression of the trace file to reduce disk write operations during simulation
# (currently done via gzip)
# Common variables
#
set scriptname /tmp/chorist_inter.tr
set val(chan) Channel/WirelessChannel ;# Channel Type
set val(prop) Propagation/TwoRayGround ;# radio-propagation model
set val(netif) Phy/WirelessPhy ;# network interface type
set val(mac) Mac/802_11 ;# MAC type
set val(ifq) Queue/DropTail/PriQueue ;# interface queue type
set val(ll) LL ;# link layer type
set val(ant) Antenna/OmniAntenna ;# antenna model
set val(ifqlen) 50 ;# max packet in ifq
set val(x) 800 ;# x range in meters
set val(y) 600 ;# y range in meters
set val(rp) DumbAgent ;# routing protocol
set val(nn) 4 ;# number of mobile nodes
#set val(stime) 200.0 ;# simulation time
set val(stime) 360000.0 ;# simulation time = 100 hours
set ns [new Simulator]
$ns use-scheduler RealTime
set tracefd [open $scriptname w]
$ns trace-all $tracefd
#set namtrace [open $scriptname.nam w]
#set namtrace [open "|nam -r 0.1 -" w]
#$ns namtrace-all-wireless $namtrace $val(x) $val(y)
#Procedure needed when running nam in real-time
proc NamTime {} {
#Send time to nam periodically
global ns namtrace
set now [$ns now]
set next [expr $now + 0.05]
puts $namtrace "T -t $now"
flush $namtrace
$ns at $next "NamTime"
}
#$ns at 1.0 "NamTime"
proc UniformErr {} {
set err [new ErrorModel]
$err unit packet
$err set rate_ 0.01
$err ranvar [new RandomVariable/Uniform]
$err drop-target [new Agent/Null]
return $err
}
set topo [new Topography]
$topo load_flatgrid $val(x) $val(y)
# Create GOD
create-god $val(nn)
# Create channel
set chan_1 [new $val(chan)]
set chan_2 [new $val(chan)]
# Configure node parameters
$ns node-config -adhocRouting $val(rp) \
-llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $val(ant) \
-propType $val(prop) \
-phyType $val(netif) \
-topoInstance $topo \
-agentTrace ON \
-routerTrace ON \
-macTrace ON \
-movementTrace ON \
-channel $chan_1 \
-IncomingErrProc UniformErr
#Procedure to configure an ns-2 node initially
proc setup_node {id x y z color} {
global ns node_
set node_($id) [$ns node]
$node_($id) set X_ $x
$node_($id) set Y_ $y
$node_($id) set Z_ $z
$node_($id) color $color
$ns at 0 "$node_($id) setdest $x $y 0"
$ns at 0 "$node_($id) color $color"
$node_($id) random-motion 0
}
#Topo table:
set RELAY $vms(RELAY)
set CH1 $vms(CH1)
set CH2 $vms(CH2)
set MR1 $vms(MR1)
set MR2 $vms(MR2)
set MN1 $vms(MN1)
set MN2 $vms(MN2)
set map(1) [list $MR1 eth0 $chan_2 100 100 0 "green"]
set map(2) [list $MR2 eth0 $chan_2 500 100 0 "green"]
set map(3) [list $MN1 eth0 $chan_2 150 100 0 "red"]
set map(4) [list $MN2 eth0 $chan_2 450 100 0 "red"]
Agent/Tap set maxpkt_ 1500
for {set i 1} {$i <= $val(nn)} {incr i} {
$ns node-config -channel [lindex $map($i) 2]
puts "setup_node $i [lindex $map($i) 3] [lindex $map($i) 4] [lindex $map($i) 5] [lindex $map($i) 6]"
setup_node $i [lindex $map($i) 3] [lindex $map($i) 4] [lindex $map($i) 5] [lindex $map($i) 6]
$ns at 0 "$node_($i) start";
$ns at $val(stime) "$node_($i) reset";
#set raw($i) [new Network/Raw]
set raw($i) [new Network/Daemon]
set node [lindex $map($i) 0]
set iff [lindex $map($i) 1]
puts [$node getinfo $iff 1]
#$raw($i) open [$node getinfo $iff 1] readwrite
$raw($i) open [$node getinfo $iff 3] readwrite
#Tap Agent for each node
puts [$node getinfo $iff 2]
#set tagent($i) [new Agent/Tap/Raw [$node getinfo $iff 2]]
# if {$node == $MR2 && $iff == "eth0"} {
# set tagent($i) [new Agent/Tap/Raw fe:fd:0:0:3:0]
# } else {
set tagent($i) [new Agent/Tap/Raw [$node getinfo $iff 1]]
# }
$tagent($i) network $raw($i)
$ns attach-agent $node_($i) $tagent($i)
}
$ns at $val(stime) "stop"
$ns at $val(stime) "puts \"NS EXITING ...\" ; $ns halt"
proc setdest_1 { x y speed} {
global node_
$node_(3) setdest $x $y $speed
}
proc setdest_2 { x y speed} {
global node_
$node_(4) setdest $x $y $speed
}
proc stop {} {
global ns tracefd raw
$ns flush-trace
close $tracefd
for {set i 1} {$i <= $val(nn)} {incr i} {
$raw($i) close
}
}
source utils.tcl
puts "okey"
$ns run
+34
View File
@@ -0,0 +1,34 @@
# cat /etc/radvd.conf
interface eth0
{
AdvSendAdvert on;
AdvIntervalOpt on;
AdvHomeAgentFlag on;
MinRtrAdvInterval 0.1;
MaxRtrAdvInterval 0.3;
AdvReachableTime 1;
AdvRetransTimer 1;
prefix 2001:1::1/64
{
AdvOnLink on;
AdvValidLifetime 20;
AdvPreferredLifetime 15;
AdvAutonomous on;
AdvRouterAddr on;
};
prefix fec0:1000::1/64
{
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
AdvValidLifetime 5;
AdvPreferredLifetime 1;
};
};
+34
View File
@@ -0,0 +1,34 @@
# cat /etc/radvd.conf
interface eth0
{
AdvSendAdvert on;
AdvIntervalOpt on;
AdvHomeAgentFlag on;
MinRtrAdvInterval 0.1;
MaxRtrAdvInterval 0.3;
AdvReachableTime 1;
AdvRetransTimer 1;
prefix 2001:1::1/64
{
AdvValidLifetime 20;
AdvPreferredLifetime 15;
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
};
prefix fec0:2000::1/64
{
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
AdvValidLifetime 10;
AdvPreferredLifetime 1;
};
};
+106
View File
@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--DOCTYPE vnuml SYSTEM "/usr/local/share/xml/vnuml/vnuml.dtd"-->
<!DOCTYPE vnuml SYSTEM "/packages/vnuml_1.8.3/share/xml/vnuml/vnuml.dtd">
<!--
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE vnuml SYSTEM "/packages/vnuml_1.8.3/share/xml/vnuml/vnuml.dtd">
This file describe the Wireless Mesh Network topology for Chorist Project
Author:
Huu-Nghia.Nguyen@eurecom.fr
Christian.Bonnet@eurecom.fr
-->
<vnuml>
<global>
<version>1.8</version>
<simulation_name>chorist</simulation_name>
<automac/>
<vm_mgmt type="none" />
<vm_defaults exec_mode="mconsole">
<filesystem type="cow">/home/Local_Data/nguyenhn/airnet/root_fs.fc6</filesystem>
<kernel>/home/Local_Data/nguyenhn/airnet/linux</kernel>
<!--
<filesystem type="cow">/home/all/root_fs.fc6</filesystem>
<kernel>/home/all/linux</kernel>
-->
<console id="0">xterm</console>
<console id="1">pts</console>
<console id="2">pts</console>
<console id="3">pts</console>
<console id="4">pts</console>
<console id="5">pts</console>
</vm_defaults>
</global>
<net name="Inter" mode="uml_switch" hub="yes" />
<net name="CH.0" mode="uml_switch" hub="yes"/>
<net name="MR1.1" mode="uml_switch" hub="yes" />
<net name="MR2.1" mode="uml_switch" hub="yes" />
<net name="MR1.0" mode="uml_switch" hub="yes" />
<net name="MR2.0" mode="uml_switch" hub="yes" />
<net name="MN1.0" mode="uml_switch" hub="yes" />
<net name="MN2.0" mode="uml_switch" hub="yes" />
<!-- Correspondent Node -->
<vm name="CN">
<if id="0" net="Inter">
<ipv6>2000::1/64</ipv6>
</if>
<route type="ipv6" gw="2000::2">2001::/16</route>
</vm>
<!-- Cluster Heads -->
<vm name="CH">
<if id="1" net="Inter">
<ipv6>2000::2/64</ipv6>
</if>
<if id="0" net="CH.0">
<ipv6>2001:100::1/64</ipv6>
</if>
<route type="ipv6" gw="2001:100::2">2001:1::1/128</route> <!-- forward to MR1 -->
<route type="ipv6" gw="2001:100::3">2001:1::2/128</route> <!-- forward to MR2 -->
<route type="ipv6" gw="2000::2">2000::/16</route> <!-- forward through CH.1-->
<forwarding type="ip"/>
</vm>
<!-- Mobile Routers-->
<vm name="MR1">
<if id="1" net="MR1.1">
<ipv6>2001:100::2/64</ipv6>
</if>
<if id="0" net="MR1.0">
<ipv6>2001:1::1/64</ipv6>
</if>
<route type="ipv6" gw="2001:100::1">default</route> <!-- default gateway is CH.IF0 -->
<forwarding type="ip"/>
</vm>
<vm name="MR2">
<if id="1" net="MR2.1">
<ipv6>2001:100::3/64</ipv6>
</if>
<if id="0" net="MR2.0">
<ipv6>2001:1::2/64</ipv6>
</if>
<route type="ipv6" gw="2001:100::1">default</route> <!-- default gateway is CH.IF0 -->
<forwarding type="ip"/>
</vm>
<!-- Mobile Nodes -->
<vm name="MN1">
<if id="0" net="MN1.0">
</if>
</vm>
<vm name="MN2">
<if id="0" net="MN2.0">
</if>
</vm>
</vnuml>
+106
View File
@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--DOCTYPE vnuml SYSTEM "/usr/local/share/xml/vnuml/vnuml.dtd"-->
<!DOCTYPE vnuml SYSTEM "/packages/vnuml_1.8.3/share/xml/vnuml/vnuml.dtd">
<!--
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE vnuml SYSTEM "/packages/vnuml_1.8.3/share/xml/vnuml/vnuml.dtd">
This file describe the Wireless Mesh Network topology for Chorist Project
Author:
Huu-Nghia.Nguyen@eurecom.fr
Christian.Bonnet@eurecom.fr
-->
<vnuml>
<global>
<version>1.8</version>
<simulation_name>chorist_intra</simulation_name>
<automac/>
<vm_mgmt type="none" />
<vm_defaults exec_mode="mconsole">
<filesystem type="cow">/home/Local_Data/nguyenhn/airnet/root_fs.fc6</filesystem>
<kernel>/home/Local_Data/nguyenhn/airnet/linux</kernel>
<!--
<filesystem type="cow">/home/all/root_fs.fc6</filesystem>
<kernel>/home/all/linux</kernel>
-->
<console id="0">xterm</console>
<console id="1">pts</console>
<console id="2">pts</console>
<console id="3">pts</console>
<console id="4">pts</console>
<console id="5">pts</console>
</vm_defaults>
</global>
<net name="Inter" mode="uml_switch" hub="yes" />
<net name="CH.0" mode="uml_switch" hub="yes"/>
<net name="MR1.1" mode="uml_switch" hub="yes" />
<net name="MR2.1" mode="uml_switch" hub="yes" />
<net name="MR1.0" mode="uml_switch" hub="yes" />
<net name="MR2.0" mode="uml_switch" hub="yes" />
<net name="MN1.0" mode="uml_switch" hub="yes" />
<net name="MN2.0" mode="uml_switch" hub="yes" />
<!-- Correspondent Node -->
<vm name="CN">
<if id="0" net="Inter">
<ipv6>2000::1/64</ipv6>
</if>
<route type="ipv6" gw="2000::2">2001::/16</route>
</vm>
<!-- Cluster Heads -->
<vm name="CH">
<if id="1" net="Inter">
<ipv6>2000::2/64</ipv6>
</if>
<if id="0" net="CH.0">
<ipv6>2001:100::1/64</ipv6>
</if>
<route type="ipv6" gw="2001:100::2">2001:1::1/128</route> <!-- forward to MR1 -->
<route type="ipv6" gw="2001:100::3">2001:1::2/128</route> <!-- forward to MR2 -->
<route type="ipv6" gw="2000::2">2000::/16</route> <!-- forward through CH.1-->
<forwarding type="ip"/>
</vm>
<!-- Mobile Routers-->
<vm name="MR1">
<if id="1" net="MR1.1">
<ipv6>2001:100::2/64</ipv6>
</if>
<if id="0" net="MR1.0">
<ipv6>2001:1::1/64</ipv6>
</if>
<route type="ipv6" gw="2001:100::1">default</route> <!-- default gateway is CH.IF0 -->
<forwarding type="ip"/>
</vm>
<vm name="MR2">
<if id="1" net="MR2.1">
<ipv6>2001:100::3/64</ipv6>
</if>
<if id="0" net="MR2.0">
<ipv6>2001:1::2/64</ipv6>
</if>
<route type="ipv6" gw="2001:100::1">default</route> <!-- default gateway is CH.IF0 -->
<forwarding type="ip"/>
</vm>
<!-- Mobile Nodes -->
<vm name="MN1">
<if id="0" net="MN1.0">
</if>
</vm>
<vm name="MN2">
<if id="0" net="MN2.0">
</if>
</vm>
</vnuml>
+326
View File
@@ -0,0 +1,326 @@
#
# Utilities for Proxy Mobile IPv6
# Author Huu-Nghia.Nguyen@eurecom.fr
#
#==========================================================================
proc progress { start end } {
global ns
set now [$ns now]
if {$now <= $end && $now >= $start} {
set percent [expr floor(($now-$start)*100/($end-$start))]
puts "Progress: $percent%"
$ns at [expr $now + 1] "progress $start $end"
} else {
puts "Progres: 100% Completed!"
}
}
#==========================================================================
#Install radvd.conf in to the virtual machine <vmid> = {MN, AR1, AR2, CN, Router}
#You need to create the file <vmid>_radvd.conf first (Attention: No check for file existence)
#
proc install-radvd vmid {
global vms
exec cp $vmid\_radvd.conf [$vms($vmid) set opt(uml_dir)]/hostfs/radvd.conf
job $vmid cp /mnt/hostfs/radvd.conf /etc/radvd.conf
}
#==========================================================================
proc start-all-pmip6d {} {
job CH /mnt/hostfs/pmip6d -c -L 2001:100::1
job MR1 /mnt/hostfs/pmip6d -m -s -L 2001:100::1 -E 2001:100::2 -N 2001:1::1
job MR2 /mnt/hostfs/pmip6d -m -s -L 2001:100::1 -E 2001:100::3 -N 2001:1::2
}
#==========================================================================
proc stop-all-pmip6d {} {
job CH killall -INT pmip6d
job MR1 killall -INT pmip6d
job MR2 killall -INT pmip6d
job MN1 ifconfig eth0 down
job MN2 ifconfig eth0 down
}
#==========================================================================
proc config-chorist {} {
install-radvd MR1
install-radvd MR2
job MR1 sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
job MR2 sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
job MR1 service radvd restart
job MR2 service radvd restart
}
#==========================================================================
proc progress { start end } {
global ns
set now [$ns now]
if {$now <= $end && $now >= $start} {
set percent [expr floor(($now-$start)*100/($end-$start))]
puts "Progress: $percent%"
$ns at [expr $now + 1] "progress $start $end"
} else {
puts "Progres: 100% Completed!"
}
}
#==========================================================================
proc chorist-mobility { {filename "mobility.log"} } {
global ns
set now [$ns now]
#Step 1:
progress $now [expr $now + 200]
setdest_1 150 100 100
setdest_2 450 100 100
job MN1 ifconfig eth0 down
job MN2 ifconfig eth0 down
#Observation
$ns at [expr $now+5] "start-all-pmip6d"
#MN1 joins the network
$ns at [expr $now+10] "job MN1 ifconfig eth0 up"
$ns at [expr $now +10] "job MN2 ifconfig eth0 up"
#MN1 is moving to MR2
$ns at [expr $now+25] "setdest_1 450 100 100"
#MN1 is moving back MR1
$ns at [expr $now+100] "setdest_1 100 100 100"
#MN1 power off
$ns at [expr $now+175] "job MN1 ifconfig eth0 down"
#Finish
$ns at [expr $now+200] "puts \"Finish, stop all processes and services\""
#$ns at [expr $now+150] "stop-all-pmip6d"
$ns at [expr $now+201] "puts \"chorist-mobility: DONE!\""
}
#==========================================================================
proc chorist-basic { {filename "basic.log"} } {
global ns
set now [$ns now]
#Step 1:
progress $now [expr $now + 150]
setdest_1 150 100 100
job MN1 ifconfig eth0 down
#Observation
$ns at [expr $now+5] "start-all-pmip6d"
$ns at [expr $now+5] "job CH tcpdump -s 256 -i eth1 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+5] "job MR1 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+5] "job MR2 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
#MN1 joins the network & CN start to ping down; MN1 ping up
$ns at [expr $now+10] "job MN1 ifconfig eth0 up"
$ns at [expr $now+15] "job CN ping6 2001:1::fcfd:ff:fe00:500"
$ns at [expr $now+15] "job MN1 ping6 2000::1"
#MN1 is moving to MR2
$ns at [expr $now+25] "setdest_1 450 100 100"
#MN1 is moving back MR1
$ns at [expr $now+75] "setdest_1 100 100 100"
#MN1 power off
$ns at [expr $now+125] "job MN1 ifconfig eth0 down"
#Finish
$ns at [expr $now+150] "puts \"Finish, stop all processes and services\""
$ns at [expr $now+150] "job CN killall -INT ping6"
$ns at [expr $now+150] "job MN1 killall -INT ping6"
$ns at [expr $now+150] "job CH killall -INT tcpdump"
$ns at [expr $now+150] "job MR1 killall -INT tcpdump"
$ns at [expr $now+150] "job MR2 killall -INT tcpdump"
#$ns at [expr $now+150] "stop-all-pmip6d"
$ns at [expr $now+151] "puts \"chorist-basic: DONE!\""
}
proc chorist-tcp-basic { {filename "tcp_basic.log"} {copt "-l 4M"} {options ""} } {
global ns
set now [$ns now]
#Step 1:
progress $now [expr $now + 150]
setdest_1 150 100 100
job MN1 ifconfig eth0 down
job CN ifconfig eth0 mtu 1300
#Observation
$ns at [expr $now+5] "start-all-pmip6d"
$ns at [expr $now+5] "job CN iperf -V -s $options"
$ns at [expr $now+5] "job CH tcpdump -s 256 -i eth1 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+5] "job MR1 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+5] "job MR2 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+5] "job CN tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
#MN1 joins the network & send tcp traffic to CN
$ns at [expr $now+10] "job MN1 ifconfig eth0 up mtu 1300"
$ns at [expr $now+20] "job MN1 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+20] "job MN1 iperf -V -c 2000::1 $copt $options"
#MN1 is moving to MR2
$ns at [expr $now+45] "setdest_1 450 100 100"
#MN1 is moving back MR1
$ns at [expr $now+75] "setdest_1 100 100 100"
#MN1 power off
$ns at [expr $now+124] "job MN1 killall -INT tcpdump"
$ns at [expr $now+125] "job MN1 ifconfig eth0 down"
#Finish
$ns at [expr $now+150] "puts \"Finish, stop all processes and services\""
$ns at [expr $now+150] "job CN killall -INT iperf"
$ns at [expr $now+149] "job MN1 killall -INT iperf"
$ns at [expr $now+150] "job CH killall -INT tcpdump"
$ns at [expr $now+150] "job MR1 killall -INT tcpdump"
$ns at [expr $now+150] "job MR2 killall -INT tcpdump"
$ns at [expr $now+150] "job CN killall -INT tcpdump"
#$ns at [expr $now+150] "stop-all-pmip6d"
$ns at [expr $now+151] "puts \"chorist-basic: DONE!\""
}
proc chorist-udp-basic { {filename "udp_basic.log"} {copt "-t 100"} {options "-u"} } {
global ns
set now [$ns now]
#Step 1:
progress $now [expr $now + 150]
setdest_1 150 100 100
job MN1 ifconfig eth0 down
job CN ifconfig eth0 mtu 1300
#Observation
$ns at [expr $now+5] "start-all-pmip6d"
$ns at [expr $now+5] "job CH tcpdump -s 256 -i eth1 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+5] "job MR1 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+5] "job MR2 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+5] "job CN tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
#MN1 joins the network & send tcp traffic to CN
$ns at [expr $now+10] "job MN1 ifconfig eth0 up mtu 1300"
$ns at [expr $now+20] "job MN1 iperf -V -s $options"
$ns at [expr $now+20] "job MN1 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+25] "job CN iperf -V -c 2001:1::fcfd:ff:fe00:500 $copt $options"
#MN1 is moving to MR2
$ns at [expr $now+45] "setdest_1 450 100 100"
#MN1 is moving back MR1
$ns at [expr $now+75] "setdest_1 100 100 100"
#MN1 power off
$ns at [expr $now+124] "job MN1 killall -INT tcpdump"
$ns at [expr $now+125] "job MN1 ifconfig eth0 down"
#Finish
$ns at [expr $now+150] "puts \"Finish, stop all processes and services\""
$ns at [expr $now+150] "job CN killall -INT iperf"
$ns at [expr $now+149] "job MN1 killall -INT iperf"
$ns at [expr $now+150] "job CH killall -INT tcpdump"
$ns at [expr $now+150] "job MR1 killall -INT tcpdump"
$ns at [expr $now+150] "job MR2 killall -INT tcpdump"
$ns at [expr $now+150] "job CN killall -INT tcpdump"
#$ns at [expr $now+150] "stop-all-pmip6d"
$ns at [expr $now+151] "puts \"chorist-udp-basic: DONE!\""
}
#==========================================================================
proc chorist-intra { {filename "intra.log"} } {
global ns stdout
set now [$ns now]
#Step 1:
progress $now [expr $now + 201]
setdest_1 150 100 100
job MN1 ifconfig eth0 down
job MN2 ifconfig eth0 down
#Observation
set stdout "/mnt/hostfs/pmip6d.log"
$ns at [expr $now+5] "start-all-pmip6d"
$ns at [expr $now+5] "job CH tcpdump -s 256 -i eth1 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+5] "job MR1 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+5] "job MR2 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
set stdout "/dev/null"
#MN1 & MN2 joins the network
$ns at [expr $now+10] "job MN1 ifconfig eth0 up"
$ns at [expr $now+10] "job MN2 ifconfig eth0 up"
#MN1 & MN2 ping each other
set stdout "/mnt/hostfs/ping6.log"
$ns at [expr $now+20] "job MN2 ping6 2001:1::fcfd:ff:fe00:500"
$ns at [expr $now+20] "job MN1 ping6 2001:1::fcfd:ff:fe00:600"
#MN1 is moving to MR2
$ns at [expr $now+35] "setdest_1 450 100 100"
#MN1 is moving back MR1
$ns at [expr $now+100] "setdest_1 100 100 100"
#MN1 & MN2 power off
set stdout "/dev/null"
$ns at [expr $now+175] "job MN1 ifconfig eth0 down"
$ns at [expr $now+175] "job MN2 ifconfig eth0 down"
#Finish
$ns at [expr $now+200] "puts \"Finish, stop all processes and services\""
$ns at [expr $now+200] "job MN2 killall -INT ping6"
$ns at [expr $now+200] "job MN1 killall -INT ping6"
$ns at [expr $now+200] "job CH killall -INT tcpdump"
$ns at [expr $now+200] "job MR1 killall -INT tcpdump"
$ns at [expr $now+200] "job MR2 killall -INT tcpdump"
#$ns at [expr $now+200] "stop-all-pmip6d"
$ns at [expr $now+200] "puts \"chorist-intra: DONE!\""
set stdout "/mnt/hostfs/stdout"
}
proc chorist-tcp-intra { {filename "tcp_intra.log"} {copt "-l 4M"} {options ""} } {
global ns
set now [$ns now]
#Step 1:
progress $now [expr $now + 150]
setdest_1 150 100 100
setdest_2 450 100 100
job MN1 ifconfig eth0 down
job MN2 ifconfig eth0 down
#Observation
$ns at [expr $now+5] "start-all-pmip6d"
$ns at [expr $now+5] "job CH tcpdump -s 256 -i eth1 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+5] "job MR1 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+5] "job MR2 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
#MN1 joins the network & CN start to ping down; MN1 ping up
$ns at [expr $now+10] "job MN1 ifconfig eth0 up mtu 1300"
$ns at [expr $now+10] "job MN2 ifconfig eth0 up mtu 1300"
$ns at [expr $now+20] "job MN2 iperf -V -s $options"
$ns at [expr $now+20] "job MN2 tcpdump -s 256 -i eth0 -v -w /mnt/hostfs/$filename "
$ns at [expr $now+25] "job MN1 iperf -V -c 2001:1::fcfd:ff:fe00:600 $copt $options"
#MN1 is moving to MR2
$ns at [expr $now+35] "setdest_1 450 100 100"
#MN1 is moving back MR1
$ns at [expr $now+75] "setdest_1 100 100 100"
#MN1 MN2 power off
$ns at [expr $now+124] "job MN2 killall -INT tcpdump"
$ns at [expr $now+125] "job MN1 ifconfig eth0 down"
$ns at [expr $now+125] "job MN2 ifconfig eth0 down"
#Finish
$ns at [expr $now+150] "puts \"Finish, stop all processes and services\""
$ns at [expr $now+150] "job MN2 killall -INT iperf"
$ns at [expr $now+149] "job MN1 killall -INT iperf"
$ns at [expr $now+150] "job CH killall -INT tcpdump"
$ns at [expr $now+150] "job MR1 killall -INT tcpdump"
$ns at [expr $now+150] "job MR2 killall -INT tcpdump"
#$ns at [expr $now+150] "stop-all-pmip6d"
$ns at [expr $now+151] "puts \"chorist-basic: DONE!\""
}
@@ -0,0 +1,66 @@
#http://wiki.tcl.tk/1968
#from Jeffrey Hobbs
puts -nonewline "vnman (0) % "
if {!$tcl_interactive} {
set long_command ""
set verbose_history 0
if {![catch {rename unknown tcl_unknown}]} {
proc unknown {cmdname args} {
if {[regexp "^!..*" $cmdname]} {
banghist [string range $cmdname 1 end]
} else {
tcl_unknown $cmdname $args
}
}
}
proc banghist {val} {
global verbose_history
if {![string compare $val "!"]} {set val ""}
if {$verbose_history} {puts "[history event $val]"}
history redo $val
}
if {![info exists tcl_prompt1]} {
set tcl_prompt1 {puts -nonewline "vnman ([history nextid]) % "}
}
proc read_stdin {} {
global eventLoop tcl_prompt1 long_command
set l [gets stdin]
if {[eof stdin]} {
set eventLoop "done" ;# terminate the vwait eventloop
} else {
if {[string compare $l {}]} {
append long_command "\n$l"
set l $long_command
if {[info complete $l]} {
if {[catch {uplevel \#0 history add [list $l] exec} err]} {
puts stderr $err
} elseif {[string compare $err {}]} {
puts $err
}
set long_command ""
catch $tcl_prompt1
} else {
puts -nonewline "> "
}
} elseif {![string compare $long_command {}]} {
catch $tcl_prompt1
} else {
puts -nonewline "> "
}
flush stdout
}
}
# set up our keyboard read event handler:
# Vector stdin data to the socket
fileevent stdin readable read_stdin
catch $tcl_prompt1
flush stdout
# wait for and handle or stdin events...
#vwait eventLoop
}
+161
View File
@@ -0,0 +1,161 @@
#
# Management Script for Virtual Networking User-Mode-Linux
# Author: Huu-Nghia Nguyen
# Email: Huu-Nghia.Nguyen@eurecom.fr
# Eurecom Institute
#
Class VirtualMachine
proc flatten list {return [string map {\{ "" \} ""} $list]}
VirtualMachine instproc init {vm_opt_list} {
$self instvar opt sname
array set sname {}
array set opt $vm_opt_list
set dir [split $opt(uml_dir) "/"]
set len [llength $dir]
set opt(vmid) [lindex $dir [expr $len-2]]
set opt(scenario) [lindex $dir [expr $len-4]]
puts "VM ($opt(scenario).$opt(vmid)) running in $opt(uml_dir) is created"
}
VirtualMachine instproc mconsole args {
$self instvar opt
set dir $opt(uml_dir)$opt(umid)
set cmdline "cd $dir && uml_mconsole mconsole [flatten $args]"
puts "execute the command: $cmdline"
set result [exec sh -c "cd $dir && uml_mconsole mconsole [flatten $args]" 2>/dev/null]
return $result
}
VirtualMachine instproc getinfo {param idx} {
$self instvar opt
return [lindex [split $opt($param) ","] $idx]
}
########################################################################
#
# PARSE THE ENVIRONMENT
#
########################################################################
set vm_cmds [exec ps -ef | grep linux | grep airnet | sed s/.*linux//g | sort | uniq ]
## Split into vm_cmd_lines
set vm_cmd_lines [split $vm_cmds "\n"]
array unset vms
set stdout "/mnt/hostfs/stdout"
set stderr "/mnt/hostfs/stdout"
set filestdout ""
## Iterate over the vm_cmd_lines
foreach cmd $vm_cmd_lines {
#puts "---------\nAnalyse the command line:"
#puts $cmd
set params [split $cmd " "]
array unset opt
foreach param $params {
set fields [split $param "="]
set optname [lindex $fields 0]
set optval [lindex $fields 1]
if {$optval != ""} {
set opt($optname) $optval
}
}
if {[array size opt] > 0} {
set vm [new VirtualMachine [array get opt]]
set vms([$vm set opt(vmid)]) $vm
}
}
########################################################################
#
# COMMAND IMPLEMENTATION
#
########################################################################
set helpstr "Command list:\n\
\tconfig <vm> <device\[=options\]>: querry/add a new device to <vm>\n\
\tjob <vm> <command>: execute a command in <vm> using sh -c\n\
\tresult <vm>: return result of last job\n\
\tterm <vm> <conid>: open the console <conid> of <vm>\n\
\tmconsole <vm> <args>: run uml_mconsole for <vm>\n\
\tsetdest <x> <y> <speed>: \n\t\tset destination (<x>, <y>) for the MN with the speed of <speed> m/s\n"
proc help {} {
global helpstr
puts $helpstr
}
proc config {vmid args} {
global vms
set vm $vms($vmid)
return [$vm mconsole config $args]
}
proc job {vmid args} {
global vms filestdout
global stdout stderr
set vm $vms($vmid)
catch { exec rm opt(uml_dir)]/hostfs/$stdout }
return [$vm mconsole exec "'" $args ">$stdout 2>$stderr '"]
regsub {(.*)/(.*)} $stdout {\2} filename
set filestdout [$vm set opt(uml_dir)]/hostfs/$filename
exec cat $filestdout
}
proc lastresult {} {
exec cat $filestdout
}
proc result {vmid} {
global vms
global stdout stderr
set vm $vms($vmid)
regsub {(.*)/(.*)} $stdout {\2} filename
set filestdout [$vm set opt(uml_dir)]/hostfs/$filename
exec cat $filestdout
}
proc term {vmid conid} {
global vms
set vm $vms($vmid)
#Create screen name
set result [$vm mconsole config $conid]
regsub {(.*):(.*)} $result {\2} device
regsub {(.*)/(\d+)} $device {\2} devid
set screenname "$conid$devid$vmid"
#Try to look up in the env if the screen exist?
set filename /tmp/vnman-screen-[pid].cfg
catch { exec screen -ls > $filename } {}
set output [split [exec cat $filename] "\n"]
if {[lsearch -regex $output ".*$screenname.*"] < 0} {exec screen -d -m -S $screenname $device}
catch { exec rm -f $filename}
#Show the terminal
exec konsole -e screen -d -r $screenname &
}
proc mconsole {vmid args} {
global vms
set vm $vms($vmid)
return [$vm mconsole $args]
}
########################################################################
#
# COMMAND LINE INTERFACE
#
########################################################################
puts "VM lists: [array names vms]"
help
source vninteractive.tcl
source wirelesstopo.tcl
stop
+174
View File
@@ -0,0 +1,174 @@
#! /bin/nse
# An example script for the usage of ns-2 in emulation mode:
# Uses:
# 1. Network/Daemon agents (by Huu-Nghia.Nguyen@eurecom.fr) to access to a uml_switch at level II
# 2. Tap/Raw agents to map between real MAC addresses and NS-2 IP addresses
# 3. In-memory compression of the trace file to reduce disk write operations during simulation
# (currently done via gzip)
# Common variables
#
set scriptname routingdemo
set val(chan) Channel/WirelessChannel ;# Channel Type
set val(prop) Propagation/TwoRayGround ;# radio-propagation model
set val(netif) Phy/WirelessPhy ;# network interface type
set val(mac) Mac/802_11 ;# MAC type
set val(ifq) Queue/DropTail/PriQueue ;# interface queue type
set val(ll) LL ;# link layer type
set val(ant) Antenna/OmniAntenna ;# antenna model
set val(ifqlen) 50 ;# max packet in ifq
set val(x) 800 ;# x range in meters
set val(y) 600 ;# y range in meters
set val(rp) DumbAgent ;# routing protocol
set val(nn) 7 ;# number of mobile nodes
#set val(stime) 200.0 ;# simulation time
set val(stime) 360000.0 ;# simulation time = 100 hours
set ns [new Simulator]
$ns use-scheduler RealTime
set tracefd [open $scriptname.tr w]
$ns trace-all $tracefd
#set namtrace [open $scriptname.nam w]
#set namtrace [open "|nam -r 0.1 -" w]
#$ns namtrace-all-wireless $namtrace $val(x) $val(y)
#Procedure needed when running nam in real-time
proc NamTime {} {
#Send time to nam periodically
global ns namtrace
set now [$ns now]
set next [expr $now + 0.05]
puts $namtrace "T -t $now"
flush $namtrace
$ns at $next "NamTime"
}
#$ns at 1.0 "NamTime"
proc UniformErr {} {
set err [new ErrorModel]
$err unit packet
$err set rate_ 0.01
$err ranvar [new RandomVariable/Uniform]
$err drop-target [new Agent/Null]
return $err
}
set topo [new Topography]
$topo load_flatgrid $val(x) $val(y)
# Create GOD
create-god $val(nn)
# Create channel
set chan_1 [new $val(chan)]
set chan_2 [new $val(chan)]
# Configure node parameters
$ns node-config -adhocRouting $val(rp) \
-llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $val(ant) \
-propType $val(prop) \
-phyType $val(netif) \
-topoInstance $topo \
-agentTrace ON \
-routerTrace ON \
-macTrace ON \
-movementTrace ON \
-channel $chan_1 \
-IncomingErrProc UniformErr
#Procedure to configure an ns-2 node initially
proc setup_node {id x y z color} {
global ns node_
set node_($id) [$ns node]
$node_($id) set X_ $x
$node_($id) set Y_ $y
$node_($id) set Z_ $z
$node_($id) color $color
$ns at 0 "$node_($id) setdest $x $y 0"
$ns at 0 "$node_($id) color $color"
$node_($id) random-motion 0
}
#Topo table:
#set CN $vms(CN)
set CH $vms(CH)
set MR1 $vms(MR1)
set MR2 $vms(MR2)
set MN1 $vms(MN1)
set MN2 $vms(MN2)
set map(1) [list $CH eth0 $chan_1 300 100 0 "black"]
set map(2) [list $MR1 eth1 $chan_1 100 100 0 "green"]
set map(3) [list $MR1 eth0 $chan_2 100 100 0 "green"]
set map(4) [list $MR2 eth1 $chan_1 500 100 0 "green"]
set map(5) [list $MR2 eth0 $chan_2 500 100 0 "green"]
set map(6) [list $MN1 eth0 $chan_2 150 100 0 "red"]
set map(7) [list $MN2 eth0 $chan_2 450 100 0 "red"]
Agent/Tap set maxpkt_ 1500
for {set i 1} {$i <= $val(nn)} {incr i} {
$ns node-config -channel [lindex $map($i) 2]
puts "setup_node $i [lindex $map($i) 3] [lindex $map($i) 4] [lindex $map($i) 5] [lindex $map($i) 6]"
setup_node $i [lindex $map($i) 3] [lindex $map($i) 4] [lindex $map($i) 5] [lindex $map($i) 6]
$ns at 0 "$node_($i) start";
$ns at $val(stime) "$node_($i) reset";
#set raw($i) [new Network/Raw]
set raw($i) [new Network/Daemon]
set node [lindex $map($i) 0]
set iff [lindex $map($i) 1]
puts [$node getinfo $iff 1]
#$raw($i) open [$node getinfo $iff 1] readwrite
$raw($i) open [$node getinfo $iff 3] readwrite
#Tap Agent for each node
puts [$node getinfo $iff 2]
#set tagent($i) [new Agent/Tap/Raw [$node getinfo $iff 2]]
# if {$node == $MR2 && $iff == "eth0"} {
# set tagent($i) [new Agent/Tap/Raw fe:fd:0:0:3:0]
# } else {
set tagent($i) [new Agent/Tap/Raw [$node getinfo $iff 1]]
# }
$tagent($i) network $raw($i)
$ns attach-agent $node_($i) $tagent($i)
}
$ns at $val(stime) "stop"
$ns at $val(stime) "puts \"NS EXITING ...\" ; $ns halt"
proc setdest_1 { x y speed} {
global node_
$node_(6) setdest $x $y $speed
}
proc setdest_2 { x y speed} {
global node_
$node_(7) setdest $x $y $speed
}
proc stop {} {
global ns tracefd raw
$ns flush-trace
close $tracefd
for {set i 1} {$i <= $val(nn)} {incr i} {
$raw($i) close
}
}
source utils.tcl
puts "okey"
$ns run
+97
View File
@@ -0,0 +1,97 @@
#!/bin/bash
source params.sh
sleep 1
export OPENAIR1_DIR=~/Openair/openair1
export OPENAIR2_DIR=~/Openair/openair2
export OPENAIR3_DIR=~/Openair/openair3
export OPENAIR3_HOME=~/Openair/openair3
echo Clusterhead address is $CH1_IN6_ADDR
#echo Launching AS and RF
#./start_openair.sh 8 0
# Installing NASMESH driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x01000000
echo Classification rules for CH
#CH1<-> MR1 IP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $CH1_IN6_ADDR -y $MR1_IN6_ADDR -r 12
#CH1<-> MR1 MPLS user-plane bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MR1_LABEL_IN -m $MR1_LABEL_OUT -r 13
#CH1<->MR1 - For com between MN1 and MN3 - MPLS user-plane bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MN3_CH1_MR1_MN1 -m $MN1_MR1_CH1_MN3 -r 13
#CH1<-> MR1 multicast (rajout THC)
echo EADS Multicast for CH1
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.15 -r 12
#CH1<-> MR2 (IP Signaling)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x $CH1_IN6_ADDR -y $MR2_IN6_ADDR1 -r 20
#CH1<-> MR2 (MPLS user-plane bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c16 -i0 -z0 -l $MR2_CH1_LABEL_IN -m $MR2_CH1_LABEL_OUT -r 21
#CH1<-> MR2 (MPLS PMIP signaling bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c17 -i0 -z0 -l $CH1_MR2_CH2_LABEL_OUT -m $CH1_MR2_CH2_LABEL_IN -r 21
#CH1<-> MR2 - For com between MN1 and MN3 - (MPLS signaling bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c18 -i0 -z0 -l $MN1_CH1_MR2_MN3 -m $MN3_MR2_CH1_MN1 -r 21
#CH1<-> MR2 multicast EADS (rajout THC)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c19 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.10 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c20 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.10 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c21 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.11 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c22 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.11 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c23 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.12 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c24 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.12 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c25 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.13 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c26 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.13 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c27 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.14 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c28 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.14 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c29 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.15 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c30 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.15 -r 20
#CH Broadcast (transmission of Router ADV)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c31 -i0 -z0 -x $CH1_IN6_ADDR -y ff02::1 -r 3
#CH<-> MR1 Imulticast
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x ff3e:30:2001:660:5502:ffff:e000:3737 -y $MR1_IN_ADDR -r 14
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -s 10.0.0.2 -t 224.0.55.55 -r 12
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -s 10.0.0.1 -t 224.0.55.55 -r 12
#CH<-> MR2 (IP Signaling)
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -x $CH_ADDR -y $MR2_IN_ADDR -r 20
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -s 10.0.0.1 -t 224.0.66.66 -r 20
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -s 10.0.0.3 -t 224.0.66.66 -r 20
#CH<-> MR2 (MPLS user-plane bearer)
# Bring up openair NASMESH device and set IPv6 address
sudo ifconfig nasmesh0 up
sudo ip addr add 10.0.0.1/24 dev nasmesh0
sudo ip -6 addr add $CH1_IN6_ADDR/64 dev nasmesh0
echo No MPLS debug
echo "0" > /sys/mpls/debug
#echo Multicast state launched with config_ch1
#xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_ch1 &
#xterm -hold -e ./mac_sim -m0 -t $OPENAIR2_DIR/SIMULATION/TOPOLOGIES/eth_3nodes.top &
+41
View File
@@ -0,0 +1,41 @@
#!/bin/bash
source params.sh
sudo ./ch_conf_nas.sh
# MN1 -> MN2
sudo ./mpls_nas.sh $MR1_LABEL_OUT $MR2_IN6_ADDR1 $MR2_CH1_LABEL_IN
# MN2 -> MN1
sudo ./mpls_nas.sh $MR2_CH1_LABEL_OUT $MR1_IN6_ADDR $MR1_LABEL_IN
# MN1 -> MN3
sudo ./mpls_nas.sh $MN1_MR1_CH1_MN3 $MR2_IN6_ADDR1 $MN1_CH1_MR2_MN3
# MN3 -> MN1
sudo ./mpls_nas.sh $MN3_MR2_CH1_MN1 $MR1_IN6_ADDR $MN3_CH1_MR1_MN1
# CH1 -> CH2
#echo 'CH2->MR2->CH1'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $CH1_MR2_CH2_LABEL_IN labelspace 0 proto ipv6
#echo 'CH1->MR2->CH2'
var=`mpls nhlfe add key 0 instructions push gen $CH1_MR2_CH2_LABEL_OUT nexthop nasmesh0 ipv6 $MR2_IN6_ADDR1 | grep key |cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $CH2_IN6_ADDR/128 via $MR2_IN6_ADDR1 mpls $var
echo 0 > /sys/mpls/debug
# PMIP
echo /openair3/pmip6d/pmip6d -c -L $CH1_IN6_ADDR -A $CH2_IN6_ADDR
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -c -L $CH1_IN6_ADDR -A $CH2_IN6_ADDR" &
xterm -hold -e "cd /homes/foubert/Openair/openair2/SIMULATION/USER_TOOLS/LAYER2_SIM ; ./mac_sim -m0 -t $OPENAIR2_DIR/SIMULATION/TOPOLOGIES/eth_3nodes.top"
#watch -n .1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats ; cat /proc/openair1/openair1_state"
#./stop_rf.sh
sleep 2
./del_mpls.sh
#sleep 2
#./del_mpls.sh
+111
View File
@@ -0,0 +1,111 @@
#!/bin/bash
#Script by Irina Dumitrascu (dumitrascu.irina@gmail.com) and Adrian Popa (adrian.popa.gh@gmail.com)
#June 2006
#Released under GPL
#Added by phil, Huu Nghia, 8 July 08
echo Deleting all mpls - xc settings
xc_output="`mpls xc show | cut -c 9-75`"
number_of_lines=`echo $xc_output|wc -l`
for i in `seq 1 $number_of_lines`
do
xc_output_line="`echo $xc_output| head -$i | tail -1`"
echo Deleting: mpls xc del $xc_output_line
mpls xc del $xc_output
#increment i
i=`expr $i+1`
done
echo Deleting all mpls - ip route settings
nr_of_lines=` ip route show |grep mpls |wc -l`
for i in `seq 1 $nr_of_lines `
do
output=`ip route show |grep mpls |head -1`
echo Deleting: ip route del $output
ip route del $output
i=`expr $i+1`
done
var1=`ip route show table 1`
if [ ! -z "$var1" ]; then
ip route del table 1
#var1=`ip route show table 1`
#ip route del $var1 table 1
ip route flush table 1
echo "clearing ip route table 1"
fi
var1=`ip route show table 2`
if [ ! -z "$var1" ]; then
ip route del table 2
# var1=`ip route show table 2`
# ip route del $var1 table 2
ip route flush table 2
echo "clearing ip route table 2"
fi
#echo Flushing iptables chains
#iptables -F
#echo Flushing iptables -t nat
#iptables -t nat -F
#echo Flushing iptables -t mangle
#iptables -t mangle -F
echo Deleting all mpls - nhlfe settings
nr_of_lines=` mpls nhlfe show |grep key |wc -l`
for i in `seq 1 $nr_of_lines `
do
output=`mpls nhlfe show |grep key |cut -c 17-26 |head -1`
echo Deleting: mpls nhlfe del key $output
mpls nhlfe del key $output
i=`expr $i+1`
done
echo Deleting all mpls - labelspace settings
nr_of_lines=`mpls labelspace show |grep -v "labelspace -1" |wc -l`
for i in `seq 1 $nr_of_lines `
do
output=`mpls labelspace show |grep -v "labelspace -1"|cut -c 17-37 |head -1`
echo Deleting: mpls labelspace set $output -1
mpls labelspace set $output -1
i=`expr $i+1`
done
echo Deleting all mpls - ilm settings
nr_of_lines=`mpls ilm show |grep ILM |wc -l`
for i in `seq 1 $nr_of_lines `
do
output=`mpls ilm show |grep ILM |cut -c 10-37 |head -1`
echo Deleting: mpls ilm del $output
mpls ilm del $output
i=`expr $i+1`
done
var1=`tc qdisc show |grep eth0 |grep htb`
if [ ! -z "$var1" ]; then
tc qdisc del dev eth0 root
echo "tc clear eth0"
fi
var2=`tc qdisc show |grep eth3 |grep htb`
if [ ! -z "$var2" ]; then
tc qdisc del dev eth3 root
echo "tc clear eth3"
fi
var3=`tc qdisc show |grep eth1 |grep htb`
if [ ! -z "$var3" ]; then
tc qdisc del dev eth1 root
echo "tc clear eth1"
fi
var4=`tc qdisc show |grep eth2 |grep htb`
if [ ! -z "$var4" ]; then
tc qdisc del dev eth2 root
echo "tc clear eth2"
fi
+1
View File
@@ -0,0 +1 @@
/homes/foubert/Openair/openair2/SIMULATION/USER_TOOLS/LAYER2_SIM/mac_sim
+25
View File
@@ -0,0 +1,25 @@
#!/bin/bash
#Script by Lamia Romdhani
#June 2008
echo Setting MPLS
sudo modprobe mpls6
echo Number of params = $#
if [ $# -eq 3 ]; then
LABEL_IN=$1
IP_NEXT_HOP=$2
LABEL_OUT=$3
echo "IP Next Hop is $IP_NEXT_HOP"
echo 'Starting mpls'
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $LABEL_IN labelspace 0 proto ipv6
var=`mpls nhlfe add key 0 instructions push gen $LABEL_OUT nexthop nasmesh0 ipv6 $IP_NEXT_HOP |grep key | cut -c 17-26`
sudo mpls xc add ilm_label gen $LABEL_IN ilm_labelspace 0 nhlfe_key $var
else
echo usage: mpls_nas.sh LABEL_IN IP_NEXT_HOP LABEL_OUT
fi
+50
View File
@@ -0,0 +1,50 @@
#!/bin/bash
source params.sh
sleep 1
export OPENAIR1_DIR
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
#echo Launching AS and RF
#./start_openair.sh 8 8
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x02000000
#sudo ifconfig eth2 10.0.1.3
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.3
sudo ip -6 addr add $MR1_IN6_ADDR/64 dev nasmesh0
echo Classification rules for MR1 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $MR1_IN6_ADDR -y $CH1_IN6_ADDR -r 4
echo Classification rules for MR1 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MN1_MR1_CH1_MN3 -m $MN3_CH1_MR1_MN1 -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR1_LABEL_OUT -m $MR1_LABEL_IN -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.15 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.15 -r 4
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
#echo Multicast state launched with config_mr1
#xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr1 &
#xterm -hold -e ./mac_sim -m0 -t $OPENAIR2_DIR/SIMULATION/TOPOLOGIES/eth_3nodes.top &
+28
View File
@@ -0,0 +1,28 @@
#!/bin/bash
# Script by Lamia Romdhani, Nghia, Philippe, Hicham 18 Feb 2009
source params.sh
sudo modprobe mpls6
echo Setting MPLS for mr1
echo "0" > /sys/mpls/debug
# MN1 <-> MN3
echo 'MN3->MN1'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $MN3_CH1_MR1_MN1 labelspace 0 proto ipv6
echo 'MN1->MN3'
var=`mpls nhlfe add key 0 instructions push gen $MN1_MR1_CH1_MN3 nexthop nasmesh0 ipv6 $CH1_IN6_ADDR | grep key |cut -c 17-26`
echo "Creating routes from MN1 to MN3"
sudo ip -6 route add $MN3_IN6_ADDR/128 via $CH1_IN6_ADDR mpls $var
sudo ip -6 route add $MN1_IN6_ADDR/128 dev eth2
# MN1 <-> MN2
echo 'MN2->MN1'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $MR1_LABEL_IN labelspace 0 proto ipv6
echo 'MN1->MN2'
var=`mpls nhlfe add key 0 instructions push gen $MR1_LABEL_OUT nexthop nasmesh0 ipv6 $CH1_IN6_ADDR | grep key |cut -c 17-26`
echo "Creating routes from MN1 to MN2"
sudo ip -6 route add $MN2_IN6_ADDR/128 via $CH1_IN6_ADDR mpls $var
+23
View File
@@ -0,0 +1,23 @@
#Phil, Lamia 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr1_conf_nas.sh
./mr1_mpls_nas.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR1_EG6_ADDR/64 dev eth2
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR1_EG6_ADDR -E $MR1_IN6_ADDR" &
#watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
xterm -hold -e "cd /homes/foubert/Openair/openair2/SIMULATION/USER_TOOLS/LAYER2_SIM ; ./mac_sim -m1 -t $OPENAIR2_DIR/SIMULATION/TOPOLOGIES/eth_3nodes.top"
#./stop_rf.sh
sleep 2
./del_mpls.sh
#sleep 2
#./del_mpls.sh
+74
View File
@@ -0,0 +1,74 @@
#!/bin/bash
source params.sh
sleep 1
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
#echo Launching AS and RF
#./start_openair.sh 8 9
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x03000000
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.4
#sudo ifconfig eth3 10.0.3.3
sudo ip -6 addr add $MR2_IN6_ADDR1/64 dev nasmesh0
sudo ip -6 addr add $MR2_IN6_ADDR2/64 dev nasmesh0
# Com between MR2 <-> CH1
echo Classification rules for MR2- Cluster 1 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x $MR2_IN6_ADDR1 -y $CH1_IN6_ADDR -r 4
echo Classification rules for MR2- Cluster 1 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR2_CH1_LABEL_OUT -m $MR2_CH1_LABEL_IN -r 5
echo Classification rules for MR2- Cluster 1 - MPLS PMIP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -l $CH1_MR2_CH2_LABEL_IN -m $CH1_MR2_CH2_LABEL_OUT -r 5
echo Classification rules for MR2- Cluster 1 - MPLS for com between MN3 and MN1
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -l $MN3_MR2_CH1_MN1 -m $MN1_CH1_MR2_MN3 -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.15 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c16 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.15 -r 4
# Com between MR2 <-> CH2
#echo Classification rules for MR2 -Cluster 2 - Default DTCH UL for L3 signaling
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c17 -i0 -z0 -x ff02::1 -y ff02::1 -r 11
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c18 -i0 -z0 -x $MR2_IN6_ADDR2 -y $CH2_IN6_ADDR -r 12
#echo Classification rules for MR2 -Cluster 2 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c19 -i0 -z0 -l $MR2_CH2_LABEL_OUT -m $MR2_CH2_LABEL_IN -r 13
#echo Classification rules for MR2- Cluster 2 - MPLS PMIP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c20 -i0 -z0 -l $CH2_MR2_CH1_LABEL_IN -m $CH2_MR2_CH1_LABEL_OUT -r 13
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c21 -i0 -z0 -l $MN3_MR2_CH2_MN2 -m $MN2_CH2_MR2_MN3 -r 13
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c22 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c23 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c24 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c25 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c26 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c27 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c28 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c29 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c30 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c31 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c32 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c33 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.15 -r 12
#echo Multicast state launched with config_mr2
#xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr2_mesh &
#xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr2_mn3 &
#xterm -hold -e ./mac_sim -m0 -t $OPENAIR2_DIR/SIMULATION/TOPOLOGIES/eth_3nodes.top &
@@ -0,0 +1,79 @@
#!/bin/bash
source params.sh
sleep 1
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Launching AS and RF
./start_openair.sh 5 9
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x03000000
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.4
sudo ifconfig eth0 10.0.3.3
sudo ip -6 addr add $MR2_IN6_ADDR1/64 dev nasmesh0
sudo ip -6 addr add $MR2_IN6_ADDR2/64 dev nasmesh0
# Com between MR2 <-> CH1
echo Classification rules for MR2- Cluster 1 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x $MR2_IN6_ADDR1 -y $CH1_IN6_ADDR -r 4
echo Classification rules for MR2- Cluster 1 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR2_CH1_LABEL_OUT -m $MR2_CH1_LABEL_IN -r 5
echo Classification rules for MR2- Cluster 1 - MPLS PMIP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -l $CH1_MR2_CH2_LABEL_IN -m $CH1_MR2_CH2_LABEL_OUT -r 5
echo Classification rules for MR2- Cluster 1 - MPLS for com between MN3 and MN1
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -l $MN3_MR2_CH1_MN1 -m $MN1_CH1_MR2_MN3 -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.15 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c16 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.15 -r 4
# Com between MR2 <-> CH2
#echo Classification rules for MR2 -Cluster 2 - Default DTCH UL for L3 signaling
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c17 -i0 -z0 -x ff02::1 -y ff02::1 -r 11
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c18 -i0 -z0 -x $MR2_IN6_ADDR2 -y $CH2_IN6_ADDR -r 12
#echo Classification rules for MR2 -Cluster 2 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c19 -i0 -z0 -l $MR2_CH2_LABEL_OUT -m $MR2_CH2_LABEL_IN -r 13
#echo Classification rules for MR2- Cluster 2 - MPLS PMIP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c20 -i0 -z0 -l $CH2_MR2_CH1_LABEL_IN -m $CH2_MR2_CH1_LABEL_OUT -r 13
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c21 -i0 -z0 -l $MN3_MR2_CH2_MN2 -m $MN2_CH2_MR2_MN3 -r 13
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c22 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c23 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c24 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c25 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c26 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c27 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c28 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c29 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c30 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c31 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c32 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c33 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.15 -r 12
echo Multicast state launched with config_mr2
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr2_mesh &
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr2_mn3 &
+36
View File
@@ -0,0 +1,36 @@
#!/bin/bash
# Author: Lamia Romdhani
#June 2008
source params.sh
sudo modprobe mpls6
echo Starting routing ...
echo No MPLS debug
echo "0" >/sys/mpls/debug
#MN1->MN2
./mpls_nas.sh $MR2_CH1_LABEL_IN $CH2_IN6_ADDR $MR2_CH2_LABEL_OUT
#MN2->MN1
./mpls_nas.sh $MR2_CH2_LABEL_IN $CH1_IN6_ADDR $MR2_CH1_LABEL_OUT
#CH1->CH2
./mpls_nas.sh $CH1_MR2_CH2_LABEL_OUT $CH2_IN6_ADDR $CH2_MR2_CH1_LABEL_IN
#CH2->CH1
./mpls_nas.sh $CH2_MR2_CH1_LABEL_OUT $CH1_IN6_ADDR $CH1_MR2_CH2_LABEL_IN
#MN3->MN1
var=`mpls nhlfe add key 0 instructions push gen $MN3_MR2_CH1_MN1 nexthop nasmesh0 ipv6 $CH1_IN6_ADDR |grep key | cut -c 17-26`
sudo ip -6 route add $MN1_IN6_ADDR/128 via $CH1_IN6_ADDR mpls $var
sudo ip -6 route add $MN3_IN6_ADDR/128 dev eth3
#MN1->MN3
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $MN1_CH1_MR2_MN3 labelspace 0 proto ipv6
#MN3->MN2
var=`mpls nhlfe add key 0 instructions push gen $MN3_MR2_CH2_MN2 nexthop nasmesh0 ipv6 $CH2_IN6_ADDR |grep key | cut -c 17-26`
sudo ip -6 route add $MN2_IN6_ADDR/128 via $CH2_IN6_ADDR mpls $var
#MN2->MN3
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $MN2_CH2_MR2_MN3 labelspace 0 proto ipv6
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
#Lamia, Philippe huu nghia, 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr2_conf_nas.sh
./mr2_mpls_nas.sh
sudo sysctl -w net.ipv6.conf.eth3.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth3 promisc
sudo ip -6 addr add $MR2_EG6_ADDR/64 dev eth3
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR2_EG6_ADDR -E $MR2_IN6_ADDR1" &
#watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
xterm -hold -e "cd /homes/foubert/Openair/openair2/SIMULATION/USER_TOOLS/LAYER2_SIM ; ./mac_sim -m2 -t $OPENAIR2_DIR/SIMULATION/TOPOLOGIES/eth_3nodes.top"
#./stop_rf.sh
sleep 2
./del_mpls.sh
#sleep 2
#./del_mpls.sh
@@ -0,0 +1,20 @@
#!/bin/bash
#Lamia, Philippe huu nghia, 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr2_conf_nas_barca_outdoor.sh
./mr2_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR2_EG6_ADDR/64 dev eth0
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR2_EG6_ADDR -E $MR2_IN6_ADDR1" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
@@ -0,0 +1,20 @@
#!/bin/bash
#Lamia, Philippe huu nghia, 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr2_conf_nas_barca_parking.sh
./mr2_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR2_EG6_ADDR/64 dev eth0
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR2_EG6_ADDR -E $MR2_IN6_ADDR1" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
@@ -0,0 +1,20 @@
#!/bin/bash
#Lamia, Philippe huu nghia, 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr2_conf_nas_barca_parking.sh
./mr2_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR2_EG6_ADDR/64 dev eth0
#sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR2_EG6_ADDR -E $MR2_IN6_ADDR1" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
+52
View File
@@ -0,0 +1,52 @@
#!/bin/bash
source params.sh
sleep 1
export OPENAIR1_DIR
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Launching AS and RF
./start_openair.sh 1 10
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x02000000
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.5
sudo ip -6 addr add $MR3_IN6_ADDR/64 dev nasmesh0
echo Classification rules for MR3 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $MR3_IN6_ADDR -y $CH2_IN6_ADDR -r 4
echo Classification rules for MR3 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MN2_MR3_CH2_MN3 -m $MN3_CH2_MR3_MN2 -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR3_LABEL_OUT -m $MR3_LABEL_IN -r 5
echo EADS Multicast for MR3
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.15 -r 12
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
echo Multicast state launched with config_mr3
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr3 &
@@ -0,0 +1,52 @@
#!/bin/bash
source params.sh
sleep 1
export OPENAIR1_DIR
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Launching AS and RF
./start_openair.sh 8 10
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x02000000
sudo ifconfig eth0 10.0.2.5
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.5
sudo ip -6 addr add $MR3_IN6_ADDR/64 dev nasmesh0
echo Classification rules for MR3 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $MR3_IN6_ADDR -y $CH2_IN6_ADDR -r 4
echo Classification rules for MR3 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MN2_MR3_CH2_MN3 -m $MN3_CH2_MR3_MN2 -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR3_LABEL_OUT -m $MR3_LABEL_IN -r 5
echo EADS Multicast for MR3
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.15 -r 12
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
echo Multicast state launched with config_mr3
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr3 &
@@ -0,0 +1,52 @@
#!/bin/bash
source params.sh
sleep 1
export OPENAIR1_DIR
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Launching AS and RF
./start_openair.sh 6 10
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x02000000
sudo ifconfig eth0 10.0.2.5
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.5
sudo ip -6 addr add $MR3_IN6_ADDR/64 dev nasmesh0
echo Classification rules for MR3 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $MR3_IN6_ADDR -y $CH2_IN6_ADDR -r 12
echo Classification rules for MR3 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MN2_MR3_CH2_MN3 -m $MN3_CH2_MR3_MN2 -r 13
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR3_LABEL_OUT -m $MR3_LABEL_IN -r 13
echo EADS Multicast for MR3
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.15 -r 12
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
echo Multicast state launched with config_mr3
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr3 &
+34
View File
@@ -0,0 +1,34 @@
#!/bin/bash
# Script by Lamia Romdhani, Nghia, Philippe, Hicham 18 Feb 2009
source params.sh
sudo modprobe mpls6
echo Setting MPLS for mr3
echo "0" > /sys/mpls/debug
echo 'MN1->MN2'
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $MR3_LABEL_IN labelspace 0 proto ipv6
echo 'MN2->MN1'
var=`mpls nhlfe add key 0 instructions push gen $MR3_LABEL_OUT nexthop nasmesh0 ipv6 $CH2_IN6_ADDR |grep key | cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $MN1_IN6_ADDR/128 via $CH2_IN6_ADDR mpls $var
sudo ip -6 route add $MN2_IN6_ADDR/128 dev $ETH_MR3
echo 'MN3->MN2'
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $MN3_CH2_MR3_MN2 labelspace 0 proto ipv6
echo 'MN2->MN3'
var=`mpls nhlfe add key 0 instructions push gen $MN2_MR3_CH2_MN3 nexthop nasmesh0 ipv6 $CH2_IN6_ADDR |grep key | cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $MN3_IN6_ADDR/128 via $CH2_IN6_ADDR mpls $var
+34
View File
@@ -0,0 +1,34 @@
#!/bin/bash
# Script by Lamia Romdhani, Nghia, Philippe, Hicham 18 Feb 2009
source params.sh
sudo modprobe mpls6
echo Setting MPLS for mr3
echo "0" > /sys/mpls/debug
echo 'MN1->MN2'
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $MR3_LABEL_IN labelspace 0 proto ipv6
echo 'MN2->MN1'
var=`mpls nhlfe add key 0 instructions push gen $MR3_LABEL_OUT nexthop nasmesh0 ipv6 $CH2_IN6_ADDR |grep key | cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $MN1_IN6_ADDR/128 via $CH2_IN6_ADDR mpls $var
sudo ip -6 route add $MN2_IN6_ADDR/128 dev $ETH_MR3
echo 'MN3->MN2'
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $MN3_CH2_MR3_MN2 labelspace 0 proto ipv6
echo 'MN2->MN3'
var=`mpls nhlfe add key 0 instructions push gen $MN2_MR3_CH2_MN3 nexthop nasmesh0 ipv6 $CH2_IN6_ADDR |grep key | cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $MN3_IN6_ADDR/128 via $CH2_IN6_ADDR mpls $var
+20
View File
@@ -0,0 +1,20 @@
#Phil, Lamia 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr3_conf_nas_barca.sh
./mr3_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR3_EG6_ADDR/64 dev eth0
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH2_IN6_ADDR -N $MR3_EG6_ADDR -E $MR3_IN6_ADDR" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
@@ -0,0 +1,20 @@
#Phil, Lamia 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr3_conf_nas_barca_outdoor.sh
./mr3_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR3_EG6_ADDR/64 dev eth0
#sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH2_IN6_ADDR -N $MR3_EG6_ADDR -E $MR3_IN6_ADDR" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
@@ -0,0 +1,20 @@
#Phil, Lamia 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr3_conf_nas_barca_parking.sh
./mr3_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR3_EG6_ADDR/64 dev eth0
#sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH2_IN6_ADDR -N $MR3_EG6_ADDR -E $MR3_IN6_ADDR" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
@@ -0,0 +1 @@
../../../openair1/PHY/CONFIG/chorist.cfg
@@ -0,0 +1 @@
../../../openair1/PHY/CONFIG/chorist.scn
+83
View File
@@ -0,0 +1,83 @@
#!/bin/bash
MR1_IN_ADDR=10.0.1.3
MR1_IN6_ADDR=2001:10:0:1:7856:3412:0:2
MR1_EG_ADDR=192.168.9.1
MR1_EG6_ADDR=2001:660:5502::100
# Flow CH1->MR1
MR1_LABEL_IN=1001
# Flow MR1->CH1
MR1_LABEL_OUT=1000
ETH_MR1=eth0
MR2_IN_ADDR=10.0.1.4
MR2_IN6_ADDR1=2001:10:0:1:7856:3412:0:3
MR2_IN6_ADDR2=2001:10:0:2:7856:3412:0:3
MR2_EG6_ADDR=2001:660:5502::300
ETH_MR2=eth0
# Flow CH1->MR2
MR2_CH1_LABEL_IN=2000
# Flow MR2->CH1
MR2_CH1_LABEL_OUT=2001
# Flow CH2->MR2
MR2_CH2_LABEL_IN=3001
# Flow MR2->CH2
MR2_CH2_LABEL_OUT=3000
MR3_IN_ADDR=10.0.1.5
MR3_IN6_ADDR=2001:10:0:2:7856:3412:0:2
MR3_EG_ADDR=192.168.10.1
MR3_EG6_ADDR=2001:660:5502::200
# Flow CH2->MR3
MR3_LABEL_IN=4000
# Flow MR3->CH2
MR3_LABEL_OUT=4001
ETH_MR3=eth2
CH1_IN_ADDR=10.0.1.1
CH2_IN_ADDR=10.0.1.2
CH1_IN6_ADDR=2001:10:0:1:7856:3412:0:1
CH2_IN6_ADDR=2001:10:0:2:7856:3412:0:1
## Communication between the CHs
CH1_MR2_CH2_LABEL_IN=8001
CH1_MR2_CH2_LABEL_OUT=8000
CH2_MR2_CH1_LABEL_IN=9001
CH2_MR2_CH1_LABEL_OUT=9000
## Com between MN1 and MN3
MN1_MR1_CH1_MN3=1500
MN3_CH1_MR1_MN1=1501
MN1_CH1_MR2_MN3=2500
MN3_MR2_CH1_MN1=2501
## Com between MN2 and MN3
MN3_MR2_CH2_MN2=3500
MN2_CH2_MR2_MN3=3501
MN3_CH2_MR3_MN2=4500
MN2_MR3_CH2_MN3=4501
#MN1_IN6_ADDR=2001:660:5502::20
#MN2_IN6_ADDR=2001:660:5502::25
#MN1_IN6_ADDR=2001:660:5502::110
MN1_IN6_ADDR=2001:660:5502:0:211:43ff:fe74:77bb
MN1_IN_ADDR=192.168.9.2
MN2_IN6_ADDR=2001:660:5502::210
#MN3_IN6_ADDR=2001:660:5502::310
#MN3_IN6_ADDR=2001:660:5502:0:240:8cff:fe77:9b79
MN3_IN6_ADDR=2001:660:5502:0:218:8bff:feb0:50aa
MN2_IN_ADDR=192.168.10.2
# Put the right OPENAIR3 path here
OPENAIR3_HOME=~/Openair/openair3
OPENAIR3_PMIP6D_PATH=$OPENAIR3_HOME/pmip6d
OPENAIR3_SCRIPTS_PATH=$OPENAIR3_HOME/scripts
REFLECTOR_DIR=$OPENAIR3_HOME/EXAMPLES/BARCA_TRIALS/REFLECTOR
# Put the right OPENAIR2 path here
#OPENAIR2_DIR=~/openair2_r234/openair2/
OPENAIR2_DIR=~/Openair/openair2
+127
View File
@@ -0,0 +1,127 @@
if [ "$1" == "" ]; then
echo "Please provide a TX power level (0-8)"
exit
fi
if [ "$2" == "" ]; then
echo "Please provide a Node ID (0-7 for CH, 8-15 for MR/UE)"
exit
fi
if [ "$OPENAIR1_DIR" == "" ] ; then
echo "Please set OPENAIR1_DIR environment variable"
exit
else
echo "OPENAIR1_DIR Set to $OPENAIR1_DIR"
fi
cd $OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF
source ./txgains.sh
case $1 in
0)
CBMIMO1_POWER=$CBMIMO1_m20_dBm
echo "Configuring CBMIMO1 for -20dBm ($CBMIMO1_POWER)"
;;
1)
CBMIMO1_POWER=$CBMIMO1_m15_dBm
echo Configuring CBMIMO1 for -15dBm
;;
2)
CBMIMO1_POWER=$CBMIMO1_m10_dBm
echo Configuring CBMIMO1 for -10dBm
;;
3)
CBMIMO1_POWER=$CBMIMO1_m5_dBm
echo Configuring CBMIMO1 for -5dBm
;;
4)
CBMIMO1_POWER=$CBMIMO1_0_dBm
echo Configuring CBMIMO1 for 0dBm
;;
5)
CBMIMO1_POWER=$CBMIMO1_5_dBm
echo Configuring CBMIMO1 for 5dBm
;;
6)
CBMIMO1_POWER=$CBMIMO1_10_dBm
echo Configuring CBMIMO1 for 10dBm
;;
7)
CBMIMO1_POWER=$CBMIMO1_15_dBm
echo Configuring CBMIMO1 for 15dBm
;;
8)
CBMIMO1_POWER=$CBMIMO1_20_dBm
echo Configuring CBMIMO1 for 20dBm
;;
*)
echo Invalid TX power
exit
esac
echo Removing openair_rf,openair_l2 and openair_rrc modules
sudo rmmod -f openair_rrc
sudo rmmod -f openair_l2
sudo rmmod -f openair_rf
sudo insmod $OPENAIR1_DIR/ARCH/CBMIMO1/DEVICE_DRIVER/openair_rf_l2.ko
OARF_RET=`lsmod | grep -e openair_rf`
if [ "$OARF_RET" = "" ]; then
echo Error loading openair1 module
exit
fi
sudo insmod $OPENAIR2_DIR/LAYER2/openair_layer2.ko
OA2_RET=`lsmod | grep -e openair_l2`
if [ "$OA2_RET" = "" ]; then
echo Error loading openair2 module
exit
fi
sudo insmod $OPENAIR2_DIR/RRC/MESH/openair_RRC.ko
OARRC_RET=`lsmod | grep -e openair_rrc`
if [ "$OARRC_RET" = "" ]; then
echo Error loading openair RRC module
exit
fi
OA_DEV="/dev/openair0"
if [ -c "$OA_DEV" ]; then
echo "$OA_DEV exists"
else
echo "creating $OA_DEV"
sudo mknod $OA_DEV c 127 0
sudo chmod a+rw /dev/openair0
fi
./openair_rf_cbmimo1 1 0
./openair_rf_cbmimo1 1 6 $CBMIMO1_POWER
if [ $2 -lt "8" ]; then
./openair_rf_cbmimo1 1 1 1 $2
elif [ $2 -lt "16" ]; then
./openair_rf_cbmimo1 1 3 1 $2
else
echo Illegal Node ID, exiting
exit
fi
sleep 1
# Watch the status of the radio to check for hardware exit event
#OA1_STATE=`cat /proc/openair1/openair1_state`
#while [ "$OA1_STATE" != "EXITED" ]; do
# OA1_STATE=`cat /proc/openair1/openair1_state`
# sleep .5
#done
#./openair_rf_cbmimo1 1 4 1
#echo CBMIMO1 Hardware exit, restarting ...
+22
View File
@@ -0,0 +1,22 @@
cd $OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF
echo STOP STARTS...
./openair_rf_cbmimo1 1 4 1
sleep 2
echo STOP RF DONE
sudo killall chbch_scope
echo STOP CHBCH SCOPE DONE
sudo killall sach_scope
echo STOP_SACH SCOPE DONE
sleep 1
sudo rmmod nasmesh
sleep 1
echo REMOVE NASMESH MODULE DONE
sudo rmmod openair_rrc
sleep 1
echo REMOVE RRC MODULE DONE
sudo rmmod openair_l2
sleep 1
echo REMOVE LAYER2 MODULE DONE
sudo rmmod openair_rf
echo REMOVE RF MODULE DONE
echo STOP FINISHED SUCCESSFULLY
+24
View File
@@ -0,0 +1,24 @@
# Configuration file of CH1 (SP4-Wimaxhead1)
# side linked to MR1 (Chorist Edge 1) : name of interface, IPv4, TTL
int_1=nasmesh0
ipv_1=4
ttl_1=65
# side linked to MR2 (SP4-Wimaxrelay-2) : name of interface, IPv4, TTL
int_2=nasmesh0
ipv_2=4
ttl_2=65
#multicast group label on side 1 then group label on side 2
groupes=226.30.10.10,226.40.10.10
groupes=226.30.10.11,226.40.10.11
groupes=226.30.10.12,226.40.10.12
groupes=226.30.10.13,226.40.10.13
groupes=226.30.10.14,226.40.10.14
groupes=226.30.10.15,226.40.10.15
#Port ranges
ports=1234,1234
ports=6300,6308
ports=6340,6348
ports=6360,6368
+24
View File
@@ -0,0 +1,24 @@
# Configuration file of CH1 (SP4-Wimaxhead2)
# side linked to MR2 (SP4-Wimaxrelay-2) : name of interface, IPv4, TTL
int_1=nasmesh0
ipv_1=4
ttl_1=65
# side linked to MR3 (SP4-Edge2) : name of interface, IPv4, TTL
int_2=nasmesh0
ipv_2=4
ttl_2=65
#multicast group label on side 1 then group label on side 2
groupes=226.50.10.10,226.30.10.10
groupes=226.50.10.11,226.30.10.11
groupes=226.50.10.12,226.30.10.12
groupes=226.50.10.13,226.30.10.13
groupes=226.50.10.14,226.30.10.14
groupes=226.50.10.15,226.30.10.15
#Port ranges
ports=1234,1234
ports=6300,6308
ports=6340,6348
ports=6360,6368
+26
View File
@@ -0,0 +1,26 @@
# Configuration file of MN1 (Dieppe)
# side linked to EADS End-users (Wifi side) : name of interface, IPv4, TTL
int_1=wifi0
ipv_1=4
ttl_1=65
# side linked to MR1 (CHORIST-Edge1): name of interface, IPv4, TTL
int_2=eth0
ipv_2=4
ttl_2=65
#multicast group label on side 1 then group label on side 2
groupes=224.0.55.55,224.0.66.66
groupes=226.10.10.10,226.20.10.10
groupes=226.10.10.11,226.20.10.11
groupes=226.10.10.12,226.20.10.12
groupes=226.10.10.13,226.20.10.13
groupes=226.10.10.14,226.20.10.14
groupes=226.10.10.15,226.20.10.15
#Port ranges
ports=1234,1234
ports=6300,6308
ports=6340,6348
ports=6360,6368
+25
View File
@@ -0,0 +1,25 @@
# Configuration file of MN2 (Sarlat)
# side linked to MR3 (CHORIST-Edge2) : name of interface, IPv4, TTL
int_2=eth0
ipv_2=4
ttl_2=65
# side linked to EADS End-users (Wifi side) : name of interface, IPv4, TTL
int_1=wifi0
ipv_1=4
ttl_1=65
#multicast group label on side 1 then group label on side 2
groupes=226.20.10.10,226.10.10.10
groupes=226.20.10.11,226.10.10.11
groupes=226.20.10.12,226.10.10.12
groupes=226.20.10.13,226.10.10.13
groupes=226.20.10.14,226.10.10.14
groupes=226.20.10.15,226.10.10.15
#Port ranges
ports=1234,1234
ports=6300,6308
ports=6340,6348
ports=6360,6368
+26
View File
@@ -0,0 +1,26 @@
# Configuration file MR1 (Chorist-Edge1)
# side linked to MN1 (DIEPPE) : name of interface, IPv4, TTL
int_1=eth0
ipv_1=4
ttl_1=65
# side linked to CH1 (SP4-Wimaxhead1) : name of interface, IPv4, TTL
int_2=nasmesh0
ipv_2=4
ttl_2=65
#multicast group label on side 1 then group label on side 2
groupes=226.20.10.10,226.30.10.10
groupes=226.20.10.11,226.30.10.11
groupes=226.20.10.12,226.30.10.12
groupes=226.20.10.13,226.30.10.13
groupes=226.20.10.14,226.30.10.14
groupes=226.20.10.15,226.30.10.15
# different port ranges
ports=1234,1234
ports=6300,6308
ports=6340,6348
ports=6360,6368
+27
View File
@@ -0,0 +1,27 @@
# Configuration file MR2 (SP4-Wimaxrelay-2)
# side linked to CH1 (SP4-Wimaxhead1) : name of interface, IPv4, TTL
int_1=nasmesh0
ipv_1=4
ttl_1=65
# side linked to CH1 (SP4-Wimaxhead2) : name of interface, IPv4, TTL
int_2=nasmesh0
ipv_2=4
ttl_2=65
#multicast group label on side 1 then group label on side 2
groupes=226.40.10.10,226.50.10.10
groupes=226.40.10.11,226.50.10.11
groupes=226.40.10.12,226.50.10.12
groupes=226.40.10.13,226.50.10.13
groupes=226.40.10.14,226.50.10.14
groupes=226.40.10.15,226.50.10.15
# different port ranges
ports=1234,1234
ports=6300,6308
ports=6340,6348
ports=6360,6368
+25
View File
@@ -0,0 +1,25 @@
# Configuration file MR3 (Chorist-Edge2)
# side linked to CH2 (SP4-Wimaxhead2) : name of interface, IPv4, TTL
int_1=nasmesh0
ipv_1=4
ttl_1=65
# side linked to MN2 (SARLAT) : name of interface, IPv4, TTL
int_2=eth0
ipv_2=4
ttl_2=65
#multicast group label on side 1 then group label on side 2
groupes=226.30.10.10,226.20.10.10
groupes=226.30.10.11,226.20.10.11
groupes=226.30.10.12,226.20.10.12
groupes=226.30.10.13,226.20.10.13
groupes=226.30.10.14,226.20.10.14
groupes=226.30.10.15,226.20.10.15
# different port ranges
ports=1234,1234
ports=6300,6308
ports=6340,6348
ports=6360,6368
Binary file not shown.
@@ -0,0 +1,637 @@
/*******************************/
/* reflector-forwarding-v4m by */
/*******************************/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <strings.h>
#include <netdb.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/unistd.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/signal.h>
#include <sys/param.h>
#include <errno.h>
#include <arpa/inet.h>
#include <pthread.h>
#include <syslog.h>
/* To get ifreq */
#include <arpa/inet.h>
#include <sys/socket.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include <limits.h>
#include <netinet/in_systm.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/udp.h>
#define _PATH_PROCNET_IFINET6 "/proc/net/if_inet6"
#define MSGBUF_SIZE 32768
#define IFNAMSIZE 11
#define INLINE inline __attribute__((always_inline))
struct ipaddr_str
{
char buf[MAX(INET6_ADDRSTRLEN, INET_ADDRSTRLEN)];
};
int IP_VERSION;
static INLINE const char *ip4_to_string(struct ipaddr_str * const buf, const struct in_addr addr4) { return inet_ntop(AF_INET, &addr4, buf->buf, sizeof(buf->buf)); }
static INLINE const char *ip6_to_string(struct ipaddr_str * const buf, const struct in6_addr * const addr6) { return inet_ntop(AF_INET6, addr6, buf->buf, sizeof(buf->buf)); }
static INLINE const char *sockaddr4_to_string(struct ipaddr_str * const buf, const struct sockaddr * const addr) { const struct sockaddr_in * const addr4 = (const struct sockaddr_in *)addr; return ip4_to_string(buf, addr4->sin_addr); }
int programshutdown (void);
#define NUM_THREADS 200
struct thread_data{
int thread_id;
char interface1[11];
char multicast_addr1[41];
char interface2[11];
char multicast_addr2[41];
int ttl1;
int ttl2;
int port1;
int port2;
};
struct thread_data thread_data_array[NUM_THREADS];
/*******************************************************************
*From net-tools lib/interface.c
*
*******************************************************************/
int
get_ipv6_address(char *ifname, struct sockaddr_in6 *saddr6, int scope_in)
{
char addr6[40], devname[IFNAMSIZE];
char addr6p[8][5];
int plen, scope, dad_status, if_idx;
FILE *f;
struct sockaddr_in6 tmp_sockaddr6;
if ((f = fopen(_PATH_PROCNET_IFINET6, "r")) != NULL)
{
while (fscanf(f, "%4s%4s%4s%4s%4s%4s%4s%4s %02x %02x %02x %02x %20s\n",
addr6p[0], addr6p[1], addr6p[2], addr6p[3],
addr6p[4], addr6p[5], addr6p[6], addr6p[7],
&if_idx, &plen, &scope, &dad_status, devname) != EOF)
{
if (!strcmp(devname, ifname))
{
sprintf(addr6, "%s:%s:%s:%s:%s:%s:%s:%s",
addr6p[0], addr6p[1], addr6p[2], addr6p[3],
addr6p[4], addr6p[5], addr6p[6], addr6p[7]);
printf( "\t inet6 addr: %s\n", addr6);
printf("\t Scope: %d\n", scope);
if(scope == scope_in)
{
printf( "\tFound GLOBAL addr: %s:%s:%s:%s:%s:%s:%s:%s\n",
addr6p[0], addr6p[1], addr6p[2], addr6p[3],
addr6p[4], addr6p[5], addr6p[6], addr6p[7]);
inet_pton(AF_INET6,addr6,&tmp_sockaddr6);
memcpy(&saddr6->sin6_addr, &tmp_sockaddr6, sizeof(struct in6_addr));
fclose(f);
return 1;
}
}
}
fclose(f);
}
return 0;
}
/*****************************************************/
/* Threaded routine */
/*****************************************************/
void *Reflector(void *threadarg)
{
int ioctl_s;
struct thread_data *my_data;
my_data = (struct thread_data *)threadarg;
struct in_addr multicastaddress_in; //IPv4 multicast address from command line
struct in_addr multicastaddress_out;
struct sockaddr_in6 tmp_saddr6;
struct ifreq ifr;
struct ipaddr_str buf;
int mcdataport4; //IPv4 multicast port 1
int mcdataport; //IPv4 multicast port 2
/*define variables*/
int mcdatarecvfd4; //multicast data receive socket side 1
int mcdatarecvfd; //multicast data receive socket side 2
int sendfd4; //local send socket IPv4 side 1
int sendfd; //local send socket IPv4 side 2
int ttl1; //time to live IPv4 side 1
int ttl2; //time to live IPv4 side 2
struct sockaddr_in mcdataaddr4; //reception IPv4 sockaddr
struct sockaddr_in mcdataaddr; //reception IPv44 sockaddr
char myhostnameipaddress4[20]; // IPv4 reflector's address string
char myhostnameipaddress[20]; // IPv44 reflector's address string
char addressstring4[20]; // IPv4 address string
char addressstring[20]; // IPv44 address string
struct sockaddr_in localsendaddr4; //IPv4 address of outgoing packets interface 1
struct sockaddr_in localsendaddr; //IPv4 address of outgoing packets interface 2
struct sockaddr_in sourceaddr4; //IPv4 address of incoming packets interface 1
struct sockaddr_in sourceaddr; //IPv4 address of incoming packets interface 2
struct ip_mreq mcdatareq4; //IPv4 join group structure
struct ip_mreq mcdatareq; //IPv44 join group structure
int mcdataaddrlen; //IPv4 multicast address length
unsigned int sourceaddrlen; //IPv4 source address length
char mcdatarecvbuf4[MSGBUF_SIZE]; //IPv4 multicast receive buffer
char mcdatarecvbuf[MSGBUF_SIZE]; //IPv44 multicast receive buffer
fd_set readfds; // file descriptors set
int maxfds; // max number of file descriptors
int nfds;
int nr; // number of bytes read with recvfrom
int ns; // number of bytes sent with sendto
int chksrc; // asserts if source address is not the reflector's one
int debugon=1;
int n2;
char inputbuf[32];
/* IPv4 multicast address */
if((inet_pton(AF_INET,my_data->multicast_addr1,&multicastaddress_in.s_addr))!=1){
printf("bad multicast IPv4 address format\n");
exit (1);
}
//printf("multicastaddress side 1 v4 =%s\n",my_data->multicast_addr1);
/* IPv4 multicast address */
if((inet_pton(AF_INET,my_data->multicast_addr2,&multicastaddress_out.s_addr))!=1){
printf("bad multicast IPv4 address format\n");
exit (1);
}
//printf("multicastaddress side 2 v4 =%s\n",my_data->multicast_addr2);
/* IPv4 multicast ports */
mcdataport4 = my_data->port1;
mcdataport = my_data->port2;
/* Time to live for IPv4 multicast */
ttl1 = my_data->ttl1;
/* Time to live for IPv4 multicast */
ttl2 = my_data->ttl2;
IP_VERSION=4;
if (IP_VERSION==4 )//
{
ioctl_s = socket(AF_INET, SOCK_DGRAM, 0);
if (ioctl_s < 0)
{
syslog(LOG_ERR, "ioctl socket: %m");
exit (0);
}
/* INTERFACE 1 */
memset(&ifr, 0, sizeof(struct ifreq));
strncpy(ifr.ifr_name, my_data->interface1, IFNAMSIZE);
/* Check interface address (IPv4) */
if(ioctl(ioctl_s, SIOCGIFADDR, &ifr) < 0)
{
printf( "\tCould not get address of interface 1 - removing it\n");
exit(0);
}
sockaddr4_to_string(&myhostnameipaddress4, &ifr.ifr_addr);
/* INTERFACE 2 */
memset(&ifr, 0, sizeof(struct ifreq));
strncpy(ifr.ifr_name, my_data->interface2, IFNAMSIZE);
/* Check interface address (IPv4) */
if(ioctl(ioctl_s, SIOCGIFADDR, &ifr) < 0)
{
printf( "\tCould not get address of interface 2 - removing it\n");
exit(0);
}
sockaddr4_to_string(&myhostnameipaddress, &ifr.ifr_addr);
}
else
{
/* Global address mode */
int ipv6_addrtype = 0; /* global */
/* Get IPV6 GLOBAL interface address */
memset(&ifr, 0, sizeof(struct ifreq));
strncpy(ifr.ifr_name, my_data->interface2, IFNAMSIZE);
if(get_ipv6_address(ifr.ifr_name, &tmp_saddr6, ipv6_addrtype ) <= 0)
{
printf( "\tCould not find site-local IPv6 address for %s\n", ifr.ifr_name);
}
memset(&ifr, 0, sizeof(struct ifreq));
strncpy(ifr.ifr_name, my_data->interface2, IFNAMSIZE);
// printf("\n Adding interface : %s \n", my_data->interface2);
/* Get IPV6 GLOBAL interface address */
if(get_ipv6_address(ifr.ifr_name, &tmp_saddr6, ipv6_addrtype ) <= 0)
{
printf( "\tCould not find site-local IPv6 address for %s\n", ifr.ifr_name);
}
}
/* Structures initialization */
/*enter the address/port data into the mcdataaddr structure for IPv4*/
bzero((char *) &mcdataaddr4, sizeof(mcdataaddr4));
mcdataaddr4.sin_family=AF_INET;
mcdataaddr4.sin_addr.s_addr = multicastaddress_in.s_addr;
mcdataaddr4.sin_port = htons(mcdataport4);
/*enter the address/port data into the mcdataaddr structure for IPv4*/
bzero((char *) &mcdataaddr, sizeof(mcdataaddr));
mcdataaddr.sin_family=AF_INET;
mcdataaddr.sin_addr.s_addr = multicastaddress_out.s_addr;
mcdataaddr.sin_port = htons(mcdataport);
/*enter the address/port data into the localsendaddr structure for IPv4*/
bzero((char *) &localsendaddr4, sizeof(localsendaddr4));
localsendaddr4.sin_family=AF_INET;
inet_pton(AF_INET, myhostnameipaddress4 , &localsendaddr4.sin_addr.s_addr);
localsendaddr4.sin_port = htons(0);
//LL
// inet_ntop(AF_INET, &localsendaddr4.sin_addr.s_addr,addressstring ,sizeof(addressstring));
// printf("threaded function local sender addr side 1=%s \t",addressstring);
/*enter the address/port data into the localsendaddr structure for IPv4*/
bzero((char *) &localsendaddr, sizeof(localsendaddr));
localsendaddr.sin_family=AF_INET;
inet_pton(AF_INET, myhostnameipaddress , &localsendaddr.sin_addr.s_addr);
localsendaddr.sin_port = htons(0);
//LL
// inet_ntop(AF_INET, &localsendaddr.sin_addr.s_addr,addressstring ,sizeof(addressstring));
// printf("threaded function local sender addr side 2=%s\n", addressstring);
/*enter the address/port data into the mcdatareq structure for IPv4*/
bzero((char *) &mcdatareq4, sizeof(mcdatareq4));
// mcdatareq4.imr_interface.s_addr=htonl(INADDR_ANY); < force to add a multicast route
inet_pton(AF_INET, myhostnameipaddress4 ,&mcdatareq4.imr_interface.s_addr );
mcdatareq4.imr_multiaddr.s_addr=multicastaddress_in.s_addr;
// inet_pton(AF_INET, myhostnameipaddress4 , &mcdatareq4.imr_interface.s_addr);
/*enter the address/port data into the mcdatareq structure for IPv4*/
bzero((char *) &mcdatareq, sizeof(mcdatareq));
inet_pton(AF_INET, myhostnameipaddress ,&mcdatareq.imr_interface.s_addr );
// mcdatareq.imr_interface.s_addr=htonl(INADDR_ANY);
mcdatareq.imr_multiaddr.s_addr=multicastaddress_out.s_addr;
/*get the sendfd socket linked to the first address of the current host */
if ((sendfd4 = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
perror("can't open sendfd socket!");
exit (1);
}
if (bind(sendfd4, (struct sockaddr *) &localsendaddr4, \
sizeof(localsendaddr4)) < 0) {
perror("can't bind localsendaddr v4 to socket!");
exit(1);
}
/*get the sendfd socket linked to the first address of the current host*/
if ((sendfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
perror("can't open sendfd socket!");
exit (1);
}
if (bind(sendfd, (struct sockaddr *) &localsendaddr, \
sizeof(localsendaddr)) < 0) {
perror("can't bind localsendaddr v4 side 2 to socket!");
exit(1);
}
if ((mcdatarecvfd4 = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
perror("can't open mcdatarecvfd4 socket!");
exit(1);
}
/*allow multiple processes per host to read from IPv4 sockets side 2*/
if (setsockopt(mcdatarecvfd4, SOL_SOCKET, SO_REUSEADDR, &mcdataaddr4, sizeof(mcdataaddr4)) < 0) {
perror("SO_REUSEADDR setsockopt v4\n");
}
if (bind(mcdatarecvfd4, (struct sockaddr *) &mcdataaddr4, \
sizeof(mcdataaddr4)) < 0) {
inet_ntop(AF_INET, &mcdataaddr4.sin_addr.s_addr,addressstring ,sizeof(addressstring));
printf("with address of bind %s\n", addressstring);
perror("can't bind mcdataaddr v4 to socket!");
exit(1);
}
if (multicastaddress_out.s_addr!=multicastaddress_in.s_addr)
{
//multicast data receive socket side 2
/*get a mcdatarecvfd socket, bind to address for IPv4*/
if ((mcdatarecvfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
perror("can't open mcdatarecvfd4 socket!");
exit(1);
}
/*allow multiple processes per host to read from IPv4 sockets side 2*/
if (setsockopt(mcdatarecvfd, SOL_SOCKET, SO_REUSEADDR, &mcdataaddr, sizeof(mcdataaddr)) < 0) {
perror("SO_REUSEADDR setsockopt v4\n");
}
if (bind(mcdatarecvfd, (struct sockaddr *) &mcdataaddr, \
sizeof(mcdataaddr)) < 0) {
perror("can't bind mcdataaddr v4 side 2 to socket!");
exit(1);
}
}
else
{
mcdatarecvfd= mcdatarecvfd4;
}
/*set socket options to join multicast group in IPv4*/
if (setsockopt(mcdatarecvfd4, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mcdatareq4,\
sizeof(mcdatareq4)) < 0) {
perror("can't set socket options to join multicast group data v4 side 1!");
exit(1);
}
/*set socket options to join multicast group in IPv4*/
if (setsockopt(mcdatarecvfd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mcdatareq,\
sizeof(mcdatareq)) < 0) {
perror("can't set socket options to join multicast group data v4 side 2!");
exit(1);
}
/*now set multicast socket TTL option for IPv4*/
if (setsockopt(sendfd4, IPPROTO_IP, IP_MULTICAST_TTL, \
&ttl1, sizeof(ttl1)) < 0)
perror("can't set multicast ttl v4 socket option!");
/*now set multicast socket TTL option for IPv4*/
if (setsockopt(sendfd, IPPROTO_IP, IP_MULTICAST_TTL, \
&ttl2, sizeof(ttl2)) < 0)
perror("can't set multicast ttl v4 socket option!");
/*define the sizes of the address structures*/
mcdataaddrlen=sizeof(mcdataaddr4);
sourceaddrlen=sizeof(sourceaddr4);
/*start infinite while loop*/
/*and check for activity on sockets*/
/*set up the select sytem call parameters*/
/*zero out the readfds and writefds lists, then add*/
/*the file descriptors of interest*/
while(1) {
FD_ZERO(&readfds);
FD_SET(mcdatarecvfd4, &readfds);
FD_SET(mcdatarecvfd, &readfds);
if (debugon >= 1) {
FD_SET(0, &readfds);
}
maxfds = mcdatarecvfd4 + 5;
/*check for activity*/
nfds = select(maxfds, &readfds, NULL, NULL, NULL);
/*if specified on the command line, check for input on stdin*/
if (debugon >= 1) {
if (FD_ISSET(0, &readfds)) {
n2 = read(0,inputbuf, sizeof(inputbuf));
inputbuf[n2>0? n2-1: 0] = '\0';
if (!strcmp(inputbuf,"q")) {
programshutdown();
}
}
fflush(stdout);
}
/*1:receive from IPv4, send on IPv44 - data*/
if (FD_ISSET(mcdatarecvfd4, &readfds)) {
nr = recvfrom(mcdatarecvfd4, mcdatarecvbuf4, MSGBUF_SIZE, 0, (struct sockaddr *) \
&sourceaddr4, &sourceaddrlen);
if (debugon >= 2){
inet_ntop(AF_INET, &sourceaddr4.sin_addr.s_addr, addressstring4 , sizeof(addressstring4));
printf("\nreading from mcdatarecvfd4, got data from %s\n", addressstring4);
}
if (sourceaddr4.sin_addr.s_addr == localsendaddr4.sin_addr.s_addr){
chksrc = 0;
if (debugon >= 2)
printf("don't retransmit multicastv4 sourced from gateway machine\n");
} else {
chksrc = 1;
if (debugon >= 2)
printf("retransmit to multicast address\n");
}
if (chksrc) {
if (nr < 0)
printf ("mcdatarecvfd4:recvfrom over multicast v4 address error!(1)\n");
/*now send to IPv4*/
if (multicastaddress_out.s_addr != INADDR_ANY) {
if (debugon >= 2) {
inet_ntop(AF_INET, &mcdataaddr.sin_addr.s_addr,addressstring4 ,sizeof(addressstring4));
printf("sending to %s\n", addressstring4);
}
ns = sendto(sendfd, mcdatarecvbuf4, nr, 0, (struct sockaddr *)&mcdataaddr, \
sizeof(mcdataaddr));
} else {
if (debugon >= 2) printf("not resending to ORIGINATOR! or array entry = 0\n");
}
}
}
/*2:receive from IPv4 side 2, send on IPv44 side 1 - data*/
if (FD_ISSET(mcdatarecvfd, &readfds)) {
nr = recvfrom(mcdatarecvfd, mcdatarecvbuf, MSGBUF_SIZE, 0, (struct sockaddr *) \
&sourceaddr, &sourceaddrlen);
if (debugon >= 2){
inet_ntop(AF_INET, &sourceaddr.sin_addr.s_addr, addressstring , sizeof(addressstring));
printf("\nreading from mcdatarecvfd side 2, got data from %s\n", addressstring);
}
if (sourceaddr.sin_addr.s_addr == localsendaddr.sin_addr.s_addr){
chksrc = 0;
if (debugon >= 2)
printf("don't retransmit multicastv4 sourced from gateway machine\n");
} else {
chksrc = 1;
if (debugon >= 2)
printf("retransmit to multicast address side 1\n");
}
if (chksrc) {
if (nr < 0)
printf ("mcdatarecvfd:recvfrom over multicast v4 address error!(1)\n");
/*now send to IPv4*/
if (multicastaddress_in.s_addr != INADDR_ANY) {
if (debugon >= 2) {
inet_ntop(AF_INET, &mcdataaddr4.sin_addr.s_addr,addressstring ,sizeof(addressstring));
printf("sending to %s\n", addressstring);
}
ns = sendto(sendfd4, mcdatarecvbuf, nr, 0, (struct sockaddr *)&mcdataaddr4, \
sizeof(mcdataaddr4));
} else {
if (debugon >= 2) printf("not resending to ORIGINATOR! or array entry = 0\n");
}
}
}
} //end of while loop
}
/*****************************************************/
int
main (argc, argv)
int argc;
char **argv;
{
char interface1[11], interface2[11];
int ttl1; //time to live side1
int ttl2; //time to live side 2
struct couple
{
char multicast_addr1[41]; /* address multicast for the group side 1 */
char multicast_addr2[41]; /* address multicast for the group side 2 */
};
int nb_port_range;
int nb_multicast_couple;
int ip_version, ip_version2;
int displayon=0;
struct couple *multi_group;
int i,j, k, rc,port;
pthread_t threads[NUM_THREADS];
struct port_range
{
int port_begin;
int port_end;
};
struct port_range *prt_range;
if (argc < 12) {
fprintf (stderr, "Error in the syntax\n");
exit(1);
}
strcpy(interface1,argv[1]);
strcpy(interface2,argv[2]);
ip_version= atoi(argv[3]);
ip_version2=atoi(argv[4]);
/* Time to live for IPv4 multicast */
ttl1 = atoi(argv[5]);
/* Time to live for IPv4 multicast */
ttl2 = atoi(argv[6]);
nb_multicast_couple=atoi(argv[7]);
if (nb_multicast_couple !=0)
{
if ((multi_group=(struct couple *)malloc(nb_multicast_couple*sizeof(struct couple)))==NULL)
{
printf("Memory problem to allocate struct couple !\n") ;
exit (1);
}
for (i=0; i <nb_multicast_couple; i++)
{
strcpy(multi_group[i].multicast_addr1,argv[8+2*i]);
strcpy(multi_group[i].multicast_addr2,argv[8+2*i +1]);
}
}
else
{
exit(0);
}
nb_port_range=atoi(argv[8 + nb_multicast_couple*2]);
if (nb_port_range !=0)
{
if ((prt_range=(struct port_range *)malloc(nb_port_range*sizeof(struct port_range)))==NULL)
{
printf("Memory problem to allocate struct port !\n") ;
exit (1);
}
for (i=0; i <nb_port_range; i++)
{
prt_range[i].port_begin= atoi(argv[8+1 + nb_multicast_couple*2+2*i]);
prt_range[i].port_end = atoi(argv[8+1 + nb_multicast_couple*2+2*i +1]);
}
}
else
{
exit(0);
}
k=0;
printf( "Multicast state : for interface %s and interface %s for %d multicast group(s) on %d port range(s) \n", interface1, interface2, nb_multicast_couple, nb_port_range);
for (i=0; i <nb_multicast_couple; i++)
{
for(j=0; j <nb_port_range; j++)
{
for (port= prt_range[j].port_begin; port <=prt_range[j].port_end; port++)
{
strcpy (thread_data_array[k].interface1, interface1);
strcpy (thread_data_array[k].interface2, interface2);
thread_data_array[k].ttl1=ttl1;
thread_data_array[k].ttl2=ttl2;
strcpy (thread_data_array[k].multicast_addr1, multi_group[i].multicast_addr1);
strcpy (thread_data_array[k].multicast_addr2, multi_group[i].multicast_addr2);
thread_data_array[k].thread_id=k;
thread_data_array[k].port1=port;
thread_data_array[k].port2=port;
if (displayon >= 1) printf("Creating thread %d for group %d for port %d\n", k,i ,port);
rc=pthread_create(&threads[k], NULL, Reflector, (void *)&thread_data_array[k]);
if (rc)
{
printf("Error; return code from pthreade_create() is %d\n", rc);
exit(-1);
}
k=k+1;
if (k> NUM_THREADS)
{
printf("Number of created threads over the fixed limited!" );
exit(-1);
}
}
}
}
pthread_exit(NULL);
}
int programshutdown () {
exit (1);
}
@@ -0,0 +1,75 @@
#!/usr/bin/perl -w
use Switch;
$dir = $ARGV[0];
$file = $ARGV[1];
$nb_groupes = `grep groupes $ARGV[0]|wc -l|sed \'s/ //g\'`;
$nb_plages = `grep port $ARGV[0]|wc -l|sed \'s/ //g\'`;
chomp($nb_plages);
chomp($nb_groupes);
#les structures dans lesquelles on stocke les données
@groupes=();
@ports=();
@int_1=();
@int_2=();
@ipv_1=();
@ipv_2=();
@ttl_1=();
@ttl_2=();
#on compte le nombre de lignes, pour signaler l'erreur
$num_ligne = 0;
open(fFile, "< $file") or die "cannot open file $file";
while($line = <fFile>){
$num_ligne++;
#on ignore les lignes commentées ou vides
if ((substr ($line,0,1) ne "#") && ($line =~ /=/)) {
@ligne=split("=", $line);
#si l'argument est vide, alors le programme sort avec une erreur
chomp($ligne[1]);
if(!length($ligne[1])){
printf "Erreur dans le fichier de conf à la ligne $num_ligne.\n";
exit;
}
#on met les données dans les structures adéquates
switch ($ligne[0]){
case "int_1" {push(@int_1,$ligne[1])}
case "int_2" {push(@int_2,$ligne[1])}
case "ipv_1" {push(@ipv_1,$ligne[1])}
case "ipv_2" {push(@ipv_2,$ligne[1])}
case "ttl_1" {push(@ttl_1,$ligne[1])}
case "ttl_2" {push(@ttl_2,$ligne[1])}
case "groupes" {push(@groupes,$ligne[1])}
case "ports" {push(@ports,$ligne[1])}
}
}
}
close(fFile);
#On construit la commande et on l'affiche
$commande = "$dir/reflector $int_1[0] $int_2[0] $ipv_1[0] $ipv_2[0] $ttl_1[0] $ttl_2[0]";
#on rajoute le nb de groupes et les groupes
$commande = $commande." ".@groupes;
foreach $groupe (@groupes){
@couple = split (",", $groupe);
$commande = $commande." $couple[0] $couple[1]";
}
#on rajoute le nb de ports et les ports
$commande = $commande." ".@ports;
foreach $port (@ports){
@couple = split (",", $port);
$commande = $commande." $couple[0] $couple[1]";
}
$commande = $commande."\n";
system($commande);
@@ -0,0 +1,97 @@
#!/bin/bash
source params.sh
sleep 1
echo Clusterhead address is $CH1_IN6_ADDR
echo Launching AS and RF
./start_openair.sh 8 0
# Installing NASMESH driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x01000000
echo Classification rules for CH
#CH1<-> MR1 IP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $CH1_IN6_ADDR -y $MR1_IN6_ADDR -r 12
#CH1<-> MR1 MPLS user-plane bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MR1_LABEL_IN -m $MR1_LABEL_OUT -r 13
## Est ce bon ?
#CH1<->MR1 - For com between MN1 and MN3 - MPLS user-plane bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MN3_CH1_MR1_MN1 -m $MN1_MR1_CH1_MN3 -r 13
#CH1<-> MR1 multicast (rajout THC)
echo EADS Multicast for CH1
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.15 -r 12
#CH1<-> MR2 (IP Signaling)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x $CH1_IN6_ADDR -y $MR2_IN6_ADDR1 -r 20
#CH1<-> MR2 (MPLS user-plane bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c16 -i0 -z0 -l $MR2_CH1_LABEL_IN -m $MR2_CH1_LABEL_OUT -r 21
#CH1<-> MR2 (MPLS PMIP signaling bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c17 -i0 -z0 -l $CH1_MR2_CH2_LABEL_OUT -m $CH1_MR2_CH2_LABEL_IN -r 21
#CH1<-> MR2 - For com between MN1 and MN3 - (MPLS signaling bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c18 -i0 -z0 -l $MN1_CH1_MR2_MN3 -m $MN3_MR2_CH1_MN1 -r 21
#CH1<-> MR2 multicast EADS (rajout THC)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c19 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.10 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c20 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.10 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c21 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.11 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c22 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.11 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c23 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.12 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c24 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.12 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c25 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.13 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c26 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.13 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c27 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.14 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c28 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.14 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c29 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.15 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c30 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.15 -r 20
#CH Broadcast (transmission of Router ADV)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c31 -i0 -z0 -x $CH1_IN6_ADDR -y ff02::1 -r 3
#CH<-> MR1 Imulticast
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x ff3e:30:2001:660:5502:ffff:e000:3737 -y $MR1_IN_ADDR -r 14
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -s 10.0.0.2 -t 224.0.55.55 -r 12
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -s 10.0.0.1 -t 224.0.55.55 -r 12
#CH<-> MR2 (IP Signaling)
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -x $CH_ADDR -y $MR2_IN_ADDR -r 20
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -s 10.0.0.1 -t 224.0.66.66 -r 20
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -s 10.0.0.3 -t 224.0.66.66 -r 20
#CH<-> MR2 (MPLS user-plane bearer)
# Bring up openair NASMESH device and set IPv6 address
sudo ifconfig nasmesh0 up
sudo ip addr add 10.0.0.1/24 dev nasmesh0
sudo ip -6 addr add $CH1_IN6_ADDR/64 dev nasmesh0
echo No MPLS debug
echo "0" > /sys/mpls/debug
echo Multicast state launched with config_ch1
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_ch1 &
@@ -0,0 +1,97 @@
#!/bin/bash
source params.sh
sleep 1
echo Clusterhead address is $CH1_IN6_ADDR
echo Launching AS and RF
./start_openair.sh 6 0
# Installing NASMESH driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x01000000
echo Classification rules for CH
#CH1<-> MR1 IP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $CH1_IN6_ADDR -y $MR1_IN6_ADDR -r 12
#CH1<-> MR1 MPLS user-plane bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MR1_LABEL_IN -m $MR1_LABEL_OUT -r 13
## Est ce bon ?
#CH1<->MR1 - For com between MN1 and MN3 - MPLS user-plane bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MN3_CH1_MR1_MN1 -m $MN1_MR1_CH1_MN3 -r 13
#CH1<-> MR1 multicast (rajout THC)
echo EADS Multicast for CH1
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.15 -r 12
#CH1<-> MR2 (IP Signaling)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x $CH1_IN6_ADDR -y $MR2_IN6_ADDR1 -r 20
#CH1<-> MR2 (MPLS user-plane bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c16 -i0 -z0 -l $MR2_CH1_LABEL_IN -m $MR2_CH1_LABEL_OUT -r 21
#CH1<-> MR2 (MPLS PMIP signaling bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c17 -i0 -z0 -l $CH1_MR2_CH2_LABEL_OUT -m $CH1_MR2_CH2_LABEL_IN -r 21
#CH1<-> MR2 - For com between MN1 and MN3 - (MPLS signaling bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c18 -i0 -z0 -l $MN1_CH1_MR2_MN3 -m $MN3_MR2_CH1_MN1 -r 21
#CH1<-> MR2 multicast EADS (rajout THC)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c19 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.10 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c20 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.10 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c21 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.11 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c22 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.11 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c23 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.12 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c24 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.12 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c25 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.13 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c26 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.13 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c27 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.14 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c28 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.14 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c29 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.15 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c30 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.15 -r 20
#CH Broadcast (transmission of Router ADV)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c31 -i0 -z0 -x $CH1_IN6_ADDR -y ff02::1 -r 3
#CH<-> MR1 Imulticast
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x ff3e:30:2001:660:5502:ffff:e000:3737 -y $MR1_IN_ADDR -r 14
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -s 10.0.0.2 -t 224.0.55.55 -r 12
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -s 10.0.0.1 -t 224.0.55.55 -r 12
#CH<-> MR2 (IP Signaling)
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -x $CH_ADDR -y $MR2_IN_ADDR -r 20
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -s 10.0.0.1 -t 224.0.66.66 -r 20
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -s 10.0.0.3 -t 224.0.66.66 -r 20
#CH<-> MR2 (MPLS user-plane bearer)
# Bring up openair NASMESH device and set IPv6 address
sudo ifconfig nasmesh0 up
sudo ip addr add 10.0.0.1/24 dev nasmesh0
sudo ip -6 addr add $CH1_IN6_ADDR/64 dev nasmesh0
echo No MPLS debug
echo "0" > /sys/mpls/debug
echo Multicast state launched with config_ch1
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_ch1 &
+41
View File
@@ -0,0 +1,41 @@
#!/bin/bash
source params.sh
sudo ./ch1_conf_nas_barca_outdoor.sh
# MN1 -> MN2
sudo ./mpls_nas.sh $MR1_LABEL_OUT $MR2_IN6_ADDR1 $MR2_CH1_LABEL_IN
# MN2 -> MN1
sudo ./mpls_nas.sh $MR2_CH1_LABEL_OUT $MR1_IN6_ADDR $MR1_LABEL_IN
# MN1 -> MN3
sudo ./mpls_nas.sh $MN1_MR1_CH1_MN3 $MR2_IN6_ADDR1 $MN1_CH1_MR2_MN3
# MN3 -> MN1
sudo ./mpls_nas.sh $MN3_MR2_CH1_MN1 $MR1_IN6_ADDR $MN3_CH1_MR1_MN1
# CH1 -> CH2
#echo 'CH2->MR2->CH1'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $CH1_MR2_CH2_LABEL_IN labelspace 0 proto ipv6
#echo 'CH1->MR2->CH2'
var=`mpls nhlfe add key 0 instructions push gen $CH1_MR2_CH2_LABEL_OUT nexthop nasmesh0 ipv6 $MR2_IN6_ADDR1 | grep key |cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $CH2_IN6_ADDR/128 via $MR2_IN6_ADDR1 mpls $var
echo 0 > /sys/mpls/debug
# PMIP
echo /openair3/pmip6d/pmip6d -c -L $CH1_IN6_ADDR -A $CH2_IN6_ADDR
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -c -L $CH1_IN6_ADDR -A $CH2_IN6_ADDR" &
watch -n .1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats ; cat /proc/openair1/openair1_state"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
@@ -0,0 +1,41 @@
#!/bin/bash
source params.sh
sudo ./ch1_conf_nas_barca_outdoor.sh
# MN1 -> MN2
sudo ./mpls_nas.sh $MR1_LABEL_OUT $MR2_IN6_ADDR1 $MR2_CH1_LABEL_IN
# MN2 -> MN1
sudo ./mpls_nas.sh $MR2_CH1_LABEL_OUT $MR1_IN6_ADDR $MR1_LABEL_IN
# MN1 -> MN3
sudo ./mpls_nas.sh $MN1_MR1_CH1_MN3 $MR2_IN6_ADDR1 $MN1_CH1_MR2_MN3
# MN3 -> MN1
sudo ./mpls_nas.sh $MN3_MR2_CH1_MN1 $MR1_IN6_ADDR $MN3_CH1_MR1_MN1
# CH1 -> CH2
#echo 'CH2->MR2->CH1'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $CH1_MR2_CH2_LABEL_IN labelspace 0 proto ipv6
#echo 'CH1->MR2->CH2'
var=`mpls nhlfe add key 0 instructions push gen $CH1_MR2_CH2_LABEL_OUT nexthop nasmesh0 ipv6 $MR2_IN6_ADDR1 | grep key |cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $CH2_IN6_ADDR/128 via $MR2_IN6_ADDR1 mpls $var
echo 0 > /sys/mpls/debug
# PMIP
echo /openair3/pmip6d/pmip6d -c -L $CH1_IN6_ADDR -A $CH2_IN6_ADDR
#sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -c -L $CH1_IN6_ADDR -A $CH2_IN6_ADDR" &
watch -n .1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats ; cat /proc/openair1/openair1_state"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
+41
View File
@@ -0,0 +1,41 @@
#!/bin/bash
source params.sh
sudo ./ch1_conf_nas_barca_parking.sh
# MN1 -> MN2
sudo ./mpls_nas.sh $MR1_LABEL_OUT $MR2_IN6_ADDR1 $MR2_CH1_LABEL_IN
# MN2 -> MN1
sudo ./mpls_nas.sh $MR2_CH1_LABEL_OUT $MR1_IN6_ADDR $MR1_LABEL_IN
# MN1 -> MN3
sudo ./mpls_nas.sh $MN1_MR1_CH1_MN3 $MR2_IN6_ADDR1 $MN1_CH1_MR2_MN3
# MN3 -> MN1
sudo ./mpls_nas.sh $MN3_MR2_CH1_MN1 $MR1_IN6_ADDR $MN3_CH1_MR1_MN1
# CH1 -> CH2
#echo 'CH2->MR2->CH1'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $CH1_MR2_CH2_LABEL_IN labelspace 0 proto ipv6
#echo 'CH1->MR2->CH2'
var=`mpls nhlfe add key 0 instructions push gen $CH1_MR2_CH2_LABEL_OUT nexthop nasmesh0 ipv6 $MR2_IN6_ADDR1 | grep key |cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $CH2_IN6_ADDR/128 via $MR2_IN6_ADDR1 mpls $var
echo 0 > /sys/mpls/debug
# PMIP
echo /openair3/pmip6d/pmip6d -c -L $CH1_IN6_ADDR -A $CH2_IN6_ADDR
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -c -L $CH1_IN6_ADDR -A $CH2_IN6_ADDR" &
watch -n .5 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats ; cat /proc/openair1/openair1_state"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
@@ -0,0 +1,41 @@
#!/bin/bash
source params.sh
sudo ./ch1_conf_nas_barca_parking.sh
# MN1 -> MN2
sudo ./mpls_nas.sh $MR1_LABEL_OUT $MR2_IN6_ADDR1 $MR2_CH1_LABEL_IN
# MN2 -> MN1
sudo ./mpls_nas.sh $MR2_CH1_LABEL_OUT $MR1_IN6_ADDR $MR1_LABEL_IN
# MN1 -> MN3
sudo ./mpls_nas.sh $MN1_MR1_CH1_MN3 $MR2_IN6_ADDR1 $MN1_CH1_MR2_MN3
# MN3 -> MN1
sudo ./mpls_nas.sh $MN3_MR2_CH1_MN1 $MR1_IN6_ADDR $MN3_CH1_MR1_MN1
# CH1 -> CH2
#echo 'CH2->MR2->CH1'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $CH1_MR2_CH2_LABEL_IN labelspace 0 proto ipv6
#echo 'CH1->MR2->CH2'
var=`mpls nhlfe add key 0 instructions push gen $CH1_MR2_CH2_LABEL_OUT nexthop nasmesh0 ipv6 $MR2_IN6_ADDR1 | grep key |cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $CH2_IN6_ADDR/128 via $MR2_IN6_ADDR1 mpls $var
echo 0 > /sys/mpls/debug
# PMIP
#echo /openair3/pmip6d/pmip6d -c -L $CH1_IN6_ADDR -A $CH2_IN6_ADDR
#sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -c -L $CH1_IN6_ADDR -A $CH2_IN6_ADDR" &
watch -n .5 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats ; cat /proc/openair1/openair1_state"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
@@ -0,0 +1,78 @@
#!/bin/bash
source params.sh
sleep 1
echo ClusterHead address is $CH2_IN6_ADDR
echo Launching AS and RF
./start_openair.sh 8 1
# Installing NASMESH driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x01000000
echo Classification rules for CH2
#CH2 Broadcast (transmission of Router ADV)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $CH2_IN6_ADDR -y ff02::1 -r 3
#CH2<-> MR2 IP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x $CH2_IN6_ADDR -y $MR2_IN6_ADDR2 -r 20
#CH<-> MR1 MPLS user-plane bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR2_CH2_LABEL_IN -m $MR2_CH2_LABEL_OUT -r 21
#CH2<-> MR2 MPLS PMIP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -l $CH2_MR2_CH1_LABEL_OUT -m $CH2_MR2_CH1_LABEL_IN -r 21
#CH2<-> MR2 MPLS Signaling - For com between MN3 and MN2
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -l $MN2_CH2_MR2_MN3 -m $MN3_MR2_CH2_MN2 -r 21
#CH2<-> MR2 Imulticast
echo EADS Multicast for MR2
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.10 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.10 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.11 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.11 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.12 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.12 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.13 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.13 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.14 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.14 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.15 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c16 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.15 -r 20
#CH2<-> MR3 (IP Signaling)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c17 -i0 -z0 -x $CH2_IN6_ADDR -y $MR3_IN6_ADDR -r 28
#CH2<-> MR3 (MPLS user-plane bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c18 -i0 -z0 -l $MR3_LABEL_IN -m $MR3_LABEL_OUT -r 29
#CH2<-> MR3 (MPLS for com between MN2 and MN3)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c19 -i0 -z0 -l $MN3_CH2_MR3_MN2 -m $MN2_MR3_CH2_MN3 -r 29
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c20 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.10 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c21 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.10 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c22 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.11 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c23 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.11 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c24 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.12 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c25 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.12 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c26 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.13 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c27 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.13 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c28 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.14 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c29 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.14 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c30 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.15 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c31 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.15 -r 28
# Bring up openair NASMESH device and set IPv6 address
sudo ifconfig nasmesh0 up
sudo ip addr add 10.0.0.2/24 dev nasmesh0
sudo ip -6 addr add $CH2_IN6_ADDR/64 dev nasmesh0
echo No MPLS debug
echo "0" >/sys/mpls/debug
echo Multicast state launched with config_ch2
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_ch2 &
@@ -0,0 +1,78 @@
#!/bin/bash
source params.sh
sleep 1
echo ClusterHead address is $CH2_IN6_ADDR
echo Launching AS and RF
./start_openair.sh 8 1
# Installing NASMESH driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x01000000
echo Classification rules for CH2
#CH2 Broadcast (transmission of Router ADV)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $CH2_IN6_ADDR -y ff02::1 -r 3
#CH2<-> MR2 IP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x $CH2_IN6_ADDR -y $MR2_IN6_ADDR2 -r 20
#CH<-> MR1 MPLS user-plane bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR2_CH2_LABEL_IN -m $MR2_CH2_LABEL_OUT -r 21
#CH2<-> MR2 MPLS PMIP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -l $CH2_MR2_CH1_LABEL_OUT -m $CH2_MR2_CH1_LABEL_IN -r 21
#CH2<-> MR2 MPLS Signaling - For com between MN3 and MN2
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -l $MN2_CH2_MR2_MN3 -m $MN3_MR2_CH2_MN2 -r 21
#CH2<-> MR2 Imulticast
echo EADS Multicast for MR2
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.10 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.10 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.11 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.11 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.12 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.12 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.13 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.13 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.14 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.14 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.15 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c16 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.15 -r 20
#CH2<-> MR3 (IP Signaling)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c17 -i0 -z0 -x $CH2_IN6_ADDR -y $MR3_IN6_ADDR -r 28
#CH2<-> MR3 (MPLS user-plane bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c18 -i0 -z0 -l $MR3_LABEL_IN -m $MR3_LABEL_OUT -r 29
#CH2<-> MR3 (MPLS for com between MN2 and MN3)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c19 -i0 -z0 -l $MN3_CH2_MR3_MN2 -m $MN2_MR3_CH2_MN3 -r 29
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c20 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.10 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c21 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.10 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c22 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.11 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c23 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.11 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c24 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.12 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c25 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.12 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c26 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.13 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c27 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.13 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c28 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.14 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c29 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.14 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c30 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.15 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c31 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.15 -r 28
# Bring up openair NASMESH device and set IPv6 address
sudo ifconfig nasmesh0 up
sudo ip addr add 10.0.0.2/24 dev nasmesh0
sudo ip -6 addr add $CH2_IN6_ADDR/64 dev nasmesh0
echo No MPLS debug
echo "0" >/sys/mpls/debug
echo Multicast state launched with config_ch2
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_ch2 &
+37
View File
@@ -0,0 +1,37 @@
#!/bin/bash
#CH2_NAS.SH
#Cluster Head (2)– with NAS_MPLS_PMIP working
#Phil, 25 july 08
source params.sh
./ch2_conf_nas_barca_outdoor.sh
#MN1->MN2
./mpls_nas.sh $MR2_CH2_LABEL_OUT $MR3_IN6_ADDR $MR3_LABEL_IN
#MN2->MN1
./mpls_nas.sh $MR3_LABEL_OUT $MR2_IN6_ADDR2 $MR2_CH2_LABEL_IN
#CH1->MR2->CH2
echo 'CH1->MR2->CH2'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $CH2_MR2_CH1_LABEL_IN labelspace 0 proto ipv6
echo 'CH1->MR2->CH2'
var=`mpls nhlfe add key 0 instructions push gen $CH2_MR2_CH1_LABEL_OUT nexthop nasmesh0 ipv6 $MR2_IN6_ADDR2 | grep key |cut -c 17-26`
echo "Creating routes from CH2 to CH1"
sudo ip -6 route add $CH1_IN6_ADDR/128 via $MR2_IN6_ADDR2 mpls $var
#MN3->MN2
./mpls_nas.sh $MN3_MR2_CH2_MN1 $MR3_IN6_ADDR $MN3_CH2_MR3_MN2
#MN2->MN3
./mpls_nas.sh $MN2_MR3_CH2_MN3 $MR2_IN6_ADDR2 $MN1_CH2_MR2_MN3
echo $OPENAIR3_HOME/pmip6d/pmip6d -c -L $CH2_IN6_ADDR -A $CH1_IN6_ADDR
#sudo xterm -hold -e "$OPENAIR3_HOME/pmip6d/pmip6d -c -L $CH2_IN6_ADDR -A $CH1_IN6_ADDR" &
watch -n .1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats ; cat /proc/openair1/openair1_state"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
+39
View File
@@ -0,0 +1,39 @@
#!/bin/bash
#CH2_NAS.SH
#Cluster Head (2)– with NAS_MPLS_PMIP working
#Phil, 25 july 08
source params.sh
./ch2_conf_nas_barca_parking.sh
echo "0" > /sys/mpls/debug
#MN1->MN2
./mpls_nas.sh $MR2_CH2_LABEL_OUT $MR3_IN6_ADDR $MR3_LABEL_IN
#MN2->MN1
./mpls_nas.sh $MR3_LABEL_OUT $MR2_IN6_ADDR2 $MR2_CH2_LABEL_IN
echo "0" > /sys/mpls/debug
#CH1->MR2->CH2
echo 'CH1->MR2->CH2'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $CH2_MR2_CH1_LABEL_IN labelspace 0 proto ipv6
echo 'CH1->MR2->CH2'
var=`mpls nhlfe add key 0 instructions push gen $CH2_MR2_CH1_LABEL_OUT nexthop nasmesh0 ipv6 $MR2_IN6_ADDR2 | grep key |cut -c 17-26`
echo "Creating routes from CH2 to CH1"
sudo ip -6 route add $CH1_IN6_ADDR/128 via $MR2_IN6_ADDR2 mpls $var
#MN3->MN2
./mpls_nas.sh $MN3_MR2_CH2_MN1 $MR3_IN6_ADDR $MN3_CH2_MR3_MN2
#MN2->MN3
./mpls_nas.sh $MN2_MR3_CH2_MN3 $MR2_IN6_ADDR2 $MN1_CH2_MR2_MN3
echo $OPENAIR3_HOME/pmip6d/pmip6d -c -L $CH2_IN6_ADDR -A $CH1_IN6_ADDR
#sudo xterm -hold -e "$OPENAIR3_HOME/pmip6d/pmip6d -c -L $CH2_IN6_ADDR -A $CH1_IN6_ADDR" &
watch -n .5 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats ; cat /proc/openair1/openair1_state"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
+111
View File
@@ -0,0 +1,111 @@
#!/bin/bash
#Script by Irina Dumitrascu (dumitrascu.irina@gmail.com) and Adrian Popa (adrian.popa.gh@gmail.com)
#June 2006
#Released under GPL
#Added by phil, Huu Nghia, 8 July 08
echo Deleting all mpls - xc settings
xc_output="`mpls xc show | cut -c 9-75`"
number_of_lines=`echo $xc_output|wc -l`
for i in `seq 1 $number_of_lines`
do
xc_output_line="`echo $xc_output| head -$i | tail -1`"
echo Deleting: mpls xc del $xc_output_line
mpls xc del $xc_output
#increment i
i=`expr $i+1`
done
echo Deleting all mpls - ip route settings
nr_of_lines=` ip route show |grep mpls |wc -l`
for i in `seq 1 $nr_of_lines `
do
output=`ip route show |grep mpls |head -1`
echo Deleting: ip route del $output
ip route del $output
i=`expr $i+1`
done
var1=`ip route show table 1`
if [ ! -z "$var1" ]; then
ip route del table 1
#var1=`ip route show table 1`
#ip route del $var1 table 1
ip route flush table 1
echo "clearing ip route table 1"
fi
var1=`ip route show table 2`
if [ ! -z "$var1" ]; then
ip route del table 2
# var1=`ip route show table 2`
# ip route del $var1 table 2
ip route flush table 2
echo "clearing ip route table 2"
fi
#echo Flushing iptables chains
#iptables -F
#echo Flushing iptables -t nat
#iptables -t nat -F
#echo Flushing iptables -t mangle
#iptables -t mangle -F
echo Deleting all mpls - nhlfe settings
nr_of_lines=` mpls nhlfe show |grep key |wc -l`
for i in `seq 1 $nr_of_lines `
do
output=`mpls nhlfe show |grep key |cut -c 17-26 |head -1`
echo Deleting: mpls nhlfe del key $output
mpls nhlfe del key $output
i=`expr $i+1`
done
echo Deleting all mpls - labelspace settings
nr_of_lines=`mpls labelspace show |grep -v "labelspace -1" |wc -l`
for i in `seq 1 $nr_of_lines `
do
output=`mpls labelspace show |grep -v "labelspace -1"|cut -c 17-37 |head -1`
echo Deleting: mpls labelspace set $output -1
mpls labelspace set $output -1
i=`expr $i+1`
done
echo Deleting all mpls - ilm settings
nr_of_lines=`mpls ilm show |grep ILM |wc -l`
for i in `seq 1 $nr_of_lines `
do
output=`mpls ilm show |grep ILM |cut -c 10-37 |head -1`
echo Deleting: mpls ilm del $output
mpls ilm del $output
i=`expr $i+1`
done
var1=`tc qdisc show |grep eth0 |grep htb`
if [ ! -z "$var1" ]; then
tc qdisc del dev eth0 root
echo "tc clear eth0"
fi
var2=`tc qdisc show |grep eth3 |grep htb`
if [ ! -z "$var2" ]; then
tc qdisc del dev eth3 root
echo "tc clear eth3"
fi
var3=`tc qdisc show |grep eth1 |grep htb`
if [ ! -z "$var3" ]; then
tc qdisc del dev eth1 root
echo "tc clear eth1"
fi
var4=`tc qdisc show |grep eth2 |grep htb`
if [ ! -z "$var4" ]; then
tc qdisc del dev eth2 root
echo "tc clear eth2"
fi
+25
View File
@@ -0,0 +1,25 @@
#!/bin/bash
#Script by Lamia Romdhani
#June 2008
echo Setting MPLS
sudo modprobe mpls6
echo Number of params = $#
if [ $# -eq 3 ]; then
LABEL_IN=$1
IP_NEXT_HOP=$2
LABEL_OUT=$3
echo "IP Next Hop is $IP_NEXT_HOP"
echo 'Starting mpls'
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $LABEL_IN labelspace 0 proto ipv6
var=`mpls nhlfe add key 0 instructions push gen $LABEL_OUT nexthop nasmesh0 ipv6 $IP_NEXT_HOP |grep key | cut -c 17-26`
sudo mpls xc add ilm_label gen $LABEL_IN ilm_labelspace 0 nhlfe_key $var
else
echo usage: mpls_nas.sh LABEL_IN IP_NEXT_HOP LABEL_OUT
fi
@@ -0,0 +1,57 @@
#!/bin/bash
source params.sh
sleep 1
export OPENAIR1_DIR
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Launching AS and RF
./start_openair.sh 8 8
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x02000000
sudo ifconfig eth0 10.0.1.3
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.3
sudo ip -6 addr add $MR1_IN6_ADDR/64 dev nasmesh0
echo Classification rules for MR1 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $MR1_IN6_ADDR -y $CH1_IN6_ADDR -r 4
echo Classification rules for MR1 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MN1_MR1_CH1_MN3 -m $MN3_CH1_MR1_MN1 -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR1_LABEL_OUT -m $MR1_LABEL_IN -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.15 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.15 -r 4
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
echo Multicast state launched with config_mr1
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr1 &
@@ -0,0 +1,57 @@
#!/bin/bash
source params.sh
sleep 1
export OPENAIR1_DIR
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Launching AS and RF
./start_openair.sh 6 8
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x02000000
sudo ifconfig eth0 10.0.1.3
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.3
sudo ip -6 addr add $MR1_IN6_ADDR/64 dev nasmesh0
echo Classification rules for MR1 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $MR1_IN6_ADDR -y $CH1_IN6_ADDR -r 4
echo Classification rules for MR1 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MN1_MR1_CH1_MN3 -m $MN3_CH1_MR1_MN1 -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR1_LABEL_OUT -m $MR1_LABEL_IN -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.15 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.15 -r 4
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
echo Multicast state launched with config_mr1
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr1 &
@@ -0,0 +1,57 @@
#!/bin/bash
source params.sh
sleep 1
export OPENAIR1_DIR
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Launching AS and RF
./start_openair.sh 0 8
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x02000000
sudo ifconfig eth0 10.0.1.3
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.3
sudo ip -6 addr add $MR1_IN6_ADDR/64 dev nasmesh0
echo Classification rules for MR1 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $MR1_IN6_ADDR -y $CH1_IN6_ADDR -r 4
echo Classification rules for MR1 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MN1_MR1_CH1_MN3 -m $MN3_CH1_MR1_MN1 -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR1_LABEL_OUT -m $MR1_LABEL_IN -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.15 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.15 -r 4
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
echo Multicast state launched with config_mr1
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr1 &
+28
View File
@@ -0,0 +1,28 @@
#!/bin/bash
# Script by Lamia Romdhani, Nghia, Philippe, Hicham 18 Feb 2009
source params.sh
sudo modprobe mpls6
echo Setting MPLS for mr1
echo "0" > /sys/mpls/debug
# MN1 <-> MN3
echo 'MN3->MN1'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $MN3_CH1_MR1_MN1 labelspace 0 proto ipv6
echo 'MN1->MN3'
var=`mpls nhlfe add key 0 instructions push gen $MN1_MR1_CH1_MN3 nexthop nasmesh0 ipv6 $CH1_IN6_ADDR | grep key |cut -c 17-26`
echo "Creating routes from MN1 to MN3"
sudo ip -6 route add $MN3_IN6_ADDR/128 via $CH1_IN6_ADDR mpls $var
sudo ip -6 route add $MN1_IN6_ADDR/128 dev eth0
# MN1 <-> MN2
echo 'MN2->MN1'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $MR1_LABEL_IN labelspace 0 proto ipv6
echo 'MN1->MN2'
var=`mpls nhlfe add key 0 instructions push gen $MR1_LABEL_OUT nexthop nasmesh0 ipv6 $CH1_IN6_ADDR | grep key |cut -c 17-26`
echo "Creating routes from MN1 to MN2"
sudo ip -6 route add $MN2_IN6_ADDR/128 via $CH1_IN6_ADDR mpls $var
+20
View File
@@ -0,0 +1,20 @@
#Phil, Lamia 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr1_conf_nas_barca_outdoor.sh
./mr1_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR1_EG6_ADDR/64 dev eth0
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR1_EG6_ADDR -E $MR1_IN6_ADDR" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
@@ -0,0 +1,20 @@
#Phil, Lamia 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr1_conf_nas_barca_outdoor.sh
./mr1_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR1_EG6_ADDR/64 dev eth0
#sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR1_EG6_ADDR -E $MR1_IN6_ADDR" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
+20
View File
@@ -0,0 +1,20 @@
#Phil, Lamia 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr1_conf_nas_barca_parking.sh
./mr1_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR1_EG6_ADDR/64 dev eth0
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR1_EG6_ADDR -E $MR1_IN6_ADDR" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
@@ -0,0 +1,20 @@
#Phil, Lamia 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr1_conf_nas_barca_parking.sh
./mr1_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR1_EG6_ADDR/64 dev eth0
#sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR1_EG6_ADDR -E $MR1_IN6_ADDR" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
@@ -0,0 +1,20 @@
#Phil, Lamia 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr1_conf_nas_barca_room_nopmip.sh
./mr1_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR1_EG6_ADDR/64 dev eth0
#sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR1_EG6_ADDR -E $MR1_IN6_ADDR" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
@@ -0,0 +1,79 @@
#!/bin/bash
source params.sh
sleep 1
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Launching AS and RF
./start_openair.sh 8 9
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x03000000
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.4
sudo ifconfig eth0 10.0.3.3
sudo ip -6 addr add $MR2_IN6_ADDR1/64 dev nasmesh0
sudo ip -6 addr add $MR2_IN6_ADDR2/64 dev nasmesh0
# Com between MR2 <-> CH1
echo Classification rules for MR2- Cluster 1 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x $MR2_IN6_ADDR1 -y $CH1_IN6_ADDR -r 4
echo Classification rules for MR2- Cluster 1 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR2_CH1_LABEL_OUT -m $MR2_CH1_LABEL_IN -r 5
echo Classification rules for MR2- Cluster 1 - MPLS PMIP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -l $CH1_MR2_CH2_LABEL_IN -m $CH1_MR2_CH2_LABEL_OUT -r 5
echo Classification rules for MR2- Cluster 1 - MPLS for com between MN3 and MN1
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -l $MN3_MR2_CH1_MN1 -m $MN1_CH1_MR2_MN3 -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.15 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c16 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.15 -r 4
# Com between MR2 <-> CH2
#echo Classification rules for MR2 -Cluster 2 - Default DTCH UL for L3 signaling
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c17 -i0 -z0 -x ff02::1 -y ff02::1 -r 11
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c18 -i0 -z0 -x $MR2_IN6_ADDR2 -y $CH2_IN6_ADDR -r 12
#echo Classification rules for MR2 -Cluster 2 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c19 -i0 -z0 -l $MR2_CH2_LABEL_OUT -m $MR2_CH2_LABEL_IN -r 13
#echo Classification rules for MR2- Cluster 2 - MPLS PMIP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c20 -i0 -z0 -l $CH2_MR2_CH1_LABEL_IN -m $CH2_MR2_CH1_LABEL_OUT -r 13
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c21 -i0 -z0 -l $MN3_MR2_CH2_MN2 -m $MN2_CH2_MR2_MN3 -r 13
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c22 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c23 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c24 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c25 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c26 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c27 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c28 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c29 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c30 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c31 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c32 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c33 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.15 -r 12
echo Multicast state launched with config_mr2
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr2_mesh &
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr2_mn3 &
@@ -0,0 +1,79 @@
#!/bin/bash
source params.sh
sleep 1
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Launching AS and RF
./start_openair.sh 5 9
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x03000000
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.4
sudo ifconfig eth0 10.0.3.3
sudo ip -6 addr add $MR2_IN6_ADDR1/64 dev nasmesh0
sudo ip -6 addr add $MR2_IN6_ADDR2/64 dev nasmesh0
# Com between MR2 <-> CH1
echo Classification rules for MR2- Cluster 1 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x $MR2_IN6_ADDR1 -y $CH1_IN6_ADDR -r 4
echo Classification rules for MR2- Cluster 1 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR2_CH1_LABEL_OUT -m $MR2_CH1_LABEL_IN -r 5
echo Classification rules for MR2- Cluster 1 - MPLS PMIP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -l $CH1_MR2_CH2_LABEL_IN -m $CH1_MR2_CH2_LABEL_OUT -r 5
echo Classification rules for MR2- Cluster 1 - MPLS for com between MN3 and MN1
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -l $MN3_MR2_CH1_MN1 -m $MN1_CH1_MR2_MN3 -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.15 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c16 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.15 -r 4
# Com between MR2 <-> CH2
#echo Classification rules for MR2 -Cluster 2 - Default DTCH UL for L3 signaling
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c17 -i0 -z0 -x ff02::1 -y ff02::1 -r 11
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c18 -i0 -z0 -x $MR2_IN6_ADDR2 -y $CH2_IN6_ADDR -r 12
#echo Classification rules for MR2 -Cluster 2 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c19 -i0 -z0 -l $MR2_CH2_LABEL_OUT -m $MR2_CH2_LABEL_IN -r 13
#echo Classification rules for MR2- Cluster 2 - MPLS PMIP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c20 -i0 -z0 -l $CH2_MR2_CH1_LABEL_IN -m $CH2_MR2_CH1_LABEL_OUT -r 13
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c21 -i0 -z0 -l $MN3_MR2_CH2_MN2 -m $MN2_CH2_MR2_MN3 -r 13
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c22 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c23 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c24 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c25 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c26 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c27 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c28 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c29 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c30 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c31 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c32 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c33 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.15 -r 12
echo Multicast state launched with config_mr2
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr2_mesh &
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr2_mn3 &
+37
View File
@@ -0,0 +1,37 @@
#!/bin/bash
# Author: Lamia Romdhani
#June 2008
source params.sh
modprobe mpls6
echo Starting routing ...
echo No MPLS debug
echo "0" >/sys/mpls/debug
#MN1->MN2
./mpls_nas.sh $MR2_CH1_LABEL_IN $CH2_IN6_ADDR $MR2_CH2_LABEL_OUT
#MN2->MN1
./mpls_nas.sh $MR2_CH2_LABEL_IN $CH1_IN6_ADDR $MR2_CH1_LABEL_OUT
#CH1->CH2
./mpls_nas.sh $CH1_MR2_CH2_LABEL_OUT $CH2_IN6_ADDR $CH2_MR2_CH1_LABEL_IN
#CH2->CH1
./mpls_nas.sh $CH2_MR2_CH1_LABEL_OUT $CH1_IN6_ADDR $CH1_MR2_CH2_LABEL_IN
#MN3->MN1
var=`mpls nhlfe add key 0 instructions push gen $MN3_MR2_CH1_MN1 nexthop nasmesh0 ipv6 $CH1_IN6_ADDR |grep key | cut -c 17-26`
sudo ip -6 route add $MN1_IN6_ADDR/128 via $CH1_IN6_ADDR mpls $var
sudo ip -6 route add $MN3_IN6_ADDR/128 dev eth0
#MN1->MN3
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $MN1_CH1_MR2_MN3 labelspace 0 proto ipv6
#MN3->MN2
var=`mpls nhlfe add key 0 instructions push gen $MN3_MR2_CH2_MN2 nexthop nasmesh0 ipv6 $CH2_IN6_ADDR |grep key | cut -c 17-26`
sudo ip -6 route add $MN2_IN6_ADDR/128 via $CH2_IN6_ADDR mpls $var
#MN2->MN3
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $MN2_CH2_MR2_MN3 labelspace 0 proto ipv6
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
#Lamia, Philippe huu nghia, 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr2_conf_nas_barca_outdoor.sh
./mr2_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR2_EG6_ADDR/64 dev eth0
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR2_EG6_ADDR -E $MR2_IN6_ADDR1" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
@@ -0,0 +1,20 @@
#!/bin/bash
#Lamia, Philippe huu nghia, 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr2_conf_nas_barca_outdoor.sh
./mr2_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR2_EG6_ADDR/64 dev eth0
#sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR2_EG6_ADDR -E $MR2_IN6_ADDR1" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
#Lamia, Philippe huu nghia, 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr2_conf_nas_barca_parking.sh
./mr2_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR2_EG6_ADDR/64 dev eth0
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR2_EG6_ADDR -E $MR2_IN6_ADDR1" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
@@ -0,0 +1,20 @@
#!/bin/bash
#Lamia, Philippe huu nghia, 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr2_conf_nas_barca_parking.sh
./mr2_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR2_EG6_ADDR/64 dev eth0
#sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR2_EG6_ADDR -E $MR2_IN6_ADDR1" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
+52
View File
@@ -0,0 +1,52 @@
#!/bin/bash
source params.sh
sleep 1
export OPENAIR1_DIR
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Launching AS and RF
./start_openair.sh 1 10
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x02000000
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.5
sudo ip -6 addr add $MR3_IN6_ADDR/64 dev nasmesh0
echo Classification rules for MR3 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $MR3_IN6_ADDR -y $CH2_IN6_ADDR -r 4
echo Classification rules for MR3 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MN2_MR3_CH2_MN3 -m $MN3_CH2_MR3_MN2 -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR3_LABEL_OUT -m $MR3_LABEL_IN -r 5
echo EADS Multicast for MR3
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.15 -r 12
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
echo Multicast state launched with config_mr3
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr3 &
@@ -0,0 +1,52 @@
#!/bin/bash
source params.sh
sleep 1
export OPENAIR1_DIR
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Launching AS and RF
./start_openair.sh 8 10
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x02000000
sudo ifconfig eth0 10.0.2.5
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.5
sudo ip -6 addr add $MR3_IN6_ADDR/64 dev nasmesh0
echo Classification rules for MR3 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $MR3_IN6_ADDR -y $CH2_IN6_ADDR -r 4
echo Classification rules for MR3 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MN2_MR3_CH2_MN3 -m $MN3_CH2_MR3_MN2 -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR3_LABEL_OUT -m $MR3_LABEL_IN -r 5
echo EADS Multicast for MR3
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.15 -r 12
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
echo Multicast state launched with config_mr3
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr3 &
@@ -0,0 +1,52 @@
#!/bin/bash
source params.sh
sleep 1
export OPENAIR1_DIR
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Launching AS and RF
./start_openair.sh 6 10
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x02000000
sudo ifconfig eth0 10.0.2.5
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.5
sudo ip -6 addr add $MR3_IN6_ADDR/64 dev nasmesh0
echo Classification rules for MR3 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $MR3_IN6_ADDR -y $CH2_IN6_ADDR -r 12
echo Classification rules for MR3 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MN2_MR3_CH2_MN3 -m $MN3_CH2_MR3_MN2 -r 13
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR3_LABEL_OUT -m $MR3_LABEL_IN -r 13
echo EADS Multicast for MR3
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.15 -r 12
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
echo Multicast state launched with config_mr3
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr3 &
+34
View File
@@ -0,0 +1,34 @@
#!/bin/bash
# Script by Lamia Romdhani, Nghia, Philippe, Hicham 18 Feb 2009
source params.sh
sudo modprobe mpls6
echo Setting MPLS for mr3
echo "0" > /sys/mpls/debug
echo 'MN1->MN2'
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $MR3_LABEL_IN labelspace 0 proto ipv6
echo 'MN2->MN1'
var=`mpls nhlfe add key 0 instructions push gen $MR3_LABEL_OUT nexthop nasmesh0 ipv6 $CH2_IN6_ADDR |grep key | cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $MN1_IN6_ADDR/128 via $CH2_IN6_ADDR mpls $var
sudo ip -6 route add $MN2_IN6_ADDR/128 dev $ETH_MR3
echo 'MN3->MN2'
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $MN3_CH2_MR3_MN2 labelspace 0 proto ipv6
echo 'MN2->MN3'
var=`mpls nhlfe add key 0 instructions push gen $MN2_MR3_CH2_MN3 nexthop nasmesh0 ipv6 $CH2_IN6_ADDR |grep key | cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $MN3_IN6_ADDR/128 via $CH2_IN6_ADDR mpls $var
+34
View File
@@ -0,0 +1,34 @@
#!/bin/bash
# Script by Lamia Romdhani, Nghia, Philippe, Hicham 18 Feb 2009
source params.sh
sudo modprobe mpls6
echo Setting MPLS for mr3
echo "0" > /sys/mpls/debug
echo 'MN1->MN2'
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $MR3_LABEL_IN labelspace 0 proto ipv6
echo 'MN2->MN1'
var=`mpls nhlfe add key 0 instructions push gen $MR3_LABEL_OUT nexthop nasmesh0 ipv6 $CH2_IN6_ADDR |grep key | cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $MN1_IN6_ADDR/128 via $CH2_IN6_ADDR mpls $var
sudo ip -6 route add $MN2_IN6_ADDR/128 dev $ETH_MR3
echo 'MN3->MN2'
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $MN3_CH2_MR3_MN2 labelspace 0 proto ipv6
echo 'MN2->MN3'
var=`mpls nhlfe add key 0 instructions push gen $MN2_MR3_CH2_MN3 nexthop nasmesh0 ipv6 $CH2_IN6_ADDR |grep key | cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $MN3_IN6_ADDR/128 via $CH2_IN6_ADDR mpls $var
+20
View File
@@ -0,0 +1,20 @@
#Phil, Lamia 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr3_conf_nas_barca.sh
./mr3_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR3_EG6_ADDR/64 dev eth0
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH2_IN6_ADDR -N $MR3_EG6_ADDR -E $MR3_IN6_ADDR" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
+20
View File
@@ -0,0 +1,20 @@
#Phil, Lamia 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr3_conf_nas_barca_outdoor.sh
./mr3_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR3_EG6_ADDR/64 dev eth0
#sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH2_IN6_ADDR -N $MR3_EG6_ADDR -E $MR3_IN6_ADDR" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
+20
View File
@@ -0,0 +1,20 @@
#Phil, Lamia 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr3_conf_nas_barca_parking.sh
./mr3_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR3_EG6_ADDR/64 dev eth0
#sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH2_IN6_ADDR -N $MR3_EG6_ADDR -E $MR3_IN6_ADDR" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
+80
View File
@@ -0,0 +1,80 @@
#!/bin/bash
MR1_IN_ADDR=10.0.1.3
MR1_IN6_ADDR=2001:10:0:1:7856:3412:0:2
MR1_EG_ADDR=192.168.9.1
MR1_EG6_ADDR=2001:660:5502::100
# Flow CH1->MR1
MR1_LABEL_IN=1001
# Flow MR1->CH1
MR1_LABEL_OUT=1000
ETH_MR1=eth0
MR2_IN_ADDR=10.0.1.4
MR2_IN6_ADDR1=2001:10:0:1:7856:3412:0:3
MR2_IN6_ADDR2=2001:10:0:2:7856:3412:0:3
MR2_EG6_ADDR=2001:660:5502::300
ETH_MR2=eth0
# Flow CH1->MR2
MR2_CH1_LABEL_IN=2000
# Flow MR2->CH1
MR2_CH1_LABEL_OUT=2001
# Flow CH2->MR2
MR2_CH2_LABEL_IN=3001
# Flow MR2->CH2
MR2_CH2_LABEL_OUT=3000
MR3_IN_ADDR=10.0.1.5
MR3_IN6_ADDR=2001:10:0:2:7856:3412:0:2
MR3_EG_ADDR=192.168.10.1
MR3_EG6_ADDR=2001:660:5502::200
# Flow CH2->MR3
MR3_LABEL_IN=4000
# Flow MR3->CH2
MR3_LABEL_OUT=4001
ETH_MR3=eth2
CH1_IN_ADDR=10.0.1.1
CH2_IN_ADDR=10.0.1.2
CH1_IN6_ADDR=2001:10:0:1:7856:3412:0:1
CH2_IN6_ADDR=2001:10:0:2:7856:3412:0:1
## Communication between the CHs
CH1_MR2_CH2_LABEL_IN=8001
CH1_MR2_CH2_LABEL_OUT=8000
CH2_MR2_CH1_LABEL_IN=9001
CH2_MR2_CH1_LABEL_OUT=9000
## Com between MN1 and MN3
MN1_MR1_CH1_MN3=1500
MN3_CH1_MR1_MN1=1501
MN1_CH1_MR2_MN3=2500
MN3_MR2_CH1_MN1=2501
## Com between MN2 and MN3
MN3_MR2_CH2_MN2=3500
MN2_CH2_MR2_MN3=3501
MN3_CH2_MR3_MN2=4500
MN2_MR3_CH2_MN3=4501
#MN1_IN6_ADDR=2001:660:5502::20
#MN2_IN6_ADDR=2001:660:5502::25
MN1_IN6_ADDR=2001:660:5502::110
MN1_IN_ADDR=192.168.9.2
MN2_IN6_ADDR=2001:660:5502::210
MN3_IN6_ADDR=2001:660:5502::310
MN2_IN_ADDR=192.168.10.2
# Put the right OPENAIR3 path here
OPENAIR3_HOME=/root/openair_trials_2/openair3
OPENAIR3_PMIP6D_PATH=$OPENAIR3_HOME/pmip6d
OPENAIR3_SCRIPTS_PATH=$OPENAIR3_HOME/scripts
REFLECTOR_DIR=$OPENAIR3_HOME/EXAMPLES/BARCA_TRIALS/REFLECTOR
# Put the right OPENAIR2 path here
#OPENAIR2_DIR=~/openair2_r234/openair2/
OPENAIR2_DIR=/root/openair_trials_2/openair2
+127
View File
@@ -0,0 +1,127 @@
if [ "$1" == "" ]; then
echo "Please provide a TX power level (0-8)"
exit
fi
if [ "$2" == "" ]; then
echo "Please provide a Node ID (0-7 for CH, 8-15 for MR/UE)"
exit
fi
if [ "$OPENAIR1_DIR" == "" ] ; then
echo "Please set OPENAIR1_DIR environment variable"
exit
else
echo "OPENAIR1_DIR Set to $OPENAIR1_DIR"
fi
cd $OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF
source ./txgains.sh
case $1 in
0)
CBMIMO1_POWER=$CBMIMO1_m20_dBm
echo "Configuring CBMIMO1 for -20dBm ($CBMIMO1_POWER)"
;;
1)
CBMIMO1_POWER=$CBMIMO1_m15_dBm
echo Configuring CBMIMO1 for -15dBm
;;
2)
CBMIMO1_POWER=$CBMIMO1_m10_dBm
echo Configuring CBMIMO1 for -10dBm
;;
3)
CBMIMO1_POWER=$CBMIMO1_m5_dBm
echo Configuring CBMIMO1 for -5dBm
;;
4)
CBMIMO1_POWER=$CBMIMO1_0_dBm
echo Configuring CBMIMO1 for 0dBm
;;
5)
CBMIMO1_POWER=$CBMIMO1_5_dBm
echo Configuring CBMIMO1 for 5dBm
;;
6)
CBMIMO1_POWER=$CBMIMO1_10_dBm
echo Configuring CBMIMO1 for 10dBm
;;
7)
CBMIMO1_POWER=$CBMIMO1_15_dBm
echo Configuring CBMIMO1 for 15dBm
;;
8)
CBMIMO1_POWER=$CBMIMO1_20_dBm
echo Configuring CBMIMO1 for 20dBm
;;
*)
echo Invalid TX power
exit
esac
echo Removing openair_rf,openair_l2 and openair_rrc modules
sudo rmmod -f openair_rrc
sudo rmmod -f openair_l2
sudo rmmod -f openair_rf
sudo insmod $OPENAIR1_DIR/ARCH/CBMIMO1/DEVICE_DRIVER/openair_rf_l2.ko
OARF_RET=`lsmod | grep -e openair_rf`
if [ "$OARF_RET" = "" ]; then
echo Error loading openair1 module
exit
fi
sudo insmod $OPENAIR2_DIR/LAYER2/openair_layer2.ko
OA2_RET=`lsmod | grep -e openair_l2`
if [ "$OA2_RET" = "" ]; then
echo Error loading openair2 module
exit
fi
sudo insmod $OPENAIR2_DIR/RRC/MESH/openair_RRC.ko
OARRC_RET=`lsmod | grep -e openair_rrc`
if [ "$OARRC_RET" = "" ]; then
echo Error loading openair RRC module
exit
fi
OA_DEV="/dev/openair0"
if [ -c "$OA_DEV" ]; then
echo "$OA_DEV exists"
else
echo "creating $OA_DEV"
sudo mknod $OA_DEV c 127 0
sudo chmod a+rw /dev/openair0
fi
./openair_rf_cbmimo1 1 0
./openair_rf_cbmimo1 1 6 $CBMIMO1_POWER
if [ $2 -lt "8" ]; then
./openair_rf_cbmimo1 1 1 1 $2
elif [ $2 -lt "16" ]; then
./openair_rf_cbmimo1 1 3 1 $2
else
echo Illegal Node ID, exiting
exit
fi
sleep 1
# Watch the status of the radio to check for hardware exit event
#OA1_STATE=`cat /proc/openair1/openair1_state`
#while [ "$OA1_STATE" != "EXITED" ]; do
# OA1_STATE=`cat /proc/openair1/openair1_state`
# sleep .5
#done
#./openair_rf_cbmimo1 1 4 1
#echo CBMIMO1 Hardware exit, restarting ...
+22
View File
@@ -0,0 +1,22 @@
cd $OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF
echo STOP STARTS...
./openair_rf_cbmimo1 1 4 1
sleep 2
echo STOP RF DONE
sudo killall chbch_scope
echo STOP CHBCH SCOPE DONE
sudo killall sach_scope
echo STOP_SACH SCOPE DONE
sleep 1
sudo rmmod nasmesh
sleep 1
echo REMOVE NASMESH MODULE DONE
sudo rmmod openair_rrc
sleep 1
echo REMOVE RRC MODULE DONE
sudo rmmod openair_l2
sleep 1
echo REMOVE LAYER2 MODULE DONE
sudo rmmod openair_rf
echo REMOVE RF MODULE DONE
echo STOP FINISHED SUCCESSFULLY

Some files were not shown because too many files have changed in this diff Show More