Retrouver le numéro du port du switch cisco avec tcpdump (si CDP est activé)


root@gayant:~# tcpdump -i net3 -c1 -s0 -XX ‘ether[20:2]=0x2000′


tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on net3, link-type EN10MB (Ethernet), capture size 65535 bytes
14:07:51.990245 CDPv2, ttl: 180s, Device-ID ‘2960.lab.fr’, length 367
0x0000: 0100 0ccc cccc 9c4e 205e 8324 0177 aaaa …….N.^.$.w..
0x0010: 0300 000c 2000 02b4 244b 0001 000f 3239 ……..$K….29
0x0020: 3630 2e6c 6162 2e66 7200 0500 be43 6973 60.lab.fr….Cis
0x0030: 636f 2049 4f53 2053 6f66 7477 6172 652c co.IOS.Software,
0x0040: 2043 3239 3630 2053 6f66 7477 6172 6520 .C2960.Software.
0x0050: 2843 3239 3630 2d4c 414e 4241 5345 4b39 (C2960-LANBASEK9
0x0060: 2d4d 292c 2056 6572 7369 6f6e 2031 322e -M),.Version.12.
0x0070: 3228 3434 2953 4536 2c20 5245 4c45 4153 2(44)SE6,.RELEAS
0x0080: 4520 534f 4654 5741 5245 2028 6663 3129 E.SOFTWARE.(fc1)
0x0090: 0a43 6f70 7972 6967 6874 2028 6329 2031 .Copyright.(c).1
0x00a0: 3938 362d 3230 3039 2062 7920 4369 7363 986-2009.by.Cisc
0x00b0: 6f20 5379 7374 656d 732c 2049 6e63 2e0a o.Systems,.Inc..
0x00c0: 436f 6d70 696c 6564 204d 6f6e 2030 392d Compiled.Mon.09-
0x00d0: 4d61 722d 3039 2031 383a 3130 2062 7920 Mar-09.18:10.by.
0x00e0: 6765 7265 6464 7900 0600 1a63 6973 636f gereddy…. cisco
0x00f0: 2057 532d 4332 3936 3047 2d34 3854 432d .WS-C2960G-48TC-
0x0100: 4c00 0200 1100 0000 0101 01cc 0004 ac10 L……………
0x0110: 100a 0003 0017 4769 6761 6269 7445 7468 ……GigabitEth
0x0120: 6572 6e65 7430 2f33 3600 0400 0800 0000 ernet0/36…….
0x0130: 2800 0800 2400 000c 0112 0000 0000 ffff (…$………..
0x0140: ffff 0102 2504 0000 0000 0000 9c4e 205e ….%……..N.^
0x0150: 8300 ff00 0000 0900 0400 0a00 0600 0100 …………….
0x0160: 0b00 0501 0016 0011 0000 0001 0101 cc00 …………….
0x0170: 04ac 1010 0a00 1a00 1000 0000 0100 0000 …………….
0x0180: 00ff ffff ff …..
1 packets captured
86 packets received by filter
0 packets dropped by kernel

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *