Re: Best USB NIC for obsd7.2

2023-01-09 Thread Sriranga Veeraraghavan


> On Jan 9, 2023, at 17:34, Nenhum_de_Nos  wrote:
> 
>> Which 1Gbit USB 3.0A NIC is performing best with obsd 7.2?
>> 
>> I am aware of the hardware list, but I am asking personal experience from
>> users in here
>> 
>> Regards, Lars.
>> 
> 
> Hi Lars,
> 
> I cannot tell much about network performance (I remember it not reaching
> close to 1 Gbps), but I can tell about stability. This box is not yet
> upgraded to 7.2, but I have it running for quite some time, upgraded since
> at least 7.0 on a RPi 4B 4GB.
> 
> axen0 at uhub0 port 3 configuration 1 interface 0 "ASIX Elec. Corp.
> AX88179" rev 3.00/1.00 addr 3
> axen0: AX88179, address xxx
> rgephy0 at axen0 phy 3: RTL8169S/8110S/8211 PHY, rev. 5
> 
> It's a Trendnet TU3-ETG/EUNL USB 3.0
> 
> matheus
> 
> 

Hi Lars,

I have a Anker USB-C to 1GB ethernet adapter (Model A8341 - 
https://us.anker.com/products/a8341) that I use with my Surface Go 2 running 
OpenBSD 7.2.  It uses the ure(4) Realtek driver. The adapter generally seems 
stable and reliable whenever I use it, but I have not tested its performance.

Thanks,

-ranga




Re: Best USB NIC for obsd7.2

2023-01-09 Thread Nenhum_de_Nos
> Which 1Gbit USB 3.0A NIC is performing best with obsd 7.2?
>
> I am aware of the hardware list, but I am asking personal experience from
> users in here
>
> Regards, Lars.
>

Hi Lars,

I cannot tell much about network performance (I remember it not reaching
close to 1 Gbps), but I can tell about stability. This box is not yet
upgraded to 7.2, but I have it running for quite some time, upgraded since
at least 7.0 on a RPi 4B 4GB.

axen0 at uhub0 port 3 configuration 1 interface 0 "ASIX Elec. Corp.
AX88179" rev 3.00/1.00 addr 3
axen0: AX88179, address xxx
rgephy0 at axen0 phy 3: RTL8169S/8110S/8211 PHY, rev. 5

It's a Trendnet TU3-ETG/EUNL USB 3.0

matheus




Re: sndio and bit perfect playback

2023-01-09 Thread Geoff Steckel

The math goes back to Shannon and sampling theory:

Any time you remove significant digits you remove information.
One interpretation is that you introduce noise.
Period. The math says so.
The math says what the resulting power is.

You have the option to determine where the noise goes.

If you do nothing the noise is correlated with the input
signal. You get what in audio terms is intermodulation
distortion. In the simplest case this is harmonic distortion.

You can spread the noise by applying digital transforms.
You -cannot- remove it entirely.
The easiest and most common method is dithering
which spreads the power over the (audio) spectrum.
That result can be white, pink etc.

People are very sensitive to intermodulation distortion.
Less sensitive to harmonic distortion.
  (People who like vacuum tubes and vinyl -like-
   second harmonic distortion = "rich sound" )
Very less sensitive to random noise.
Even less to mostly-random noise outside of 1KHz-5KHz or so.

Some of the standard minimal tests of audio equipment translated
to the digital domain:

Run FFTs with sufficient accuracy on the following
(double precision at least for good results):
  (a) a precise sine wave (32 bits or better) truncated to 24 and 16 bits
  testing harmonic distortion (usually 1KHz)

  (b) two sines (usually 1KHz and 7KHz) testing intermodulation distortion

  (c) (a) and (b) resampled (96 to 48, 48 to 44.1, etc.) and
  resampled 24 to 16 testing purely digital distortion

Decide for yourself if the results are significant for your use.

If you read the sox(1) man page you'll notice that it computes
in 32 bits and applies dithering -by default- when truncating to
the output sample width. You can defeat it if you want and
wish to accept the result.



IKEv1 and IKEv2 coexistence

2023-01-09 Thread jean-yves boisiaud
Hello,

I have an OpenBSD firewall running IPSEc with IKEv1.

As said here https://marc.info/?l=openbsd-misc=163819895506660=2
isakmpd cannot coexist with IKEv2.

But I have several IPs, could I use one IP for IKEv1 and  another one for
IKEv2 ?

I'm running OpenBSD 7.1.

Thank you for your help.

-- 
Jean-Yves Boisiaud - Alcor Consulting
49, rue du Chemin Vert
49300 Cholet
mobile : +33 6 63 71 73 46


Re: sndio and bit perfect playback

2023-01-09 Thread Jan Stary
On Jan 09 13:10:09, euryd...@riseup.net wrote:
> > > aucat(1) currently says
> > > 
> > >   BUGS
> > >Resampling is low quality.
> > > 
> > > Is this still considered to be the case?
> > 
> > IMO, it doesn't deserve the BUGS section anymore, I'll remove this
> > sentence. Objections?
> 
> Although I need to finalize the Perl script I was using to do this (life gets
> busy), in practice I was able to distinguish between samples created by
> audio/sox and aucat(1) in informal AB/X testing on my 7th generation X1 Carbon
> with HiFiMan Sundara headphones plugged in. To describe the circumstances +
> outcome briefly: 9 out of 10 correct in 10 trials; randomly sampling from an
> array containing the givens A and B to get an unknown X; comparing 15 seconds 
> of
> audio; audio/sox as the playback software. In the future, I would do >=16
> trials, and perhaps conduct the tests from my desktop instead since it has a
> discrete amp and DAC.
> 
> In offline resampling from 48kHz to 44.1kHz, the highs were most affected and
> that's what I was able to use to distinguish between samples. The percussion,
> especially the cymbals, sounded different in particular because the clip
> resampled by aucat had cymbal crashes that seemed to 'shimmer' much less (the
> decay was more rapid). The spectrograms seemed to confirm that the highs were
> most affected. 
> 
> Whether that means "low quality resampling" or merely that the results of the
> two commands can be differentiated is something I'm uncertain of. Either way, 
> I
> don't know enough about C or sndio internals to be useful in that domain yet. 
> As
> an aside, I did find this to be a useful resource for learning about digital
> audio resampling, and they recommend audio/sox there.
> 
> https://ccrma.stanford.edu/~jos/resample/
> 
> I hadn't said anything about this earlier because I wanted to take the time to
> finish + document the script, reproduce my results with a royalty free sample 
> at
> a greater trial count, and then post. Given that I haven't done so yet, I can 
> at
> least post the commands used to resample the audio for those that are
> interested.
> 
> 
> # This was originally an opus file downloaded with www/yt-dlp.
> # Converting to WAV so both SoX and aucat can work with it.
> $ opusdec input.{opus,wav}

Can you please point to the specific opus file,
so that I can reproduce exactly what you have done?

> # Resample 16-bit 48kHz WAV file to 44.1kHz using both SoX and aucat(1).
> #
> # If I recall correctly, I converted to FLAC here because the WAV headers
> # generated by aucat and SoX differed, and so SoX would refuse to play WAV 
> files
> # created by aucat.

That would be a bug in itself.
How exactly does SoX refuse to play the WAVs created by aucat?

> $ sox -G input.wav -t wav - rate -v 44100 | flac - -o output-sox.flac
> $ aucat -i input.wav -h wav -r 44100 -e s16 -o - | flac - -o output-aucat.flac

sox dithers by default; can you try with sox -D
to see of the results are more similar?

> # Generate spectrograms for later inspection/comparison.
> $ sox output-sox.flac -n spectrogram -o spectrogram-sox.png
> $ sox output-aucat.flac -n spectrogram -o spectrogram-aucat.png
> 
> I'd certainly be interested in the ability to play audio in a way
> that avoids resampling altogether,

If you have a 48kHz file, and your audio device can only do 44100,
then you have to resample, no way around it.

> similar to what a user can do on FreeBSD with the
> following sysctl tweaks:
> 
> # sysctl hw.snd.maxautovchans=0 dev.pcm.0.bitperfect=1
> 
> https://www.freebsd.org/cgi/man.cgi?query=sound=FreeBSD+13.1-RELEASE=html

It's off topis of course, but What is dev.pcm.%d.bitperfect gonna do
if the sample rate (or some other characteristics) is not what the device
itself supports? As in e.g. $ play -r 12345 -c 3 -n synth 10



Re: sndio and bit perfect playback

2023-01-09 Thread Ashlen
On 23/01/09 06:22, Alexandre Ratchov wrote:
> On Sun, Jan 08, 2023 at 10:56:31PM +0100, Jan Stary wrote:
> > On Oct 16 08:18:17, a...@caoua.org wrote:
> > > On Sat, Oct 15, 2022 at 10:03:52PM +0200, Åke Nordin wrote:
> > > > On 10/14/22 11:21, Alexandre Ratchov wrote:
> > > > > Here are the measures of the aliasing noise using sine sweeps. Check
> > > > > the figure for the 44.1kHz to 48kH conversion, the sndiod column:
> > > > > 
> > > > > https://arverb.com/pub/src/
> > 
> > 
> > aucat(1) currently says
> > 
> > BUGS
> >  Resampling is low quality.
> > 
> > Is this still considered to be the case?
> > 
> 
> IMO, it doesn't deserve the BUGS section anymore, I'll remove this
> sentence. Objections?

Not necessarily an objection, but I've been watching this thread silently since
it started and wanted to voice some of my thoughts. 

Although I need to finalize the Perl script I was using to do this (life gets
busy), in practice I was able to distinguish between samples created by
audio/sox and aucat(1) in informal AB/X testing on my 7th generation X1 Carbon
with HiFiMan Sundara headphones plugged in. To describe the circumstances +
outcome briefly: 9 out of 10 correct in 10 trials; randomly sampling from an
array containing the givens A and B to get an unknown X; comparing 15 seconds of
audio; audio/sox as the playback software. In the future, I would do >=16
trials, and perhaps conduct the tests from my desktop instead since it has a
discrete amp and DAC.

In offline resampling from 48kHz to 44.1kHz, the highs were most affected and
that's what I was able to use to distinguish between samples. The percussion,
especially the cymbals, sounded different in particular because the clip
resampled by aucat had cymbal crashes that seemed to 'shimmer' much less (the
decay was more rapid). The spectrograms seemed to confirm that the highs were
most affected. 

Whether that means "low quality resampling" or merely that the results of the
two commands can be differentiated is something I'm uncertain of. Either way, I
don't know enough about C or sndio internals to be useful in that domain yet. As
an aside, I did find this to be a useful resource for learning about digital
audio resampling, and they recommend audio/sox there.

https://ccrma.stanford.edu/~jos/resample/

I hadn't said anything about this earlier because I wanted to take the time to
finish + document the script, reproduce my results with a royalty free sample at
a greater trial count, and then post. Given that I haven't done so yet, I can at
least post the commands used to resample the audio for those that are
interested.


# This was originally an opus file downloaded with www/yt-dlp.
# Converting to WAV so both SoX and aucat can work with it.
$ opusdec input.{opus,wav}

# Resample 16-bit 48kHz WAV file to 44.1kHz using both SoX and aucat(1).
#
# If I recall correctly, I converted to FLAC here because the WAV headers
# generated by aucat and SoX differed, and so SoX would refuse to play WAV files
# created by aucat.
$ sox -G input.wav -t wav - rate -v 44100 | flac - -o output-sox.flac
$ aucat -i input.wav -h wav -r 44100 -e s16 -o - | flac - -o output-aucat.flac

# Generate spectrograms for later inspection/comparison.
$ sox output-sox.flac -n spectrogram -o spectrogram-sox.png
$ sox output-aucat.flac -n spectrogram -o spectrogram-aucat.png


I'd certainly be interested in the ability to play audio in a way that avoids
resampling altogether, similar to what a user can do on FreeBSD with the
following sysctl tweaks:

# sysctl hw.snd.maxautovchans=0 dev.pcm.0.bitperfect=1

https://www.freebsd.org/cgi/man.cgi?query=sound=FreeBSD+13.1-RELEASE=html

That said, I understand that someone would have to write the code for that, and
right now I lack the know-how so my expectations are nil. 

To end this mail, here are some relevant command outputs (note that these
weren't gathered at the time of testing, they're to show what the system
generally looks like):

# mixerctl -av
inputs.dac-2:3=94,94
inputs.dac-0:1=94,94
record.adc-0:1_mute=off  [ off on ]
record.adc-0:1=124,124
record.adc-2:3_mute=off  [ off on ]
record.adc-2:3=124,124
outputs.spkr_source=dac-2:3  [ dac-2:3 ]
outputs.spkr_mute=off  [ off on ]
outputs.spkr_eapd=on  [ off on ]
outputs.spkr2_source=dac-0:1  [ dac-2:3 dac-0:1 ]
outputs.spkr2_mute=off  [ off on ]
outputs.spkr2_boost=off  [ off on ]
inputs.mic=85,85
outputs.mic_dir=input-vr80  [ none input input-vr0 input-vr50 input-vr80 
input-vr100 ]
outputs.hp_source=dac-0:1  [ dac-2:3 dac-0:1 ]
outputs.hp_mute=off  [ off on ]
outputs.hp_boost=off  [ off on ]
outputs.hp_eapd=on  [ off on ]
record.adc-2:3_source=mic  { mic }
record.adc-0:1_source=mic  { mic }
outputs.mic_sense=unplugged  [ unplugged plugged ]
outputs.hp_sense=unplugged  [ unplugged plugged ]
outputs.spkr_muters=hp  { hp }
outputs.master=95,95
outputs.master.mute=off  [ off on ]
outputs.master.slaves=dac-2:3,dac-0:1,spkr,spkr2,hp  { dac-2:3 dac-0:1 spkr 
spkr2 hp }

Re: BiDi sfp in ix

2023-01-09 Thread Hrvoje Popovski
On 9.1.2023. 15:21, Hrvoje Popovski wrote:
> On 5.1.2023. 18:43, Hrvoje Popovski wrote:
>> On 4.1.2023. 14:20, Ivo Chutkin wrote:
>>> On 2.1.2023 г. 16:58 ч., Hrvoje Popovski wrote:
 On 28.12.2022. 20:21, Stuart Henderson wrote:
> On 2022-12-28, Hrvoje Popovski  wrote:
>> Hi all,
>>
>> I don't have much experience with BiDi sfp, so I'm asking you guys,
>> should openbsd ix work with 1G BiDi sfp.
>
> should do, yes.
>
> in case you're not aware, bidi transceivers come in different types,
> e.g.
> your MaxLink ML-S5531-20 transmits at 1550nm and receives at 1310nm, so
> must be paired with a transceiver that transmits at 1310nm and receives
> at 1550nm (e.g. the MaxLink model is ML-S3155-20) - do you have that?
>
> also, they should normally be used with single-mode fibre (due to how
> the bidi optics are coupled into the fibre they *can* also work with
> multimode fibre, though if you do that, insertion loss is high so
> distance is much more limited, plus it's even more sensitive to bending
> than usual in that case).
>
>

 Hi,

 everything is fine regarding transceiver and fiber. I've played with it
 for few days with my ISP and that BiDI sfp works on mikrotik
 RB5009UG+S+IN and cisco 2960 switch. On aruba 2540 (allow unsupported
 transceiver), ibm switch and openbsd ix(4) it won't work.

 I've ordered few BiDi sfp from fs.com and maybe my ISP will lend me
 MaxLink sfp so I could test them in lab.

 Thank you Stuart for information ...

>>> Hi Hrvoje,
>>>
>>> Can you try setting NIC to use speed 1G since it is SFP, not 10G SFP+
>>> module.
>>> My experience is that "media: Ethernet autoselect" not always work.
>>>
>>
>> Hi,
>>
>> yes that's one of the problems. I couldn't set media to 1000baseLX and
>> ifconfig ix0 media only showed me autoselect, even when BiDi was
>> inserted into nic.
>>
>> Maybe that's problem with x552 but i didn't have x520 near me at that time.
>>
>> Good thing is that BiDi sfp's arrived and I will play with them.
>>
> 
> Hi all,
> 
> It seems that ix(4) is having problems with 1G BiDi sfp. I've tested
> FS.COM 1G BiDi and they are working on mikrotik and some switches but on
> OpenBSD I'm getting "status: no carrier" what ever I do.
> I've tried:
> advertise 1G without auto-negotiation and speed 1Gbps full duplex
> advertise 1G with auto-negotiation
> With those sfp's in OpenBSD I just can't disable auto-neg or configure
> media to advertise 1G full-duplex.
> With normal 1G sfp everything is working as expected on OpenBSD ix(4).
> 
> For link to be UP between network equipment with 1G BiDi i needed to
> configure interfaces to advertise 1G without auto-negotiation and speed
> 1Gbps full duplex.
> 
> On other hand 10G BiDi is working as expected with auto negotiation,
> means that I didn't need to configure anything for link to be up.
> 
> 
> 
> 1G BiDi
> OpenBSD
> ix0: flags=8843 mtu 1500
> lladdr a0:36:9f:2e:96:a0
> index 1 priority 0 llprio 3
> media: Ethernet autoselect
> status: no carrier
> transceiver: SFP LC, 1490 nm, 10.0km SMF
> model: FS SFP-GE-BX rev A0
> serial: F2130238999, date: 2022-03-28
> voltage: 3.28 V, bias current: 12.90 mA
> temp: 41.18 C (low -10.00 C, high 80.00 C)
> tx: -6.42 dBm (low -10.00 dBm, high -2.00 dBm)
> rx: -7.24 dBm (low -23.98 dBm, high -2.00 dBm)
> inet 10.255.1.3 netmask 0xff00 broadcast 10.255.1.255
> ix0: flags=8843 mtu 1500
> lladdr a0:36:9f:2e:96:a0
> index 1 priority 0 llprio 3
> media: Ethernet autoselect
> status: no carrier
> supported media:
> media autoselect
> inet 10.255.1.3 netmask 0xff00 broadcast 10.255.1.255
> 
> 
> mikrotik
> name: sfp-sfpplus1
>   status: no-link
>   sfp-module-present: yes
>  sfp-rx-loss: no
> sfp-tx-fault: no
> sfp-type: SFP-or-SFP+
>   sfp-connector-type: LC
>   sfp-link-length-sm: 10km
>  sfp-vendor-name: FS
>   sfp-vendor-part-number: SFP-GE-BX
>  sfp-vendor-revision: A0
>sfp-vendor-serial: F2040345575
>   sfp-manufacturing-date: 22-04-06
>   sfp-wavelength: 1310nm
>  sfp-temperature: 34C
>   sfp-supply-voltage: 3.265V
>  sfp-tx-bias-current: 9mA
> sfp-tx-power: -6.333dBm
> sfp-rx-power: -6.203dBm
>  eeprom-checksum: good
> 
> 
> 
> 
> 10G BiDi
> OpenBSD
> ix0: flags=8843 mtu 1500
> lladdr a0:36:9f:2e:96:a0
> index 1 priority 0 llprio 3
> media: Ethernet autoselect (autoselect rxpause,txpause)
> status: active
> transceiver: SFP LC, 1270 nm, 10.0km SMF
> model: FS SFP-10G-BX
> serial: F2220232065, date: 2022-06-28
> voltage: 3.32 V, bias current: 39.09 mA
> temp: 

Re: BiDi sfp in ix

2023-01-09 Thread Hrvoje Popovski
On 9.1.2023. 16:39, Boyd Stephens wrote:
> Hrvoje,
> 
> I may be inquiring about an item that you have already provided but
> would it be possible for you to supply a copy of your hostname.ix0
> config file.  I have been unable to locate this bit of info while
> perusing this particular thread.
> 
> Thank you much.
> 
> ---
> Boyd
> 

Hi,

there's nothing special in hostname.ix0 file.

cat /etc/hostname.ix0
inet 10.255.1.3/24

interesting ifconfig commands for troubleshooting this kind of problems:
ifconfig ix0 transceiver or sff
ifconfig ix0 media

dmesg | grep ix
ix0 at pci3 dev 0 function 0 "Intel 82599" rev 0x01, msix, 12 queues
ix1 at pci3 dev 0 function 1 "Intel 82599" rev 0x01, msix, 12 queues





Re: OpenBGDP IPv6 ignoring set localpref parameter

2023-01-09 Thread Claudio Jeker
On Mon, Jan 09, 2023 at 11:59:22AM -0500, Matt wrote:
> Hello list,
> 
>  
> 
> I've run across an interesting issue which I think might be something I did
> wrong but here goes. Below is my configuration file for bgpd.conf. I will
> also give you the interface configurations for the two tunnels that I am
> running. When I show the RIB using bgpctl show rib, I notice that the set
> localpref parameter is not being applied properly to IPv6.
> 
>  
> 
> #/etc/hostname.wg0
> 
> wgkey 
> 
> wgpeer  wgendpoint 47.87.173.98 21764 wgaip
> 192.168.220.190/32 wgaip 172.20.53.98/32 wgaip 172.20.0.0/14 wgaip
> fe80::ade1 wgaip fe80::ade0 wgaip fd00::/8 wgpka 20
> 
> inet 192.168.220.190/32
> 
> inet6 fe80::ade1%wg0
> 
> descr "TO-KIOUBIT"
> 
> up
> 
> !route add -host 172.20.53.98 192.168.220.190
> 
> !route add -inet6 fe80::ade0 fe80::ade1%wg0
> 
> !route add -inet6 fd00::/8 fe80::ade1%wg0
> 
>  
> 
> #/etc/hostname.gre0
> 
> 172.21.83.84 172.21.83.85
> 
> tunnel 173.49.42.100 81.2.241.46
> 
> descr "TO-NOP.HU"
> 
> up
> 
> !ifconfig gre0 inet6 fd40:cc1e:c0de::252 fd40:cc1e:c0de::251
> 
>  
> 
> #/etc/bgpd.conf
> 
> ASN="4242421764"
> 
>  
> 
> AS $ASN
> 
> router-id 192.168.220.190
> 
>  
> 
> prefix-set mynetworks {
> 
> 172.20.165.192/27
> 
> fd0b:7449:62d2::/48
> 
> }
> 
>  
> 
> prefix-set nothankyou {
> 
> 10.0.0.0/8
> 
> }
> 
>  
> 
> network prefix-set mynetworks set large-community $ASN:1:1
> 
>  
> 
>  
> 
> group "kioubit" {
> 
> set localpref 20
> 
> neighbor 172.20.53.98 {
> 
> remote-as 4242423914
> 
> descr "TO-KIOUBIT-IPV4-US2"
> 
> }
> 
>  
> 
> neighbor fe80::ade0 {
> 
> remote-as 4242423914
> 
> descr "TO-KIOUBIT-IPV6-US2"
> 
> }
> 
> }
> 
>  
> 
> group "mc36" {
> 
>set localpref 10
> 
> neighbor 172.21.83.85 {
> 
> remote-as 4242421955
> 
> descr "TO-NOP.HU-IPV4"
> 
> }
> 
>  
> 
> neighbor fd40:cc1e:c0de::251 {
> 
>remote-as 4242421955
> 
> descr "TO-NOP.HU-IPV6"
> 
> set localpref 10
> 
> }
> 
> }
> 
>  
> 
> deny quick from ebgp prefix-set mynetworks or-longer
> 
> deny quick from ebgp prefix-set nothankyou or-longer
> 
> deny quick from any max-as-len 8
> 
>  
> 
> allow to ebgp prefix-set mynetworks large-community $ASN:1:1
> 
> allow from ebgp ovs valid
> 
>  
> 
> match from ebgp set { large-community delete $ASN:*:* }
> 
> match from any community GRACEFUL_SHUTDOWN set { localpref 0 }
> 
>  
> 
> include "/etc/roa-set.conf"
> 
>  
> 
> When I type bgpctl show rib, I see that the route selected for IPv6 traffic
> is going through the neighbor fd40:cc1e:c0de::251 and not fe80::ade0.
> Ideally, I'd rather have IPv6 go through the neighbor fe80::ade0 as that one
> is on my continent. Below is an example from the show rib statement. I don't
> even know why the fe80::ade0 address is not even showing up in the output.
> 
>  
> 
> *>  V fd00:bb:5bf3::/48fd40:cc1e:c0de::25110 0 4242421955
> 4242423088 4242420549 i
> 
> V fd00:bb:5bf3::/48:: 20 0 4242423914
> 4242420549 i
> 
>  
> 
> I have verified that the neighbor fe80::ade0 is actually getting a
> connection and sending me route updates. Here is an example:
> 
>  
> 
> V fdff:feed:c0de::/48  :: 20 0 4242423914 4242420585
> 4242422980 210074 64719 65043 4242420138 i
> 
>  
> 
> Any ideas?

Hard to judge from the little information you share but the :: nexthop is
for sure not good. Because of this the route to fd00:bb:5bf3::/48 via AS
4242423914 is not valid and can't be selected as route.
Not sure what exactly goes on there but you need to fix that.

Also check out 'bgpctl show rib nei fe80::ade0 in' to see the unfiltered
routes.

-- 
:wq Claudio



OpenBGDP IPv6 ignoring set localpref parameter

2023-01-09 Thread Matt
Hello list,

 

I've run across an interesting issue which I think might be something I did
wrong but here goes. Below is my configuration file for bgpd.conf. I will
also give you the interface configurations for the two tunnels that I am
running. When I show the RIB using bgpctl show rib, I notice that the set
localpref parameter is not being applied properly to IPv6.

 

#/etc/hostname.wg0

wgkey 

wgpeer  wgendpoint 47.87.173.98 21764 wgaip
192.168.220.190/32 wgaip 172.20.53.98/32 wgaip 172.20.0.0/14 wgaip
fe80::ade1 wgaip fe80::ade0 wgaip fd00::/8 wgpka 20

inet 192.168.220.190/32

inet6 fe80::ade1%wg0

descr "TO-KIOUBIT"

up

!route add -host 172.20.53.98 192.168.220.190

!route add -inet6 fe80::ade0 fe80::ade1%wg0

!route add -inet6 fd00::/8 fe80::ade1%wg0

 

#/etc/hostname.gre0

172.21.83.84 172.21.83.85

tunnel 173.49.42.100 81.2.241.46

descr "TO-NOP.HU"

up

!ifconfig gre0 inet6 fd40:cc1e:c0de::252 fd40:cc1e:c0de::251

 

#/etc/bgpd.conf

ASN="4242421764"

 

AS $ASN

router-id 192.168.220.190

 

prefix-set mynetworks {

172.20.165.192/27

fd0b:7449:62d2::/48

}

 

prefix-set nothankyou {

10.0.0.0/8

}

 

network prefix-set mynetworks set large-community $ASN:1:1

 

 

group "kioubit" {

set localpref 20

neighbor 172.20.53.98 {

remote-as 4242423914

descr "TO-KIOUBIT-IPV4-US2"

}

 

neighbor fe80::ade0 {

remote-as 4242423914

descr "TO-KIOUBIT-IPV6-US2"

}

}

 

group "mc36" {

   set localpref 10

neighbor 172.21.83.85 {

remote-as 4242421955

descr "TO-NOP.HU-IPV4"

}

 

neighbor fd40:cc1e:c0de::251 {

   remote-as 4242421955

descr "TO-NOP.HU-IPV6"

set localpref 10

}

}

 

deny quick from ebgp prefix-set mynetworks or-longer

deny quick from ebgp prefix-set nothankyou or-longer

deny quick from any max-as-len 8

 

allow to ebgp prefix-set mynetworks large-community $ASN:1:1

allow from ebgp ovs valid

 

match from ebgp set { large-community delete $ASN:*:* }

match from any community GRACEFUL_SHUTDOWN set { localpref 0 }

 

include "/etc/roa-set.conf"

 

When I type bgpctl show rib, I see that the route selected for IPv6 traffic
is going through the neighbor fd40:cc1e:c0de::251 and not fe80::ade0.
Ideally, I'd rather have IPv6 go through the neighbor fe80::ade0 as that one
is on my continent. Below is an example from the show rib statement. I don't
even know why the fe80::ade0 address is not even showing up in the output.

 

*>  V fd00:bb:5bf3::/48fd40:cc1e:c0de::25110 0 4242421955
4242423088 4242420549 i

V fd00:bb:5bf3::/48:: 20 0 4242423914
4242420549 i

 

I have verified that the neighbor fe80::ade0 is actually getting a
connection and sending me route updates. Here is an example:

 

V fdff:feed:c0de::/48  :: 20 0 4242423914 4242420585
4242422980 210074 64719 65043 4242420138 i

 

Any ideas?

 

Thanks,

Matt 



Re: BiDi sfp in ix

2023-01-09 Thread Boyd Stephens

On 1/9/23 08:21, Hrvoje Popovski wrote:

On 5.1.2023. 18:43, Hrvoje Popovski wrote:

On 4.1.2023. 14:20, Ivo Chutkin wrote:

On 2.1.2023 г. 16:58 ч., Hrvoje Popovski wrote:

On 28.12.2022. 20:21, Stuart Henderson wrote:

On 2022-12-28, Hrvoje Popovski  wrote:

Hi all,

I don't have much experience with BiDi sfp, so I'm asking you guys,
should openbsd ix work with 1G BiDi sfp.


should do, yes.

in case you're not aware, bidi transceivers come in different types,
e.g.
your MaxLink ML-S5531-20 transmits at 1550nm and receives at 1310nm, so
must be paired with a transceiver that transmits at 1310nm and receives
at 1550nm (e.g. the MaxLink model is ML-S3155-20) - do you have that?

also, they should normally be used with single-mode fibre (due to how
the bidi optics are coupled into the fibre they *can* also work with
multimode fibre, though if you do that, insertion loss is high so
distance is much more limited, plus it's even more sensitive to bending
than usual in that case).




Hi,

everything is fine regarding transceiver and fiber. I've played with it
for few days with my ISP and that BiDI sfp works on mikrotik
RB5009UG+S+IN and cisco 2960 switch. On aruba 2540 (allow unsupported
transceiver), ibm switch and openbsd ix(4) it won't work.

I've ordered few BiDi sfp from fs.com and maybe my ISP will lend me
MaxLink sfp so I could test them in lab.

Thank you Stuart for information ...


Hi Hrvoje,

Can you try setting NIC to use speed 1G since it is SFP, not 10G SFP+
module.
My experience is that "media: Ethernet autoselect" not always work.



Hi,

yes that's one of the problems. I couldn't set media to 1000baseLX and
ifconfig ix0 media only showed me autoselect, even when BiDi was
inserted into nic.

Maybe that's problem with x552 but i didn't have x520 near me at that time.

Good thing is that BiDi sfp's arrived and I will play with them.



Hi all,

It seems that ix(4) is having problems with 1G BiDi sfp. I've tested
FS.COM 1G BiDi and they are working on mikrotik and some switches but on
OpenBSD I'm getting "status: no carrier" what ever I do.
I've tried:
advertise 1G without auto-negotiation and speed 1Gbps full duplex
advertise 1G with auto-negotiation
With those sfp's in OpenBSD I just can't disable auto-neg or configure
media to advertise 1G full-duplex.
With normal 1G sfp everything is working as expected on OpenBSD ix(4).

For link to be UP between network equipment with 1G BiDi i needed to
configure interfaces to advertise 1G without auto-negotiation and speed
1Gbps full duplex.

On other hand 10G BiDi is working as expected with auto negotiation,
means that I didn't need to configure anything for link to be up.



1G BiDi
OpenBSD
ix0: flags=8843 mtu 1500
 lladdr a0:36:9f:2e:96:a0
 index 1 priority 0 llprio 3
 media: Ethernet autoselect
 status: no carrier
 transceiver: SFP LC, 1490 nm, 10.0km SMF
 model: FS SFP-GE-BX rev A0
 serial: F2130238999, date: 2022-03-28
 voltage: 3.28 V, bias current: 12.90 mA
 temp: 41.18 C (low -10.00 C, high 80.00 C)
 tx: -6.42 dBm (low -10.00 dBm, high -2.00 dBm)
 rx: -7.24 dBm (low -23.98 dBm, high -2.00 dBm)
 inet 10.255.1.3 netmask 0xff00 broadcast 10.255.1.255
ix0: flags=8843 mtu 1500
 lladdr a0:36:9f:2e:96:a0
 index 1 priority 0 llprio 3
 media: Ethernet autoselect
 status: no carrier
 supported media:
 media autoselect
 inet 10.255.1.3 netmask 0xff00 broadcast 10.255.1.255


mikrotik
 name: sfp-sfpplus1
   status: no-link
   sfp-module-present: yes
  sfp-rx-loss: no
 sfp-tx-fault: no
 sfp-type: SFP-or-SFP+
   sfp-connector-type: LC
   sfp-link-length-sm: 10km
  sfp-vendor-name: FS
   sfp-vendor-part-number: SFP-GE-BX
  sfp-vendor-revision: A0
sfp-vendor-serial: F2040345575
   sfp-manufacturing-date: 22-04-06
   sfp-wavelength: 1310nm
  sfp-temperature: 34C
   sfp-supply-voltage: 3.265V
  sfp-tx-bias-current: 9mA
 sfp-tx-power: -6.333dBm
 sfp-rx-power: -6.203dBm
  eeprom-checksum: good




10G BiDi
OpenBSD
ix0: flags=8843 mtu 1500
 lladdr a0:36:9f:2e:96:a0
 index 1 priority 0 llprio 3
 media: Ethernet autoselect (autoselect rxpause,txpause)
 status: active
 transceiver: SFP LC, 1270 nm, 10.0km SMF
 model: FS SFP-10G-BX
 serial: F2220232065, date: 2022-06-28
 voltage: 3.32 V, bias current: 39.09 mA
 temp: 41.07 C (low -43.00 C, high 88.00 C)
 tx: -1.68 dBm (low -10.00 dBm, high 2.00 dBm)
 rx: -1.70 dBm (low -16.50 dBm, high 2.50 dBm)
 inet 10.255.1.3 netmask 0xff00 broadcast 10.255.1.255
ix0: flags=8843 mtu 1500
 lladdr a0:36:9f:2e:96:a0
 index 1 priority 0 llprio 3
 media: Ethernet autoselect (autoselect 

Re: BiDi sfp in ix

2023-01-09 Thread Hrvoje Popovski
On 5.1.2023. 18:43, Hrvoje Popovski wrote:
> On 4.1.2023. 14:20, Ivo Chutkin wrote:
>> On 2.1.2023 г. 16:58 ч., Hrvoje Popovski wrote:
>>> On 28.12.2022. 20:21, Stuart Henderson wrote:
 On 2022-12-28, Hrvoje Popovski  wrote:
> Hi all,
>
> I don't have much experience with BiDi sfp, so I'm asking you guys,
> should openbsd ix work with 1G BiDi sfp.

 should do, yes.

 in case you're not aware, bidi transceivers come in different types,
 e.g.
 your MaxLink ML-S5531-20 transmits at 1550nm and receives at 1310nm, so
 must be paired with a transceiver that transmits at 1310nm and receives
 at 1550nm (e.g. the MaxLink model is ML-S3155-20) - do you have that?

 also, they should normally be used with single-mode fibre (due to how
 the bidi optics are coupled into the fibre they *can* also work with
 multimode fibre, though if you do that, insertion loss is high so
 distance is much more limited, plus it's even more sensitive to bending
 than usual in that case).


>>>
>>> Hi,
>>>
>>> everything is fine regarding transceiver and fiber. I've played with it
>>> for few days with my ISP and that BiDI sfp works on mikrotik
>>> RB5009UG+S+IN and cisco 2960 switch. On aruba 2540 (allow unsupported
>>> transceiver), ibm switch and openbsd ix(4) it won't work.
>>>
>>> I've ordered few BiDi sfp from fs.com and maybe my ISP will lend me
>>> MaxLink sfp so I could test them in lab.
>>>
>>> Thank you Stuart for information ...
>>>
>> Hi Hrvoje,
>>
>> Can you try setting NIC to use speed 1G since it is SFP, not 10G SFP+
>> module.
>> My experience is that "media: Ethernet autoselect" not always work.
>>
> 
> Hi,
> 
> yes that's one of the problems. I couldn't set media to 1000baseLX and
> ifconfig ix0 media only showed me autoselect, even when BiDi was
> inserted into nic.
> 
> Maybe that's problem with x552 but i didn't have x520 near me at that time.
> 
> Good thing is that BiDi sfp's arrived and I will play with them.
> 

Hi all,

It seems that ix(4) is having problems with 1G BiDi sfp. I've tested
FS.COM 1G BiDi and they are working on mikrotik and some switches but on
OpenBSD I'm getting "status: no carrier" what ever I do.
I've tried:
advertise 1G without auto-negotiation and speed 1Gbps full duplex
advertise 1G with auto-negotiation
With those sfp's in OpenBSD I just can't disable auto-neg or configure
media to advertise 1G full-duplex.
With normal 1G sfp everything is working as expected on OpenBSD ix(4).

For link to be UP between network equipment with 1G BiDi i needed to
configure interfaces to advertise 1G without auto-negotiation and speed
1Gbps full duplex.

On other hand 10G BiDi is working as expected with auto negotiation,
means that I didn't need to configure anything for link to be up.



1G BiDi
OpenBSD
ix0: flags=8843 mtu 1500
lladdr a0:36:9f:2e:96:a0
index 1 priority 0 llprio 3
media: Ethernet autoselect
status: no carrier
transceiver: SFP LC, 1490 nm, 10.0km SMF
model: FS SFP-GE-BX rev A0
serial: F2130238999, date: 2022-03-28
voltage: 3.28 V, bias current: 12.90 mA
temp: 41.18 C (low -10.00 C, high 80.00 C)
tx: -6.42 dBm (low -10.00 dBm, high -2.00 dBm)
rx: -7.24 dBm (low -23.98 dBm, high -2.00 dBm)
inet 10.255.1.3 netmask 0xff00 broadcast 10.255.1.255
ix0: flags=8843 mtu 1500
lladdr a0:36:9f:2e:96:a0
index 1 priority 0 llprio 3
media: Ethernet autoselect
status: no carrier
supported media:
media autoselect
inet 10.255.1.3 netmask 0xff00 broadcast 10.255.1.255


mikrotik
name: sfp-sfpplus1
  status: no-link
  sfp-module-present: yes
 sfp-rx-loss: no
sfp-tx-fault: no
sfp-type: SFP-or-SFP+
  sfp-connector-type: LC
  sfp-link-length-sm: 10km
 sfp-vendor-name: FS
  sfp-vendor-part-number: SFP-GE-BX
 sfp-vendor-revision: A0
   sfp-vendor-serial: F2040345575
  sfp-manufacturing-date: 22-04-06
  sfp-wavelength: 1310nm
 sfp-temperature: 34C
  sfp-supply-voltage: 3.265V
 sfp-tx-bias-current: 9mA
sfp-tx-power: -6.333dBm
sfp-rx-power: -6.203dBm
 eeprom-checksum: good




10G BiDi
OpenBSD
ix0: flags=8843 mtu 1500
lladdr a0:36:9f:2e:96:a0
index 1 priority 0 llprio 3
media: Ethernet autoselect (autoselect rxpause,txpause)
status: active
transceiver: SFP LC, 1270 nm, 10.0km SMF
model: FS SFP-10G-BX
serial: F2220232065, date: 2022-06-28
voltage: 3.32 V, bias current: 39.09 mA
temp: 41.07 C (low -43.00 C, high 88.00 C)
tx: -1.68 dBm (low -10.00 dBm, high 2.00 dBm)
rx: -1.70 dBm (low -16.50 dBm, high 2.50 dBm)
inet 10.255.1.3 netmask 0xff00 broadcast 10.255.1.255
ix0: flags=8843 mtu 1500
lladdr 

Best USB NIC for obsd7.2

2023-01-09 Thread Lars Bonnesen
Which 1Gbit USB 3.0A NIC is performing best with obsd 7.2?

I am aware of the hardware list, but I am asking personal experience from
users in here

Regards, Lars.


Re: CARP and DHCP

2023-01-09 Thread Christer Solskogen
On Sun, Jan 8, 2023 at 5:23 PM Nick Holland 
wrote:

>
> Does this actually maintain state?  I'm thinking pfsync might
> not work properly when the external interface "changes" like that.
> It wouldn't actually matter much in *my case*, but I'm wondering
> about the more general case.
>
>
>
I no expert, but I think so. I can be in a Teams meeting while I switch
from master to slave, without loosing the connection.