IPCALC(1) General Commands Manual IPCALC(1)NAME
ipcalc - perform simple manipulation of IP addresses
SYNOPSIS
ipcalc [OPTION]... <IP address>[/prefix] [netmask]
DESCRIPTION
ipcalc provides a simple way to calculate IP information for a host. The various options specify what information ipcalc should display on
standard out. Multiple options may be specified. An IP address to operate on must always be specified. Most operations also require a
netmask or a CIDR prefix as well.
OPTIONS -c, --check
Validate the IP address under the specified family. If no address family is specified, IPv4 is assumed.
-4, --ipv4
Specify IPv4 address family (default).
-6, --ipv6
Specify IPv6 address family.
-b, --broadcast
Display the broadcast address for the given IP address and netmask.
-h, --hostname
Display the hostname for the given IP address.
-m, --netmask
Calculate the netmask for the given IP address. It assumes that the IP address is in a complete class A, B, or C network. Many net-
works do not use the default netmasks, in which case an inappropriate value will be returned.
-p, --prefix
Show the prefix for the given mask/IP address.
-n, --network
Display the network address for the given IP address and netmask.
-s, --silent
Don't ever display error messages.
AUTHORS
Erik Troan <ewt@redhat.com>
Preston Brown <pbrown@redhat.com>
IPv6 supported wedged in by David Cantrell <dcantrell@redhat.com>
REPORTING BUGS
Report bugs at http://bugzilla.redhat.com/
COPYRIGHT
Copyright (C) 1997-2008 Red Hat, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
Red Hat, Inc. April 30 2001 IPCALC(1)
Check Out this Related Man Page
cmpt_get_ifcid(3) Library Functions Manual cmpt_get_ifcid(3)NAME
cmpt_get_ifcid(), cmpt_get_addrcid() - get the compartment IDs associated with a network interfaces
SYNOPSIS
Parameters
ifname Pointer to network interface name string.
family Address family of the ipaddress specified. Currently, the AF_INET and AF_INET6 address families are supported.
addr Points to a buffer holding an IPv4 address if the family argument is AF_INET or an IPv6 address if the family is AF_INET6.
The address should be in numeric format in the network byte order. Numeric format is the binary value that goes into a
socket address structure.
The binary value is the hex representation of the IPv4/IPv6 address. This binary value resides in the structure for IPv4
address and in the structure for IPv6 address. (See inet(3N) for more details.)
mask Network mask in the CIDR representation.
DESCRIPTION
The function returns the compartment ID associated with a network interface.
The function returns the compartment ID of the tuple as set by a previous invocation of the command.
RETURN VALUE
The functions and return the following values:
Successful completion.
n is the compartment of the interface or the tuple.
Function failed.
may be set to indicate the error.
ERRORS
If any of the following conditions occur, and fails and sets
Compartmentalization feature is not supported.
The process does not have the appropriate privilege.
See privileges(5).
Specified interface or the address tuple has no compartment mapping.
Specified mask or family is invalid.
DEPENDENCIES
These functions are a part of the library.
SEE ALSO compartments(4), compartments(5), privileges(5).
cmpt_get_ifcid(3)
I have an Octane2 running IRIX 6.4 .
The problem is that the machine is not coming on the network .
I have put in all the details perfectly , like IP , netmask , name servers , gateway IP ,
I tried it on a Mac alongside me but On the IRIX it dosent work .
I have no idea wats the prob lem .... (2 Replies)
Hi all,
im running a redhat 6 linux on an Laptop. I am unable to find the configuration file where i have to configure all the settings like ip address, netmast, broadcast and gateway.
Every time at startup i have wrong settings of the network.
Thx all for help!
Best regards
Frank (2 Replies)
Hello,
I'm new to solaris and have an experience with linux. When we see network interface I can see qfe, hme, le0. What is that mean? Is it depend on the network card? (11 Replies)
hi,
I am trying to configure one of my interfaces, but after reboot - i lose the changes to the netmask & broadcast address.
I have added an entry in /etc/netmasks, but it doesnt pick up the new settings. any ideas - much appreciated.
before reboot:
eri0:... (3 Replies)
Hi,
I am having two variables
IP="10.150.12.1"
netmask="255.255.255.0"
To get network number, I know that a bitwise & will help.
networkno=IP & netmask
My code is
#!/usr/bin/ksh
ip="10.150.12.1"
netmask="255.255.255.0"
networkno="$ip" & "$netmask"
echo $networkno
I am... (7 Replies)
Hello,
I am having problems with using less on
Linux version 2.6.18-92.1.17.el5 (brewbuilder@hs20-bc1-7.build.redhat.com) (gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)). I am using csh but have the same problems on bash.
If I pipe something to less it works perfectly i.e. cat file | less... (9 Replies)
I am trying to find a script that will generate all the ip addresses in particular range.
Example: start: 41.0.0.0 end ip 41.1.1.2
32.32.35.3 to 32.32.36.0
Please help.
Thanks (9 Replies)
Buenas,
Tengo 3 sistemas registrados en redhat network; hace un mes modificamos las ip's de los mismos pero en redhat network igue poniendo las antiguas. Como puedo modificarlas? tengo q registrar los sistemas de nuevo?
Otra cosilla, he intentado actualizar packages y erratas: en actualizar ahora... (4 Replies)
Hello,
I am running a post script in autoyast where I am trying to set the broadcast and network address.
I have the ip address and netmask already (reading from a file)..
I saw the post from fpmurphy but it is using ksh which isn't an option in autoyast.
Thanks in advance! (3 Replies)
I have 4 digi etherlite boards that allow Wyse and VT100 terminals to connect to our network (stop laughing) :)
We are switching from an older version of redhat where we have these running to: Red Hat Enterprise Linux Server release 6.5 (Santiago)
I finally got them working and copied the tty... (5 Replies)
Hi folks,
i am using Oracle Red hat linux 6.5 64 bit operating system. but when i fire a command ifconfig -a it shows me no ip address has been assigned to this server except loop back address.then i done the following things
1)
#nm-connection-editor
2)
#service NetworkManager stop... (5 Replies)
Hi all, I would appreciate if someone could share how to convert CIDR notation to netmask and vice versa.
The value below is just an example. it could be different numbers/ip addresses.
Initial Output, let say file1.txt
Final Output, let say file2.txt (3 Replies)
Hi,
I need to write a bash script that when i enter two ip address, it will calculate summerize address for them.
Examlpe:
192.168.1.27/25
192.168.1.129/25
Result will be:
192.168.1.0/24
can you help me with this script?
I even dont know how to start with it (3 Replies)