网络拓朴
多网卡跨网段通信VMware+KVM
多网卡跨网段通信VMware+KVM

实验环境:
真机:Windows VMware
Client1: 网卡ens33(桥接)
Client2: 网卡ens33(NAT)
KVM:网卡ens33,ens34
所有机器开启firewalld并设置Trusted默认区域:
[[email protected] ~]# firewall-cmd set-default-zone=trusted
操作:
Client1客户端
[[email protected]~]# route add -net 192.168.27.0/24 gw 192.168.1.133
[[email protected]~]# route add -net 192.168.122.0/24 gw 192.168.1.133
Client2客户端
[[email protected]~]# route add -net 192.168.122.0/24 gw 192.168.27.132
[[email protected]~]# route add -net 192.168.1.0/24 gw 192.168.27.132
KVM
[[email protected]~]# echo “net.ipv4.ip_forward = 1” >> /etc/sysctl.conf
[[email protected]~]# route add -net 192.168.1.0/24 gw 0.0.0.0 dev ens34
[[email protected]~]# route add -net 192.168.27.0/24 gw 0.0.0.0 dev ens33
[[email protected]~]# route add -net 192.168.122.0/24 gw 0.0.0.0 dev virbr0
[[email protected]~]# iptables -P INPUT ACCEPT
[[email protected]~]# iptables -P FORWARD ACCEPT
[[email protected]~]# iptables -t nat -A POSTROUTING -j MASQUERADE

测试(每台机器安装httpd服务进行测试)
Client2(192.168.27.128)请求Client1(192.168.1.200)、KVM(192.168.1.133)、node1(192.168.122.119)http服务
多网卡跨网段通信VMware+KVM


Client1(192.168.1.200)请求KVM(192.168.27.132)、node1(192.168.122.119)、node2(192.168.122.210)http服务
多网卡跨网段通信VMware+KVM


KVM(192.168.27.132)请求Client(192.168.1.200)、node1(192.168.122.119)、node2(192.168.122.210)http服务
多网卡跨网段通信VMware+KVM


node1请求Client(192.168.1.200)、KVM(192.168.27.132)、node2(192.168.122.210)http服务
多网卡跨网段通信VMware+KVM


node2同上

相关文章:

  • 2021-11-23
  • 2022-01-05
  • 2022-12-23
  • 2022-01-21
  • 2022-12-23
  • 2021-11-12
  • 2022-12-23
猜你喜欢
  • 2021-10-07
  • 2022-12-23
  • 2021-12-19
  • 2021-12-14
  • 2019-07-31
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案