Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I learnt that routers shall have the last IP for the subnet, eg: 192.168.1.0/24 -> router IP shall be 192.168.1.254, and so on.

But... why is this? Is this merely preferential or there is also other reason?

Thanks!

share|improve this question

migrated from stackoverflow.com Oct 31 '10 at 19:16

This question came from our site for professional and enthusiast programmers.

    
offtopic for SO, try SuperUser or ServerFault –  Lie Ryan Oct 31 '10 at 18:09

6 Answers 6

It doesn't, really, matter what you pick as your "router IP". Just make sure you're consistent. I, personally, prefer "lowest host IP for default gateway" (with physical IPs for routers participating in HSRP being the next few up). But "highest possible host IP for default gateway" is equally good (you'd then presumably pick the next few lower IPs as the physical IPs for HSRP interfaces, to the extent you use HSRP).

However, having "highest" on some LANs, "lowest" on some and router IPs half-way through the raneg on one or two will cause issues, down the line.

share|improve this answer

One thing to keep in mind is that other network administrators expect things, and something being configured different just makes everything a bit harder to understand.

For instance, in a home scenario (which I know isn't directly relevant, since you've tagged this with 'cisco') you'd better have a very good reason to not use 192.168.1.1/24 or 192.168.1.254/24 as the router IP address, and 'admin'/'admin' as the username and password for router administration. If a technician walks into a house, that's what they expect.

There's no technical reason for a particular IP (and I have given a router some very strange IP addresses before) but it just makes more sense for the people working on the networks.

share|improve this answer
1  
I agree for the most part, except the password front. Any technician worth his salt would 'expect' to walk into a house and find the password as something OTHER than 'admin'! You don't want malware on a PC, or someone who's made it onto your network, able to easily guess the Router password. Once you have malware or a malicious user on your network, it's almost Game Over, but it's still worth the inconvenience of a sticky note on the router with the password written on it, as opposed to as an easily guessed password. –  justinsteven Nov 1 '10 at 4:14
    
That's a very good point! While it's always best for the password to be changed and written down somewhere, I'd argue that it's better for the password to be a default, rather than the owner having no idea what said password is. I've spent countless hours on the phone to ISPs asking for ADSL passwords on behalf of customers, and it would all be fixed if they either wrote it down somewhere or left it default so I didn't need to reset the modem. –  Jack Scott Nov 1 '10 at 4:16

I believe there is a RFC suggesting a common usage as you explained. You can check details in the following RFCs:

* RFC 1918 – "Address Allocation for Private Internets"
* RFC 2036 – "Observations on the use of Components of the Class A Address Space within the Internet"
* RFC 2050 – "Internet Registry IP Allocation Guidelines"
* RFC 2101 – "IPv4 Address Behaviour Today"
* RFC 2663 – "IP Network Address Translator (NAT) Terminology and Considerations"
* RFC 3022 – "Traditional IP Network Address Translator (Traditional NAT)"
* RFC 3330 – "Special-Use IPv4 Addresses" (superseded)
* RFC 5735 – "Special-Use IPv4 Addresses"
* RFC 3879 – "Deprecating Site Local Addresses"
* RFC 3927 – "Dynamic Configuration of IPv4 Link-Local Addresses"
* RFC 4193 – "Unique Local IPv6 Unicast Addresses"
share|improve this answer

There isn't a rule that says explicitly "use the last IP on the subnet for the router".

You might as well use the middle one, but one thing that needs to be true is consistency. Its easier to remember the default gateway if you use one consistent way to assign them.

Further, assigning them either at the end or at the beginning makes it administratively easier to assign DHCP ranges etc.

share|improve this answer
    
+1 - For me it's always because it would make DHCP management orders of magnitude harder. –  Mark Henderson Nov 1 '10 at 1:06

I'm fairly sure that it's for the sake of convenience.

share|improve this answer

This is merely preferential. Most people prefer to use the .1 or .254 in a simple classed subnet.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.