network connectivity problem (ifconfig, arp, ...)

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

network connectivity problem (ifconfig, arp, ...)

vincent delft-2
Hello,

I'm running -current and enjoy the new "join" feature of hostname.if.

Nevertheless, I have sometime issues to have an  internet connection.

The context:
I have wifi and cable possibilities to connect the same network. Normaly I
prefer the network connection, so at my desk I plug the cable and use it.
But in some cases, I disconnect my laptop and use the wifi connection.

Problem:
The wifi is well connected to my nwid, but the connectivity is not working
(cannot ping my main firewall to connect internet).
I think the problem is linked to wrong arp table (cfr here under)

Why the arp entry for my firewall remains "expired" so long (could be more
than 10 minuntes) ?
Why a "doas arp -ad" does not remove this bad fw entry from the table ?
What could I do to solve the issue without rebooting the laptop ? (If I
reboot the laptop, this solve the problem).



e5450:~$ arp -a
Host                                 Ethernet Address    Netif Expire
Flags
fw                                   (incomplete)          em0 expired
192.168.3.15                         10:02:b5:83:40:41    iwm0 permanent l
192.168.3.16                         f8:ca:b8:50:84:15     em0 permanent l
Reply | Threaded
Open this post in threaded view
|

Re: network connectivity problem (ifconfig, arp, ...)

Stefan Sperling-5
On Mon, Sep 03, 2018 at 07:46:09PM +0200, vincent delft wrote:

> Hello,
>
> I'm running -current and enjoy the new "join" feature of hostname.if.
>
> Nevertheless, I have sometime issues to have an  internet connection.
>
> The context:
> I have wifi and cable possibilities to connect the same network. Normaly I
> prefer the network connection, so at my desk I plug the cable and use it.
> But in some cases, I disconnect my laptop and use the wifi connection.
>
> Problem:
> The wifi is well connected to my nwid, but the connectivity is not working
> (cannot ping my main firewall to connect internet).
> I think the problem is linked to wrong arp table (cfr here under)
>
> Why the arp entry for my firewall remains "expired" so long (could be more
> than 10 minuntes) ?
> Why a "doas arp -ad" does not remove this bad fw entry from the table ?
> What could I do to solve the issue without rebooting the laptop ? (If I
> reboot the laptop, this solve the problem).
>
>
>
> e5450:~$ arp -a
> Host                                 Ethernet Address    Netif Expire
> Flags
> fw                                   (incomplete)          em0 expired
> 192.168.3.15                         10:02:b5:83:40:41    iwm0 permanent l
> 192.168.3.16                         f8:ca:b8:50:84:15     em0 permanent l

Didn't we already discuss the same question back in July?
https://marc.info/?l=openbsd-misc&m=153220020618146&w=2

Again, try trunk(4).

Reply | Threaded
Open this post in threaded view
|

Re: network connectivity problem (ifconfig, arp, ...)

vincent delft-2
Hello stefan,

Hum... it could be similar situations.

I've found an article combining the "join" and the trunk: https://dataswamp.org/~solene/2018-08-30-openbsd-trunk.html

I'll do same setup and will see

Thanks.

V.







On 3 September 2018 20:26:27 CEST, Stefan Sperling <[hidden email]> wrote:

>On Mon, Sep 03, 2018 at 07:46:09PM +0200, vincent delft wrote:
>> Hello,
>>
>> I'm running -current and enjoy the new "join" feature of hostname.if.
>>
>> Nevertheless, I have sometime issues to have an  internet connection.
>>
>> The context:
>> I have wifi and cable possibilities to connect the same network.
>Normaly I
>> prefer the network connection, so at my desk I plug the cable and use
>it.
>> But in some cases, I disconnect my laptop and use the wifi
>connection.
>>
>> Problem:
>> The wifi is well connected to my nwid, but the connectivity is not
>working
>> (cannot ping my main firewall to connect internet).
>> I think the problem is linked to wrong arp table (cfr here under)
>>
>> Why the arp entry for my firewall remains "expired" so long (could be
>more
>> than 10 minuntes) ?
>> Why a "doas arp -ad" does not remove this bad fw entry from the table
>?
>> What could I do to solve the issue without rebooting the laptop ? (If
>I
>> reboot the laptop, this solve the problem).
>>
>>
>>
>> e5450:~$ arp -a
>> Host                                 Ethernet Address    Netif Expire
>> Flags
>> fw                                   (incomplete)          em0
>expired
>> 192.168.3.15                         10:02:b5:83:40:41    iwm0
>permanent l
>> 192.168.3.16                         f8:ca:b8:50:84:15     em0
>permanent l
>
>Didn't we already discuss the same question back in July?
>https://marc.info/?l=openbsd-misc&m=153220020618146&w=2
>
>Again, try trunk(4).

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Reply | Threaded
Open this post in threaded view
|

Re: network connectivity problem (ifconfig, arp, ...)

Alexander Hall
On Mon, Sep 03, 2018 at 10:58:49PM +0200, Vincent wrote:
> Hello stefan,
>
> Hum... it could be similar situations.
>
> I've found an article combining the "join" and the trunk: https://dataswamp.org/~solene/2018-08-30-openbsd-trunk.html

For me, it's as simple as this:

==> /etc/hostname.em0 <==
up

==> /etc/hostname.iwn0 <==
join wirelessnet wpakey foo
join anothernet wpakey bar
up

==> /etc/hostname.trunk0 <==
trunkproto failover
trunkport em0
trunkport iwn0
# You could hardcode a mac address here at will
#lladdr aa:bb:cc:dd:ee:ff
dhcp

/Alexander

>
> I'll do same setup and will see
>
> Thanks.
>
> V.
>
>
>
>
>
>
>
> On 3 September 2018 20:26:27 CEST, Stefan Sperling <[hidden email]> wrote:
> >On Mon, Sep 03, 2018 at 07:46:09PM +0200, vincent delft wrote:
> >> Hello,
> >>
> >> I'm running -current and enjoy the new "join" feature of hostname.if.
> >>
> >> Nevertheless, I have sometime issues to have an  internet connection.
> >>
> >> The context:
> >> I have wifi and cable possibilities to connect the same network.
> >Normaly I
> >> prefer the network connection, so at my desk I plug the cable and use
> >it.
> >> But in some cases, I disconnect my laptop and use the wifi
> >connection.
> >>
> >> Problem:
> >> The wifi is well connected to my nwid, but the connectivity is not
> >working
> >> (cannot ping my main firewall to connect internet).
> >> I think the problem is linked to wrong arp table (cfr here under)
> >>
> >> Why the arp entry for my firewall remains "expired" so long (could be
> >more
> >> than 10 minuntes) ?
> >> Why a "doas arp -ad" does not remove this bad fw entry from the table
> >?
> >> What could I do to solve the issue without rebooting the laptop ? (If
> >I
> >> reboot the laptop, this solve the problem).
> >>
> >>
> >>
> >> e5450:~$ arp -a
> >> Host                                 Ethernet Address    Netif Expire
> >> Flags
> >> fw                                   (incomplete)          em0
> >expired
> >> 192.168.3.15                         10:02:b5:83:40:41    iwm0
> >permanent l
> >> 192.168.3.16                         f8:ca:b8:50:84:15     em0
> >permanent l
> >
> >Didn't we already discuss the same question back in July?
> >https://marc.info/?l=openbsd-misc&m=153220020618146&w=2
> >
> >Again, try trunk(4).
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.

Reply | Threaded
Open this post in threaded view
|

Re: network connectivity problem (ifconfig, arp, ...)

Daniel Jakots-3
In reply to this post by vincent delft-2
On Mon, 03 Sep 2018 22:58:49 +0200, Vincent <[hidden email]>
wrote:

> I've found an article

It's always better to rely on the FAQ rather than on a third party
article who may have not kept the information up to date. It's not
always possible because not everything is in the FAQ but in this case,
it is:

https://www.openbsd.org/faq/faq6.html#Wireless

(scroll down a bit until "Trunking your wireless adapter")

Cheers,
Daniel

Reply | Threaded
Open this post in threaded view
|

Re: network connectivity problem (ifconfig, arp, ...)

vincent delft-2
In reply to this post by vincent delft-2
Re-hello,

The trunk is working fine at my office (between cable and wifi).
I will need more time to better evaluate it. But this sounds indeed
matching the need.

But

With this trunk now configured, I'm no more able to select the wifi at
customer site.
Indeed, at customer, I have 2 different nwid, and I'm used to switch from
one to the other via simple ifconfig commands.
When I will have time, I'll read some faq or man pages, to solve this
situation via few ifconfig commands.



In fact, I remain with my initial question:
why  arp having an entry with address "incomplete" on em0 does not perform
the task when iwm0 is triggered and request a connection to my firewall ?
The fw is running on the same address, just the path (netif) that change.


regards












On Mon, Sep 3, 2018 at 10:58 PM Vincent <[hidden email]> wrote:

> Hello stefan,
>
> Hum... it could be similar situations.
>
> I've found an article combining the "join" and the trunk:
> https://dataswamp.org/~solene/2018-08-30-openbsd-trunk.html
>
> I'll do same setup and will see
>
> Thanks.
>
> V.
>
>
>
>
>
>
>
> On 3 September 2018 20:26:27 CEST, Stefan Sperling <[hidden email]> wrote:
>>
>> On Mon, Sep 03, 2018 at 07:46:09PM +0200, vincent delft wrote:
>>
>>>  Hello,
>>>
>>>  I'm running -current and enjoy the new "join" feature of hostname.if.
>>>
>>>  Nevertheless, I have sometime issues to have an  internet connection.
>>>
>>>  The context:
>>>  I have wifi and cable possibilities to connect the same network. Normaly I
>>>  prefer the network connection, so at my desk I plug the cable and use it.
>>>  But in some cases, I disconnect my laptop and use the wifi connection.
>>>
>>>  Problem:
>>>  The wifi is well connected to my nwid, but the connectivity is not working
>>>  (cannot ping my main firewall to connect internet).
>>>  I think the problem is linked to wrong arp table (cfr here under)
>>>
>>>  Why the arp entry for my firewall remains "expired" so long (could be more
>>>  than 10 minuntes) ?
>>>  Why a "doas arp -ad" does not remove this bad fw entry from the table ?
>>>  What could I do to solve the issue without rebooting the laptop ? (If I
>>>  reboot the laptop, this solve the problem).
>>>
>>>
>>>
>>>  e5450:~$ arp -a
>>>  Host                                 Ethernet Address    Netif Expire
>>>  Flags
>>>  fw                                   (incomplete)          em0 expired
>>>  192.168.3.15                         10:02:b5:83:40:41    iwm0 permanent l
>>>  192.168.3.16                         f8:ca:b8:50:84:15     em0 permanent l
>>>
>>
>> Didn't we already discuss the same question back in July?
>> https://marc.info/?l=openbsd-misc&m=153220020618146&w=2
>>
>> Again, try trunk(4).
>>
>>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>
Reply | Threaded
Open this post in threaded view
|

Re: network connectivity problem (ifconfig, arp, ...)

Stefan Sperling-5
On Tue, Sep 04, 2018 at 09:35:38PM +0200, vincent delft wrote:
> In fact, I remain with my initial question:
> why  arp having an entry with address "incomplete" on em0 does not perform
> the task when iwm0 is triggered and request a connection to my firewall ?
> The fw is running on the same address, just the path (netif) that change.

Generally, having two interfaces in the same subnet is never a good idea
unless you really know what you are doing. So when you switch from em0 to
iwm0 and they both end up having addresses on the same IP network, then you
should delete the IP address from the interface which you aren't using:

        ifconfig em0 delete

IP addresses are managed by tools like ifconfig and dhclient, they are
not managed automatically by drivers such as em and iwm.
To change IP addresses you need to run commands; either manually or in
some automated way. For instance, you could configure ifstated(8) to run
ifconfig when the em0 interface goes down.