Multiple NIC cpu test

I have a CPU that has dual NIC’s on it. I’d like to perform a hardware
loopback from one to the other, but they are configured to be on different
subnets, i.e. one is on 192.xxx.xxx.xxx and the other local 10.yyy.yyy.yyy.
I have a hardwired ethernet crossover cable connecting them, but traffic
between goes thru the software stack and not the wire (as evidenced by the
program working without the cable connected).

As a last resort, I could configure them to be on the same subnet, but the
problem of not sending the data across the wire still exists. How can I
make TCP force the transmission across the wire?

Thx,
John Bowen

All the packets which have destination ip as one of the interface addresses
are routed back to the stack in the ip layer(They don’t make it to even the
ethernet layer).It does not matter what subnets you choose to use.What
exactly are you trying to accomplish by this? Some of the NICs have a
loopback option built in so that if you enable that it loops back the packet
that is being sent.But it will be done on the same NIC.If you are just
reading from one of the NICs you can do the following

  1. Assign an IP address to Interface A.Don’t assign any address to Interface
    B
  2. Set the Interface B in promiscous mode
  3. Connect the cross over cable between A & B
  4. Now you send packets through A(To any address)
  5. You will be receiving these packets on B
    Drawback to this being that you have to have handler to process packets
    received by Interface B,May be in form of a filter.

Hope it helps,

Sreekanth

“John Bowen” <John.Bowen@grc.nasa.gov> wrote in message
news:bi5d63$u5$1@nntp.qnx.com

I have a CPU that has dual NIC’s on it. I’d like to perform a hardware
loopback from one to the other, but they are configured to be on different
subnets, i.e. one is on 192.xxx.xxx.xxx and the other local
10.yyy.yyy.yyy.
I have a hardwired ethernet crossover cable connecting them, but traffic
between goes thru the software stack and not the wire (as evidenced by the
program working without the cable connected).

As a last resort, I could configure them to be on the same subnet, but the
problem of not sending the data across the wire still exists. How can I
make TCP force the transmission across the wire?

Thx,
John Bowen

Here’s one way to do it:

io-net -del900 -dtulip -p tcpip

ifconfig -a

lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 33212
capabilities=7<IP4CSUM,TCP4CSUM,UDP4CSUM>
enabled=0<>
inet 127.0.0.1 netmask 0xff000000
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet6 ::1 prefixlen 128
en0: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
capabilities=7<IP4CSUM,TCP4CSUM,UDP4CSUM>
enabled=0<>
address: 00:01:02:49:65:ff
media: Ethernet 10baseT half-duplex
status: active
en1: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
address: 00:e0:29:1e:46:d1
media: Ethernet 10baseT half-duplex
status: active

ifconfig en0 10.25

ifconfig en1 11.163

route delete -net 10

delete net 10

route delete -net 11

delete net 11

route add -net 11 -iface 10.25 -cloning

add net 11: gateway 10.25

route add -net 10 -iface 11.163 -cloning

add net 10: gateway 11.163

ping 11.163

64 bytes from 11.0.0.163: icmp_seq=0 ttl=255 time=1.000 ms

John Bowen <John.Bowen@grc.nasa.gov> wrote:

I have a CPU that has dual NIC’s on it. I’d like to perform a hardware
loopback from one to the other, but they are configured to be on different
subnets, i.e. one is on 192.xxx.xxx.xxx and the other local 10.yyy.yyy.yyy.
I have a hardwired ethernet crossover cable connecting them, but traffic
between goes thru the software stack and not the wire (as evidenced by the
program working without the cable connected).

As a last resort, I could configure them to be on the same subnet, but the
problem of not sending the data across the wire still exists. How can I
make TCP force the transmission across the wire?

Thx,
John Bowen

The purpose behind this is to be able to verify the functionality of the
ethernet hardware without physically connecting to a network backbone. I
have many of these cards and it would be nice to have a “testbed” that I can
verify them with.

How can I receive packets on the controller that is in promiscuous mode? I
guess I don’t understand what you mean by “filter”.

Thank you!

“Sreekanth” <nospam@nospam.com> wrote in message
news:bi5p55$irs$1@inn.qnx.com

All the packets which have destination ip as one of the interface
addresses
are routed back to the stack in the ip layer(They don’t make it to even
the
ethernet layer).It does not matter what subnets you choose to use.What
exactly are you trying to accomplish by this? Some of the NICs have a
loopback option built in so that if you enable that it loops back the
packet
that is being sent.But it will be done on the same NIC.If you are just
reading from one of the NICs you can do the following

  1. Assign an IP address to Interface A.Don’t assign any address to
    Interface
    B
  2. Set the Interface B in promiscous mode
  3. Connect the cross over cable between A & B
  4. Now you send packets through A(To any address)
  5. You will be receiving these packets on B
    Drawback to this being that you have to have handler to process
    packets
    received by Interface B,May be in form of a filter.

Hope it helps,

Sreekanth

“John Bowen” <> John.Bowen@grc.nasa.gov> > wrote in message
news:bi5d63$u5$> 1@nntp.qnx.com> …
I have a CPU that has dual NIC’s on it. I’d like to perform a hardware
loopback from one to the other, but they are configured to be on
different
subnets, i.e. one is on 192.xxx.xxx.xxx and the other local
10.yyy.yyy.yyy.
I have a hardwired ethernet crossover cable connecting them, but traffic
between goes thru the software stack and not the wire (as evidenced by
the
program working without the cable connected).

As a last resort, I could configure them to be on the same subnet, but
the
problem of not sending the data across the wire still exists. How can I
make TCP force the transmission across the wire?

Thx,
John Bowen
\

Sean, could you give me a “nickel” description of what that is doing?

“Sean Boudreau” <seanb@node25.ott.qnx.com> wrote in message
news:bi5qp1$gp2$1@nntp.qnx.com

Here’s one way to do it:

io-net -del900 -dtulip -p tcpip

ifconfig -a

lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 33212
capabilities=7<IP4CSUM,TCP4CSUM,UDP4CSUM
enabled=0
inet 127.0.0.1 netmask 0xff000000
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet6 ::1 prefixlen 128
en0: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
capabilities=7<IP4CSUM,TCP4CSUM,UDP4CSUM
enabled=0
address: 00:01:02:49:65:ff
media: Ethernet 10baseT half-duplex
status: active
en1: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
address: 00:e0:29:1e:46:d1
media: Ethernet 10baseT half-duplex
status: active

ifconfig en0 10.25

ifconfig en1 11.163

route delete -net 10

delete net 10

route delete -net 11

delete net 11

route add -net 11 -iface 10.25 -cloning

add net 11: gateway 10.25

route add -net 10 -iface 11.163 -cloning

add net 10: gateway 11.163

ping 11.163

64 bytes from 11.0.0.163: icmp_seq=0 ttl=255 time=1.000 ms

John Bowen <> John.Bowen@grc.nasa.gov> > wrote:
I have a CPU that has dual NIC’s on it. I’d like to perform a hardware
loopback from one to the other, but they are configured to be on
different
subnets, i.e. one is on 192.xxx.xxx.xxx and the other local
10.yyy.yyy.yyy.
I have a hardwired ethernet crossover cable connecting them, but traffic
between goes thru the software stack and not the wire (as evidenced by
the
program working without the cable connected).

As a last resort, I could configure them to be on the same subnet, but
the
problem of not sending the data across the wire still exists. How can I
make TCP force the transmission across the wire?

Thx,
John Bowen

It deletes the routes that are set automatically
when you configure the interfaces. It then replaces
them with ones pointing at the interfaces themselves.
The -cloning is so that the stack still arps for
the destination.

-seanb

John Bowen <John.Bowen@grc.nasa.gov> wrote:

Sean, could you give me a “nickel” description of what that is doing?

“Sean Boudreau” <> seanb@node25.ott.qnx.com> > wrote in message
news:bi5qp1$gp2$> 1@nntp.qnx.com> …
Here’s one way to do it:

io-net -del900 -dtulip -p tcpip

ifconfig -a

lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 33212
capabilities=7<IP4CSUM,TCP4CSUM,UDP4CSUM
enabled=0
inet 127.0.0.1 netmask 0xff000000
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet6 ::1 prefixlen 128
en0: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
capabilities=7<IP4CSUM,TCP4CSUM,UDP4CSUM
enabled=0
address: 00:01:02:49:65:ff
media: Ethernet 10baseT half-duplex
status: active
en1: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
address: 00:e0:29:1e:46:d1
media: Ethernet 10baseT half-duplex
status: active

ifconfig en0 10.25

ifconfig en1 11.163

route delete -net 10

delete net 10

route delete -net 11

delete net 11

route add -net 11 -iface 10.25 -cloning

add net 11: gateway 10.25

route add -net 10 -iface 11.163 -cloning

add net 10: gateway 11.163

ping 11.163

64 bytes from 11.0.0.163: icmp_seq=0 ttl=255 time=1.000 ms

John Bowen <> John.Bowen@grc.nasa.gov> > wrote:
I have a CPU that has dual NIC’s on it. I’d like to perform a hardware
loopback from one to the other, but they are configured to be on
different
subnets, i.e. one is on 192.xxx.xxx.xxx and the other local
10.yyy.yyy.yyy.
I have a hardwired ethernet crossover cable connecting them, but traffic
between goes thru the software stack and not the wire (as evidenced by
the
program working without the cable connected).

As a last resort, I could configure them to be on the same subnet, but
the
problem of not sending the data across the wire still exists. How can I
make TCP force the transmission across the wire?

Thx,
John Bowen