Geek or Music?
All the talking cock on computers, RC helicopters, cello and Chinese orchestral music. Singaporeans call this the rojak, others just call it crap.
 
MY BLOG | PHOTO GALLERY
 
SEARCH GO

About Me

Your typical next-door kao-peh kao-bu neighbour.
Location: Singapore

Recent Entries

This blog has moved
Installing Windows without a working CD-ROM drive
I'm not visiting Sim Lim Square ever again
31-bit (255.255.255.254) subnets, RFC 3021
PayPal Support SUCKS!
M1 Mobile Broadband and UMPC Review
Responsibility Push Syndrome - can Singaporeans really work?
Degress are Glorified Testimonials
Living on Imaginary Money
GBP, EUR, NZD, AUD in the slumps vs SGD

Categories

Business and Economy
Cars and Commuting
Music and Entertainment
People and Politics
QQBlogs Dev
Random
RC Hobby
Technology
Travel
Work

Archives

August 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008

People

Dear
Adeline Chan
Andrew Chia
Edelyn Lee
Eileen Choo
Estee Teo
Kenneth Lim
Kiev Leong
Jacqueline Wong
Jasselyn Seet
Jessie Chia
Jia-Jing Guo
Rachel Jiang
Sze-Yun Quek
Yong-Wee Pang
Yu-Fen Tan

Recommended Sites

WhyMobile
21st Century Chinese Orchestra Development Group
ACE Hobby
WattFlyer
daddyHOBBY
Aerosmith Hobby
Tan Kin Lian's Blog
Ah Seng's Blog
UpLorry.com

31-bit (255.255.255.254) subnets, RFC 3021

Thursday, November 27, 2008 | Technology

For those who are wondering WTH is a /31 subnet (255.255.255.254), here's some very interesting information.

Traditionally, PtP links were assigned a /30 subnet (255.255.255.252), yeilding a network address, 2 host addresses and a broadcast address. Objectively speaking, this is a 100% waste of network addresses - for every 2 host I need, I created 2 unused addresses... unless you use IP-directed broadcast, that's a different story.

The 31-bit netmask is proposed by RFC 3021. This reduces the number of wasted addresses and makes the 2 addresses in the network completely available for use by hosts and removes the network and broadcast addresses.

So what happens to broadcast? Directed broadcasts are not supported, but 255.255.255.255 broadcasts can still be accepted. Also, the network now becomes the first host addresses, e.g. 192.168.0.0/31 is the network where 192.168.0.0 and 192.168.0.1 are both useable IPs.

For the Cisco gurus, it is currently supported by Cisco devices running 12.2(T) and above. Here's how:

ip subnet-zero
interface Vlan1
 ip address 192.168.0.0 255.255.255.254

My copy of CentOS 4 running kernel 2.6.9 supports this as well.

eth0      Link encap:Ethernet  HWaddr 00:0C:29:CD:7C:00
          inet addr:192.168.0.1  Bcast:192.168.0.1  Mask:255.255.255.254

Here's the two boxes communicating...

PING 192.168.0.0 (192.168.0.0) 56(84) bytes of data.
64 bytes from 192.168.0.0: icmp_seq=0 ttl=255 time=7.02 ms
64 bytes from 192.168.0.0: icmp_seq=1 ttl=255 time=2.32 ms
64 bytes from 192.168.0.0: icmp_seq=2 ttl=255 time=3.02 ms

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.254 U     0      0        0 eth0

Vincent has also verified that this is completely routable in his lab router setup (via OSPF). I'm sure it would work for other routing protocols... it doesn't really matter.

However, Windows XP gives me an error indicating that there's only 1 host bit so that means it's not supported. I'm not sure if Vista or Windows 2008 supports this, maybe somebody can verify?

ISPs, why are you still wasting your limited IP address space!?


posted by detach at 01:33:03 AM | permanent link | 1 comments

1 comments:

jess said...

because they dun have u to tweak for them :D

Thursday, November 27, 2008 03:19:42 PM

write comment