Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #184277

Jessie networking with multiple IPs (IPv and IPv6), single physical NIC

From Tom Browder <tom.browder@gmail.com>
Newsgroups linux.debian.user
Subject Jessie networking with multiple IPs (IPv and IPv6), single physical NIC
Date 2017-07-26 19:50 +0200
Message-ID <u7yBA-3lo-15@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Last year I successfully modified /etc/network/interfaces on my remote
debian 8 server to handle multiple IPv4 addresses on a single NIC, and
now I want to add its IPv6 capability.

But, before I do, I would like to show you my proposed new interfaces
file for comment and to make sure I don't break my server:

My hosting service has provisioned my server with the following IP
address information:

dns-nameservers 192.187.107.16 69.30.209.16

IPv4:
===
Gateway: 142.54.186.1
Subnet Mask: 255.255.255.248
assigned 142.54.186.2/29 which results in five addresses:
142.54.186.2
142.54.186.3
142.54.186.4
142.54.186.5
142.54.186.6

IPv6:
===
Gateway: 2604:4300:a:95::1
Subnet Mask: ffff:ffff:ffff:ffff::
assigned 2604:4300:a:95::2/64 and I will use the following five addresses:
2604:4300:a:95::2
2604:4300:a:95::3
2604:4300:a:95::4
2604:4300:a:95::5
2604:4300:a:95::6

The proposed /etc/network/interfaces file:
# begin =============================
iface eth0 inet static
        address 142.54.186.2
        netmask 255.255.255.248
        gateway 142.54.186.1
        dns-nameservers 192.187.107.16 69.30.209.16

        # add new IPv4 devices
        up   addr add 142.54.186.3/29 dev $IFACE label $IFACE:0
        down addr del 142.54.186.3/29 dev $IFACE label $IFACE:0

        up   addr add 142.54.186.4/29 dev $IFACE label $IFACE:1
        down addr del 142.54.186.4/29 dev $IFACE label $IFACE:1

        up   addr add 142.54.186.5/29 dev $IFACE label $IFACE:2
        down addr del 142.54.186.5/29 dev $IFACE label $IFACE:2

        up   addr add 142.54.186.6/29 dev $IFACE label $IFACE:3
        down addr del 142.54.186.6/29 dev $IFACE label $IFACE:3

iface eth0 inet6 static
        address 2604:4300:a:95::2
        netmask ffff:ffff:ffff:ffff::
        gateway 2604:4300:a:95::1
        dns-nameservers 192.187.107.16 69.30.209.16

        # add new IPv4 devices
        up   addr add 2604:4300:a:95::3/64 dev $IFACE label $IFACE:4
        down addr del 2604:4300:a:95::3/64 dev $IFACE label $IFACE:4

        up   addr add 2604:4300:a:95::4/64 dev $IFACE label $IFACE:5
        down addr del 2604:4300:a:95::4/64 dev $IFACE label $IFACE:5

        up   addr add 2604:4300:a:95::5/64 dev $IFACE label $IFACE:6
        down addr del 2604:4300:a:95::5/64 dev $IFACE label $IFACE:6

        up   addr add 2604:4300:a:95::6/64 dev $IFACE label $IFACE:7
        down addr del 2604:4300:a:95::6/64 dev $IFACE label $IFACE:7
# end =============================

Thanks for your help.

Best regards,

-Tom

Back to linux.debian.user | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Jessie networking with multiple IPs (IPv and IPv6), single physical NIC Tom Browder <tom.browder@gmail.com> - 2017-07-26 19:50 +0200
  Re: Jessie networking with multiple IPs (IPv and IPv6), single physical NIC Sven Hartge <sven@svenhartge.de> - 2017-07-26 20:30 +0200
    Re: Jessie networking with multiple IPs (IPv and IPv6), single  physical NIC Georgi Naplatanov <gosho@oles.biz> - 2017-07-26 21:10 +0200
      Re: Jessie networking with multiple IPs (IPv and IPv6), single physical NIC Sven Hartge <sven@svenhartge.de> - 2017-07-26 21:20 +0200
        Re: Jessie networking with multiple IPs (IPv and IPv6), single  physical NIC Tom Browder <tom.browder@gmail.com> - 2017-07-26 21:30 +0200
          Re: Jessie networking with multiple IPs (IPv and IPv6), single physical NIC Sven Hartge <sven@svenhartge.de> - 2017-07-26 22:50 +0200
            Re: Jessie networking with multiple IPs (IPv and IPv6), single  physical NIC Tom Browder <tom.browder@gmail.com> - 2017-07-27 00:50 +0200
              Re: Jessie networking with multiple IPs (IPv and IPv6), single  physical NIC Tom Browder <tom.browder@gmail.com> - 2017-07-27 03:40 +0200
              Re: Jessie networking with multiple IPs (IPv and IPv6), single  physical NIC Curt <curty@free.fr> - 2017-07-31 18:20 +0200
                Re: Jessie networking with multiple IPs (IPv and IPv6), single  physical NIC Wilko Fokken <wfokken@web.de> - 2017-07-31 20:10 +0200
                Re: Jessie networking with multiple IPs (IPv and IPv6), single  physical NIC Tom Browder <tom.browder@gmail.com> - 2017-07-31 23:20 +0200

csiph-web