describing the usage of protocols for forwarded network ports.

This commit is contained in:
H "Waldo" Grunenwald 2013-10-08 10:58:32 -04:00
parent 0db87ff406
commit 050837090c
1 changed files with 15 additions and 0 deletions

View File

@ -28,6 +28,21 @@ end
This will allow acessing port 80 on the guest via port 8080 on the host.
## Forwarded Port Protocols
By default, any defined port will only forward the TCP protocol. As an optional
third parameter, you may specify `protocol: 'udp'` in order to pass UDP
traffic. If a given port needs to be able to listen to the same port on both
protocols, you must define the port twice with each protocol specified, like
so:
```
Vagrant.configure("2") do |config|
config.vm.network "forwarded_port", guest: 2003, host: 12003, protocol: 'tcp'
config.vm.network "forwarded_port", guest: 2003, host: 12003, protocol: 'udp'
end
```
## Port Collisions and Correction
It is common when running multiple Vagrant machines to unknowingly create