VMware vSphere Tanzu部署_05_vyos虛擬路由器部署

二乘八是十六發表於2024-07-03

1.VYOS虛擬路由器部署

1.1.VYOS虛擬路由器映象下載

  • 在此處可以下載VYOS虛擬路由器映象:https://vyos.net/get/nightly-builds/

1.2.VYOS虛擬路由器部署

  • 建立虛擬機器時,選擇debian10



  • vyos預設使用者名稱和密碼均為vyos





1.3.VYOS虛擬路由器介面配置

set interfaces ethernet eth0 address 192.168.201.1/24
set interfaces ethernet eth1 address 192.168.202.1/24
set interfaces ethernet eth2 address 192.168.203.1/24
set interfaces ethernet eth0 description 'mgmt'
set interfaces ethernet eth1 description 'workload'
set interfaces ethernet eth2 description 'fortend'

1.4.VYOS配置靜態路由

set protocols static route 0.0.0.0/0 next-hop 192.168.201.254

1.5.VYOS配置NAT

set nat source rule 50 translation address 192.168.200.0/22
set nat source rule 50 outbound-interface name "eth0"
set nat source rule 50 translation address 'masquerade'

1.6.VYOS配置DNS轉發

set system  name-server 10.22.1.2
set service dns forwarding listen-address 192.168.201.1
set service dns forwarding name-server 10.22.1.2
set service dns forwarding allow-from 192.168.200.0/22

1.7.VYOS開啟SSH服務

set service ssh port 22

1.8.VYOS應用配置並生效

commit
save

1.9.測試網路連通性

  • 測試fortend網路連通性

  • 測試workload網路連通性

相關文章