在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/Linux  網(wǎng)絡(luò)安全/ 關(guān)于ifconfig的一個(gè)疑問

關(guān)于ifconfig的一個(gè)疑問

最近在學(xué)習(xí)tcp/ip協(xié)議,在我的vagrant的虛擬機(jī)里面執(zhí)行

ifconfig

出現(xiàn)了如下的結(jié)果:

clipboard.png
其中enp0s3和lo我都明白代表的網(wǎng)絡(luò)。但是我不明白enp0s3代表哪個(gè)網(wǎng)絡(luò),求網(wǎng)絡(luò)協(xié)議和Linux大神指點(diǎn)!我的虛擬機(jī)是運(yùn)行在windows上的,linux發(fā)行版本是centos7.

下面是我的虛擬機(jī)的路由信息

clipboard.png
下面是我的vagrant的配置信息

# -*- mode: ruby -*-
# vi: set ft=ruby :

# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
  # The most common configuration options are documented and commented below.
  # For a complete reference, please see the online documentation at
  # https://docs.vagrantup.com.

  # Every Vagrant development environment requires a box. You can search for
  # boxes at https://atlas.hashicorp.com/search.
  config.vm.box = "newbox"

  # Disable automatic box update checking. If you disable this, then
  # boxes will only be checked for updates when the user runs
  # `vagrant box outdated`. This is not recommended.
  # config.vm.box_check_update = false

  # Create a forwarded port mapping which allows access to a specific port
  # within the machine from a port on the host machine. In the example below,
  # accessing "localhost:8080" will access port 80 on the guest machine.
  # config.vm.network "forwarded_port", guest: 80, host: 8080

  # Create a private network, which allows host-only access to the machine
  # using a specific IP.
  # config.vm.network "private_network", ip: "192.168.33.10"
  config.vm.network "private_network", ip: "192.168.33.34"

  # Create a public network, which generally matched to bridged network.
  # Bridged networks make the machine appear as another physical device on
  # your network.
  # config.vm.network "public_network"

  # Share an additional folder to the guest VM. The first argument is
  # the path on the host to the actual folder. The second argument is
  # the path on the guest to mount the folder. And the optional third
  # argument is a set of non-required options.
  # config.vm.synced_folder "../data", "/vagrant_data"
  config.vm.synced_folder "D:/phpStudy/WWW", "/vagrant"

  # Provider-specific configuration so you can fine-tune various
  # backing providers for Vagrant. These expose provider-specific options.
  # Example for VirtualBox:
  #
  # config.vm.provider "virtualbox" do |vb|
  #   # Display the VirtualBox GUI when booting the machine
  #   vb.gui = true
  #
  #   # Customize the amount of memory on the VM:
  #   vb.memory = "1024"
  # end
  #
  # View the documentation for the provider you are using for more
  # information on available options.

  # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
  # such as FTP and Heroku are also available. See the documentation at
  # https://docs.vagrantup.com/v2/push/atlas.html for more information.
  # config.push.define "atlas" do |push|
  #   push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
  # end

  # Enable provisioning with a shell script. Additional provisioners such as
  # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
  # documentation for more information about their specific syntax and use.
  # config.vm.provision "shell", inline: <<-SHELL
  #   sudo apt-get update
  #   sudo apt-get install -y apache2
  # SHELL
end

回答
編輯回答
挽歌

如果我沒有猜錯(cuò), 你用的是 VirtualBox 虛擬機(jī)引擎.

enp0s3(10.0.2.15) 這是 VirtualBox 的默認(rèn)網(wǎng)卡, 可透過宿主機(jī)(這里指你的 windows) 連接外網(wǎng). 沒有它虛擬機(jī)就上不了外網(wǎng)了. 它使用 NAT 模式, 你可以打開一個(gè) VirtualBox 虛擬機(jī)的網(wǎng)絡(luò)設(shè)置了解一下其他模式.

enp0s8(192.168.33.34) 是你配置的另一張網(wǎng)卡, 只能透過宿主機(jī)訪問.

2017年1月11日 10:20