5

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!

6 Answers6

9

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.

Andreas
  • 91
  • 1
4

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

Martijn Heemels
  • 7,728
  • 7
  • 40
  • 64
1

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

Joseph Redfern
  • 197
  • 1
  • 5
1

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.

Vatine
  • 5,440
  • 25
  • 24
0

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"
0

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.

Jack Scott
  • 155
  • 2
  • 6
  • 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 01 '10 at 04: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 01 '10 at 04:16