LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-22-2010, 12:16 AM   #1
molossus
Member
 
Registered: Nov 2010
Location: US
Distribution: Ubuntu 12.04
Posts: 49

Rep: Reputation: 0
why is this subnet wrong?


i would like to know why this subnet is wrong, iam using an online IP calculator
198.32.130.192/25
gives me:
Code:
Address:   198.32.130.192        11000110.00100000.10000010.1 1000000
Netmask:   255.255.255.128 = 25  11111111.11111111.11111111.1 0000000
Wildcard:  0.0.0.127             00000000.00000000.00000000.0 1111111
=>
Network:   198.32.130.128/25     11000110.00100000.10000010.1 0000000 (Class C)
Broadcast: 198.32.130.255        11000110.00100000.10000010.1 1111111
HostMin:   198.32.130.129        11000110.00100000.10000010.1 0000001
HostMax:   198.32.130.254        11000110.00100000.10000010.1 1111110
Hosts/Net: 126
which is wrong, the network shows as 198.32.130.128/25
128???, it is supposed to show as 192/25.

when i run this 198.32.130.192/26 , or /27 or /28 or /29 or /30
it shows ok:
Code:
Address:   198.32.130.192        11000110.00100000.10000010.11 000000
Netmask:   255.255.255.192 = 26  11111111.11111111.11111111.11 000000
Wildcard:  0.0.0.63              00000000.00000000.00000000.00 111111
=>
Network:   198.32.130.192/26     11000110.00100000.10000010.11 000000 (Class C)
Broadcast: 198.32.130.255        11000110.00100000.10000010.11 111111
HostMin:   198.32.130.193        11000110.00100000.10000010.11 000001
HostMax:   198.32.130.254        11000110.00100000.10000010.11 111110
Hosts/Net: 62
online ip calc: http://jodies.de/ipcalc?host=198.32....ask1=26&mask2=
for ubuntu or fedora:
sudo apt-get install ipcalc
su -c 'yum install ipcalc'
 
Old 11-22-2010, 12:55 AM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
The subnet is correct, because you are masking out the second bit of the 192 (C0h) when you specify that only the first 25 bits are the network part of the address.
 
Old 11-22-2010, 01:56 AM   #3
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Hello molossus,

there is everything correct. 198.32.130.128/25 is the networkadress when 198.32.130.192 is an IP-adress within this subnet. When changing the mask to 26 bit the adress 198.32.130.192 is no longer an IP-adress of a machine within the network but the networkadress of the 198.32.130.192/26 subnet.

Markus

Last edited by markush; 11-23-2010 at 06:18 AM. Reason: typo
 
Old 11-23-2010, 05:38 AM   #4
okcomputer44
Member
 
Registered: Jun 2008
Location: /home/laz
Distribution: CentOS/Debian
Posts: 246

Rep: Reputation: 53
Quote:
Originally Posted by markush View Post
Hello molossus,

there is everything correct. 198.32.130.128/25 is the networkadress when 198.32.130.92 is an IP-adress within this subnet. When changing the mask to 26 bit the adress 198.32.130.92 is no longer an IP-adress of a machine within the network but the networkadress of the 198.32.130.92/26 subnet.

Markus
198.32.130.192 you meant, yeah?

0, 64, 128, 192, the networks if the mask /26.

Just to be exact if some one who does not know this and reading it, might misunderstood the whole lot. Actualy the .92 /26 is a host address at the second subnet.

Anyway I know this was a mistyping.

Laz.
 
Old 11-23-2010, 06:17 AM   #5
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Quote:
Originally Posted by okcomputer44 View Post
198.32.130.192 you meant, yeah?...
Well thank you very much, it's a typo, I'll edit my post and change it.

Markus
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] DHCP client in wrong subnet AchimRS Linux - Networking 3 07-20-2010 01:29 PM
Wrong disk free space (VERY wrong) macrojd Linux - Server 12 05-17-2009 02:14 AM
rsync uses wrong directory, has wrong size but right file count? brianpbarnes Linux - Software 1 02-23-2009 05:48 PM
Fortran - G95 - Wrong Syntax or wrong compiler settings laucian Programming 1 03-21-2008 10:18 AM
Can IP from different subnet be configured on another subnet russell Linux - Networking 1 08-23-2002 01:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration