One way of classifying the extension teaching methods is according to their use and the nature of contact. The details of this classification are furnished below. Broadly, such methods may be classified in three ways viz., A whole range of extension teaching methods are available, that can serve different purposes. Teaching methods are the tools in the hands of extension worker for transfer of new technology. Use the ping command to test connectivity to a host ~]# salt 'node1' network.ping baidu.2.1.3 Classification of Extension Teaching Methods Returns all open ports and status ~]# salt 'node1' stat # Add a temporary IP address to node1 and use the command to obtain ~]# ip addr add 192.168.220.11/24 dev ~]# ip aĢ: ens33: mtu 1500 qdisc fq_codel state UP group default qlen 1000 This function will ignore the address of 127.0.0.1 ~]# salt '*' network.ip_addrs Returns all network card information in the current system ~]# salt '*' network.interfaces Returns the IP address of the specified network card ~]# salt 'node1' network.interface_ip ~]# salt 'node1' network.interface_ip ~]# salt 'master' network.interface_ip ~]# salt 'master' network.interface_ip ens33 Returns the information of the specified network card ~]# salt 'node1' network.interface ~]# salt 'node1' network.interface lo Judge whether the current host is in a network segment ~]# salt 'node1' network.in_subnet ~]# salt 'node1' network.in_subnet 172.16.0.0/16 ~]# salt 'node1' network.ifacestartswith 127 ~]# salt 'node1' network.ifacestartswith 192.168 Retrieves the interface name from a specific network ~]# salt 'node1' network.ifacestartswith 192 TOMTOM HOME 2.7.6 MACReturns the MAC address of the specified network card ~]# salt 'node1' network.hw_addr ~]# salt 'node1' network.hw_addr ~]# salt 'master' network.hw_addr ~]# salt 'master' network.hw_addr ens33 Query the routing information of a target network ~]# salt 'node1' network.get_route ~]# salt 'node1' network.get_route ~]# salt 'node1' network.get_route 192.168.162.109 Get host name ~]# salt 'master' ~]# salt 'node1' network.get_hostname View FQDN (fully qualified domain name) of the host ~]# salt 'node1' ~]# salt 'master' network.get_fqdn View default routes ~]# salt 'node1' fault_route Test whether the network from minion to a server is connected ~]# salt 'node1' nnect 80 Returns all active tcp connections (similar to the ss -ant command) ~]# salt 'node1' network.active_tcpĬalculate the network segment through IP and subnet mask ~]# salt 'node1' network.calc_net 192.168.220.10 ~]# salt 'node1' network.calc_net 192.168.1.10 ~]# salt 'node1' network.calc_net 172.15.1.3 255.255.0.0 Common modules of saltstack: 2.1 network of common modules 2.1.1 network.active_tcp It also supports specifying the parameter separator - args separator = ~]# salt 'node1' test.echo,cmd.run,service.status hello,date,sshdĢ. By default, parameters are separated by commas. # SaltStack also supports the execution of multiple modules at a time by default. List of supplementary groups of the new account Name or ID of the primary group of the new account # View the usage of the specified module ~]# salt 'master' sys.doc user |less # View all functions of the specified ~]# salt 'master' sys.list_functions user You can view the list of all supported modules through the following command: # View a list of all module ~]# salt 'master' sys.list_modules For example, our daily simple tasks such as executing commands, viewing package installation and service operation are realized through SaltStack Module.Īfter installing the Master and Minion packages, many modules will be installed on the system. It is also the entrance for SaltStack to manage by pushing. Module is one of the components that SaltStack contacts most in daily use.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |