VmWare ubuntu 虚拟机网络设置

VmWare ubuntu 虚拟机网络设置



虚拟机配置,网卡一NAT模式,网卡二桥接模式;
编辑 -> 虚拟网络编辑器 查看NAT模式 网关为192.168.100.2;
编辑 -> 虚拟网络编辑器 配置桥接模式网卡,桥接到 无线网卡;

wyk@ubuntu:~$ ifconfig 
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.100.100  netmask 255.255.255.0  broadcast 192.168.100.255
        inet6 fe80::20c:29ff:fed6:a99b  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:d6:a9:9b  txqueuelen 1000  (Ethernet)
        RX packets 1400  bytes 139058 (139.0 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1942  bytes 280039 (280.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens38: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.7  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::2727:52bc:eb6f:8b32  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:d6:a9:a5  txqueuelen 1000  (Ethernet)
        RX packets 384  bytes 61301 (61.3 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 249  bytes 30654 (30.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 727  bytes 55430 (55.4 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 727  bytes 55430 (55.4 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wyk@ubuntu:~$ 
wyk@ubuntu:~$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto ens33
iface ens33 inet static
address 192.168.100.100
gateway 192.168.100.2
netmask 255.255.255.0

wyk@ubuntu:~$ 



posted @ 2022-05-24 23:13  王阳开  阅读(188)  评论(0)    收藏  举报