CN106161105A - A method for automatically configuring NFT under the system - Google Patents
A method for automatically configuring NFT under the system Download PDFInfo
- Publication number
- CN106161105A CN106161105A CN201610700516.6A CN201610700516A CN106161105A CN 106161105 A CN106161105 A CN 106161105A CN 201610700516 A CN201610700516 A CN 201610700516A CN 106161105 A CN106161105 A CN 106161105A
- Authority
- CN
- China
- Prior art keywords
- ifcfg
- echo
- eth
- bond0
- nft
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0876—Aspects of the degree of configuration automation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/72—Code refactoring
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
Description
技术领域technical field
本发明涉及网络数据传输技术,尤其涉及一种实现系统下自动配置NFT的方法。The invention relates to network data transmission technology, in particular to a method for realizing automatic configuration of NFT under the system.
背景技术Background technique
由于网络的快速发展,在金融等高端行业实现网络数据的传输稳定就是很重要的要求,由于NFT功能可以实现在交换机down掉后可以由另一台交换机替代工作并且数据的传输不会出现断开的情况,NFT功能的配置就显得尤为重要。Due to the rapid development of the network, it is very important to achieve stable network data transmission in high-end industries such as finance. Because the NFT function can realize that after the switch is down, another switch can replace the work and the data transmission will not be disconnected. However, the configuration of NFT functions is particularly important.
在服务器上存在多个网卡,NFT实现一个网卡处于激活的状态,可以传输数据流,另一个网卡或者网口在该网卡出现问题的情况下可以迅速接替该网卡工作,保证数据流不会断开,在金融,银行等行业有着重要的应用。There are multiple network cards on the server. NFT realizes that one network card is in an active state and can transmit data streams. Another network card or network port can quickly take over the work of the network card in case of a problem with the network card, ensuring that the data stream will not be disconnected. , has important applications in finance, banking and other industries.
发明内容Contents of the invention
为了解决以上问题,本发明提出了一种基于LINUX平台的实现系统下自动配置NFT的方法。In order to solve the above problems, the present invention proposes a method based on the LINUX platform to automatically configure NFT under the system.
本发明的技术方案是:Technical scheme of the present invention is:
一种实现系统下自动配置NFT的方法,A method for automatically configuring NFT under the system,
运行脚本后输入对应配置的网口和IP,会自动创建所需的配置文件,并对系统存在的相关文件进行修改,在系统重启后所有配置生效。After running the script, enter the corresponding configured network port and IP, and the required configuration files will be created automatically, and the relevant files existing in the system will be modified. All configurations will take effect after the system restarts.
借用shell脚本实现在linux系统下自动创建并配置相关的文件,手动输入要配置的网口和IP,实现在服务器上系统的NFT所有配置,以实现服务器的NFT功能。Borrow the shell script to automatically create and configure related files under the linux system, manually input the network port and IP to be configured, and realize all configurations of the NFT system on the server to realize the NFT function of the server.
脚本内容script content
关闭系统的自带服务模块:Close the built-in service module of the system:
service iptables stop service iptables stop
chkconfig NetworkManager off chkconfig NetworkManager off
service NetworkManager stop service NetworkManager stop
显示网卡的网口和网卡名称信息:Display the network port and network card name information of the network card:
lspci | grep -i ether | cut -d “ “ -f4-9 >> 1 lspci | grep -i ether | cut -d " " -f4-9 >> 1
ifconfig | grep eth | cut -d “ “ -f 1 >> 2 ifconfig | grep eth | cut -d " " -f 1 >> 2
paste 1 2 > 3 paste 1 2 > 3
cat 3 cat 3
输入要选择的网口和IP: Enter the network port and IP to be selected:
read -p “input the first eth” firstread -p "input the first eth" first
read -p “input the second eth ” secondread -p "input the second eth" second
read -p “input the IP between 192.168.0.1-254” IPread -p “input the IP between 192.168.0.1-254” IP
自动创建配置文件:Automatically create configuration files:
cd /etc/sysconfig/network-scripts/cd /etc/sysconfig/network-scripts/
rm -rf ifcfg-eth$firstrm -rf ifcfg -eth $first
touch ifcfg-eth$firsttouch ifcfg -eth $first
自动向配置文件中写入相关参数Automatically write relevant parameters to the configuration file
echo ‘DEVICE=eth$first’ >> ifcfg-eth$firstecho 'DEVICE=eth$first' >> ifcfg-eth$first
echo ‘BOOTPROTO=none’ >> ifcfg-eth$firstecho 'BOOTPROTO=none' >> ifcfg-eth$first
echo ‘ >> ifcfg-eth$firstecho ' >> ifcfg-eth$first
echo ‘MASTER=bond0’ >> ifcfg-eth$firstecho 'MASTER=bond0' >> ifcfg-eth$first
echo ‘SLAVE=yes’ >> ifcfg-eth$firstecho 'SLAVE=yes' >> ifcfg-eth$first
echo ‘USERCTL=no’ >> ifcfg-eth$firstecho 'USERCTL=no' >> ifcfg-eth$first
echo ‘ NM_CONTROLLED=no’ >> ifcfg-eth$firstecho 'NM_CONTROLLED=no' >> ifcfg-eth$first
rm -rf ifcfg-eth$secondrm -rf ifcfg -eth $second
touch ifcfg-eth$secondtouch ifcfg-eth $second
echo ‘DEVICE=eth$second’ >> ifcfg-eth$secondecho 'DEVICE=eth$second' >> ifcfg-eth$second
echo ‘BOOTPROTO=none’ >> ifcfg-eth$secondecho 'BOOTPROTO=none' >> ifcfg-eth$second
echo ‘ >> ifcfg-eth$secondecho ' >> ifcfg-eth$second
echo ‘MASTER=bond0’ >> ifcfg-eth$secondecho 'MASTER=bond0' >> ifcfg-eth$second
echo ‘SLAVE=yes’ >> ifcfg-eth$secondecho 'SLAVE=yes' >> ifcfg-eth$second
echo ‘USERCTL=no’ >> ifcfg-eth$secondecho 'USERCTL=no' >> ifcfg-eth$second
echo ‘ NM_CONTROLLED=no’ >> ifcfg-eth$secondecho 'NM_CONTROLLED=no' >> ifcfg-eth$second
touch ifcfg-bond0//创建bond0的配置文件,并加入设置参数touch ifcfg-bond0//Create a configuration file for bond0 and add setting parameters
echo ‘DEVICE=bond0’ >> ifcfg-bond0echo 'DEVICE=bond0' >> ifcfg-bond0
echo ‘BOOTPROTO=none’ >> ifcfg-bond0echo 'BOOTPROTO=none' >> ifcfg-bond0
echo ‘ >> ifcfg-bond0echo ' >> ifcfg-bond0
echo ‘ BROADCAST=192.168.0.255’ >> ifcfg-bond0echo 'BROADCAST=192.168.0.255' >> ifcfg-bond0
echo ‘ IPADDR=$IP’ >> ifcfg-bond0echo 'IPADDR=$IP' >> ifcfg-bond0
echo ‘NETMASK=255.255.255.0 ’ >> ifcfg-bond0echo 'NETMASK=255.255.255.0' >> ifcfg-bond0
echo ‘ NETWORK=192.168.0.0’ >> ifcfg-bond0echo 'NETWORK=192.168.0.0' >> ifcfg-bond0
echo ‘ USERCTL=no’ >> ifcfg-bond0echo 'USERCTL=no' >> ifcfg-bond0
echo ‘ BONDING_OPTS=”mode=1 miimon=100” ’ >> ifcfg-bond0//设置参数为NFTecho ' BONDING_OPTS=”mode=1 miimon=100” ’ >> ifcfg-bond0//Set the parameter to NFT
修改系统已经存在的配置文件Modify the existing configuration files of the system
echo ‘alias bond0 bonding ’ >> /etc/modprobe.d/dist.confecho 'alias bond0 bonding' >> /etc/modprobe.d/dist.conf
echo ‘options bonding mode=1 miimon=100 primary=eth0’>> /etc/modprobe.d/dist.confecho 'options bonding mode=1 miimon=100 primary=eth0'>> /etc/modprobe.d/dist.conf
向系统启动文件加入bond参数Add bond parameter to system startup file
echo ‘ifensalve bond0 eth$first eth$second’ >> /etc/rc.local//echo 'ifensalve bond0 eth$first eth$second' >> /etc/rc.local//
reboot // 系统重启reboot // system restart
本发明的有益效果是The beneficial effect of the present invention is
完成linux系统下的NFT自动配置,无需人工干预;Linux 下自动配置NFT功能节省测试的时间,节省测试人员,可以更合理的分配测试资源。Complete the NFT automatic configuration under the Linux system without manual intervention; the automatic configuration of the NFT function under Linux saves testing time, saves testers, and can allocate testing resources more reasonably.
具体实施方式detailed description
下面对本发明的内容进行更加详细的阐述:The content of the present invention is described in more detail below:
本发明借用shell脚本实现在linux系统下自动创建并配置相关的文件,手动输入要配置的网口和IP,实现在服务器上系统的NFT所有配置,以实现服务器的NFT功能。The present invention borrows the shell script to automatically create and configure related files under the linux system, manually input the network port and IP to be configured, and realize all configurations of the system's NFT on the server, so as to realize the NFT function of the server.
部分脚本part script
关闭系统的自带服务模块:Close the built-in service module of the system:
service iptables stop service iptables stop
chkconfig NetworkManager off chkconfig NetworkManager off
service NetworkManager stop service NetworkManager stop
显示网卡的网口和网卡名称信息:Display the network port and network card name information of the network card:
lspci | grep -i ether | cut -d “ “ -f4-9 >> 1 lspci | grep -i ether | cut -d " " -f4-9 >> 1
ifconfig | grep eth | cut -d “ “ -f 1 >> 2 ifconfig | grep eth | cut -d " " -f 1 >> 2
paste 1 2 > 3 paste 1 2 > 3
cat 3 cat 3
输入要选择的网口和IP: Enter the network port and IP to be selected:
read -p “input the first eth” firstread -p "input the first eth" first
read -p “input the second eth ” secondread -p "input the second eth" second
read -p “input the IP between 192.168.0.1-254” IPread -p “input the IP between 192.168.0.1-254” IP
自动创建配置文件:Automatically create configuration files:
cd /etc/sysconfig/network-scripts/cd /etc/sysconfig/network-scripts/
rm -rf ifcfg-eth$firstrm -rf ifcfg -eth $first
touch ifcfg-eth$firsttouch ifcfg -eth $first
自动向配置文件中写入相关参数Automatically write relevant parameters to the configuration file
echo ‘DEVICE=eth$first’ >> ifcfg-eth$firstecho 'DEVICE=eth$first' >> ifcfg-eth$first
echo ‘BOOTPROTO=none’ >> ifcfg-eth$firstecho 'BOOTPROTO=none' >> ifcfg-eth$first
echo ‘ >> ifcfg-eth$firstecho ' >> ifcfg-eth$first
echo ‘MASTER=bond0’ >> ifcfg-eth$firstecho 'MASTER=bond0' >> ifcfg-eth$first
echo ‘SLAVE=yes’ >> ifcfg-eth$firstecho 'SLAVE=yes' >> ifcfg-eth$first
echo ‘USERCTL=no’ >> ifcfg-eth$firstecho 'USERCTL=no' >> ifcfg-eth$first
echo ‘ NM_CONTROLLED=no’ >> ifcfg-eth$firstecho 'NM_CONTROLLED=no' >> ifcfg-eth$first
rm -rf ifcfg-eth$secondrm -rf ifcfg -eth $second
touch ifcfg-eth$secondtouch ifcfg-eth $second
echo ‘DEVICE=eth$second’ >> ifcfg-eth$secondecho 'DEVICE=eth$second' >> ifcfg-eth$second
echo ‘BOOTPROTO=none’ >> ifcfg-eth$secondecho 'BOOTPROTO=none' >> ifcfg-eth$second
echo ‘ >> ifcfg-eth$secondecho ' >> ifcfg-eth$second
echo ‘MASTER=bond0’ >> ifcfg-eth$secondecho 'MASTER=bond0' >> ifcfg-eth$second
echo ‘SLAVE=yes’ >> ifcfg-eth$secondecho 'SLAVE=yes' >> ifcfg-eth$second
echo ‘USERCTL=no’ >> ifcfg-eth$secondecho 'USERCTL=no' >> ifcfg-eth$second
echo ‘ NM_CONTROLLED=no’ >> ifcfg-eth$secondecho 'NM_CONTROLLED=no' >> ifcfg-eth$second
touch ifcfg-bond0//创建bond0的配置文件,并加入设置参数touch ifcfg-bond0//Create a configuration file for bond0 and add setting parameters
echo ‘DEVICE=bond0’ >> ifcfg-bond0echo 'DEVICE=bond0' >> ifcfg-bond0
echo ‘BOOTPROTO=none’ >> ifcfg-bond0echo 'BOOTPROTO=none' >> ifcfg-bond0
echo ‘ >> ifcfg-bond0echo ' >> ifcfg-bond0
echo ‘ BROADCAST=192.168.0.255’ >> ifcfg-bond0echo 'BROADCAST=192.168.0.255' >> ifcfg-bond0
echo ‘ IPADDR=$IP’ >> ifcfg-bond0echo 'IPADDR=$IP' >> ifcfg-bond0
echo ‘NETMASK=255.255.255.0 ’ >> ifcfg-bond0echo 'NETMASK=255.255.255.0' >> ifcfg-bond0
echo ‘ NETWORK=192.168.0.0’ >> ifcfg-bond0echo 'NETWORK=192.168.0.0' >> ifcfg-bond0
echo ‘ USERCTL=no’ >> ifcfg-bond0echo 'USERCTL=no' >> ifcfg-bond0
echo ‘ BONDING_OPTS=”mode=1 miimon=100” ’ >> ifcfg-bond0//设置参数为NFTecho ' BONDING_OPTS=”mode=1 miimon=100” ’ >> ifcfg-bond0//Set the parameter to NFT
修改系统已经存在的配置文件Modify the existing configuration files of the system
echo ‘alias bond0 bonding ’ >> /etc/modprobe.d/dist.confecho 'alias bond0 bonding' >> /etc/modprobe.d/dist.conf
echo ‘options bonding mode=1 miimon=100 primary=eth0’>> /etc/modprobe.d/dist.confecho 'options bonding mode=1 miimon=100 primary=eth0'>> /etc/modprobe.d/dist.conf
向系统启动文件加入bond参数Add bond parameter to system startup file
echo ‘ifensalve bond0 eth$first eth$second’ >> /etc/rc.local//echo 'ifensalve bond0 eth$first eth$second' >> /etc/rc.local//
reboot // 系统重启。reboot // System reboot.
Claims (3)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610700516.6A CN106161105A (en) | 2016-08-19 | 2016-08-19 | A method for automatically configuring NFT under the system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610700516.6A CN106161105A (en) | 2016-08-19 | 2016-08-19 | A method for automatically configuring NFT under the system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN106161105A true CN106161105A (en) | 2016-11-23 |
Family
ID=57342125
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610700516.6A Pending CN106161105A (en) | 2016-08-19 | 2016-08-19 | A method for automatically configuring NFT under the system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN106161105A (en) |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106878088A (en) * | 2017-03-10 | 2017-06-20 | 郑州云海信息技术有限公司 | A method of configuring server data transmission based on linux |
| CN108829458A (en) * | 2018-05-30 | 2018-11-16 | 郑州云海信息技术有限公司 | A kind of server installation Linux Optimizing Configuration System and method |
| CN109039764A (en) * | 2018-08-28 | 2018-12-18 | 郑州云海信息技术有限公司 | A kind of network parameter configuration method of distributed memory system |
| CN109067604A (en) * | 2018-10-08 | 2018-12-21 | 郑州云海信息技术有限公司 | A kind of the automatic configuration network system and method for distributed file storage system |
| CN109088768A (en) * | 2018-08-17 | 2018-12-25 | 郑州云海信息技术有限公司 | A kind of method and device of automatic configuration Linux network interface card bonding |
| CN111125149A (en) * | 2019-12-19 | 2020-05-08 | 广州品唯软件有限公司 | Hive-based data acquisition method and device and storage medium |
| CN115529216A (en) * | 2022-10-10 | 2022-12-27 | 苏州浪潮智能科技有限公司 | Method, system, device and storage medium for automatically configuring smart network card IP |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20130260795A1 (en) * | 2012-03-27 | 2013-10-03 | Matthew Nicholas Papakipos | Dynamic Geographic Beacons for Geographic-Positioning-Capable Devices |
-
2016
- 2016-08-19 CN CN201610700516.6A patent/CN106161105A/en active Pending
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20130260795A1 (en) * | 2012-03-27 | 2013-10-03 | Matthew Nicholas Papakipos | Dynamic Geographic Beacons for Geographic-Positioning-Capable Devices |
Non-Patent Citations (1)
| Title |
|---|
| XUEXI090610: "Linux网口绑定", 《HTTP://BLOG.CSDN.NET/XUEXI090610/ARTICLE/DETAILS/51073116》 * |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106878088A (en) * | 2017-03-10 | 2017-06-20 | 郑州云海信息技术有限公司 | A method of configuring server data transmission based on linux |
| CN108829458A (en) * | 2018-05-30 | 2018-11-16 | 郑州云海信息技术有限公司 | A kind of server installation Linux Optimizing Configuration System and method |
| CN109088768A (en) * | 2018-08-17 | 2018-12-25 | 郑州云海信息技术有限公司 | A kind of method and device of automatic configuration Linux network interface card bonding |
| CN109039764A (en) * | 2018-08-28 | 2018-12-18 | 郑州云海信息技术有限公司 | A kind of network parameter configuration method of distributed memory system |
| CN109067604A (en) * | 2018-10-08 | 2018-12-21 | 郑州云海信息技术有限公司 | A kind of the automatic configuration network system and method for distributed file storage system |
| CN111125149A (en) * | 2019-12-19 | 2020-05-08 | 广州品唯软件有限公司 | Hive-based data acquisition method and device and storage medium |
| CN111125149B (en) * | 2019-12-19 | 2024-01-26 | 广州品唯软件有限公司 | Hive-based data acquisition method, device and storage medium |
| CN115529216A (en) * | 2022-10-10 | 2022-12-27 | 苏州浪潮智能科技有限公司 | Method, system, device and storage medium for automatically configuring smart network card IP |
| CN115529216B (en) * | 2022-10-10 | 2025-01-24 | 苏州浪潮智能科技有限公司 | Method, system, device and storage medium for automatically configuring smart network card IP |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN106161105A (en) | A method for automatically configuring NFT under the system | |
| US11822949B2 (en) | Guest cluster deployed as virtual extension of management cluster in a virtualized computing system | |
| CN107580083B (en) | Method and system for allocating container IP addresses | |
| US11593139B2 (en) | Software compatibility checking for managed clusters in a virtualized computing system | |
| US10216531B2 (en) | Techniques for virtual machine shifting | |
| US9766943B2 (en) | Method and system for managing interconnection of virtual network functions | |
| US8392919B2 (en) | Runtime environment for virtualizing information technology appliances | |
| US20190026100A1 (en) | Unified update tool for multi-protocol network adapter | |
| US11030079B2 (en) | Service virtualization platform | |
| US10303487B2 (en) | System and method for booting an information handling system | |
| CN110704155A (en) | Container network construction method and device, physical host and data transmission method | |
| US20170155569A1 (en) | Test case based virtual machine (vm) template generation | |
| CN104102614A (en) | Server serial port output method and server serial port output device | |
| US9501296B2 (en) | Hypervisor automation manager for starting an operation system with customization data from a disk image | |
| CN107357732B (en) | User terminal and software development kit access state detection device and method | |
| CN114201360B (en) | AER function management method, AER function management device, server and storage medium | |
| US20140040446A1 (en) | Remote Provisioning of Virtual Appliances for Access to Virtualized Storage | |
| WO2023109346A1 (en) | Network virtualization service system and network virtualization server | |
| CN105512063A (en) | Method and system for data transmission | |
| US8578006B2 (en) | Enabling selective policy driven propagation of configuration elements between and among a host and a plurality of guests | |
| US10372865B2 (en) | System design based on unified chip specification | |
| US11113088B2 (en) | Generating and managing groups of physical hosts associated with virtual machine managers in an information handling system | |
| WO2017096889A1 (en) | Method and device for upgrading and downgrading system | |
| US12535957B2 (en) | Writing a configuration file to flash memory on a server | |
| Mackey et al. | XenServer Administration Handbook: Practical Recipes for Successful Deployments |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| WD01 | Invention patent application deemed withdrawn after publication | ||
| WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20161123 |