Defining port and port-range in /etc/services file

本文详细介绍了在Linux/Unix DB2分区安装环境中,如何为客户端到服务器通信分配默认端口(50000),以及启用多分区间通信所需的端口范围。通过/etc/services文件配置端口,确保不同服务器之间的有效通信。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Technote (FAQ)


Question

How communication ports and range are defined in /etc/services file in Linux/Unix DB2 partitioned installations?

Answer


①单分区:

When you create a DB2 instance with single partition, default port of 50000 is assigned for client to server communication. 

# Default port 
db2c_db2inst1         50000/tcp

②多分区:

But, a port range is required to enable the communication between the DB2 partitions using FCM (fast communication manager). So, use of port range depends on whether you use partitions or not while installing DB2.

  # Default port 
  db2c_db2inst1         50000/tcp
  # FCM ( fast communication manager ) port range 
  DB2_db2inst1          60000/tcp
  DB2_db2inst1_1        60001/tcp
  DB2_db2inst1_2        60002/tcp
  DB2_db2inst1_END      60003/tcp

To enable communications between the servers in a partitioned database environment using /etc/services file, here are the basic steps to create entries in /etc/services file:


1. Log on to the primary computer (instance owning computer) as a user with root authority.
2. Create an instance.
3. View the default port range that has been reserved in the /etc/services file. In addition to the base configuration, the FCM ports should appear similar to the following: 
   # Default port 
   db2c_db2inst1         50000/tcp
  # FCM ( fast communication manager ) port range 
  DB2_db2inst1          60000/tcp
  DB2_db2inst1_1        60001/tcp
  DB2_db2inst1_2        60002/tcp
  DB2_db2inst1_END      60003/tcp
By default, the first port (50000) is reserved for client to server connection requests, and the first available four ports above 60000 are reserved for FCM communication. One port is for the instance-owning database partition server and three ports are for logical database partition servers that you might choose to add to the computer after installation is complete.

The port range must include a start and an END entry. Intermediate entries are optional. Explicitly including intermediate values can be useful for preventing other applications from using these ports, but these entries are not verified by the database manager.

Naming convention for the ports:

DB2® port entries use the following format: 
   DB2_instance_name_suffix  port_number/tcp  # comment
where:

  • instance_name is the name of the partitioned instance.

  • suffix is not used for the first FCM port. Intermediate entries are those between the lowest and highest port. If you include the intermediate entries between the first and ending FCM port, the suffix consists of an integer that you increment by one for each additional port. For example, the second port is numbered 1, and third is numbered 2, and so on to ensure uniqueness. The word END must be used as the suffix for the last entry.

  • port_number is the port number that you reserve for database partition server communications.

  • comment is an optional comment describing an entry.


转载于:https://my.oschina.net/goopand/blog/499913

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值