A few methods of static configuration network1. ifconfig [Interface]-A: View all interfaces that include an inactive stateEnable or disable: Ifconfig IFNAME up|downor enable: Ifup IFNAMEDisabled: Ifdown IFNAMESet IP address: Ifconfig IFACE ip/netmask [up]Note: CIDR format masks, such as 172.18.0.1/16Or: Ifconfig IFACE IP netmask netmaskNote: The full format mask, such as 255.255.0.0The address is immediately sent to the kernel and takes effect immediately, but will not be permanently valid.Route
t1 ifconfig eth3 172.16.1.200/244. Set the address of eth1 and eth2 ifconfig eth1 192.168.1.1/24Ifconfig eth2 172.16.1.1/245. Set a default route for two NetnsIP netns exec T1 route add default GW 192.168.1.1IP netns exec T2 route add default GW 172.16.1.16. TestingPing eth3 address in Netns T2 in Netns t1IP netns exec T1 ping 172.16.1.200After the above configuration, packets sent from Eth0 are routed thr
, and file Ifcfg-ethx in the ETHX to be consistent
Broadcast broadcast address
HWADDR Physical Address, this you don't change
IPADDR IP Address
NETMASK Subnet Mask
Onboot If the device is started when the network is started or restarted, yes is started, no is not started
Bootproto boot protocol, the most common three parameters are as follows:
①static (static IP)
②none (unspecified, set fixed IP situation, this is OK, but if you want to set the multi-port binding bond, yo
This article is very good, multi-Nic recommended with a fourth method.
Http://blog.sina.com.cn/s/blog_828e50020101ern5.html
Add a permanent static route to CentOS
A static route is required when using a dual NIC with 2 gateways at the same time. Of course, there are many times when you need to add routes.
Operating system version centos-6.4 64bit
One: Use the route command to add
1, the route command added by using the route, the machine restarts or the network card restarts after the route
About switch and router configurations it's impossible to use hardware when it comes to teaching. No condition today brings everyone is I do a small experiment.
You can have the next Huawei ma5200g Simulator to experiment
Specific orders and explanations I've written it all up. Hope and I like the dishes of friends and I do together!
First, we've collected some basic commands for the switches.Usually commands:PCA login:root, using root userpassword:linux; password is Linux# shutdown-h now; sh
Tags: lis route command Route address command stat AC 3.2 pad1. Use the route command to view the native route and enter the route return directly.Route commandParameters:
Add Add route
del Delete route
-net setting a route to a network segment
-host setting a route to a host
GW Export Gateway IP address
Dev Egress Gateway Physical device name
Example
Add route
Route add-net 192.168.0.0/24
Tags: linux devops linux Cloud Linux Getting started 0 basic Linuxcommunication between the network mainly relies on routers, in addition to the daily use of the router device, Linux system can also be configured to the router, simply add some simple routing entries on the Linux host, these Linux hosts can act as a simple router function, The following is an example of implementing router functions in a CentOS6 environment:1. Set all IP addresses as shown2. Configure routing for different Machin
I. Use the route command in linux to addIf you use the route entry added by the route command, the route becomes invalid after the machine is restarted or the NIC is restarted. The method is as follows:// Route entry to the host# Route add-host 192.168.1.11 dev eth0# Route add-host 192.168.1.12 gw 192.168.1.1// Route added to the network# Route add-net 192.168.1.11 netmask 255.255.255.0 eth0# Route add-net 192.168.1.11 netmask 255.255.255.0
CentOS 6.7 Add all methods for permanent static routes
When using a dual-nic and two gateways at the same time, you need to add a static route. Of course there are still many times that you need to add routes.
Operating system version centos-6.4 64bit
I. Use the route command to add
1. Use the route command to add a route. After the machine restarts or the NIC restarts, the route will become invalid. Method:
// Route entry to the host
# Route add-host 192.168.1.11 dev eth0
# Route add-host 1
Tomcat log cutting and Regular deletion
In the Tomcat software environment, if we allow unlimited growth of log files, the disk will be full one day (nonsense ). Especially when log files grow rapidly, it is necessary to cut and delete log files by log. The following describes how to cut log files.
Chapter 3 system environment1.1 Operating System Environment[Root @ server1 ~] # Cat/etc/RedHat-releaseCentOS release 6.5 (Final)[Root @ server1 ~] # Uname-r2.6.32-431. el6.x86 _ 64[Root @ server1 ~]
=/sbin/init ipaddr = 10.0.14.143 netmask = 255.255.255.252 gw = 10.0.12.1
Of course, you can write a program for string analysis. This is the most conservative and stupid method... You need to write string Analysis on your own.
It is better to solve the problem in the simplest way.
Use sed in the script to implement the following:
#!/bin/baship=`sed -n 's/ /\n/gp' /proc/cmdline | sed -n '/ipaddr/p' | sed -n 's/ipaddr=//gp'`netmask=`sed -n 's/ /\n/gp
General Usage of Linux Route
Route ConfigurationRoute
Route: displays or configures local route information.
The main configuration information of a route table configuration is:
Configuration item
Meaning
Target
Destination Ip host address or Ip address
Gw
Next Hop address
Dev
Next Hop Network Interface
If an ip report needs to be sent from the local machine or an ip datagram is forwarded, Linux w
Show all Routes now#route[Email protected] ubuntu:~# RouteKernel IP Routing TableDestination Gateway genmask Flags Metric Ref use Iface10.147.9.0 * 255.255.255.0 U 1 0 0 eth0192.168.1.0 * 255.255.255.0 U 2 0 0 Wlan0192.168.122.0 * 255.255.255.0 U 0 0 0 virbr0link-local * 255.255.0.0 U 0 0 eth0192.168.0.0 192.168.1.1 255.255.0.0 UG 0 0 0 Wlan0Default 10.147.9.1 0.0.0.0 UG 0 0 0 eth0[Email protected]:~#The result is top-down, that is, which one is in front, which one has precedence, none in front,
t1 ifconfig eth3 172.16.1.200/244. Set the address of eth1 and eth2 ifconfig eth1 192.168.1.1/24Ifconfig eth2 172.16.1.1/245. Set a default route for two NetnsIP netns exec T1 route add default GW 192.168.1.1IP netns exec T2 route add default GW 172.16.1.16. TestingPing eth3 address in Netns T2 in Netns t1IP netns exec T1 ping 172.16.1.200After the above configuration, packets sent from Eth0 are routed thr
, ccbezierconfig.controlpoint_2 Vertex, Ccbezierconfig.endposition EndApplication scenario: Bullet, PvZ roof level4, ccaction--fast (Cceasein)Object creation: Cceasein.action (ccintervalaction action, float rate)Description: Action controlled actions, rate acceleration, assuming 1 is uniform.Slow: Cceaseout is the same as the Cceasein, the opposite of the action5, ccaction--Zoom (Ccscaleby and Ccscaleto)Create object: Ccscaleby (to). Action (float T,
). Played three laps, the card was taken away by the coach ...Yang Shangyi played pⅴz and Pokemon were reported to the coach.I looked at some of the results of the printing ... dizzy ... Abandon therapy.In the hotel saw the stone two people. Got the legend of the fish and eggs, indeed delicious, than Heng Supermarket high to do not know where to go (I want to transfer do not stop me).To Yanshan University test machine is also a joy. Constantly being organized from a computer room to another room
creation:
The malloc (sizeof (zval) that creates a variable and allocates space is not feasible in php. Should be used
MAKE_STD_ZVAL (pzv ),It optimizes the space allocation and automatically initializes the refCount (indicating the number of times this variable is referenced) and is_ref (whether it is mandatory) attributes. Note that its input is a pointer.
ALLOC_INIT_ZVAL ()You can also perform initialization. The difference is that zval * is set to NULL.
There are many forms for setting dif
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.