I have seen on one of my routers, an ip route where half the subnet goes to one router and the the other to another router, this is done by applying a mask, it was something like ip route 172.19.54.0 255.255.255.0 x.x.x.x, and the other route was 172.19.54.0 255.255.128.0 x.x.x.x, Its something like that, Can anyone tell me how that works
I feel you have got most specific routing entry for the half of the subnet and a entry for the whole /24 network.
The packets destined to first half of the network will take the path/host mentioned in the second route and the packet for the other ips/hosts belongs to the major /24 network will take the path via the ip mentioned in the first ip route command.
If both the routes are pointing towards the same host/ip better you can remove the second one and keep ur routing table neat & clean..
You might wonder what a router does in case there is an "address overlap". Well a router will always take the longest match in the routing table. That means it will take the matching entry with the highest value for the netmask (f.e. /25 is better suited than /24).
By the way the "worst address overlap" is when you have a default route 0.0.0.0/0, which covers every IP address. It will however only be used in case there is no more specific routing entry for a packet´s destination IP.
That didnt really answer my question, thanks anyway, I wanted to know how come the mask of 255.255.128.0 makes the upper half of the ip range to go to another route, I want to know why we use the .128 mask etc ?
Suppose you have the network 10.1.1.0/24 and you wish to route the bottom half via one interface and the top half via another.
Now, you have a 255.255.255.0 mask to start off with. In order to create two halves of the network, you need to have a mask that is one bit longer than the original mask. In this case, this means that you need a /25 mask, which is 255.255.255.128.
With a mask of 255.255.255.128, what you are actually doing is dividing the last octet of the network into two pieces.
10.1.1.0/25 - Includes all addresses from 10.1.1.0 to 10.1.1.127. All of these address have the MSB of their last octet equal to 0 (convert to binary and see).
10.1.1.128/25 - Includes all addresses from 10.1.1.128 to 10.1.1.255. All of these address have the MSB of their last octet equal to 1 (convert to binary and see).
Therefore, using a mask of 255.255.255.128, you have succeeded in splitting this prefix.
Hi everyone, I would like to thank you in advance for any help you can provide a newcomer like myself!
Im studying the 100-105 book by Odom and am currently on the topic of Port security. I purchased a used 2960 and I'm trying to follow a...
While deploying a number of 18xx/2802/3802 model access points (APs), which run AP-COS as their operating platform. It can be observed on some occasions that while many of their access points were able to join the fabric WLC withou...
I am going to design and build an LAN network under a tunnel underground with long distance between the switches.
I will have 2 Catalyst switches and 8 Industrial IE3000, and they will be connected with fiber.
For now I am planning on use Layer-2 s...