Some anomalous behaviour in trying to effect a browser login

Started by ajoeiam, September 13, 2023, 12:08:37 AM

Previous topic - Next topic
Greetings

Using opnsense 23.1.
running on a lenovo sff machine
trying to effect a log in from a laptop

laptop connected to a port extender so that the system will allow an eth0 to be setup and activated (extender includes a RJ-45 connection)
laptop eth0 is set to 192.168.1.100/24
opnsense says that it is lan 192.168.1.1 , wan xx.xx.xx.xxx/24 (direct connection into a small switch which is directly connected to the optical to electrical convertor)
plug in cable connection (into laptop)
ping laptop from router - - works
ping router from laptop - - - works
repeat both of above
check /etc/resolv.conf - - 127.0.0.1
start Firefox-esr
ask to connect to http://192.168.1.1 (from 192.168.1.100 working for ping in both directions just moments before)
opnsense box
    root@OPNsense:~ # ue0: link state changed to down

can no longer ping laptop from router
laptop can no longer ping router

when I exit root on OPNsense (to the console) there is no longer a ip addresses listed for the LAN (ue0)

is this a dns resolution issue?
something else?

please advise

The ue0 link state changed to down means according to OPN, it can no longer use the link, so all communication via it will fail, as you have experienced.
This is why these devices are not suitable for a network appliance.

Quote from: cookiemonster on September 13, 2023, 11:34:32 AM
The ue0 link state changed to down means according to OPN, it can no longer use the link, so all communication via it will fail, as you have experienced.
This is why these devices are not suitable for a network appliance.

Before purchase I had done some looking.

https://forums.freebsd.org/threads/what-is-the-best-usb-ethernet-adapter-driver-free-for-freebsd.85813/

Relatively recent material and the adapter that I bought is AX88179 based.
So according to FreeBSD this works.

Except OPN somehow decides that its never going to work.

I'm curious as to the reasoning as to why that needs to happen.

Please advise.

have you troubleshot it and confirmed it is OPN that is at fault?

Quote from: cookiemonster on September 13, 2023, 04:38:38 PM
have you troubleshot it and confirmed it is OPN that is at fault?

Well - - - - before I ask the browser on the laptop to take me to http://192.168.1.1
opn says that it has both a lan AND a wan address
(the wan address is quite similar to that in a parallel system)
I can ping the laptop from the router
I can ping the router from the laptop
as soon as I ask the browser to connect to http://192.168.1.1 (lan address given by opn (!!))
   the ue0 address flashes that it is down

at that point there is no connectivity (!!!!!!)

the only thing that entered the food chain was opn software
Please advise if there is another way of testing (short of buying another system for opn and another laptop).

what I mean is, whether the problem is the opn software or the hardware interaction with it.
you'd want to verify if possible. Any clues in dmesg ?
Do you have the option to add a pcie card to this machine? If yes, an intel based nic of two ports would be good.

Quote from: cookiemonster on September 13, 2023, 10:24:34 PM
what I mean is, whether the problem is the opn software or the hardware interaction with it.
you'd want to verify if possible. Any clues in dmesg ?
Do you have the option to add a pcie card to this machine? If yes, an intel based nic of two ports would be good.

In inverse order.
Its what I think is called a 1 liter box - - - absolutely no way to put any further cards in the box. Might be able to change the size of the ram and the ssd but that's the extent of the customization possible. (Pity I could see a lot of uses for this kind of box (low power consumption) if a second rj-45 port were possible.)

Tired another round (of this sad tale!!).

It was approximately 3 seconds (mental count) from hitting return in the firefox-esr address bar until the opn system flashed ue0 down.

(I have no even somewhat easy way to get the information from one monitor to this box so its called type it in(!!!).)
# dmesg | less   (last 13 lines (previous were about the mouse etc))
ure0 on uhub0
ure0:" <TP-link USB 10/100/1000 LAN, class 0/0, rev 3.00/30.00. addr 3> on usbus0
miibus0: <MII bus> on ure0
rgephy0: <RTL8251/8153 1000BASE-T media interface> PHY 0 on miibus0
rgephy0: none, 10baseT, 10base-=T-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto
ue0: <USB Ethernet> on ure0
ue0: Ehernet address: xx:xx:xx:xx:xx:xx
lo0: link state changed to UP
pflog0: permanently promiscuous mode enabled
em0: link state changed to DOWN
em0: link state changed to UP
em0: link state changed to UP
em0: link state changed to DOWN

(On linux I can used dmes -T and get times to go with the text of the changes - - - it doesn't work on freebsd - - sorry.
Dunno if the ipv6 address is part of the problem.
Searching its seems that FeeBSD 13.1 was supposed to be able to use the RTL series listed - - - again dunno for sure.
Spent a little time browsing the /var/log files - - - precious little there compared to linux imo.)

Over to you

without trying to set wrong expectations, some people do use realteks without problem, to a point.
You might want to try to have OPN use the vendor driver instead of the freebsd built in.
I can't search at present but search the forum for realtek driver, realtek module, realtek vendor, etc.
Only good if you can keep a connection stable enough to work with the system.
You do have another, non realtek nic, right? I guess there is a bult in nic, for WAN, if this is for LAN?
If yes, then you might need to work with that as LAN initially.

Quote from: cookiemonster on September 14, 2023, 06:09:15 PM
without trying to set wrong expectations, some people do use realteks without problem, to a point.
You might want to try to have OPN use the vendor driver instead of the freebsd built in.
I can't search at present but search the forum for realtek driver, realtek module, realtek vendor, etc.
Only good if you can keep a connection stable enough to work with the system.
You do have another, non realtek nic, right? I guess there is a bult in nic, for WAN, if this is for LAN?
If yes, then you might need to work with that as LAN initially.

C'est incroyable for me (this odyssey - - especially this last round) - - - so I changed the ports so that the lan port was on the intel nic and didn't even plug in the cable for wan.

Procedure:
setup cables on the opn box (as above)
started opn box
started laptop
setup eth0 to 192.168.1.100 (needs changing every time dunno why exactly but it wants to be on wlan real bad (I think!))
plugged in ethernet cable connection from the laptop to the opn box
can ping the laptop from the opn box
can NOT ping the opn box from the laptop
can not effect connection using firefox-esr

(I'm not surprised at the last part)
what was interesting is that dmesg (#dmesg | less) tells me that em0 was down - - -
that was with the console telling me it was up

I'm so far out of my depth on this networking that I have absolutely NO idea where to even look next.
I did try looking at ifconfig on the opn box trying to compare it to the same on my main box.
All I saw that was different was that dns was wanting to look for 0.0.0.0 on the opn box and
on my main system the router is where my local resolution is happening.
I had hoped to change that when I got to running the opn box but as that's not happening
not sure how to bring things closer to home.

This has become an expensive (2 different systems have been tried and found somehow not working
with opnsense) endeavor and there just isn't the budget to spend another few hundred dollars for a power
expensive solution or moving to slightly over $1k (can) for the 'official' box from deciso for their 'bottom
end' offerings.  That level of expenditure may be easier to swallow for others. Here - - - - well - - its just
not happening - - a different solution is just going to have to be found.

Thank you for your assistance - - - its likely been almost as frustrating for you as it has for me - - - its a
pity you couldn't just 'look over my shoulder' to facilitate something - - - I'd bet we could get something done.

Regards

Only read the thread diagonally - so could have missed something.


Disclaimer aside, I have a few questions:

Did you check in BIOS or any weird power management related settings ?

Were cables changed, replaced, and did you confirm there aren't any speed port negotiation issues ? You can set the NICs to 1GB full duplex on both sides.

Was the os-realtek-re driver installed ?

Quote from: newsense on September 17, 2023, 12:01:17 AM
Only read the thread diagonally - so could have missed something.


Disclaimer aside, I have a few questions:

Did you check in BIOS or any weird power management related settings ?

Were cables changed, replaced, and did you confirm there aren't any speed port negotiation issues ? You can set the NICs to 1GB full duplex on both sides.

Was the os-realtek-re driver installed ?

Just completed checks in bios and power management - - - can't see anything weird  - - - doesn't mean that there isn't but nothing that's obviously so.
All new cables as to the start of this odyssey.
No idea how to check for speed port negotiation issues - - - I am NOT any kind of networking guru.
Nics info suggests that everything is set for 1 GBit full duplex. (Don't have access to the best tools on all parts of my particlar system.
Don't know of a way to install the os-realtek-re driver until AFTER one has full connection to the opn system which is what is being worked on.

Over to you - -

TIA

I've been away a week. Just seeing this.
Sorry but is not very clear to me what the setup is for each interface and if you can establish a stable connection to OPN to be able to work on it.
Are you able to show the result of "ifconfig"