Create pkey on FreeBSD 9.1

Alex Liptsin alexl at mellanox.com
Thu May 30 07:30:21 UTC 2013


Hi John.

I did it, but there is no ping between the vlans.  Ping without VLANs on that ports pass.

Host1:

[root at qa-h-vrt-030-006 ~]# ifconfig ib0.100 create
[root at qa-h-vrt-030-006 ~]# ifconfig ib0.100 11.195.30.1/16 up
[root at qa-h-vrt-030-006 ~]# ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
        ether 00:50:56:23:1e:06
        inet6 fe80::250:56ff:fe23:1e06%em0 prefixlen 64 scopeid 0x2
        inet 10.195.30.6 netmask 0xffff0000 broadcast 10.195.255.255
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
ib0: flags=8043<UP,BROADCAST,RUNNING,MULTICAST> metric 0 mtu 65520
        options=80018<VLAN_MTU,VLAN_HWTAGGING,LINKSTATE>
        lladdr 80.0.0.48.fe.80.0.0.0.0.0.0.0.2.c9.0.1.0.d0.51
        inet6 fe80::250:56ff:fe23:1e06%ib0 prefixlen 64 scopeid 0x4
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
ib1: flags=8002<BROADCAST,MULTICAST> metric 0 mtu 65520
        options=80018<VLAN_MTU,VLAN_HWTAGGING,LINKSTATE>
        lladdr 80.0.0.49.fe.80.0.0.0.0.0.0.0.2.c9.0.1.0.d0.52
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
ib0.100: flags=8003<UP,BROADCAST,MULTICAST> metric 0 mtu 65520
        options=80018<VLAN_MTU,VLAN_HWTAGGING,LINKSTATE>
        lladdr 80.0.0.4a.fe.80.0.0.0.0.0.0.0.2.c9.0.1.0.d0.51
        inet6 fe80::8200:4a:fe80:0%ib0.100 prefixlen 64 scopeid 0x6
        inet 11.195.30.1 netmask 0xffff0000 broadcast 11.195.255.255
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
        vlan: 100 parent interface: ib0


Host2:

[root at qa-h-vrt-031-005 ~]# ifconfig ib0.100 create
[root at qa-h-vrt-031-005 ~]# ifconfig ib0.100 11.195.31.1/16 up
[root at qa-h-vrt-031-005 ~]# ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
        ether 00:50:56:23:1f:05
        inet6 fe80::250:56ff:fe23:1f05%em0 prefixlen 64 scopeid 0x2
        inet 10.195.31.5 netmask 0xffff0000 broadcast 10.195.255.255
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
ib0: flags=8043<UP,BROADCAST,RUNNING,MULTICAST> metric 0 mtu 65520
        options=80018<VLAN_MTU,VLAN_HWTAGGING,LINKSTATE>
        lladdr 80.0.0.48.fe.80.0.0.0.0.0.0.0.2.c9.3.0.a0.65.91
        inet6 fe80::250:56ff:fe23:1f05%ib0 prefixlen 64 scopeid 0x4
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
ib1: flags=8002<BROADCAST,MULTICAST> metric 0 mtu 65520
        options=80018<VLAN_MTU,VLAN_HWTAGGING,LINKSTATE>
        lladdr 80.0.0.49.fe.80.0.0.0.0.0.0.0.2.c9.3.0.a0.65.92
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
ib0.100: flags=8003<UP,BROADCAST,MULTICAST> metric 0 mtu 65520
        options=80018<VLAN_MTU,VLAN_HWTAGGING,LINKSTATE>
        lladdr 80.0.0.4a.fe.80.0.0.0.0.0.0.0.2.c9.3.0.a0.65.91
        inet6 fe80::8200:4a:fe80:0%ib0.100 prefixlen 64 scopeid 0x6
        inet 11.195.31.1 netmask 0xffff0000 broadcast 11.195.255.255
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
        vlan: 100 parent interface: ib0

[root at qa-h-vrt-031-005 ~]# ping 11.195.30.1
PING 11.195.30.1 (11.195.30.1): 56 data bytes
ping: sendto: Network is down
ping: sendto: Network is down
ping: sendto: Network is down



Regards,
Alex Liptsin
Software Quality Assurance Engineer | Mellanox Technologies Ltd.
Office: +972 (74) 7236141
Mobile: +972(54) 7833986
Fax: +972(74) 7236161 
Email: alexl at mellanox.com
Mellanox, Tel-Hai Industrial Park. Building 7, M.P. Upper Galilee 12100 Israel

-----Original Message-----
From: John Baldwin [mailto:jhb at freebsd.org] 
Sent: Wednesday, May 29, 2013 9:17 PM
To: freebsd-net at freebsd.org
Cc: Ryan Stone; Alex Liptsin
Subject: Re: Create pkey on FreeBSD 9.1

On Thursday, May 23, 2013 2:36:25 pm Ryan Stone wrote:
> On Thu, May 23, 2013 at 4:32 AM, Alex Liptsin <alexl at mellanox.com> wrote:
> 
> > Hello.
> >
> > I have FreeBSD 9.1 installed.
> > There is mellanox adapter inside.
> > OFED support is already installed.
> >
> > I try to add pkeys on ib0 port.
> >
> > Usually in  Linux I did:
> >
> > echo 0x800c >  /sys/class/net/ib0/create_child
> >
> > ifconfig -a
> > To Make sure you see a new interface: ib0.800c
> >
> > How can I do it on FreeBSD? There is no "/sys/class/net/ib0/create_child"
> > directory.
> >
> > Regards,
> > Alex Liptsin
> >
> > _______________________________________________
> > freebsd-net at freebsd.org mailing list 
> > http://lists.freebsd.org/mailman/listinfo/freebsd-net
> > To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
> >
> 
> From reading the source it looks like this is done by attaching a vlan 
> interface to the interface.  So try:
> 
> ifconfig vlan create vlandev ib0 vlan 0xc
> 
> This will create a new vlanX interface (ifconfig will its precise name 
> with its unit number to stdout).

Simpler though is just 'ifconfig ib0.12 create' (and how most folks expect subinterfaces to be named).

--
John Baldwin


More information about the freebsd-infiniband mailing list