DNS配置
正向
反向
vCloud核心逻辑架构
vCloud-1配置
[root@vcloud-1 桌面]# vi/etc/iproute2/rt_tables
[root@vcloud-1 桌面]# vi/etc/rc.local
输入内容如下:
ip route add 10.0.1.0/24 via 10.0.1.24 deveth0 table dmz1
ip route add 127.0.0.0/8 dev lo table dmz1
ip route add default via 10.0.1.253 deveth0 table dmz1
ip route add 10.0.1.0/24 via 10.0.1.25 deveth1 table dmz2
ip route add 127.0.0.0/8 dev lo table dmz2
ip route add default via 10.0.1.253 deveth1 table dmz2
ip route add 192.168.10.0/24 via192.168.10.24 dev eth2 table mgt
ip route add 127.0.0.0/8 dev lo table mgt
ip route add default via 192.168.10.254 deveth2 table mgt
ip rule add from 10.0.1.24 table dmz1
ip rule add from 10.0.1.25 table dmz2
ip rule add from 192.168.10.24 table mgt
重启服务器,分别输入命令查看
[root@vcloud-1 桌面]# ip routelist table dmz1
[root@vcloud-1 桌面]# ip routelist table dmz2
[root@vcloud-1 桌面]# ip routelist table mgt
[root@vcloud-1 桌面]# ip rulelist
测试DNS和vCloud-1之间的网络连通
vCloud-2配置
[root@vcloud-2 桌面]# vi/etc/iproute2/rt_tables
[root@vcloud-2 桌面]# vi/etc/rc.local
输入内容如下:
ip route add 10.0.1.0/24 via 10.0.1.26 deveth0 table dmz1
ip route add 127.0.0.0/8 dev lo table dmz1
ip route add default via 10.0.1.253 deveth0 table dmz1
ip route add 10.0.1.0/24 via 10.0.1.27 deveth1 table dmz2
ip route add 127.0.0.0/8 dev lo table dmz2
ip route add default via 10.0.1.253 deveth1 table dmz2
ip route add 192.168.10.0/24 via192.168.10.26 dev eth2 table mgt
ip route add 127.0.0.0/8 dev lo table mgt
ip route add default via 192.168.10.254 deveth2 table mgt
ip rule add from 10.0.1.26 table dmz1
ip rule add from 10.0.1.27 table dmz2
ip rule add from 192.168.10.26 table mgt
重启服务器,分别输入命令查看
[root@vcloud-1 桌面]# ip routelist table dmz1
[root@vcloud-1 桌面]# ip routelist table dmz2
[root@vcloud-1 桌面]# ip routelist table mgt
[root@vcloud-1 桌面]# ip rulelist
测试DNS和vCloud-2之间的网络连通
网络环境准备完毕。