cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements


94049
Views
40
Helpful
11
Replies
Contributor

when and why we use /31 subnet

Hi all,

i know about /30 subnet we use when we have to use point to point network.

/30 we use when we need only 2 hosts on either end of network.

cansomeone tell me why and when we use /31 subnet mask.

thanks

mahesh

3 ACCEPTED SOLUTIONS

Accepted Solutions
Cisco Employee

Re: when and why we use /31 subnet

Hi Mahesh,

My understanding is that since a point to point doesn't really need a  broadcast address, instead of using a /30 which is 4 addresses, you can  use a /31 and use 2 address and it works. I havenot really tried it but it works.

Cheers,

-amit singh

Rising star

Re: when and why we use /31 subnet

Hi,

Using a /31 subnet mask helps conserve your IP address space for point to point links. It doubles the number of links that you can number from a given block of addresses. Think of large organisations that have hundreds of WAN links but are rapidly running out of address space.

This is especially useful if you have paid for a block of public addresses from your ISP and so you want to use as many of them as possible.

Not only can a /31 subnet be used on serial interfaces but it can also be assigned to ethernet interfaces:

http://packetlife.net/blog/2008/jun/18/using-31-bit-subnets-on-point-point-links/

Beginner

Re: when and why we use /31 subnet

I have never tried using a /31 but I can say that the 2 address you have configured 192.168.5.2 and 192.158.5.1 are different segments if you use a /31 mask (255.255.255.254)

what happens if you use .2 and .3? (may require you to change some static routes)

11 REPLIES
Cisco Employee

Re: when and why we use /31 subnet

Contributor

Re: when and why we use /31 subnet

Hi amit,

thanks for reply.

so my understanding was we use /30 for point to point  links.

what is difference between /30  /31  then?

mahesh

Cisco Employee

Re: when and why we use /31 subnet

Hi Mahesh,

My understanding is that since a point to point doesn't really need a  broadcast address, instead of using a /30 which is 4 addresses, you can  use a /31 and use 2 address and it works. I havenot really tried it but it works.

Cheers,

-amit singh

Rising star

Re: when and why we use /31 subnet

Hi,

Using a /31 subnet mask helps conserve your IP address space for point to point links. It doubles the number of links that you can number from a given block of addresses. Think of large organisations that have hundreds of WAN links but are rapidly running out of address space.

This is especially useful if you have paid for a block of public addresses from your ISP and so you want to use as many of them as possible.

Not only can a /31 subnet be used on serial interfaces but it can also be assigned to ethernet interfaces:

http://packetlife.net/blog/2008/jun/18/using-31-bit-subnets-on-point-point-links/

Contributor

Re: when and why we use /31 subnet

Many thanks to amit and sean too.

mahesh

Contributor

Re: when and why we use /31 subnet

Hi Amit,

i tried to use  /31  on my network but it did  not work.

my router has direct connection to layer 3 switch.

router connects to isp cable modem.

layer 3 config

interface FastEthernet0/11
description Lan connection to 2650XM Router
no switchport
ip address 192.168.5.2 255.255.255.252
spanning-tree portfast

router config to layer 3 switch

sh run int fa1/0
Building configuration...

Current configuration : 183 bytes
!
interface FastEthernet1/0
description Lan connection to Switch 3550SMIA
ip address 192.168.5.1 255.255.255.252

i change the mask to 255.255.255.254 and it did  not work?

mahesh

Beginner

Re: when and why we use /31 subnet

I have never tried using a /31 but I can say that the 2 address you have configured 192.168.5.2 and 192.158.5.1 are different segments if you use a /31 mask (255.255.255.254)

what happens if you use .2 and .3? (may require you to change some static routes)

Contributor

Re: when and why we use /31 subnet

Hi,

Many thanks i used IP address 192.168.5.2 and .3  and it worked.

regards

mahesh

Beginner

Re: when and why we use /31 subnet

In that range the .0 and .1 are in the same /31 using a .0 seems crazy but since you don't have a network and broadcast address that is how it works. 

Beginner

Re: when and why we use /31 subnet

Correct, think of your subnet training.  /31 leave two IPs together, 0 and 1 are both in the same "network". (don't need the quotes, it's true, just no broadcast and network add needed as stated. It is similar to using the .0 address in a full /23.  Seems totally odd, but is still an address and yet not, in this subnet, the network address.  

Beginner

Re: when and why we use /31 subnet

Correct, think of your subnet training.  /31 leave two IPs together, 0 and 1 are both in the same "network". (don't need the quotes, it's true, just no broadcast and network add needed as stated. It is similar to using the .0 address in a full /23.  Seems totally odd, but is still an address and yet not, in this subnet, the network address.

Everyone's tags (1)
CreatePlease to create content
Content for Community-Ad

Ask the Expert- Endpoint Security