Static routing to an interface
-
Hi,
how i can create a static route to an interface. We have a broadcast subnet and on this interface many private and public ip addresses. those ips are directly on this interface reachable without gateway.
greets
-
The command is:
route add -net NETWORK/NETMASK -iface INTERFACE
Is there everythere a configuration mask. Or where i can add the lines for boot up.
-
We don't have a way to do that in the GUI at the moment (See http://redmine.pfsense.org/issues/972 )
You could use the shellcmd package to setup a startup command.
-
Pardon my ignorance but how can you route to a subnet on an interface without the router having an address in that subnet on that interface? And how can you add a gateway that's not in the same subnet as the interface address? You can bridge them, but how would routing work?
-
@KurianOfBorg:
Pardon my ignorance but how can you route to a subnet on an interface without the router having an address in that subnet on that interface? And how can you add a gateway that's not in the same subnet as the interface address? You can bridge them, but how would routing work?
By placing a route on the interface, it will do an ARP request to find the subnet there without having an IP in the same subnet. Sure, it's ugly, but it can work.
Expect more ugliness as IPv4 space gets more and more scarce. Already some datacenters and providers are doing this (gateway in a subnet outside of where your IP resides)
-
But what about the return path? Do the device it's talking to also need to support it?
-
Yep. They'd each need to know the other subnets are reachable via that same interface.