[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ifupdown: dhcp & static ip



ср, 11 янв. 2023 г. в 06:27, <partonusis@gmail.com>:
Вот так точнее.
Должно работать.

auto eno2
iface eno2 inet dhcp

auto eno2:0
iface eno2:0 inet static
        address 1.1.1.1/32

Сие из эпохи sarge-зоя или около того. На настоящий момент инстансы не требуется указывать. Файл с примером /usr/share/doc/ifupdown/examples/network-interfaces.gz
 явным образом содержит указание, что можно одно имя пихать:

# Multiple addresses can be added by simply using multiple iface stanzas.
# This also allows you to add both IPv4 and IPv6 addresses to the same
# interface:
#
# auto eth0
# iface eth0 inet static
#    address 192.168.0.42/24
#    gateway 192.168.0.1
# iface eth0 inet static
#    address 172.16.0.1/24
# iface eth0 inet6 static
#    address fec0::42/64
#    gateway fec0::1

--
With best regards
  Maksim Dmitrichenko

Reply to: