Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #184277 > unrolled thread
| Started by | Tom Browder <tom.browder@gmail.com> |
|---|---|
| First post | 2017-07-26 19:50 +0200 |
| Last post | 2017-07-31 23:20 +0200 |
| Articles | 11 — 5 participants |
Back to article view | Back to linux.debian.user
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
| From | Tom Browder <tom.browder@gmail.com> |
|---|---|
| Date | 2017-07-26 19:50 +0200 |
| Subject | Jessie networking with multiple IPs (IPv and IPv6), single physical NIC |
| Message-ID | <u7yBA-3lo-15@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Sven Hartge <sven@svenhartge.de> |
|---|---|
| Date | 2017-07-26 20:30 +0200 |
| Message-ID | <u7zei-3PM-15@gated-at.bofh.it> |
| In reply to | #184277 |
Tom Browder <tom.browder@gmail.com> wrote:
> 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
You don't need those up/down parts, you can add additional blocks for
eth0:
auto eth0
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
iface eth0 inet static
address 142.54.186.3
netmask 255.255.255.248
iface eth0 inet static
address 142.54.186.4
netmask 255.255.255.248
[...]
> 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
And the same here as well.
Grüße,
Sven.
--
Sigmentation fault. Core dumped.
[toc] | [prev] | [next] | [standalone]
| From | Georgi Naplatanov <gosho@oles.biz> |
|---|---|
| Date | 2017-07-26 21:10 +0200 |
| Subject | Re: Jessie networking with multiple IPs (IPv and IPv6), single physical NIC |
| Message-ID | <u7zQZ-4iw-1@gated-at.bofh.it> |
| In reply to | #184280 |
On 07/26/2017 09:22 PM, Sven Hartge wrote:
> Tom Browder <tom.browder@gmail.com> wrote:
>
>> 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
>
> You don't need those up/down parts, you can add additional blocks for
> eth0:
>
> auto eth0
> 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
>
I think that every additional interface should have suffix in its name -
eth0:1, et0:2, etc.
Example:
iface eth0:1 inet static
address 142.54.186.3
netmask 255.255.255.248
iface eth0:2 inet static
address 142.54.186.4
netmask 255.255.255.248
By the way Linux kernel supports virtual interfaces as well. I used this
feature when my local ISP forced me to use only one IPv4 address per MAC
address.
Kind regards
Georgi
> iface eth0 inet static
> address 142.54.186.3
> netmask 255.255.255.248
>
> iface eth0 inet static
> address 142.54.186.4
> netmask 255.255.255.248
> [...]
>
>
>> 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
>
> And the same here as well.
>
> Grüße,
> Sven.
>
[toc] | [prev] | [next] | [standalone]
| From | Sven Hartge <sven@svenhartge.de> |
|---|---|
| Date | 2017-07-26 21:20 +0200 |
| Message-ID | <u7A0F-4lW-13@gated-at.bofh.it> |
| In reply to | #184282 |
Georgi Naplatanov <gosho@oles.biz> wrote: > On 07/26/2017 09:22 PM, Sven Hartge wrote: >> Tom Browder <tom.browder@gmail.com> wrote: >> >>> 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 >> >> You don't need those up/down parts, you can add additional blocks for >> eth0: >> >> auto eth0 >> 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 >> > I think that every additional interface should have suffix in its name - > eth0:1, et0:2, etc. No. That was ages ago and only a workaround for the broken ifconfig, which is not able to cope with multiple IPv4 addresses per interface. Since Wheezy you can have multiple "iface eth0 ..." blocks in /e/n/interface without problems. Grüße, Sven -- Sigmentation fault. Core dumped.
[toc] | [prev] | [next] | [standalone]
| From | Tom Browder <tom.browder@gmail.com> |
|---|---|
| Date | 2017-07-26 21:30 +0200 |
| Subject | Re: Jessie networking with multiple IPs (IPv and IPv6), single physical NIC |
| Message-ID | <u7Aam-4qo-19@gated-at.bofh.it> |
| In reply to | #184283 |
On Wed, Jul 26, 2017 at 2:11 PM, Sven Hartge <sven@svenhartge.de> wrote:
> Georgi Naplatanov <gosho@oles.biz> wrote:
>> On 07/26/2017 09:22 PM, Sven Hartge wrote:
>>> Tom Browder <tom.browder@gmail.com> wrote:
>>> You don't need those up/down parts, you can add additional blocks for
>>> eth0:
>>>
>>> auto eth0
>>> 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
>>>
>
> Since Wheezy you can have multiple "iface eth0 ..." blocks in
> /e/n/interface without problems.
So can the above be simplified by leaving out the repeated info like
dns-nameservers, gateway, and netmask to give something like:
#=====================================
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
iface eth0 inet static
address 142.54.186.3
iface eth0 inet static
address 142.54.186.4
iface eth0 inet static
address 142.54.186.5
iface eth0 inet static
address 142.54.186.6
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
iface eth0 inet6 static
address 2604:4300:a:95::3
iface eth0 inet6 static
address 2604:4300:a:95::4
iface eth0 inet6 static
address 2604:4300:a:95::5
iface eth0 inet6 static
address 2604:4300:a:95::6
#=====================================
Thanks, Sven!
-Tom
[toc] | [prev] | [next] | [standalone]
| From | Sven Hartge <sven@svenhartge.de> |
|---|---|
| Date | 2017-07-26 22:50 +0200 |
| Message-ID | <u7BpM-583-15@gated-at.bofh.it> |
| In reply to | #184284 |
Tom Browder <tom.browder@gmail.com> wrote: > On Wed, Jul 26, 2017 at 2:11 PM, Sven Hartge <sven@svenhartge.de> wrote: > So can the above be simplified by leaving out the repeated info like > dns-nameservers, gateway, and netmask to give something like: > #===================================== > 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 > iface eth0 inet static > address 142.54.186.3 > iface eth0 inet static > address 142.54.186.4 > iface eth0 inet static > address 142.54.186.5 > iface eth0 inet static > address 142.54.186.6 I do believe you need the "netmask" option, but the rest is just needed once. But from reading interfaces(5) I think you further simplify by writing: ,---- | auto eth0 | iface eth0 inet static | address 142.54.186.2/29 | gateway 142.54.186.1 | dns-nameservers 192.187.107.16 69.30.209.16 | iface eth0 inet static | address 142.54.186.3/29 | iface eth0 inet static | address 142.54.186.4/29 | iface eth0 inet static | address 142.54.186.5/29 | iface eth0 inet static | address 142.54.186.6/29 `---- Grüße, Sven. -- Sigmentation fault. Core dumped.
[toc] | [prev] | [next] | [standalone]
| From | Tom Browder <tom.browder@gmail.com> |
|---|---|
| Date | 2017-07-27 00:50 +0200 |
| Subject | Re: Jessie networking with multiple IPs (IPv and IPv6), single physical NIC |
| Message-ID | <u7DhT-6kZ-3@gated-at.bofh.it> |
| In reply to | #184287 |
On Wed, Jul 26, 2017 at 3:43 PM, Sven Hartge <sven@svenhartge.de> wrote: > Tom Browder <tom.browder@gmail.com> wrote: >> On Wed, Jul 26, 2017 at 2:11 PM, Sven Hartge <sven@svenhartge.de> wrote: > >> So can the above be simplified by leaving out the repeated info like >> dns-nameservers, gateway, and netmask to give something like: > >> #===================================== >> 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 >> iface eth0 inet static >> address 142.54.186.3 >> iface eth0 inet static >> address 142.54.186.4 >> iface eth0 inet static >> address 142.54.186.5 >> iface eth0 inet static >> address 142.54.186.6 > > I do believe you need the "netmask" option, but the rest is just needed > once. But from reading interfaces(5) I think you further simplify by > writing: > > ,---- > | auto eth0 > | iface eth0 inet static > | address 142.54.186.2/29 > | gateway 142.54.186.1 > | dns-nameservers 192.187.107.16 69.30.209.16 > | iface eth0 inet static > | address 142.54.186.3/29 > | iface eth0 inet static > | address 142.54.186.4/29 > | iface eth0 inet static > | address 142.54.186.5/29 > | iface eth0 inet static > | address 142.54.186.6/29 > `---- Okay, sounds good: I don't need to duplicate anything, then. I admire your reading of man 5 interfaces. I find it very hard to understand since the pieces seem so disconnected, and, as usual, man pages are short on real examples. I'm ready to try the new file and I'll report results later. Thanks so much Sven. Best regards, -Tom BTW, my wife and I and two friends had a very nice time visiting Denmark in May while on a cruise in the Baltic celebrating our 50th wedding anniversary. Our ship, Holland-America's ms Rotterdam, visited Copenhagen and Arhus and we enjoyed them very much--especially Arhus.
[toc] | [prev] | [next] | [standalone]
| From | Tom Browder <tom.browder@gmail.com> |
|---|---|
| Date | 2017-07-27 03:40 +0200 |
| Subject | Re: Jessie networking with multiple IPs (IPv and IPv6), single physical NIC |
| Message-ID | <u7FWp-82k-7@gated-at.bofh.it> |
| In reply to | #184289 |
On Wed, Jul 26, 2017 at 5:42 PM, Tom Browder <tom.browder@gmail.com> wrote: > On Wed, Jul 26, 2017 at 3:43 PM, Sven Hartge <sven@svenhartge.de> wrote: ... >> ,---- >> | auto eth0 >> | iface eth0 inet static >> | address 142.54.186.2/29 >> | gateway 142.54.186.1 >> | dns-nameservers 192.187.107.16 69.30.209.16 >> | iface eth0 inet static >> | address 142.54.186.3/29 >> `---- Oops, I just looked at the ENTIRE active file and I forgot some lines at the top: #================================== # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eth0 iface eth0 inet static address 142.54.186.2 ... #================================== At any rate, I'm going to try the file (suitably modified) on a spare, local server I have before going live remotely. -Tom
[toc] | [prev] | [next] | [standalone]
| From | Curt <curty@free.fr> |
|---|---|
| Date | 2017-07-31 18:20 +0200 |
| Subject | Re: Jessie networking with multiple IPs (IPv and IPv6), single physical NIC |
| Message-ID | <u9lAe-8rv-19@gated-at.bofh.it> |
| In reply to | #184289 |
On 2017-07-26, Tom Browder <tom.browder@gmail.com> wrote: > > Thanks so much Sven. > > Best regards, > > -Tom > > BTW, my wife and I and two friends had a very nice time visiting > Denmark in May while on a cruise in the Baltic celebrating our 50th > wedding anniversary. Our ship, Holland-America's ms Rotterdam, > visited Copenhagen and Arhus and we enjoyed them very much--especially > Arhus. > Are you not confounding the de and dk domain suffixes, because I believe Sven is 'de' (Germany). Or maybe you know something I don't. Never heard of Arhus. 50th wedding anniversary. Do they give out medals for that? Or just voyages to exotic places? ;-) -- “Certitude is not the test of certainty.” --Oliver Wendell Holmes, Jr.
[toc] | [prev] | [next] | [standalone]
| From | Wilko Fokken <wfokken@web.de> |
|---|---|
| Date | 2017-07-31 20:10 +0200 |
| Subject | Re: Jessie networking with multiple IPs (IPv and IPv6), single physical NIC |
| Message-ID | <u9niG-167-11@gated-at.bofh.it> |
| In reply to | #184463 |
On Mon, Jul 31, 2017 at 04:17:24PM +0000, Curt wrote: > > Never heard of Arhus. Aarhus is the main town of Jutland, Danmark. -- "Certitude is not the test of certainty." --Oliver Wendell Holmes, Jr. & "Education is a man's going from cocksure ignorance to thoughtful uncertainty." (n.n.)
[toc] | [prev] | [next] | [standalone]
| From | Tom Browder <tom.browder@gmail.com> |
|---|---|
| Date | 2017-07-31 23:20 +0200 |
| Subject | Re: Jessie networking with multiple IPs (IPv and IPv6), single physical NIC |
| Message-ID | <u9qgx-2Se-11@gated-at.bofh.it> |
| In reply to | #184463 |
[Multipart message — attachments visible in raw view] — view raw
On Mon, Jul 31, 2017 at 11:18 Curt <curty@free.fr> wrote: ... > Are you not confounding the de and dk domain suffixes, because I believe > Sven is 'de' (Germany). You are certainly correct and I should have caught my error before sending. My apologies for any offended sensibilities. 50th wedding anniversary. Do they give out medals for that? No, but we got lots of congratulations for staying the course and remaining friends! -Tom
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web