美文网首页
2021-09-26

2021-09-26

作者: less_sleep | 来源:发表于2021-09-26 18:12 被阅读0次

    virtualbox 上的虚拟机设置,先桥接

    [root@localhost network-scripts]# cat ifcfg-enp0s3
    TYPE=Ethernet
    PROXY_METHOD=none
    NETMASK=255.255.255.0
    IPADDR=192.168.43.88
    BROADCAST=192.168.43.255
    GATEWAY=192.168.43.110
    BROWSER_ONLY=no
    BOOTPROTO=none
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=no
    IPV6INIT=yes
    IPV6_AUTOCONF=yes
    IPV6_DEFROUTE=yes
    IPV6_FAILURE_FATAL=no
    IPV6_ADDR_GEN_MODE=stable-privacy
    NAME=enp0s3
    UUID=88ed467d-91f4-4e8b-adcf-e8f4379bc35e
    DEVICE=enp0s3
    ONBOOT=yes
    DNS1=192.168.43.110
    DNS2=8.8.8.8

    192.168.43.110 是主机的dns 使用route 命令获取

    lingzhang@lingzhang-e470:~/.config$ route
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    default 192.168.43.110 0.0.0.0 UG 600 0 0 wlp5s0
    192.168.43.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp5s0

    [root@localhost network-scripts]# cat /etc/resolv.conf

    Generated by NetworkManager

    nameserver 192.168.43.110
    nameserver 8.8.8.8

    相关文章

      网友评论

          本文标题:2021-09-26

          本文链接:https://www.haomeiwen.com/subject/uotcnltx.html