Sponsored Content
Special Forums IP Networking How do I figure out the subnet? Post 302287235 by pludi on Friday 13th of February 2009 04:37:33 AM
Old 02-13-2009
Code:
IP        10.252.0.138    = 00001010 11111100 00000000 10001010
Netmask   255.255.255.128 = 11111111 11111111 11111111 10000000 (/25)
Network   10.252.0.128    = 00001010 11111100 00000000 10000000 (IP & Netmask)
Host      0.0.0.10        = 00000000 00000000 00000000 00001010 (IP - Network)
Broadcast 10.252.0.255    = 00001010 11111100 00000000 11111111 (IP | ^Netmask)

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

i can not figure this out

I am having problems scripting in UNIX. I am currently attending school and for the first time I am being introduced to scripting. My problem is I am supposed to enhance the spell_check by adding a third optional argument. The third argument is to specify a list of words to be added to the... (1 Reply)
Discussion started by: steph
1 Replies

2. UNIX for Dummies Questions & Answers

figure it out

hi there i am new to this site and this linux and unix stuff so kind of plz help me out hoe to start the stuff.... (1 Reply)
Discussion started by: cool_dude
1 Replies

3. Shell Programming and Scripting

Can't figure out else not matching

All, I appreciate any help you can provide on this. I get an "else unmatched" error with this code and can't figure out why. If I remove the 1st if statement through the 1st else the script runs through fine. Any thoughts? #decrypt file sudo -u gpg /usr/bin/gpg... (4 Replies)
Discussion started by: peteroc
4 Replies

4. Shell Programming and Scripting

Cant figure out this..

Hi, I need a little help here. I am exporting user info from a PSQL database and everything is working with the exception of this: 10029008:dsAuthMethodStandard\:dsAuthClearText:classword:10029008:2004:10029008:10029008:/home/student/1002/90/08:10029008 It is putting a colon right before the... (1 Reply)
Discussion started by: Stud33
1 Replies

5. IP Networking

Migrating existing Subnet to a new subnet and changing ip addresses in UNIX

Hi, My project needs to migrate the existing Subnet (255.255.255.0) to a new subnet and change the ipaddresses (currently C class). How can I do that. I need some information. John (0 Replies)
Discussion started by: johnmarsh
0 Replies

6. UNIX for Dummies Questions & Answers

How to figure out what each IP address is used for?

Hi, I have inherited a server at work that has one IP and two virtual IP's. It is live and I want to figure out what each IP is being used for. I thought of NETSTAT but I cannot figure out how to get it to list what each IP is listening for. ANy advice? (8 Replies)
Discussion started by: mojoman
8 Replies

7. UNIX for Advanced & Expert Users

Can't figure out how this is working

I have two machines, each with a virtual interface, with the following configurations: Machine1: eth2 Link encap:Ethernet HWaddr 00:09:6B:19:E5:05 inet addr:172.16.0.201 Bcast:172.16.0.255 Mask:255.255.255.0 eth2:0 Link encap:Ethernet HWaddr 00:09:6B:19:E5:05 ... (0 Replies)
Discussion started by: druidmatrix
0 Replies

8. UNIX for Dummies Questions & Answers

Can't figure this one out --

I'm putting together a shell script while I'm learning UNIX -- just for myself. It's a little script that simply takes some vendor names and writes them to a file. So far I'm at the stage where the user enters the name of the file and places it in a folder called vendorlists: * ) touch... (5 Replies)
Discussion started by: Straitsfan
5 Replies

9. UNIX for Dummies Questions & Answers

Can't figure out why this repeats

#!/bin/sh while IFS=: read address port; do : ${port:=443} address=$address port=$port cd $f_location number=`grep "$address" thing.txt -A 1 | grep "addresses=" | cut -d'"' -f2` echo "$address,$port,$number,$answer" >>... (9 Replies)
Discussion started by: shade917
9 Replies

10. Shell Programming and Scripting

Help with change significant figure to normal figure command

Hi, Below is my input file: Long list of significant figure 1.757E-4 7.51E-3 5.634E-5 . . . Desired output file: 0.0001757 0.00751 0.00005634 . . . (10 Replies)
Discussion started by: perl_beginner
10 Replies
IPSEC_SAMEADDR(3)					     Library Functions Manual						 IPSEC_SAMEADDR(3)

NAME
ipsec_sameaddr, ipsec_addrcmp, ipsec_samesubnet, ipsec_addrinsubnet, ipsec_subnetinsubnet, ipsec_subnetishost, ipsec_samesaid, ipsec_sameaddrtype, ipsec_samesubnettype - do comparisons for addresses, subnets, SA IDs and address families SYNOPSIS
#include <freeswan.h> int sameaddr(const ip_address *a, const ip_address *b); int addrcmp(const ip_address *a, const ip_address *b); int samesubnet(const ip_subnet *a, const ip_subnet *b); int addrinsubnet(const ip_address *a, const ip_subnet *s); int subnetinsubnet(const ip_subnet *a, const ip_subnet *b); int subnetishost(const ip_subnet *s); int samesaid(const ip_said *a, const ip_said *b); int sameaddrtype(const ip_address *a, const ip_address *b); int samesubnettype(const ip_subnet *a, const ip_subnet *b); DESCRIPTION
These functions do various comparisons and tests on the ip_address type and ip_subnet types. Sameaddr returns non-zero if addresses a and b are identical, and 0 otherwise. Addresses of different families are never identical. Addrcmp returns -1, 0, or 1 respectively if address a is less than, equal to, or greater than b. If they are not of the same address fam- ily, they are never equal; the ordering reported in this case is arbitrary (and probably not useful) but consistent. Samesubnet returns non-zero if subnets a and b are identical, and 0 otherwise. Subnets of different address families are never identical. Addrinsubnet returns non-zero if address a is within subnet s and 0 otherwise. An address is never within a subnet of a different address family. Subnetinsubnet returns non-zero if subnet a is a subset of subnet b and 0 otherwise. A subnet is deemed to be a subset of itself. A sub- net is never a subset of another subnet if their address families differ. Subnetishost returns non-zero if subnet s is in fact only a single host, and 0 otherwise. Samesaid returns non-zero if SA IDs a and b are identical, and 0 otherwise. Sameaddrtype returns non-zero if addresses a and b are of the same address family, and 0 otherwise. Samesubnettype returns non-zero if subnets a and b are of the same address family, and 0 otherwise. SEE ALSO
inet(3), ipsec_initaddr(3) HISTORY
Written for the FreeS/WAN project by Henry Spencer. 28 Nov 2000 IPSEC_SAMEADDR(3)
All times are GMT -4. The time now is 04:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy