当前位置:网站首页>TIPC Getting Started6
TIPC Getting Started6
2022-07-02 07:33:00 【云端漫步的程狗子】
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
边栏推荐
- P1055 [noip2008 popularization group] ISBN number
- 面对不确定性,供应链的作用
- 华为快应用中如何实现同时传递事件对象和自定义参数
- PCL 点云转深度图像
- Jsp webshell Free from killing - The Foundation of JSP
- P1055 [NOIP2008 普及组] ISBN 号码
- 二叉树专题--AcWing 18. 重建二叉树(利用前、中序遍历,构建二叉树)
- VSCode工具使用
- Leetcode 182 Find duplicate email (2022.07.01)
- Primary key policy problem
猜你喜欢

LabVIEW为什么浮点数会丢失精度

Leetcode+ 76 - 80 storm search topic

首份中国企业敏捷实践白皮书发布| 附完整下载

【深入浅出玩转FPGA学习2----设计技巧(基本语法)】
![[applinking practical case] share in app pictures through applinking](/img/12/5616f1fa55387b81e25e55a98022b9.png)
[applinking practical case] share in app pictures through applinking

华为游戏初始化init失败,返回错误码907135000

Nodejs+express+mysql simple blog building

One trick to quickly realize custom application titlebar

Special topic of binary tree -- Logu p1229 traversal problem (the number of traversals in the middle order is calculated when the pre and post order traversals of the multiplication principle are know

二叉树专题--AcWing 3540. 二叉搜索树建树(实用板子 构建二叉搜索树 并输出前、中、后序遍历)
随机推荐
[TS] 1368 seconds understand typescript generic tool types!
MySQL lethal serial question 3 -- are you familiar with MySQL locks?
Special topic of binary tree -- acwing 47 Path with a certain value in binary tree (preorder traversal)
JVM之垃圾回收器
快应用中实现自定义抽屉组件
Leetcode 182 Find duplicate email (2022.07.01)
二叉树专题--AcWing 19. 二叉树的下一个节点(找树中节点的后继)
UVM - configuration mechanism
学习open62541 --- [66] UA_String的生成方法
Special topic of binary tree -- acwing 18 Rebuild the binary tree (construct the binary tree by traversing the front and middle order)
[ark UI] implementation of the startup page of harmonios ETS
洛谷 P1892 [BOI2003]团伙(并查集变种 反集)
MongoDB 学习整理(条件操作符,$type 操作符,limit()方法,skip() 方法 和 sort() 方法)
Matlab processing of distance measurement of experimental electron microscope
618 what is the secret of dominating the list again? Nike's latest financial report gives the answer
From Read and save in bag file Jpg pictures and PCD point cloud
【快应用】text组件里的文字很多,旁边的div样式会被拉伸如何解决
K-d tree and octree of PCL
V2X-Sim数据集(上海交大&纽约大学)
Convert yv12 to rgb565 image conversion, with YUV to RGB test