1

I create 2 CentOS7 VM, one with 2 network adapter which including a NAT and a customer net2. Another CentOS7 VM connect only one adapter connect to customer net2, it can ping to the first CentOS VM, but can not ping to google.com, what did I miss?

The following is my configuration file:

First VM:

ens33 : flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu1500
        inet 192.168.59.129 netmask 255.255.255.0 broadcast 192.168.59.255
    ......
ens37 : flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu1500
    inet 192.168.10.128 netmask 255.255.255.0 broadcast 192.168.10.255
    ......

    DEVICE=ens33                       DEVICE=ens37
    BOOTPROTO=dhcp                      BOOTPROTO=static
    ONBOOT=yes                          ONBOOT=yes
    DEFROUTE=yes                        IPADDR=192.168.10.128
    PEERDNS=yes                         NETMASK=255.255.255.0
    TYPE=Ethernet                       TYPE=Ethernet
    ......                              DEFROUTE=yes

Second VM:

    ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu1500
    int 192.168.10.130 netmask 255.255.255.0 broadcast 192.168.10.255
    ......
    DEVICE=ens33
    BOOTPROTO=static
    ONBOOT=yes
    IPADDR=192.168.10.130
    NETMASK=255.255.255.0
    GATEWAY=192.168.10.128
    NM_Controlled=no

Ping: google.com : Temporary failure in name resolution

  • What should I configure for the /etc/resolv.conf file for client? is it the ip address same as the router VM or the ip address of the routerVM? – Ever Hw Apr 2 '18 at 0:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.