852T: Problem getting traffic out FEC interface using vlan
Keith Redfern
keith.redfern at uk.flextronics.com
Tue Aug 8 22:34:19 EST 2006
The system that I am using is as follows.....
Embedded Linux on a Motorola 852T processor with FEC support. Embedded
Planet BSP
Software that runs on the embedded processor to send UDP packets, via
the FEC port (eth1), to a PC.
This PC is directly linked to the FEC port with a cable and is running
etherpeek.
Software that runs on the embedded processor to listen to all received
traffic at the FEC (uses RAW packet socket).
802.1q Support has been enabled in the kernel. 802.1Q VLAN Support v1.8
Ben Greear <greearb at candelatech.com>
The vlan configuration that I am applying is ......
> ifconfig eth1 down
> ifconfig eth1 0.0.0.0 up
> vconfig add eth1 2
> ifconfig eth1.2 192.168.2.2 up
After this is done ifconfig returns the following .....
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:10:EC:00:52:FC
inet addr:10.226.210.86 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:210599 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:20804624 (19.8 MiB) TX bytes:0 (0.0 B)
Base address:0x3e00
eth1 Link encap:Ethernet HWaddr 00:10:EC:80:52:FC
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:64 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:9055 (8.8 KiB) TX bytes:365 (365.0 B)
Base address:0xe00
eth1.2 Link encap:Ethernet HWaddr 00:10:EC:80:52:FC
inet addr:192.168.2.2 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:276 (276.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:122 (122.0 B) TX bytes:122 (122.0 B)
Running the raw packet analyzing program in the background (dumps bytes
to screen) and then invoking the UDP send program (INET, SOCK_DGRAM
socket) to send UDP packets to the pc running etherpeek, I see the
following ........
# udpSend 192.168.2.1 jjjj
udpSend: sending data to '192.168.2.1' (IP : 192.168.2.1)
# ff ff ff ff ff ff 00 10 ec 80
52 fc 08 06 00 01 08 00 06 04
00 01 00 10 ec 80 52 fc c0 a8
02 02 00 00 00 00 00 00 c0 a8
02 01
Waiting for packets
Pkt Received of length 46:
ff ff ff ff ff ff 00 10 ec 80
52 fc 81 00 00 02 08 06 00 01
08 00 06 04 00 01 00 10 ec 80
52 fc c0 a8 02 02 00 00 00 00
00 00 c0 a8 02 01
Waiting for packets
ff ff ff ff ff ff 00 10 ec 80
52 fc 08 06 00 01 08 00 06 04
00 01 00 10 ec 80 52 fc c0 a8
02 02 00 00 00 00 00 00 c0 a8
02 01
Waiting for packets
Pkt Received of length 46:
ff ff ff ff ff ff 00 10 ec 80
52 fc 81 00 00 02 08 06 00 01
08 00 06 04 00 01 00 10 ec 80
52 fc c0 a8 02 02 00 00 00 00
00 00 c0 a8 02 01
Waiting for packets
ff ff ff ff ff ff 00 10 ec 80
52 fc 08 06 00 01 08 00 06 04
00 01 00 10 ec 80 52 fc c0 a8
02 02 00 00 00 00 00 00 c0 a8
02 01
Waiting for packets
Pkt Received of length 46:
ff ff ff ff ff ff 00 10 ec 80
52 fc 81 00 00 02 08 06 00 01
08 00 06 04 00 01 00 10 ec 80
52 fc c0 a8 02 02 00 00 00 00
00 00 c0 a8 02 01
Waiting for packets
Etherpeek doesn't show any info being received and the raw packet
analyzing program shows that the ARP and Vlan tagged ARP packets are
being seen on the receive side of the raw socket.
The stats show that info is being transmitted out eth1.2 and the lo
stats increase in the rx and tx counts. The eth1 stats stay constant.
The counts you see in eth1 are from being previously configured and
sending/receiving data.
I expect VLAN tagged ARP packets to be seen at etherpeek but understand
that the UDP packet will not be seen as the pc interface has not setup
to be vlan tagged. Can anyone shed some light on what is going on here?
Are there problems with my vconfig/ifconfig settings? Are there hardware
problems that mean this can't be done?
......... Keith R
Legal Disclaimer:
The information contained in this message may be privileged and confidential. It is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete or destroy any copy of this message
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20060808/e83b33eb/attachment.htm
More information about the Linuxppc-embedded
mailing list