iface eth0 inet manual和iface eth0 inet static有什么区别?


20

iface eth0 inet manual和之间有什么区别iface eth0 inet static

谢谢

Answers:


17

iface eth0 inet static:为eth0定义一个静态IP地址

iface eth0 inet manual:创建根本没有IP地址的网络接口。通常由作为桥接或聚合成员的接口,或在其上配置了VLAN设备的接口使用

有关更多信息,请阅读:

看一下该文件/usr/share/doc/ifupdown/examples/network-interfaces.gz,您可以了解有关手册的更多信息以及要使用的某些情况:

# Set up an interface to read all the traffic on the network. This 
# configuration can be useful to setup Network Intrusion Detection
# sensors in 'stealth'-type configuration. This prevents the NIDS
# system to be a direct target in a hostile network since they have
# no IP address on the network. Notice, however, that there have been
# known bugs over time in sensors part of NIDS (for example see 
# DSA-297 related to Snort) and remote buffer overflows might even be
# triggered by network packet processing.
# 
# auto eth0
# iface eth0 inet manual
#   up ifconfig $IFACE 0.0.0.0 up
#       up ip link set $IFACE promisc on
#       down ip link set $IFACE promisc off
#       down ifconfig $IFACE down

# Set up an interface which will not be allocated an IP address by
# ifupdown but will be configured through external programs. This
# can be useful to setup interfaces configured through other programs,
# like, for example, PPPOE scripts.
#
# auto eth0
# iface eth0 inet manual
#       up ifconfig $IFACE 0.0.0.0 up
#       up /usr/local/bin/myconfigscript
#       down ifconfig $IFACE down

2
这里有更详细的解释。
Pablo Bianchi '18
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.