当前位置:网站首页>TIPC Getting Started6
TIPC Getting Started6
2022-07-02 11:08:00 【Cheng Gouzi walking in the clouds】
Installation and Configuration
The TIPC kernel module is available by default in the major Linux distros. Just do ‘modprobe tipc’
and you are ready to run in single node mode.If you want to run in cluster mode you must also give each node a unique identity and
attach the interface you want to use:$ tipc node set addr 1.1.2 (e.g.) (This step can be omitted from Linux 4.17)$ tipc bearer enable media eth dev eth0If you want better redundancy and performance you can attach a second interface:
$ tipc bearer enable media eth dev eth1 If you want to run on UDP instead of directly on Ethernet use the following commands:$ tipc link list $ tipc bearer enable media udp name UDP1 localip 192.168.123.102 (e.g.) $ tipc bearer enable media udp name UDP2 localip 192.168.124.102 (e.g.)Provided you have set up another node the same way you can now list the links to it:
$ tipc link list broadcast-link: up 1001002:eth0-1001001:eth0: up 1001002:eth1-1001001:eth1: upAt this stage you can also have a look at the service binding table:
$ tipc nametable show Type Lower Upper Scope Port Node 0 16781313 16781313 cluster 0 1001001 0 16781314 16781314 cluster 0 1001002 1 1 1 node 2535696389 1001002 2 16781313 16781313 node 0 1001002 2 16781313 16781313 node 65537 1001002The two entries with service type 0 show that we have two nodes in the cluster, 1001001 and
1001002 (i.e., the own node).
The entry with service type 1 represents the built-in topology (service tracking) service.
The two entries with service type 2 show the two links, as seen from the issuing (own) node 1001002.
The range limits 16781313 represent the the peer endpoint’s address (1001001) in decimal format.Running a Program
Download and unpack the tipcutils package from the project page. The package comes ready with binaries,
but is easy to rebuild if needed.In one shell, do:
$ ./tipcutils/demos/hello_world/hello_server ****** TIPC hello world server started *****You can now take another look at the address binding table:
$ tipc nametable show Type Lower Upper Scope Port Node 0 16781313 16781313 cluster 0 1001001 0 16781314 16781314 cluster 0 1001002 1 1 1 node 2535696389 1001002 2 16781313 16781313 node 0 1001002 2 16781313 16781313 node 65537 1001002 18888 17 17 cluster 1697554572 1001002The server has bound itself to the service type 18888 and instance 17, and made itself visible
in the whole cluster.In another shell, on the same node or on the peer node, you can now do:
$ ./tipcutils/demos/hello_world/hello_client ****** TIPC hello world client started ****** Client: sent message: Hello World!! Client: received response: Uh ? ****** TIPC hello client finished ******If you now redo this exercise, but start the client before the server, you will see a simple
example of start synchronization by leveraging the service tracking feature.Downloading the Code
The kernel source code can be checked out from:
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.gitThe ‘tipc’ tool for configuring and managing TIPC is available as a standard part of the iproute2 package,
which is also available in all distros. The source code can be checked out from:$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.gitThe ‘tipcutils’ package contains a set of demos and test programs. The downloadable .zip file comes complete
with binaries, but is only a snapshot, so it may not always be up to date with the latest version in the git repository.
This can can be checked out from:$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
边栏推荐
- Jsp webshell Free from killing - The Foundation of JSP
- Oracle notes
- Learn open62541 -- [66] UA_ Generation method of string
- MySQL lethal serial question 3 -- are you familiar with MySQL locks?
- [quick application] there are many words in the text component. How to solve the problem that the div style next to it will be stretched
- Point cloud projection picture
- [AI application] Hikvision ivms-4200 software installation
- Use of vscode tool
- Overview of integrated learning
- How to transfer event objects and user-defined parameters simultaneously in Huawei express applications
猜你喜欢

flink二开,实现了个 batch lookup join(附源码)

Creation and use of unified links in Huawei applinking

QT学习日记8——资源文件添加

【深入浅出玩转FPGA学习3-----基本语法】

The URL in the RTSP setup header of the axis device cannot take a parameter

Easyexcel, a concise, fast and memory saving excel processing tool

快应用中实现自定义抽屉组件

JSP webshell free -- the basis of JSP

Disassembling Meitu SaaS: driving the plane to change the engine

软件产品管理系统有哪些?12个最佳产品管理工具盘点
随机推荐
二叉树专题--AcWing 47. 二叉树中和为某一值的路径(前序遍历)
2022-06-17
Huawei game failed to initialize init with error code 907135000
如何使用IDE自动签名调试鸿蒙应用
正则及常用公式
Record attributeerror: 'nonetype' object has no attribute 'nextcall‘
一招快速实现自定义快应用titlebar
Leetcode+ 76 - 80 storm search topic
P1055 [NOIP2008 普及组] ISBN 号码
What are the software product management systems? Inventory of 12 best product management tools
Implementation of six singleton modes
Flink two Open, implement Batch Lookup join (attached source)
【AGC】如何解决事件分析数据本地和AGC面板中显示不一致的问题?
Summary of cases of players' disconnection and reconnection in Huawei online battle service
2. Hacking lab script off [detailed writeup]
华为快应用中如何实现同时传递事件对象和自定义参数
Hdu1228 a + B (map mapping)
Use Huawei performance management service to configure the sampling rate on demand
Luogu p1892 [boi2003] Gang (and search for variant anti set)
Use of vscode tool