[SFS] Ubuntu server with 2 IP addresses

Zachary Mance zachary.mance@gmail.com
Wed, 11 Oct 2017 17:11:30 -0600


--001a1143df6645a6bf055b4d8bc8
Content-Type: text/plain; charset="UTF-8"

What does your network script look like?

On Wed, Oct 11, 2017 at 2:58 PM, Zack Coffey <clickwir@gmail.com> wrote:

> Looks like someone with a Raspberry Pi had a similar sounding issue.
> https://raspberrypi.stackexchange.com/questions/
> 13359/where-does-my-secondary-ip-come-from
>
> Here's the solution they posted:
>
> # The issue was caused by a separate dhcp@network laying in
> /etc/systemd/system/
> # No clue where it came from, but deleting it solved my problem :)
>
> On Wed, Oct 11, 2017 at 2:32 PM, Corey <skiabq@gmail.com> wrote:
>
>> Hi Mr. Willson -
>>
>> Yes, it is persistant thru a reboot.
>>
>> Ip address delete removes both of them (even if I just specify the
>> dynamic IP), but a reboot restores them both.
>>
>> I have joined MatterMost as "n3rDy".
>>
>> Thanks
>>
>> Corey
>>
>> On 10/11/17, David L. Willson <DLWillson@thegeek.nu> wrote:
>> > Does it persist through a reboot?
>> >
>> > Does the undesired address come off, and stay off (for a long time), if
>> you
>> > 'ip address delete (it)'?
>> >
>> > It seems like this might take a few rounds of Q & T & A ... Maybe you
>> should
>> > come hang out with us in MatterMost:
>> > https://mattermost.sofree.us/signup_user_complete/?id=brmczf
>> xbrjr15ggn7rwtpwgthy
>> >
>> > --
>> > David L. Willson
>> > Teacher, Engineer, Evangelist
>> > COA LFCS CCAH RHCE CLP
>> > Mobile 720-333-LANS(5267)
>> > http://sofree.us
>> >
>> > This is a good time for a r3VOLution.
>> >
>> > ----- Original Message -----
>> >> Hopefully this message will get to everybody, I think I sent it to
>> >> the
>> >> right address . . . if not would somebody forward it to the brain
>> >> trust for me?
>> >>
>> >> Thanks in advance for any advice and or sarcasm offered ;-)
>> >>
>> >> I have an issue with an Ubuntu server that I just upgraded from 14.04
>> >> to 16.04 using the do-release-upgrade command. I know it is not
>> >> ideal,
>> >> but this was preferred over a clean install. Everything seemed to go
>> >> well, but now eth0 has 2 IP addresses, 1 dynamic (I don't need or
>> >> want) and 1 static, which is the actual one that I want. They are
>> >> both
>> >> working fine and I can SSH to the server on either address. How can I
>> >> turn off the 1 dynamic address?
>> >>
>> >> Here is my interfaces file:
>> >>
>> >> # The loopback network interface
>> >> auto lo
>> >> iface lo inet loopback
>> >>
>> >> # The primary network interface
>> >> auto eth0
>> >> iface eth0 inet static
>> >>         address 10.0.1.211
>> >>         netmask 255.255.255.0
>> >>         network 10.0.1.0
>> >>         broadcast 10.0.1.255
>> >>         gateway 10.0.1.254
>> >>         dns-nameservers 10.0.1.2 10.0.1.22
>> >>
>> >> Here is the result of "ip a", notice it shows both addresses, but
>> >> "ifconfig" that follows it only shows the dynamic one:
>> >>
>> >> srv:~$ ip a
>> >> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
>> >> group default
>> >>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>> >>     inet 127.0.0.1/8 scope host lo
>> >>        valid_lft forever preferred_lft forever
>> >>     inet6 ::1/128 scope host
>> >>        valid_lft forever preferred_lft forever
>> >> 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP
>> >> group default qlen 1000
>> >>     link/ether 00:50:56:85:7a:60 brd ff:ff:ff:ff:ff:ff
>> >>     inet 10.0.1.64/24 brd 10.0.1.255 scope global dynamic eth0
>> >>        valid_lft 258240sec preferred_lft 258240sec
>> >>     inet 10.0.1.211/24 brd 10.0.1.255 scope global secondary eth0
>> >>        valid_lft forever preferred_lft forever
>> >>     inet6 fe80::250:56ff:fe85:7a60/64 scope link
>> >>        valid_lft forever preferred_lft forever
>> >>
>> >>
>> >> srv:~$ ifconfig
>> >> eth0      Link encap:Ethernet  HWaddr 00:50:56:85:7a:60
>> >>           inet addr:10.0.1.64  Bcast:10.0.1.255  Mask:255.255.255.0
>> >>           inet6 addr: fe80::250:56ff:fe85:7a60/64 Scope:Link
>> >>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>> >>           RX packets:4454 errors:0 dropped:0 overruns:0 frame:0
>> >>           TX packets:348 errors:0 dropped:0 overruns:0 carrier:0
>> >>           collisions:0 txqueuelen:1000
>> >>           RX bytes:415570 (415.5 KB)  TX bytes:63700 (63.7 KB)
>> >>
>> >> lo        Link encap:Local Loopback
>> >>           inet addr:127.0.0.1  Mask:255.0.0.0
>> >>           inet6 addr: ::1/128 Scope:Host
>> >>           UP LOOPBACK RUNNING  MTU:65536  Metric:1
>> >>           RX packets:333 errors:0 dropped:0 overruns:0 frame:0
>> >>           TX packets:333 errors:0 dropped:0 overruns:0 carrier:0
>> >>           collisions:0 txqueuelen:0
>> >>           RX bytes:55712 (55.7 KB)  TX bytes:55712 (55.7 KB)
>> >> _______________________________________________
>> >> SFS mailing list
>> >> SFS@thegeek.nu
>> >> http://mailman.thegeek.nu/mailman/listinfo/sfs
>> >>
>> >
>> _______________________________________________
>> SFS mailing list
>> SFS@thegeek.nu
>> http://mailman.thegeek.nu/mailman/listinfo/sfs
>>
>
>

--001a1143df6645a6bf055b4d8bc8
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">What does your network script look like?</div><div class=
=3D"gmail_extra"><br><div class=3D"gmail_quote">On Wed, Oct 11, 2017 at 2:5=
8 PM, Zack Coffey <span dir=3D"ltr">&lt;<a href=3D"mailto:clickwir@gmail.co=
m" target=3D"_blank">clickwir@gmail.com</a>&gt;</span> wrote:<br><blockquot=
e class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc sol=
id;padding-left:1ex"><div dir=3D"ltr">Looks like someone with a Raspberry P=
i had a similar sounding issue.=C2=A0<a href=3D"https://raspberrypi.stackex=
change.com/questions/13359/where-does-my-secondary-ip-come-from" target=3D"=
_blank">https://raspberrypi.<wbr>stackexchange.com/questions/<wbr>13359/whe=
re-does-my-secondary-<wbr>ip-come-from</a><div><br></div><div>Here&#39;s th=
e solution they posted:</div><div><br></div><div># The issue was caused by =
a separate dhcp@network laying in <code>/etc/systemd/system/</code></div><d=
iv># No clue where it came from, but deleting it solved my problem :)</div>=
</div><div class=3D"HOEnZb"><div class=3D"h5"><div class=3D"gmail_extra"><b=
r><div class=3D"gmail_quote">On Wed, Oct 11, 2017 at 2:32 PM, Corey <span d=
ir=3D"ltr">&lt;<a href=3D"mailto:skiabq@gmail.com" target=3D"_blank">skiabq=
@gmail.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Mr. W=
illson -<br>
<br>
Yes, it is persistant thru a reboot.<br>
<br>
Ip address delete removes both of them (even if I just specify the<br>
dynamic IP), but a reboot restores them both.<br>
<br>
I have joined MatterMost as &quot;n3rDy&quot;.<br>
<br>
Thanks<br>
<span class=3D"m_-2000944543766494236HOEnZb"><font color=3D"#888888"><br>
Corey<br>
</font></span><div class=3D"m_-2000944543766494236HOEnZb"><div class=3D"m_-=
2000944543766494236h5"><br>
On 10/11/17, David L. Willson &lt;<a href=3D"mailto:DLWillson@thegeek.nu" t=
arget=3D"_blank">DLWillson@thegeek.nu</a>&gt; wrote:<br>
&gt; Does it persist through a reboot?<br>
&gt;<br>
&gt; Does the undesired address come off, and stay off (for a long time), i=
f you<br>
&gt; &#39;ip address delete (it)&#39;?<br>
&gt;<br>
&gt; It seems like this might take a few rounds of Q &amp; T &amp; A ... Ma=
ybe you should<br>
&gt; come hang out with us in MatterMost:<br>
&gt; <a href=3D"https://mattermost.sofree.us/signup_user_complete/?id=3Dbrm=
czfxbrjr15ggn7rwtpwgthy" rel=3D"noreferrer" target=3D"_blank">https://matte=
rmost.sofree.us/s<wbr>ignup_user_complete/?id=3Dbrmczf<wbr>xbrjr15ggn7rwtpw=
gthy</a><br>
&gt;<br>
&gt; --<br>
&gt; David L. Willson<br>
&gt; Teacher, Engineer, Evangelist<br>
&gt; COA LFCS CCAH RHCE CLP<br>
&gt; Mobile 720-333-LANS(5267)<br>
&gt; <a href=3D"http://sofree.us" rel=3D"noreferrer" target=3D"_blank">http=
://sofree.us</a><br>
&gt;<br>
&gt; This is a good time for a r3VOLution.<br>
&gt;<br>
&gt; ----- Original Message -----<br>
&gt;&gt; Hopefully this message will get to everybody, I think I sent it to=
<br>
&gt;&gt; the<br>
&gt;&gt; right address . . . if not would somebody forward it to the brain<=
br>
&gt;&gt; trust for me?<br>
&gt;&gt;<br>
&gt;&gt; Thanks in advance for any advice and or sarcasm offered ;-)<br>
&gt;&gt;<br>
&gt;&gt; I have an issue with an Ubuntu server that I just upgraded from 14=
.04<br>
&gt;&gt; to 16.04 using the do-release-upgrade command. I know it is not<br=
>
&gt;&gt; ideal,<br>
&gt;&gt; but this was preferred over a clean install. Everything seemed to =
go<br>
&gt;&gt; well, but now eth0 has 2 IP addresses, 1 dynamic (I don&#39;t need=
 or<br>
&gt;&gt; want) and 1 static, which is the actual one that I want. They are<=
br>
&gt;&gt; both<br>
&gt;&gt; working fine and I can SSH to the server on either address. How ca=
n I<br>
&gt;&gt; turn off the 1 dynamic address?<br>
&gt;&gt;<br>
&gt;&gt; Here is my interfaces file:<br>
&gt;&gt;<br>
&gt;&gt; # The loopback network interface<br>
&gt;&gt; auto lo<br>
&gt;&gt; iface lo inet loopback<br>
&gt;&gt;<br>
&gt;&gt; # The primary network interface<br>
&gt;&gt; auto eth0<br>
&gt;&gt; iface eth0 inet static<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0address 10.0.1.211<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0netmask 255.255.255.0<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0network 10.0.1.0<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0broadcast 10.0.1.255<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gateway 10.0.1.254<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0dns-nameservers 10.0.1.2 10.0.1.2=
2<br>
&gt;&gt;<br>
&gt;&gt; Here is the result of &quot;ip a&quot;, notice it shows both addre=
sses, but<br>
&gt;&gt; &quot;ifconfig&quot; that follows it only shows the dynamic one:<b=
r>
&gt;&gt;<br>
&gt;&gt; srv:~$ ip a<br>
&gt;&gt; 1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 65536 qdisc noqueue state =
UNKNOWN<br>
&gt;&gt; group default<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0link/loopback 00:00:00:00:00:00 brd 00:00:00:00=
:00:00<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0inet <a href=3D"http://127.0.0.1/8" rel=3D"nore=
ferrer" target=3D"_blank">127.0.0.1/8</a> scope host lo<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 valid_lft forever preferred_lft forever=
<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0inet6 ::1/128 scope host<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 valid_lft forever preferred_lft forever=
<br>
&gt;&gt; 2: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_<wbr>UP&gt; mtu 1500 qdi=
sc mq state UP<br>
&gt;&gt; group default qlen 1000<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0link/ether 00:50:56:85:7a:60 brd ff:ff:ff:ff:ff=
:ff<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0inet <a href=3D"http://10.0.1.64/24" rel=3D"nor=
eferrer" target=3D"_blank">10.0.1.64/24</a> brd 10.0.1.255 scope global dyn=
amic eth0<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 valid_lft 258240sec preferred_lft 25824=
0sec<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0inet <a href=3D"http://10.0.1.211/24" rel=3D"no=
referrer" target=3D"_blank">10.0.1.211/24</a> brd 10.0.1.255 scope global s=
econdary eth0<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 valid_lft forever preferred_lft forever=
<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0inet6 fe80::250:56ff:fe85:7a60/64 scope link<br=
>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 valid_lft forever preferred_lft forever=
<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; srv:~$ ifconfig<br>
&gt;&gt; eth0=C2=A0 =C2=A0 =C2=A0 Link encap:Ethernet=C2=A0 HWaddr 00:50:56=
:85:7a:60<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0inet addr:10.0.1.64=C2=A0 =
Bcast:10.0.1.255=C2=A0 Mask:255.255.255.0<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0inet6 addr: fe80::250:56ff=
:fe85:7a60/64 Scope:Link<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0UP BROADCAST RUNNING MULTI=
CAST=C2=A0 MTU:1500=C2=A0 Metric:1<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0RX packets:4454 errors:0 d=
ropped:0 overruns:0 frame:0<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0TX packets:348 errors:0 dr=
opped:0 overruns:0 carrier:0<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0collisions:0 txqueuelen:10=
00<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0RX bytes:415570 (415.5 KB)=
=C2=A0 TX bytes:63700 (63.7 KB)<br>
&gt;&gt;<br>
&gt;&gt; lo=C2=A0 =C2=A0 =C2=A0 =C2=A0 Link encap:Local Loopback<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0inet addr:127.0.0.1=C2=A0 =
Mask:255.0.0.0<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0inet6 addr: ::1/128 Scope:=
Host<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0UP LOOPBACK RUNNING=C2=A0 =
MTU:65536=C2=A0 Metric:1<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0RX packets:333 errors:0 dr=
opped:0 overruns:0 frame:0<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0TX packets:333 errors:0 dr=
opped:0 overruns:0 carrier:0<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0collisions:0 txqueuelen:0<=
br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0RX bytes:55712 (55.7 KB)=
=C2=A0 TX bytes:55712 (55.7 KB)<br>
&gt;&gt; ______________________________<wbr>_________________<br>
&gt;&gt; SFS mailing list<br>
&gt;&gt; <a href=3D"mailto:SFS@thegeek.nu" target=3D"_blank">SFS@thegeek.nu=
</a><br>
&gt;&gt; <a href=3D"http://mailman.thegeek.nu/mailman/listinfo/sfs" rel=3D"=
noreferrer" target=3D"_blank">http://mailman.thegeek.nu/mail<wbr>man/listin=
fo/sfs</a><br>
&gt;&gt;<br>
&gt;<br>
______________________________<wbr>_________________<br>
SFS mailing list<br>
<a href=3D"mailto:SFS@thegeek.nu" target=3D"_blank">SFS@thegeek.nu</a><br>
<a href=3D"http://mailman.thegeek.nu/mailman/listinfo/sfs" rel=3D"noreferre=
r" target=3D"_blank">http://mailman.thegeek.nu/mail<wbr>man/listinfo/sfs</a=
><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>

--001a1143df6645a6bf055b4d8bc8--