Skip to main content

Trying to make CRC errors with scapy

More
11 years 3 months ago #38198 by yoda9999
I'm trying to make CRC errors with scapy on Linux, but the Cisco 3750 and 2950 switches won't show any CRC or FCS errors. I just wanted to make some to help someone testing SNMP. Wiresharks running on both my Linux eth2 port and on the SPAN port show "Frame check sequence: 0x61616161 [incorrect, should be 0xcfc42298]".

Any ideas on what could be the issue? I'm guessing Cisco just expects the FCS to be somewhere else.

[root@localhost ~]# scapy
INFO: Can't import python gnuplot wrapper . Won't be able to plot.
INFO: Can't import PyX. Won't be able to use psdump() or pdfdump().
WARNING: No route found for IPv6 destination :: (no default route?)
Welcome to Scapy (2.0.0.10 beta)
>>> from scapy.all import *
>>> import socket
>>> s = socket.socket(socket.AF_PACKET, socket.SOCK_RAW)
>>> s.bind(("eth2",0))
>>> frame = Ether()/IP(dst="10.10.11.254")/ICMP()/"XXXXXXXXXXXXXXX"
>>> s.send(str(frame)+"aaaa")
61
>>>


LABSWITCH#sh int gi0/1
GigabitEthernet0/1 is up, line protocol is up (connected)
Hardware is Gigabit Ethernet, address is 0016.9d66.1bd9 (bia 0016.9d66.1bd9)
MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 1000Mb/s, media type is RJ45
input flow-control is off, output flow-control is on
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output 00:00:09, output hang never
Last clearing of "show interface" counters 01:13:15
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
1359 packets input, 87114 bytes, 0 no buffer
Received 1347 broadcasts (0 multicast)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 0 multicast, 0 pause input
0 input packets with dribble condition detected
1408 packets output, 120119 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 PAUSE output
0 output buffer failures, 0 output buffers swapped out


LABSWITCH#sh controllers ethernet-controller gigabitEthernet 0/1

Transmit Receive
137118 Bytes 120984 Bytes
1623 Frames 1813 Frames
1009 Multicast frames 0 FCS errors
58 Broadcast frames 0 Multicast frames
0 Pause frames 1786 Broadcast frames
0 Single defer frames 0 Control frames
0 Multiple defer frames 0 Pause frames
0 1 collision frames 0 Unknown opcode frames
0 2-15 collisions 0 Alignment errors
0 Late collisions 0 Length out of range
0 Excessive collisions 0 Symbol error frames
0 Total collisions 0 False carrier errors
0 Control frames 0 Valid frames, too small
0 VLAN discard frames 0 Valid frames, too large
0 Too old frames 0 Invalid frames, too small
0 Tagged frames 0 Invalid frames, too large
0 Aborted Tx frames 0 Discarded frames

Transmit and Receive
2362 Minimum size frames
1055 65 to 127 byte frames
12 128 to 255 byte frames
4 256 to 511 byte frames
0 512 to 1023 byte frames
3 1024 to 1518 byte frames
0 1519 to 1522 byte frames
Time to create page: 0.139 seconds