wildcard routes
by IsThisThingOn from LinuxQuestions.org on (#5RQM2)
I have some multicast traffic I want to route where the 4th octet determines the differentiating/grouping portion of about 200+ addresses. To be more clear, the addresses are structured like this:
224.100.1.200
224.100.2.200
224.100.3.200
224.100.4.200....
224.100.1.201
224.100.2.201
224.100.3.201
224.100.4.201....
224.101.1.200
224.101.2.200
224.101.3.200
224.101.4.200....
224.101.1.201
224.101.2.201
224.101.3.201
224.101.4.201....
My goal is to route the IPs ending with:
.200 to one interface
.201 to another interface
I get how it makes more sense to have a more hierarchical approach where say the 3rd octet would be 200 or 201 and the 4th octet would be .1-253. But I have no control over the inbound addresses. The only way I can come up with that works is having 200+ individual routes. Or is there something like this that will work?
#all 200 traffic to eth1
route 224.100.0.200/? dev eth1
route 224.101.0.200/? dev eth1
#
#all 201 traffic to eth3
route 224.100.0.201/? dev eth3
route 224.101.0.201/? dev eth3
224.100.1.200
224.100.2.200
224.100.3.200
224.100.4.200....
224.100.1.201
224.100.2.201
224.100.3.201
224.100.4.201....
224.101.1.200
224.101.2.200
224.101.3.200
224.101.4.200....
224.101.1.201
224.101.2.201
224.101.3.201
224.101.4.201....
My goal is to route the IPs ending with:
.200 to one interface
.201 to another interface
I get how it makes more sense to have a more hierarchical approach where say the 3rd octet would be 200 or 201 and the 4th octet would be .1-253. But I have no control over the inbound addresses. The only way I can come up with that works is having 200+ individual routes. Or is there something like this that will work?
#all 200 traffic to eth1
route 224.100.0.200/? dev eth1
route 224.101.0.200/? dev eth1
#
#all 201 traffic to eth3
route 224.100.0.201/? dev eth3
route 224.101.0.201/? dev eth3