Tuesday, December 29, 2020

I can't understand some details of "ip route add" command.

I'm facing some problems in adding routes within different computers defined via SDN.
Let me explain: if I type

ip route add <ip\_address> via <gateway>

The <ip\_address> could be one of this:

ip_host (i.e. 10.0.0.1), or

net_id, but with subnet mask (i.e. 10.0.0.0/24).

My doubt is: why do I must add the CIDR notation only with the net_id? How can the machines understand the network if only the ip_host is given, without the subnet mask?

Thank you all in advance, hoping it's not OT.



No comments:

Post a Comment