Re: ifupdown: dhcp & static ip

Maksim Dmitrichenko <[email protected]>
Newsgroups gmane.linux.debian.user.russian
Message-ID <CAMRqRqy5GqjEVcQbG6VWdwhjC=v6OrmtjvaX0NrDA1=+Q99+Yg@mail.gmail.com>
ср, 11 янв. 2023 г. в 06:27, <[email protected]>:

> Вот так точнее.
> Должно работать.
>
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.