cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4369
Views
50
Helpful
16
Replies

/31 254 prefix usages

SJ K
Level 5
Level 5

Hi all,


All along, I have been taught that 2 IPs must be reserved for any network. The netid and broadcast address.

q1) Hence can /31 or .254 subnet mask be use ?

q2) can I also say that netid and broadcast address are logical ips that are not really residing on any interfaces.

 

Thank you and happy labour day.

 

Regards,
Noob

2 Accepted Solutions

Accepted Solutions

Jon Marshall
Hall of Fame
Hall of Fame

Just to clarify q1).

You can use a /31 for point to point links on any class network eg.

R1 (192.168.10.2/31) -> (192.168.10.3/31) R2

the above will work and you can ping between the two routers.

It is a way to conserve IP addressing if you are running out although obviously with private addressing you could just as easily use a /30 for your point to point to links.

You should obviously only use them on P2P links.

q2) neither of those addresses are assigned to any interface.

Jon

View solution in original post

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

Just to add a little to Jon's response.

Again, for question 1, as a p2p is used just for transit, and there's no need to broadcast to multiple hosts, the /31 is just a way to reduce address space consumption for p2p links.

For question 2, there's still a network address, but now it always overlaps with lower of the two p2p addresses.  This is somewhat similar as also using the first address of larger subnets, i.e. the subnet address, as a host address. The real difference, is with larger subnets, the last IP address is the subnet broadcast address, and not also used as a host address.

View solution in original post

16 Replies 16

Mark Malone
VIP Alumni
VIP Alumni

Yes that's correct  you must have a network id and broadcast address which are not allowed to be used for hosts , minimum you need a /30 mask 255.255.255.252 that will create you a point to point link with no spare useable addresses ,sometimes you would get a range of say /29 for your public ips in your network and rather than waste them on 1 link you would use vlsm to split the subnets further down into point-point links

 

q1)  There is no such mask as /31 the masks range from 8-30 only

You can have a mask that is .254 but it must be in either class A or B  , its not available for class C use , the masks only run 24-30 in class C

ex--172.16.0.1 255.255.254.0 128 subnets , 510 hosts  /23

 

 

 

Hi Mark,

 

Thanks for the confirmation.

Speaking of which.

q1) Have never thought of it though, why a subnet mask range cannot be < 8.  Since there are no longer classful networks
 

q2) is it "programmed" internally on the tcp/ip stack on nodes to always reply to a IP broadcast (if within the same subnet)  -- recently on another thread, i have ping a .255 on a point to the point link from A to B and B replies automatically.

 

q3) my lecturer told me we are not able to ping to netid on cisco routers, but i just tested on ccnaworkbook stublab on a point to point link again (A to B) and B is replying on behalf (seems like the router A, change the ping to the netid into a ping to broadcast address instead).

p.s. recently there are some issues with the forum -> can you let me know if you are able to see this thread below

https://supportforums.cisco.com/discussion/12496126/scenario-possible-services-host-2-different-ip

 

Thanks a million mark.

 

Regards,

Noob

 

 

Jon Marshall
Hall of Fame
Hall of Fame

Just to clarify q1).

You can use a /31 for point to point links on any class network eg.

R1 (192.168.10.2/31) -> (192.168.10.3/31) R2

the above will work and you can ping between the two routers.

It is a way to conserve IP addressing if you are running out although obviously with private addressing you could just as easily use a /30 for your point to point to links.

You should obviously only use them on P2P links.

q2) neither of those addresses are assigned to any interface.

Jon

in addition to what Jon has outlined (quite correctly) Many ISP's and large enterprise networks use /31's for point to points, especially for BGP peering to conserve not only public addressing, but private addressing too.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

We use /31s all the time for p2p (both logical and physical) links; most of which are OSPF.

We use them to conserve our 10.x.x.x space, as we're rather tight on that.  (We have a rather large 10.0.0.0 network.)

Godd to know that , i didnt even think /31 was valid

I never thought about or used a /31 mask.  (+5) to Jon. 

 

I assume the ip subnet-zero command is required before implementing a /31 mask?

 

Learn something new everyday!

Hi Charles

assume the ip subnet-zero command is required before implementing a /31 mask?

Interestingly no it isn't even if you used the actual subnet address because there is no subnet and broadcast address with that mask.

I just did a quick test to make sure I wasn't misleading you and even with "no ip subnet-zero" it worked fine.

Jon

Hi Jon and all.


Thanks for clarifying and replying. I did remember having seen  a /31 for point to point.

 

q1) But what is the difference between

i) /30 with netid and broacast ip + 2 host for point to point and

ii) /31 with 2 host for point to point.

 

q2) which boils down to the eventually, what is the use of a 

a) net id and broadcast ip

b) why isn't it needed in a point to point.

 

Regards,

Noob

To answer both questions -

For a point to point link there can only be two end devices so there is no need for a subnet and broadcast address because from the perspective of either device there is only one place to send the traffic.

But if you have multiple devices on a subnet then they need to know -

1) the subnet address because they need to be able to work out whether another device is on the same subnet or not and if it isn't they need to send the traffic to their default gateway

2) the broadcast address because there are things that need to be sent to all hosts on the same subnet.

Jon

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

Just to add a little to Jon's response.

Again, for question 1, as a p2p is used just for transit, and there's no need to broadcast to multiple hosts, the /31 is just a way to reduce address space consumption for p2p links.

For question 2, there's still a network address, but now it always overlaps with lower of the two p2p addresses.  This is somewhat similar as also using the first address of larger subnets, i.e. the subnet address, as a host address. The real difference, is with larger subnets, the last IP address is the subnet broadcast address, and not also used as a host address.

Hi Jon, Joseph and all,

Sorry for the late reply.

For a point to point link there can only be two end devices so there is no need for a subnet and broadcast address because from the perspective of either device there is only oneplace to send the traffic.
But if you have multiple devices on a subnet then they need to know -
1) the subnet address because they need to be able to work out whether another device is on the same subnet or not and if it isn't they need to send the traffic to their default gateway
2) the broadcast address because there are things that need to be sent to all hosts on the same subnet.

q1) so do you mean that if a device can only send traffic to just another 1 and only device through a connected interface, then we can always use a /31;

if a device can send traffic to different devices through its connected interface, then we must have a network address to check if the destination are in the same network as the host after applying the mask (if not, to default gateway)

am i right ?
 

q2) in that case, all routers to routers connections are actually 1:1 , so i can use /31 for all , isn't it ?

 

q3) when a router receive a packet to desintation192.168.130 but as the packet doesn't come with a mask information, what if there are 2 routes that are set in the router as

192.168.1.0/24 - fe0/0

192.168.1.128/25 - fe0/1

which interface will the router choose to exit the packet ?

 

Regards,
Noob

 

 

 

 

 

q1) if it is a point to point link yes you can use that mask

q2) same as above but bear in mind not all router connections are one to one ie. you may have multiple L3 devices sharing a common subnet.

q3) L3 devices always choose the longest match from the routing table before anything else so in your example the route for 192.168.1.128/25 would be used.

Jon

Hi Jon,

Thanks for coming back.

Can you elaborate abit further more on q2) ? How does the setup look likes ? I believe you are not refering to a router to router connection right ? But rather to a switch connected with multiples devices ?

 

Regards,
Noob