📄 interfaces
字号:
####################################################################### /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)## A "#" character in the very first column makes the rest of the line# be ignored. Blank lines are ignored. Lines may be indented freely.# A "\" character at the very end of the line indicates the next line# should be treated as a continuation of the current one.## The "noauto", "up", and "down" options are valid for all interfaces.# "up" and "down" may be specified multiple times, all other options# may only be specified once.####################################################################### We always want the loopback interface. Whether we want ifup/ifdown to# know about is another matter, perhaps.# iface lo inet loopback# An example ethernet card setup: (broadcast and gateway are optional)#iface eth0 inet static address 192.1.2.254 network 192.1.2.0 netmask 255.255.255.0 broadcast 192.1.2.255 up route add -net 192.0.1.0 netmask 255.255.255.0 gw 192.1.2.45 up route add -net 192.0.2.0 netmask 255.255.255.0 gw 192.1.2.23iface eth0:1 inet static address 192.1.2.129 network 192.1.2.0 netmask 255.255.255.0 broadcast 192.1.2.255iface eth0:2 inet static address 192.1.2.130 network 192.1.2.0 netmask 255.255.255.0 broadcast 192.1.2.255# okay, now add interfaces for when we are the default route for pieces# of the reverse name.iface eth0:3 inet static address 192.1.2.62 network 192.1.2.0 netmask 255.255.255.0 broadcast 192.1.2.255iface eth0:4 inet static address 192.1.2.30 network 192.1.2.0 netmask 255.255.255.0 broadcast 192.1.2.255iface eth0:5 inet static address 1.2.3.4 netmask 255.255.255.255iface eth0:7 inet static address 192.1.4.254 network 192.1.4.0 netmask 255.255.255.0 broadcast 192.1.4.255iface eth1 inet static address 192.1.3.254 network 192.1.3.0 netmask 255.255.255.0 broadcast 192.1.3.255iface eth2 inet static address 192.9.4.254 network 192.9.4.0 netmask 255.255.255.0 broadcast 192.9.4.255
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -