1. Test topology:
Note: The TCP Reset command cannot be issued from the original sensor port of the IPs because of the constraints of the simulated environment, so the test emits a TCP reset with the IPs other interfaces.
2. Basic configuration:
R1:
Interface fastethernet1/0
IP address 10.1.1.1 255.255.255.0
No shut
R2:
Interface fastethernet1/0
IP address 10.1.1.2 255.255.255.0
No shut
R3:
R3
=ethernetOnboot=yes
Two, a single network adapter to bind multiple IPsSometimes we need to configure multiple IPs on a NIC, for example, in the example above, we also need to configure IP 192.168.168.2 and 192.168.168.3 for eth0. Then you need to create a new two configuration file under/etc/sysconfig/network-scripts:ifcfg-eth0:0 content is as follows:
device=eth0:0Bootproto=staticipaddr=192.168.168.2netmask=255.255.255.0Onboot=yes
" ], "selectinterfaces": [ "InterfaceID", "IP" ] }, "ID": 2, "Auth": Token_num,} request= Requests.post (url=url,headers=headers,data=json.dumps (data)) Dict=json.loads (request.content)#print dict[' result ' returndict['result']#organize the information, output the information you want, combine it into a dictionary, I propose IP here. defGetproc (data): Dict={} list=Data forIinchList:host= i['Hos
Label: shell script ping all ips on the same network segment
The environment is centos7 / bin / bash
Note When copying the test, be sure to change the ip network segment in the example to your own ip network segment.
ctrl + z can enter the script into the background, and then kill the process.
1.
#! / bin / bash
for i in {1..254} #define 1 to 254
do
HOST = 192.168.168. $ I
ping -c 2 $ HOST > / dev / null
if [$? -eq 0]; then # -eq Determine
When the same domain name corresponds to multiple IPs, PHP gets the function of the Remote Web page content [Article Zhang feast this article version: v1.0 last modified: 2008.12.15 reproduced Please specify the original link: http://blog.zyan.cc/post/389/] PHP gets Remote Web page content in several ways, such as using its own file_get_contents, fopen and other functions. Reference PHP Gets the Remote Web page content function when the same domai
The company has become a Symantec senior partner, I will be responsible for Symantec and Kaspersky Pre-Sales Technology and after-sale support, a preliminary understanding of the 7100 series and the SxS of the new Sysmantec mode, think it is very good, Especially ids/ips on the solution, deeply admired. Self-sensing IDs differs from IPs in that one is a color congenial, one is a watchdog, one can see can no
Preface: Two scripts, the implementation of multiple addresses are not contiguous IP ping test, the function of two scripts is the same, the script is as follows:First script:#!/bin/bashCat Iplist|while Read Line #iplist是存放IP的文档, with a script placed in a path, formatted with one IP address per rowDoPING-C2 $line >/dev/nullIf [$? = 0]Thenecho "$line is up!"Elseecho "$line is down"FiDoneA second script:#!/bin/bash#check PingFor IP in ' cat iplist ' #iplist为写IP地址的文件, format each line with an IP ad
place is the display Russian!$/usr/local/bin/mmdblookup--file/mnt/data/geolite2/geolite2-country.mmdb--ip 112.225.35.70 {"Continent": { "Code": "as" 2, access to city information, this data is a bit tangled, the province no problem, the city is a problem! The official presentation address is very precise, perhaps this is the difference between free and charge:)$/usr/local/bin/mmdblookup--file/mnt/data/geolite2/geolite2-city.mmdb--ip 112.225.35.70 {"City": { "geoname_id": 1805753 Becau
= $_server["REMOTE_ADDR"];}} else {if (getenv ("Http_x_forwarded_for")) {$realip = getenv ("Http_x_forwarded_for");} else if (getenv ("Http_client_ip")) {$realip = getenv ("Http_client_ip");} else {$realip = getenv ("REMOTE_ADDR");}}return $realip;}
In addition, if we want to get more accurate use of third parties is a good way.
The code is as follows
Copy Code
function Get_onlineip () {$ch = Curl_init (' http://www.ip138.com/ip2city.asp ');curl_setop
In the work sometimes through the Plsql connection database name is the same, but on different IP hosts, so, how to differentiate the connection by plsql? Such as:See the picture, you will find that there are three different hosts are called ORCLBJ Library, and the database in the Plsql display is not the same, then we want to connect to a specific library how to distinguish it?The specific solutions are as follows:If you installed Oracle with a default installation, you can find Tnsnames.ora. I
Label:These two days in a database project, using MySQL, the need to remote access to MySQL through the external IP, found that the default MySQL is not allowed remote access, need to do a simple configuration.As follows:1. Open a terminal (CMD) inputMysql-u User name-p password# (if there is no MySQL command, you go to the MySQL bin directory to execute)2. Assigning Permissions:Grant all privileges on * * to ' login name ' @ '% ' identified by ' login password ';#说明 here is simply to say that a
StatementThe Stars last nightBlog:http://yestreenstars.blog.51cto.com/This article by oneself creation, if need reprint, please indicate source, thank cooperation!ObjectiveAutomatically logs the logon IP for Windows Remote Desktop Connection.EnvironmentSystem: Windows Server 2003Steps1. Create a new c:/rdp directory;2. New c:/rdp/rdplog.txt file; 3. New c:/rdp/rdplog.bat file and add the following content: date/t >>rdplog.txttime/t >>rdplog.txtNetstat-n-P TCP | Find ": 3389" >>rdplog.
computers and the subnet mask above, we can see that the result of the operation is the same. are 192.168.0.0, so these two computers can be considered to be the same subnet.Input Description:Enter a subnet mask, two IP addressesOutput Description:Get calculated resultsInput Example:255.255.255.0192.168.224.256192.168.10.4Output Example:1Import java.util.*;p Ublic class Main {public static void main (string[] args) {Scanner scan=new Scanner (system.in); String[] Str1=scan.nextline (). split ("\
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.