Sponsored Content
Top Forums Shell Programming and Scripting How to validate an IP address Post 63179 by sabina on Wednesday 23rd of February 2005 09:47:56 AM
Old 02-23-2005
Hi ZB

I found a case where if fails.

ip=1.2.3.4.

If we have nothing after last "." if failes to recognize it as invalid ip address.

Thanks,
Sabina
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

validate

hi need help here, a bit of code im doing requires a number to be enetered i have got validation and loop if its outside a ceratain range, but was wondering what code i need to validate if a character has been entered. cheers (3 Replies)
Discussion started by: ruffenator
3 Replies

2. UNIX for Dummies Questions & Answers

network address and broadcast address?

say I have a IP address which is 10.0.0.12, and subnet mask is 255.255.255.240, what is the network address and what is the broadcast address which host lives on? And could you explain how to get the answer? thanx in advance! (7 Replies)
Discussion started by: pnxi
7 Replies

3. IP Networking

How to Achive IP address through MAC(Ethernet) address

Hi sir, i want to make such programe which takes MAC(Ethernet) address of any host & give me its IP address....... but i'm nt getting that how i can pass the MAC address to Frame........ Please give me an idea for making such program... Thanks & regards Krishna (3 Replies)
Discussion started by: krishnacins
3 Replies

4. Programming

validate IPV6 address in windows using c++

I know there is a function inet_tpon for unix platforms to validate ipv6 addresses.But i need an equivalent of windows.When i use this function with the header file <winsock2.h> the visual studio 2005 on win2003 issues an error saying identifier not found :confused: (3 Replies)
Discussion started by: guru13
3 Replies

5. Shell Programming and Scripting

ksh - how to list all ip address between 2 ip address

Trying to do a ksh script that needs to list all ip address between ip address a and b .. ie. Ip address A=192.168.1.200 Ip address B=192.168.2.15 So the subnet changes from 1 to 2 but I want to list all possible ip addresses between the 2.. Which would be: 192.168.1.200... (4 Replies)
Discussion started by: frustrated1
4 Replies

6. UNIX for Dummies Questions & Answers

Panic kernal-mode address fault on user address 0x14

:) Firstly Hi all!!, im NEW!! and on here hoping that someone might be able to offer me some help... i have a server that keeps crashing every few days with the error message: PANIC KERNAL-MODE ADDRESS FAULT ON USER ADDRESS 0X14 KERNAL PAGE FAULT FROM (CS:EIP)=(100:EF71B5BD) EAX=EF822000... (10 Replies)
Discussion started by: Twix
10 Replies

7. Shell Programming and Scripting

Validate an IP address - Return to menu

hi! I need a script that, among other things, presents a menu to the user, checks the user input for an IP address (in quad dotted notation), and then "redirects" (with sed) that IP address to the Firewall script. The script must check that all of the inputs are valid IP addresses (numeric,... (1 Reply)
Discussion started by: zetetic
1 Replies

8. UNIX for Dummies Questions & Answers

What would the physical address be for virtual address?

Hi guys, I got one problem which I definetily no idea. What would the physical address be for virtual address? 1) 2ABC 2) 3F4B Here is the page table:see attached Thank you sos sososososso much!! (0 Replies)
Discussion started by: lemon_06
0 Replies

9. IP Networking

Tracing a MAC address to IP address: Solaris

Hi there I lost connectivity to one of our remote systems and when I checked the messages log I found the following: Aug 10 23:42:34 host xntpd: time reset (step) 1.681729 s Aug 16 13:20:51 host ip: WARNING: node "mac address" is using our IP address x.x.x.x on aggr1 Aug 16 13:20:51 host... (9 Replies)
Discussion started by: notreallyhere
9 Replies

10. UNIX for Advanced & Expert Users

C program to detect duplicate ip address if any after assigning ip address to ethernet interface

Hi , Could someone let me know how to detect duplicate ip address after assigning ip address to ethernet interface using c program (3 Replies)
Discussion started by: Gopi Krishna P
3 Replies
OCF_HEARTBEAT_IPADDR(7) 					OCF resource agents					   OCF_HEARTBEAT_IPADDR(7)

NAME
ocf_heartbeat_IPaddr2 - Manages virtual IPv4 addresses (Linux specific version) SYNOPSIS
IPaddr2 [start | stop | status | monitor | meta-data | validate-all] DESCRIPTION
This Linux-specific resource manages IP alias IP addresses. It can add an IP alias, or remove one. In addition, it can implement Cluster Alias IP functionality if invoked as a clone resource. SUPPORTED PARAMETERS
ip The IPv4 address to be configured in dotted quad notation, for example "192.168.1.1". (required, string, no default) nic The base network interface on which the IP address will be brought online. If left empty, the script will try and determine this from the routing table. Do NOT specify an alias interface in the form eth0:1 or anything here; rather, specify the base interface only. Prerequisite: There must be at least one static IP address, which is not managed by the cluster, assigned to the network interface. If you can not assign any static IP address on the interface, modify this kernel parameter: sysctl -w net.ipv4.conf.all.promote_secondaries=1 (or per device) (optional, string, default eth0) cidr_netmask The netmask for the interface in CIDR format (e.g., 24 and not 255.255.255.0) If unspecified, the script will also try to determine this from the routing table. (optional, string, no default) broadcast Broadcast address associated with the IP. If left empty, the script will determine this from the netmask. (optional, string, no default) iflabel You can specify an additional label for your IP address here. This label is appended to your interface name. If a label is specified in nic name, this parameter has no effect. (optional, string, no default) lvs_support Enable support for LVS Direct Routing configurations. In case a IP address is stopped, only move it to the loopback device to allow the local node to continue to service requests, but no longer advertise it on the network. (optional, boolean, default false) mac Set the interface MAC address explicitly. Currently only used in case of the Cluster IP Alias. Leave empty to chose automatically. (optional, string, no default) clusterip_hash Specify the hashing algorithm used for the Cluster IP functionality. (optional, string, default sourceip-sourceport) unique_clone_address If true, add the clone ID to the supplied value of ip to create a unique address to manage (optional, boolean, default false) arp_interval Specify the interval between unsolicited ARP packets in milliseconds. (optional, integer, default 200) arp_count Number of unsolicited ARP packets to send. (optional, integer, default 5) arp_bg Whether or not to send the arp packets in the background. (optional, string, default yes) arp_mac MAC address to send the ARP packets too. You really shouldn't be touching this. (optional, string, default ffffffffffff) SUPPORTED ACTIONS
This resource agent supports the following actions (operations): start Starts the resource. Suggested minimum timeout: 20s. stop Stops the resource. Suggested minimum timeout: 20s. status Performs a status check. Suggested minimum timeout: 20s. Suggested interval: 10s. monitor Performs a detailed status check. Suggested minimum timeout: 20s. Suggested interval: 10s. meta-data Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5s. validate-all Performs a validation of the resource configuration. Suggested minimum timeout: 20s. EXAMPLE
The following is an example configuration for a IPaddr2 resource using the crm(8) shell: primitive example_IPaddr2 ocf:heartbeat:IPaddr2 params ip=string op monitor depth="0" timeout="20s" interval="10s" SEE ALSO
http://www.linux-ha.org/wiki/IPaddr2_(resource_agent) AUTHOR
Linux-HA contributors (see the resource agent source for information about individual authors) resource-agents 1.0.3 07/05/2010 OCF_HEARTBEAT_IPADDR(7)
All times are GMT -4. The time now is 11:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy