Rajesh Jarang(deleted)
|
ifconfig command does not show all the interface after adding new interface
|
Rajesh Jarang(deleted)
07/25/2019 3:11 PM
post119786
|
ifconfig command does not show all the interface after adding new interface
I am using panda board for adding new network driver.
for showing example I used Sample Driver (sam.c) provided by qnx.
But following result can be reproduce with other drivers too.
here is the excerpts of the command i ran and text added between /* */ are my comments.
As you see below, en0 interface disappears as soon as another new driver is added.
Is there anything 'ifconfig' looking for? Why it is not showing all the interfaces?
------------------------------------------------------------------------------------------------------------------------
--
# io-pkt-v4-hc -dsmsc9500 mac=5e2404007ede /* Loading the ethernet driver */
# ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000
en0: flags=80008802<BROADCAST,SIMPLEX,MULTICAST,SHIM> mtu 1500
address: 5e:24:04:00:7e:de
media: Ethernet 100baseTX full-duplex
status: active
# ifconfig en0 10.10.70.189
# ifconfig /* ifconfig correctly shows the two
interfaces lo0 and en0)
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000
en0: flags=80008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,SHIM> mtu 1500
address: 5e:24:04:00:7e:dd
media: Ethernet 100baseTX full-duplex
status: active
inet 10.10.70.189 netmask 0xff000000 broadcast 10.255.255.255
# io-pkt-v6-hc -i1 -dsam /* loading the second driver (sample driver) *
/
# ifconfig /* it shows sam0 correctly but en0
disappeard !!!! */
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
sam0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
address: 00:01:02:03:04:05
------------------------------------------------------------------------------------------------------------------------
|
|
|
Peter Huber
|
Re: ifconfig command does not show all the interface after adding new interface
|
Peter Huber
07/26/2019 3:30 AM
post119787
|
Re: ifconfig command does not show all the interface after adding new interface
Hi Rajesh
By calling io-pkt-v6-hc you are starting a new network stack with no interfaces except lo0.
To add a new network interface to a running stack you must use the mount command:
mount -T io-pkt devnp-sam.so
|
|
|
Rajesh Jarang(deleted)
|
Re: ifconfig command does not show all the interface after adding new interface
|
Rajesh Jarang(deleted)
07/26/2019 6:15 PM
post119788
|
Re: ifconfig command does not show all the interface after adding new interface
My goal is to start two network stacks io-pkt-v4-hc (habdling ipv4 only) and io-pkt-v6-hc (for ipv6)
and make sure that it is shown in ifconfig.
in the above command sequence, even if I run "mount -T io-pkt devnp-sam.so"
ifconfig does not show en0 interface at all.
See command/output below below
(1) Why ifconfig not showing en0? pidin shows both stacks running.
(2) I want make two separate interfaces one for ipv4 (exclusively for ipv4) and other ipv6. What are the correct steps.
----------------------------------------------------
# io-pkt-v4-hc -dsmsc9500 mac=5e2404007ede
# ifconfig en0 10.10.70.189
# ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000
en0: flags=80008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,SHIM> mtu 1500
address: 5e:24:04:00:7e:de
media: Ethernet 100baseTX full-duplex
status: active
inet 10.10.70.189 netmask 0xff000000 broadcast 10.255.255.255
# io-pkt-v6-hc
# mount -T io-pkt devnp-sam.so
# ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
sam0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
address: 00:01:02:03:04:05
# pidin arg
pid Arguments
......
49170 io-pkt-v4-hc -dsmsc9500 mac=5e2404007edd
69651 io-pkt-v6-hc
102420 pidin arg
------------------------------------------------------------------------------------------
|
|
|
Dean Denter
|
Re: ifconfig command does not show all the interface after adding new interface
|
Dean Denter
07/26/2019 8:36 PM
post119789
|
Re: ifconfig command does not show all the interface after adding new interface
There are some important parameters missing in the startup of the 2nd io-pkt that are causing it to clobber the 1st
invocation of io-pkt.
1st stack (instance 0) startup is fine:
# io-pkt-v4-hc -dsmsc9500 mac=5e2404007edd
# ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000
en0: flags=80008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,SHIM> mtu 1500
address: 5e:24:04:00:7e:dd
media: Ethernet 100baseTX full-duplex
status: active
inet 10.10.70.189 netmask 0xff000000 broadcast 10.255.255.255
#
2nd stack needs both an instance and a prefix so it does not clobber the 1st (instance 0) stack:
# io-pkt-v6-hc -i1 -dsam -p tcpip prefix=/alt
# SOCK=/alt ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
sam0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
address: 00:01:02:03:04:05
#
For all commands referencing the 1st stack (instance 0), issue them directly without a SOCK environment variable.
For all commands referencing the 2nd stack (instance 1 at prefix /alt), the SOCK=/alt environment variable is needed.
Prefixes other than '/alt' can be used -- reference the io-pkt documentation for use of the prefix parameter.
|
|
|
Rajesh Jarang(deleted)
|
Re: ifconfig command does not show all the interface after adding new interface
|
Rajesh Jarang(deleted)
07/30/2019 2:17 PM
post119795
|
Re: ifconfig command does not show all the interface after adding new interface
for some reason I do not see newly added interface even if I provide the prefix
-----------------
# io-pkt-v6-hc -i1 -dsam -p tcpip prefix=/alt
# ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
en0: flags=80008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,SHIM> mtu 1500
address: 5e:24:04:00:7e:dd
media: Ethernet 100baseTX full-duplex
status: active
inet 10.10.70.189 netmask 0xfffffe00 broadcast 10.10.71.255
inet6 fe80::5c24:4ff:fe00:7edd%en0 prefixlen 64 scopeid 0x2
# SOCK=/alt ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
# ls -l /alt/dev/socket/
total 0
srw-rw-rw- 1 root root 0 Jan 07 22:04 1
srw-rw-rw- 1 root root 0 Jan 07 22:04 17
....
----------------------------------------------
|
|
|
Nick Reilly
|
Re: ifconfig command does not show all the interface after adding new interface
|
Nick Reilly
07/30/2019 4:29 PM
post119798
|
Re: ifconfig command does not show all the interface after adding new interface
Is your sam driver actually successfully creating an interface?
|
|
|
|