VMware ESXi中安装Vyatta实现虚拟路由器

Vyatta是linux下知名的开源路由器项目,在其官方的测试中性能甚至超过了cisco 7200系列路由器,可以支持RIP、OSPF、BGP等路由协议以及VPN、NAT、HA等特性。
 
我们的测试是希望在ESXi中安装Vyatta的虚拟机来替代cisco 1800和2800系列的路由器,或者作为cisco路由器的一个备份,测试的内容只有nat和trunk的支持。
 
1、首先从 [url]http://www.vyatta.com[/url]下载vyatta的安装ISO文件,在ESXi中新建一个虚拟机,分配2块网卡,将下载的ISO文件挂载为光驱。
2、在ESXi的配置中,将第2块网卡port group的vlan id改为4095
3、启动虚拟机,用缺省的用户名/密码 root/vyatta登陆系统
4、安装vyatta到硬盘上
install-system
5、进入配置模式
configure
6、配置系统名称
set system host-name vyatta-1
7、设置DNS
set system name-server x.x.x.x
8、设置缺省网关
set system gateway-address 10.0.0.1
9、定义外网接口IP地址
set interfaces ethernet eth0 address 10.0.0.2/24
10、定义内网口IP地址
    set interfaces ethernet eth1 vif 6 address 192.168.6.1/24
    set interfaces ethernet eth1 vif 7 address 192.168.7.1/24
    set interfaces ethernet eth1 vif 8 address 192.168.8.1/24
11、设置NAT策略
    set service nat rule 1 source address 192.168.0.0/16
    set service nat rule 1 outbound-interface eth0
    set service nat rule 1 type masquerade
12、保存和启用配置
     commit
     save

猜你喜欢

转载自bluefuture.iteye.com/blog/1056401