* gateway is missing
@ 2014-03-24 20:45 Niklas Molin
2014-03-25 2:09 ` Otavio Salvador
2014-03-25 11:58 ` Gary Thomas
0 siblings, 2 replies; 7+ messages in thread
From: Niklas Molin @ 2014-03-24 20:45 UTC (permalink / raw)
To: meta-freescale@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 1022 bytes --]
Hi.
I'm trying to toggle the eth0 with ifconfig
I noticed that it I couldn't access my board after that.
After some more testing it seems like I can't access my board from a
different subnetwork.
So I did a route -nee (before and after eth0 down and up) and it seems lie
the gateway is gone.
root@imx6qsabresd:~# route -nee
Destination Gateway Genmask Flags MSS Window irtt
Iface
0.0.0.0 192.168.55.1 0.0.0.0 UG 0 0 0
eth0
192.168.55.0 0.0.0.0 255.255.255.0 U 0 0 0
eth0
root@imx6qsabresd:~# ifconfig eth0 down
root@imx6qsabresd:~# ifconfig eth0 up
When link is back:
root@imx6qsabresd:~# route -nee
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt
Iface
192.168.55.0 0.0.0.0 255.255.255.0 U 0 0 0
eth0
I did this on a SabreSD and also my custom board.
Is there anything I'm missing in my setup?
Best regards,
Niklas
[-- Attachment #2: Type: text/html, Size: 1339 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: gateway is missing
2014-03-24 20:45 gateway is missing Niklas Molin
@ 2014-03-25 2:09 ` Otavio Salvador
2014-03-25 3:05 ` Niklas Molin
2014-03-25 11:58 ` Gary Thomas
1 sibling, 1 reply; 7+ messages in thread
From: Otavio Salvador @ 2014-03-25 2:09 UTC (permalink / raw)
To: Niklas Molin; +Cc: meta-freescale@yoctoproject.org
Hello Niklas,
On Mon, Mar 24, 2014 at 5:45 PM, Niklas Molin <niklas.p.molin@gmail.com> wrote:
> I'm trying to toggle the eth0 with ifconfig
> I noticed that it I couldn't access my board after that.
> After some more testing it seems like I can't access my board from a
> different subnetwork.
> So I did a route -nee (before and after eth0 down and up) and it seems lie
> the gateway is gone.
>
> root@imx6qsabresd:~# route -nee
> Destination Gateway Genmask Flags MSS Window irtt
> Iface
> 0.0.0.0 192.168.55.1 0.0.0.0 UG 0 0 0
> eth0
> 192.168.55.0 0.0.0.0 255.255.255.0 U 0 0 0
> eth0
> root@imx6qsabresd:~# ifconfig eth0 down
> root@imx6qsabresd:~# ifconfig eth0 up
>
> When link is back:
> root@imx6qsabresd:~# route -nee
> Kernel IP routing table
> Destination Gateway Genmask Flags MSS Window irtt
> Iface
> 192.168.55.0 0.0.0.0 255.255.255.0 U 0 0 0
> eth0
>
> I did this on a SabreSD and also my custom board.
>
> Is there anything I'm missing in my setup?
Did you set your /etc/network/interfaces accordingly?
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: gateway is missing
2014-03-25 2:09 ` Otavio Salvador
@ 2014-03-25 3:05 ` Niklas Molin
2014-03-25 11:49 ` Otavio Salvador
0 siblings, 1 reply; 7+ messages in thread
From: Niklas Molin @ 2014-03-25 3:05 UTC (permalink / raw)
To: Otavio Salvador; +Cc: meta-freescale
[-- Attachment #1: Type: text/plain, Size: 1752 bytes --]
Hi Otavio.
It works after boot (gateway is set), but when I toggle (down and up) the
eth0 (changing HW address).
Then the gateway is cleared and I have to set it again.
Best regards,
Niklas
On Mar 24, 2014 7:09 PM, "Otavio Salvador" <otavio@ossystems.com.br> wrote:
> Hello Niklas,
>
> On Mon, Mar 24, 2014 at 5:45 PM, Niklas Molin <niklas.p.molin@gmail.com>
> wrote:
> > I'm trying to toggle the eth0 with ifconfig
> > I noticed that it I couldn't access my board after that.
> > After some more testing it seems like I can't access my board from a
> > different subnetwork.
> > So I did a route -nee (before and after eth0 down and up) and it seems
> lie
> > the gateway is gone.
> >
> > root@imx6qsabresd:~# route -nee
> > Destination Gateway Genmask Flags MSS Window irtt
> > Iface
> > 0.0.0.0 192.168.55.1 0.0.0.0 UG 0 0 0
> > eth0
> > 192.168.55.0 0.0.0.0 255.255.255.0 U 0 0 0
> > eth0
> > root@imx6qsabresd:~# ifconfig eth0 down
> > root@imx6qsabresd:~# ifconfig eth0 up
> >
> > When link is back:
> > root@imx6qsabresd:~# route -nee
> > Kernel IP routing table
> > Destination Gateway Genmask Flags MSS Window irtt
> > Iface
> > 192.168.55.0 0.0.0.0 255.255.255.0 U 0 0 0
> > eth0
> >
> > I did this on a SabreSD and also my custom board.
> >
> > Is there anything I'm missing in my setup?
>
> Did you set your /etc/network/interfaces accordingly?
>
> --
> Otavio Salvador O.S. Systems
> http://www.ossystems.com.br http://code.ossystems.com.br
> Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
>
[-- Attachment #2: Type: text/html, Size: 2511 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: gateway is missing
2014-03-25 3:05 ` Niklas Molin
@ 2014-03-25 11:49 ` Otavio Salvador
2014-03-25 14:00 ` Niklas Molin
0 siblings, 1 reply; 7+ messages in thread
From: Otavio Salvador @ 2014-03-25 11:49 UTC (permalink / raw)
To: Niklas Molin, Daiane Angolini; +Cc: meta-freescale@yoctoproject.org
On Tue, Mar 25, 2014 at 12:05 AM, Niklas Molin <niklas.p.molin@gmail.com> wrote:
> It works after boot (gateway is set), but when I toggle (down and up) the
> eth0 (changing HW address).
> Then the gateway is cleared and I have to set it again.
This is indeed confusing. Daiane, are you able to reproduce it?
Did you change your kernel somehow? Is it reproducible in SabreSD as well?
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: gateway is missing
2014-03-24 20:45 gateway is missing Niklas Molin
2014-03-25 2:09 ` Otavio Salvador
@ 2014-03-25 11:58 ` Gary Thomas
2014-03-25 12:07 ` Otavio Salvador
1 sibling, 1 reply; 7+ messages in thread
From: Gary Thomas @ 2014-03-25 11:58 UTC (permalink / raw)
To: meta-freescale
On 2014-03-24 14:45, Niklas Molin wrote:
> Hi.
>
> I'm trying to toggle the eth0 with ifconfig
> I noticed that it I couldn't access my board after that.
> After some more testing it seems like I can't access my board from a different subnetwork.
> So I did a route -nee (before and after eth0 down and up) and it seems lie the gateway is gone.
>
> root@imx6qsabresd:~# route -nee
> Destination Gateway Genmask Flags MSS Window irtt Iface
> 0.0.0.0 192.168.55.1 0.0.0.0 UG 0 0 0 eth0
> 192.168.55.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
> root@imx6qsabresd:~# ifconfig eth0 down
> root@imx6qsabresd:~# ifconfig eth0 up
>
> When link is back:
> root@imx6qsabresd:~# route -nee
> Kernel IP routing table
> Destination Gateway Genmask Flags MSS Window irtt Iface
> 192.168.55.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
>
> I did this on a SabreSD and also my custom board.
>
> Is there anything I'm missing in my setup?
When you run 'ifconfig eth0 down', not only is that interface marked
as 'down', but all routes which are based on it are deleted. When you
bring it back up with 'ifconfig eth0 up', the system has no idea that
you need any additional routing, etc. (In fact, it can't make any
assumptions about this at all).
I suspect that your interface (eth0) was originally brought up when
the system booted. To keep the same behaviour, you'll need to use
the same mechanism as that.
Try this:
# /etc/init.d/networking restart
Alternatively, you should use different commands to take the interface up/down.
Use 'ifdown eth0' instead of 'ifconfig eth0 down'
'ifup eth0' instead of 'ifconfig eth0 up'
These commands will respect the setup you have in /etc/network/interfaces where
the raw 'ifconfig' commands do not.
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: gateway is missing
2014-03-25 11:58 ` Gary Thomas
@ 2014-03-25 12:07 ` Otavio Salvador
0 siblings, 0 replies; 7+ messages in thread
From: Otavio Salvador @ 2014-03-25 12:07 UTC (permalink / raw)
To: Gary Thomas; +Cc: meta-freescale@yoctoproject.org
Hello Gary,
On Tue, Mar 25, 2014 at 8:58 AM, Gary Thomas <gary@mlbassoc.com> wrote:
> On 2014-03-24 14:45, Niklas Molin wrote:
>> I'm trying to toggle the eth0 with ifconfig
>> I noticed that it I couldn't access my board after that.
>> After some more testing it seems like I can't access my board from a different subnetwork.
>> So I did a route -nee (before and after eth0 down and up) and it seems lie the gateway is gone.
>>
>> root@imx6qsabresd:~# route -nee
>> Destination Gateway Genmask Flags MSS Window irtt Iface
>> 0.0.0.0 192.168.55.1 0.0.0.0 UG 0 0 0 eth0
>> 192.168.55.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
>> root@imx6qsabresd:~# ifconfig eth0 down
>> root@imx6qsabresd:~# ifconfig eth0 up
>>
>> When link is back:
>> root@imx6qsabresd:~# route -nee
>> Kernel IP routing table
>> Destination Gateway Genmask Flags MSS Window irtt Iface
>> 192.168.55.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
>>
>> I did this on a SabreSD and also my custom board.
>>
>> Is there anything I'm missing in my setup?
>
> When you run 'ifconfig eth0 down', not only is that interface marked
> as 'down', but all routes which are based on it are deleted. When you
> bring it back up with 'ifconfig eth0 up', the system has no idea that
> you need any additional routing, etc. (In fact, it can't make any
> assumptions about this at all).
>
> I suspect that your interface (eth0) was originally brought up when
> the system booted. To keep the same behaviour, you'll need to use
> the same mechanism as that.
>
> Try this:
> # /etc/init.d/networking restart
>
> Alternatively, you should use different commands to take the interface up/down.
> Use 'ifdown eth0' instead of 'ifconfig eth0 down'
> 'ifup eth0' instead of 'ifconfig eth0 up'
> These commands will respect the setup you have in /etc/network/interfaces where
> the raw 'ifconfig' commands do not.
I missed completely he were using ifconfig instead of ifup and ifdown.
Thanks for spotting it :-)
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: gateway is missing
2014-03-25 11:49 ` Otavio Salvador
@ 2014-03-25 14:00 ` Niklas Molin
0 siblings, 0 replies; 7+ messages in thread
From: Niklas Molin @ 2014-03-25 14:00 UTC (permalink / raw)
To: Otavio Salvador; +Cc: meta-freescale@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 984 bytes --]
Hi Otavio.
I can see this on my SabreSD board too.
When it comes to the kernel, I know I added spidev in defconfig. But I'll
check if there is anything else I added.
I can also try to make a clean build (no additional features etc.) and see
if I still see this behavior.
On Tue, Mar 25, 2014 at 4:49 AM, Otavio Salvador <otavio@ossystems.com.br>wrote:
> On Tue, Mar 25, 2014 at 12:05 AM, Niklas Molin <niklas.p.molin@gmail.com>
> wrote:
> > It works after boot (gateway is set), but when I toggle (down and up) the
> > eth0 (changing HW address).
> > Then the gateway is cleared and I have to set it again.
>
> This is indeed confusing. Daiane, are you able to reproduce it?
>
> Did you change your kernel somehow? Is it reproducible in SabreSD as well?
>
> --
> Otavio Salvador O.S. Systems
> http://www.ossystems.com.br http://code.ossystems.com.br
> Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
>
[-- Attachment #2: Type: text/html, Size: 1735 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-03-25 14:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-24 20:45 gateway is missing Niklas Molin
2014-03-25 2:09 ` Otavio Salvador
2014-03-25 3:05 ` Niklas Molin
2014-03-25 11:49 ` Otavio Salvador
2014-03-25 14:00 ` Niklas Molin
2014-03-25 11:58 ` Gary Thomas
2014-03-25 12:07 ` Otavio Salvador
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.