I am creating a stroller Virtualbox Centos virtual machine. I am setting up a public network.
config.vm.network :public_network, ip: "10.135.15.137"
How to set up GATEWAY with this?
Unfortunately, Vagrant does not currently support this.
But there are requests for its addition, for example, GH-2832 and GH-2389 . The latter also has some examples of providing a shell that you could use to make it work.
According to the (new) documentation, setting up the gateway, you can do it by specifying the following in the Vagrantfile:
# default router config.vm.provision "shell", run: "always", inline: "route add default gw 192.168.0.1"
Default Router http://docs.vagrantup.com/v2/networking/public_network.html.