1. View the routing tableRoute-n2. Add Default gatewayRoute add default GW 113.200.114.225OrRoute add-net 0.0.0.0 netmask 0.0.0.0 GW 113.200.114.2253. Delete the default gatewayRoute del default GW 113.200.114.225Generally, multiple network segments communicate with each other, and a priority route needs to be established rather than through the default gateway.3
How does the CentOS server add permanent static routes?
One, Linux add permanent static route
Method One: Modify the rc.local configuration file
Scope: Test Ubuntu 14.04, CentOS 6.4, Debian 8.1, Redhat 6.4 system available
How to use:
1. Add a command to the/etc/rc.local file in the Linux system Route add-net 192.168.2.0/24 GW 192.168.2.254 (the default route for the server is 192.168.2.254), or add a command route Add-net 192.168.3.0/24 Dev Eth0
of Nginx and the partial response of Asyn_server (because nginx in test machine A also accesses Asyn_server, This part of the response should not be routed to test machine B.
Therefore, the application of the above test machine A has extranet applications (Nginx) and intranet applications (Asyn_server and MySQL applications), how to set the route. (This is the key to routing settings)
1 Set nginx response route: test Machine A nginx out of the network card, we set the following:Route del defaul
to a
Userctl: Whether a normal user can control this device
Peerdns: If the value of Bootproto is "DHCP", whether to allow DHCP server to assign a DNS server to direct the information to overwrite the/etc/resolv.conf file
Other related configuration filesRouting configuration article:/etc/sysconfig/network-scripts/route-interface
Netwoek/netmask via GATEWAY
DNS configuration file:/etc/resolv.conf
NameServer DNS_IP
Local network resolution configuration f
network requests, intranet users come in and out of the intranet interface, extranet users come in and out of the network interface other than the interface.Introduction to the experimental environment16DNS: Assume the DNS server, set up in the company headquarters, set up two network cards one to provide services internally, an external serviceIP Address: 80.0.0.8 gw:80.0.0.1IP Address: 90.0.0.9 gw:90.0.0
Http://architect.dataguru.cn/article-11431-1.htmlAPI Gateway (API GW/API Gateway), as the name implies, is an API-oriented, serial centralized, strong-control service that appears on the system boundary, where the boundary is the boundary of the enterprise IT system, which mainly acts as an isolated external access and internal system.Before the popularity of the concept of microservices, API gateway entities have been born, such as banking, securitie
1PHP2 $conn=mysql_connect("localhost", "root", "root");3 $db=mysql_select_db("Imexcel",$conn);4 mysql_query("Set names ' GBK '");5 6 $query= "Select Danwei,count (danwei) as NUM, Group_concat (Fuze SEPARATOR ', ') as GW from ' dy ' Group by Danwei";7 $result=mysql_query($query);8 Header("CONTENT-TYPE:APPLICATION/VND.MS-EXCEL;CHARSET=GBK");9 Header("Content-disposition:filename=test.xls");Ten Echo‘ One A - - the -
host or network to pass through a network interface, such as eth0. When the "add" or "del" parameter is used, the route table is modified. If no parameter exists, the current content of the route table is displayed.
3. command parameters:
-C show more information
-N does not parse the name
-V: displays detailed processing information.
-F: Display the sending information
-C: Display route cache
-F clears the route tables of all Gateway entries.
-P makes the route permanent when used together wit
file sets the network service with different ports on the host to use commands to configure the network www.2cto.com 1. the ifconfig command ifconfig is a frequently used command to configure IP addresses, gateways, and other network card information. (1) configure the IP address of Eth0 and activate the device: # ifconfig eth0 192.168.10.88 netmask 255.255.255.0 upifconfig command to use the Down command when disabling the device. for example, # ifconfig eth0 down (2) configure the IP address
Objective:This article turns to self personal blog http://www.anyisalin.com welcome everyone to visitRSYNC+INOTIFY+LVS implementation of Web service load BalancingLab Environment:System: CentOS6.7Service: LVSType: Dr modelMachine:Lvs-director:Dip:dev eth0 172.16.100.2/24 gw:172.16.100.254Vip:dev eth0:0 172.16.100.1/24 gw:172.16.100.254LVS-RS1: Publishing a Web page file serverVIP Dev lo:0 172.16.100.1/32
segments, the default gateway address must be set. The gateway address must be the address of the current network and cannot be the address of another network segment.
Set the default gateway, that is, set the default route. You can use the route command provided by linux to add or delete route information.
1> View Current route information
[Root @ localhost ~] # Route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
59.79.87.0*255.255.255.0 U 1 0 0 eth0
Default 59
to the TCP/IP network, please describe the detailed steps. (Manually specified mode)Determine if a Linux host is connected to a TCP/IP network(a) View network interface information$ ifconfig #查看活动的网络接口信息$ ifconfig-a #查看所有的网络接口信息$ ifconfig eth0 #查看指定的eth0网络接口信息(b) View Gateway, routing information$ route-n(c) Review of network connectivity$ ping 192.168.239.1$ nslookup www.163.comTo connect a host to a TCP/IP network using a manual designation(a) Temporary manual configuration of IPV4 address$ i
++) { if(sw!= BW)//It is clear that only the hundred and 10 different cases can talk about the single digits. { for(intGW =1; GW 4; gw++) { if(GW! = SW GW! = BW)//Hundred used,
/init.d/lvs_server.sh stop #如果想重启LVS Server execution:/etc/init.d/lvs_server.sh Restart gw=10.0.0.1 # Netgetway vip=10.0.0.2 #虚拟IP, more specific circumstances #有几个输入几个, corresponding to the following configuration, and must correspond to Keepalived.config configuration rip1=10.0.0.5 #实际的服务器IP rip2=10.0.0.6 # The actual server IP rip3=10.0.0.7 #实际的服务器IP. /etc/rc.d/init.d/functions # If you are prompted for insufficient permissions, then execute on the
parameter provider runs the required parameters, similarly, if it is a built-in service, it is also "internally"Look at a Telnet instance:/USR/SBIN/TCPD in.telnetd * Service Name: Telnet * Socket Type: Stream * Protocol type: TCP * Wait/nowait[.max]: Nowait * User name [. Group]: Root * Service procedure:/USR/SBIN/TCPD * Parameter: in.telnetd Opening and closing of servicesVery simple, just add a # comment before the service you want to close, such as: #telnet Stream TCP nowait ROOT/USR/SBIN/TC
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.