/etc/interfaces里"physical interface"和"logical interface"的区别?

最大的社区版本,Ubuntu的发源地
回复
科学之子
帖子: 2284
注册时间: 2013-05-26 6:58
系统: Debian 9

/etc/interfaces里"physical interface"和"logical interface"的区别?

#1

帖子 科学之子 » 2017-03-29 15:30

/etc/interfaces里"physical interface"和"logical interface"的区别?
man interfaces:

代码: 全选

Lines beginning with the word "auto" are used to identify the physical interfaces to be brought up when ifup is run with the -a option.  (This option is  used  by  the
       system  boot  scripts.)   Physical interface names should follow the word "auto" on the same line.  There can be multiple "auto" stanzas.  ifup brings the named inter‐
       faces up in the order listed.

代码: 全选

Stanzas  defining  logical interfaces start with a line consisting of the word "iface" followed by the name of the logical interface.  In simple configurations without
       mapping stanzas this name should simply be the name of the physical interface to which it is to be applied.  (The default mapping script is, in effect, the  echo  com‐
       mand.)   The  interface  name is followed by the name of the address family that the interface uses.  This will be "inet" for TCP/IP networking, but there is also some
       support for IPX networking ("ipx"), and IPv6 networking ("inet6").  Following that is the name of the method used to configure the interface.
但我的interfaces内容:

代码: 全选

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# PPPoE connection
auto provider
iface provider inet ppp
	pre-up /sbin/ifconfig eth0 up
	provider provider
好像配置文件中的auto后面的不是"physical"?
为何man里又要求是physical?
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: /etc/interfaces里"physical interface"和"logical interface"

#2

帖子 poloshiao » 2017-03-29 19:33

/etc/interfaces
/etc/network/interfaces ?
"physical interface"和"logical interface"的区别
http://qref.sourceforge.net/Debian/refe ... ay.en.html
10.6.2 High level network configuration using ifupdown logical interface definitions
In the following it will be important for the reader to understand the difference between a physical interface and a logical interface.
The iface definitions in /etc/network/interfaces are actually definitions of logical interfaces, not of physical interfaces.
回复