CN104935515A - FTP server and WEB server network configuration method in linux system - Google Patents

FTP server and WEB server network configuration method in linux system Download PDF

Info

Publication number
CN104935515A
CN104935515A CN201510294695.3A CN201510294695A CN104935515A CN 104935515 A CN104935515 A CN 104935515A CN 201510294695 A CN201510294695 A CN 201510294695A CN 104935515 A CN104935515 A CN 104935515A
Authority
CN
China
Prior art keywords
ftp
server
network
web
route
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
Application number
CN201510294695.3A
Other languages
Chinese (zh)
Inventor
任启立
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201510294695.3A priority Critical patent/CN104935515A/en
Publication of CN104935515A publication Critical patent/CN104935515A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses an FTP server and WEB server network configuration method in a linux system, and belongs to the field of application server configuration. According to the invention, besides a default route in the linux system, one route is added, and IP addresses of an FTP server and a WEB server are respectively added to two route tables. An IP address original line returning strategy is configured, thereby achieving the simultaneous access to IP address of different gateways in the linux system and the simultaneous use of the FTP server and the WEB server, achieving the reasonable use of system resources, and reducing the waste of system resources.

Description

Ftp server and WEB server network collocating method under a kind of Linux system
Technical field
The present invention discloses a kind of server network collocation method, belongs to application server and arranges field, specifically ftp server and WEB server network collocating method under a kind of Linux system.
Background technology
Along with the develop rapidly of computer technology, for the needs of socio-economic development, emerge the computer system of increasing various function, wherein Linux system server is stablized because of it, safety, low and the efficiency advantages of higher of cost and enjoy client to favor, but but often there is the situation of hardware configuration performance surplus to occur, ftp server is configured under such as linux, the only upload and download of responsible file, systematic function is not fully utilized, a large amount of system resource is remained under system, cause system resource waste, if now give system configuration WEB server, just be conducive to the utilization of system resource, but WEB server is broken at different net from the ip address of ftp server, need the ip address configuring different gateway under Linux system, when configuring different gateway under linux, an ip is only had to use, therefore under result in linux, different gateway ip address can not be accessed simultaneously, the defect that further ftp server and WEB server can not use simultaneously.The invention provides ftp server and WEB server network collocating method under a kind of Linux system, except default route, add another route under linux operating system and configure the former circuit in ip address and return strategy, under realizing linux, different gateway ip address can be accessed simultaneously, ftp server and WEB server use simultaneously, Appropriate application system resource, reduces system resource waste.
Ftp server, be then the computer providing memory space on the internet, they provide service according to File Transfer Protocol.The full name of FTP is File Transfer Protocol, i.e. file transfer protocol (FTP).Serve the same with most of Internet, FTP is also a client/server system.User supports the client program of File Transfer Protocol by one, is connected on distance host.User is given an order to server program by client program, and server program performs the order that user sends, and the result of execution is turned back to client computer.
Web server refers generally to Website server, can provide document to Web client such as browsers.When Web client to link on server and demand file time, server is sent on this browser by this request of process and by file, and subsidiary information can tell how browser checks this file, i.e. civilian WEB service type of device.Server uses HTTP to carry out information interchange, usually they is called HTTPD server.Web server can not only store information, Run Script and program on the basis of the information that can also be provided by Web browser user.
Summary of the invention
Under the present invention is directed to linux, different gateway ip address can not be accessed simultaneously, further ftp server and WEB server can not use simultaneously, cause the defect of system resource waste, ftp server and WEB server network collocating method under a kind of Linux system are provided, except default route, add another route under utilizing linux operating system and configure the former circuit in ip address and return strategy, under realizing linux, different gateway ip address can be accessed simultaneously, ftp server and WEB server use simultaneously, Appropriate application system resource, reduces system resource waste.
The concrete scheme that the present invention proposes is:
Ftp server and WEB server network collocating method under a kind of Linux system:
Under linux operating system except default route, add a route, add the IP address of ftp server and WEB server to two routing tables respectively;
The former circuit of configuration of IP address returns strategy: the access request of configuration different segment returns from the respective network segment, and two network segments are the FTP network segment respectively, the WEB network segment; Return route by adding former road, when user is by WEB network segment IP address access system, use WEB network segment gateway to do route, returned content walks WEB network segment gateway; When user is by FTP network segment IP address access system, use FTP network segment gateway to do route, returned content walks the gateway of the FTP network segment;
Routing rule writing system booting script and network startup pin, check rule, when guaranteeing that Server Restart or network service are restarted, above-mentioned routing rule did not lose efficacy.
The process that the described IP address by ftp server and WEB server adds two routing tables to is:
WEB server:
IPADDR=192.168.xx.yy
NETMASK=255.255.255.0
GATEWAY=192.168. xx.254
Ftp server:
IPADDR=192.168.ss. tt
NETMASK=255.255.255.0
GATEWAY=192.168. ss.254
The wherein equal representative digit of x, y, s, t,
Add routing table:
vi /etc/iproute2/rt_tables
#
# reserved values
#
255 local
254 main
253 default
0 unspec
252 web
251 ftp
Interpolation completes.
Described system booting script is /etc/rc.d/rc.local, and network startup script is /etc/rc.d/init.d/network.
Usefulness of the present invention is: the present invention is by configuration route, different gateway ip address is accessed simultaneously, ftp server and WEB server, the server of two different segments provides service in same system, when system resource is enough, two services are independent of each other, and take full advantage of system resource again simultaneously, reduce costs.
Accompanying drawing explanation
Fig. 1 the present invention topology schematic diagram.
Embodiment
The present invention will be further described by reference to the accompanying drawings.
Ftp server and WEB server network collocating method under a kind of Linux system:
Under linux operating system except default route, add a route, add the IP address of ftp server and WEB server to two routing tables respectively; Concrete numeral illustrates there are two IP addresses below:
WEB server:
IPADDR=192.168.20.52
NETMASK=255.255.255.0
GATEWAY=192.168.20.254
Ftp server:
IPADDR=192.168.92.75
NETMASK=255.255.255.0
GATEWAY=192.168.92.254
Add routing table to:
vi /etc/iproute2/rt_tables
#
# reserved values
#
255 local
254 main
253 default
0 unspec
252 web
251 ftp
Interpolation completes.
The former circuit of configuration of IP address returns strategy: the access request of configuration different segment returns from the respective network segment, and two network segments are the FTP network segment respectively, the WEB network segment; Route is returned by adding former road,
Wherein add the process that former road returns route to be divided into:
ip route flush table web
ip route add 192.168.20.0/24 dev bond0 src 192.168.20.52 table web
ip route add default via 192.168.20.254 table web
ip rule add from 192.168.20.52 table web
ip route flush table ftp
ip route add 192.168.92.0/24 dev bond1 src 192.168.92.75 table ftp
ip route add default via 192.168.92.254 table ftp
ip rule add from 192.168.92.75 table ftp
When user is by WEB network segment IP address access system, use WEB network segment gateway to do route, returned content walks WEB network segment gateway; When user is by FTP network segment IP address access system, use FTP network segment gateway to do route, returned content walks the gateway of the FTP network segment;
Routing rule writing system booting script and network startup pin, system booting script is /etc/rc.d/rc.local, and network startup script is /etc/rc.d/init.d/network;
Check rule, under system, perform ip rule list order
0: from all lookup 255
32764: from 192.168.92.75 lookup ftp
32765: from 192.168.20.52 lookup erp
32766: from all lookup main
32767: from all lookup default
When guaranteeing that Server Restart or network service are restarted, above-mentioned routing rule did not lose efficacy.

Claims (3)

1. ftp server and a WEB server network collocating method under Linux system, is characterized in that:
Under linux operating system except default route, add a route, add the IP address of ftp server and WEB server to two routing tables respectively;
The former circuit of configuration of IP address returns strategy: the access request of configuration different segment returns from the respective network segment, and two network segments are the FTP network segment respectively, the WEB network segment; Return route by adding former road, when user is by WEB network segment IP address access system, use WEB network segment gateway to do route, returned content walks WEB network segment gateway; When user is by FTP network segment IP address access system, use FTP network segment gateway to do route, returned content walks the gateway of the FTP network segment;
Routing rule writing system booting script and network startup pin, check rule, when guaranteeing that Server Restart or network service are restarted, above-mentioned routing rule did not lose efficacy.
2. ftp server and WEB server network collocating method under a kind of Linux system according to claim 1, is characterized in that the process that the described IP address by ftp server and WEB server adds two routing tables to is:
WEB server:
IPADDR=192.168.xx.yy
NETMASK=255.255.255.0
GATEWAY=192.168. xx.254
Ftp server:
IPADDR=192.168.ss. tt
NETMASK=255.255.255.0
GATEWAY=192.168. ss.254
The wherein equal representative digit of x, y, s, t,
Add routing table:
vi /etc/iproute2/rt_tables
#
# reserved values
#
255 local
254 main
253 default
0 unspec
252 web
251 ftp
Interpolation completes.
3. ftp server and WEB server network collocating method under a kind of Linux system according to claim 1 and 2, it is characterized in that described system booting script is /etc/rc.d/rc.local, network startup script is /etc/rc.d/init.d/network.
CN201510294695.3A 2015-06-02 2015-06-02 FTP server and WEB server network configuration method in linux system Pending CN104935515A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510294695.3A CN104935515A (en) 2015-06-02 2015-06-02 FTP server and WEB server network configuration method in linux system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510294695.3A CN104935515A (en) 2015-06-02 2015-06-02 FTP server and WEB server network configuration method in linux system

Publications (1)

Publication Number Publication Date
CN104935515A true CN104935515A (en) 2015-09-23

Family

ID=54122489

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510294695.3A Pending CN104935515A (en) 2015-06-02 2015-06-02 FTP server and WEB server network configuration method in linux system

Country Status (1)

Country Link
CN (1) CN104935515A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107026795A (en) * 2016-02-02 2017-08-08 上海格尔软件股份有限公司 A kind of method for returning bag extremely source network interface based on iptables and policybased routing
CN110650093A (en) * 2019-08-29 2020-01-03 苏州浪潮智能科技有限公司 Multi-network-segment access method and system for single operating system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102148880A (en) * 2011-03-18 2011-08-10 浪潮电子信息产业股份有限公司 Dual-network interface card (NIC) bonding method in LINUX system of blade server
US20140029617A1 (en) * 2012-07-27 2014-01-30 Ren Wang Packet processing approach to improve performance and energy efficiency for software routers
CN103973800A (en) * 2014-05-19 2014-08-06 普天信息技术有限公司 Android-based double-network-card concurrence implementation method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102148880A (en) * 2011-03-18 2011-08-10 浪潮电子信息产业股份有限公司 Dual-network interface card (NIC) bonding method in LINUX system of blade server
US20140029617A1 (en) * 2012-07-27 2014-01-30 Ren Wang Packet processing approach to improve performance and energy efficiency for software routers
CN103973800A (en) * 2014-05-19 2014-08-06 普天信息技术有限公司 Android-based double-network-card concurrence implementation method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
BOODUKLEE、TORNADO龙: "linux双网卡双网关如何设置", 《BBS.LINUXTONE.ORG/THREAD-22605-1-1.HTML》 *
HOUZENGFENG1: "linux双线双网卡双IP双网关设置方法", 《百度文库》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107026795A (en) * 2016-02-02 2017-08-08 上海格尔软件股份有限公司 A kind of method for returning bag extremely source network interface based on iptables and policybased routing
CN110650093A (en) * 2019-08-29 2020-01-03 苏州浪潮智能科技有限公司 Multi-network-segment access method and system for single operating system

Similar Documents

Publication Publication Date Title
CN109428749B (en) Network management method and related equipment
US9178935B2 (en) Distributed steam processing
CN112087312A (en) Method, device and equipment for providing edge service
CN102143243B (en) Dynamic routing processing method and dynamic routing processing device and home gateway thereof
US20100235903A1 (en) System and method for transparent cloud access
Juan et al. Multi-master ros systems
US9866525B2 (en) Source-destination network address translation (SDNAT) proxy and method thereof
CN110808857B (en) Network intercommunication method, device, equipment and storage medium for realizing Kubernetes cluster
CN113590364B (en) Data processing method and device based on distributed shared memory system
US10999239B2 (en) Stateful LISP subscription for overlapping subnetworks
CN113630479B (en) Domain name resolution method and related products
CN112333017A (en) Service configuration method, device, equipment and storage medium
CN115190103A (en) Service grid-based service domain name resolution method, device and equipment
CN103167006B (en) Virtual machine provides the method for Web service, monitor of virtual machine and system
KR20090022341A (en) Ubiquitous web service gateway and method
CN104935515A (en) FTP server and WEB server network configuration method in linux system
CN109413224B (en) Message forwarding method and device
CN104571934A (en) Memory access method, equipment and system
CN112637037B (en) Cross-region container communication system, method, storage medium and computer equipment
CN103973819A (en) Method, related device and system for responding to request for community domain name
WO2018081963A1 (en) Method and device for dns resolution and network system
CN106411771A (en) Data forwarding method and system
CN104714923A (en) Method and device for achieving equipment sharing
CN116016448A (en) Service network access method, device, equipment and storage medium
Hernàndez et al. Multi-master ROS systems

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20150923