Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple issues in LLDP/CDP discovery #252

Closed
netdisco-automation opened this issue Mar 21, 2018 · 11 comments · Fixed by #355
Closed

Multiple issues in LLDP/CDP discovery #252

netdisco-automation opened this issue Mar 21, 2018 · 11 comments · Fixed by #355
Assignees
Labels

Comments

@netdisco-automation
Copy link

From @fabled on July 13, 2017 11:45

The LLDP/CDP data is not parsed correctly for proper discovery.

Find following an anonymized dump of one switch (IPs are mapped to consistent randomized IP, same goes for MACs and hostnames; the raw literal strings are anonymized inconsistently):

[19497] 2017-07-13 10:49:55  info App::Netdisco version 2.036007 loaded.
[19497] 2017-07-13 10:49:55  info show: started at Thu Jul 13 10:49:55 2017
\ {
    47.1   [
        [0] "Switch",
        [1] "IGMP",
        [2] "Host"
    ],
    48.1   [
        [0] "Switch",
        [1] "IGMP",
        [2] "Host"
    ]
}
[19497] 2017-07-13 10:49:56  info show: finished at Thu Jul 13 10:49:56 2017
[19497] 2017-07-13 10:49:56  info show: status done: Showed cdp_cap response from 0.88.192.203.
[19501] 2017-07-13 10:49:56  info App::Netdisco version 2.036007 loaded.
[19501] 2017-07-13 10:49:57  info show: started at Thu Jul 13 10:49:57 2017
\ {
    1.1     "40:d8:d7:13:d2:9f",
    3.2     ",XÍ",
    5.2     ",X6",
    6.2     ",Xë",
    9.1     "0b:f3:8d:fa:4e:64",
    10.2    ",Xt",
    11.1    "a4:67:50:c0:db:24",
    12.2    ",X·",
    13.1    "18:95:39:03:54:c5",
    14.2    ",X¼",
    15.1    "f8:81:12:f8:41:d9",
    16.2    ",XR",
    17.2    ",X´",
    18.1    "e7:08:68:9a:c5:04",
    21.2    ",XJ",
    22.2    ",XÞ",
    24.2    ",X«",
    25.1    "16:41:d4:24:47:4c",
    26.2    ",XÌ",
    27.1    "66:6f:25:9b:16:67",
    29.1    "14:5a:31:bf:21:ee",
    30.2    ",Xç",
    31.1    "06:73:d4:7d:1e:7a",
    32.2    ",X=",
    33.1    "host-4f71bf40",
    34.1    "host-48437dba",
    35.1    "host-50977e40",
    36.1    "4d:85:29:c1:33:32",
    37.1    "host-660ffd5b",
    38.1    "host-41c62969",
    39.1    "d3:bf:53:95:23:4e",
    40.2    ",XW",
    41.1    "host-773a0d11",
    42.1    "host-34c356af",
    43.2    ",Xå",
    44.1    "host-4118779b",
    47.1    "4f:6a:84:7b:70:b0",
    48.1    "4f:6a:84:7b:70:b0",
    49.1    "fd:f7:d7:37:89:d4",
    50.1    "host-705eadf9",
    51.2    ",R¼",
    53.1    "55:ab:93:82:06:c1",
    55.2    ",X�",
    56.2    ",X°",
    57.2    ",XU",
    58.2    ",Xk",
    60.1    "84:ca:2d:f5:e6:34",
    61.2    ",XÕ",
    62.2    ",X",
    64.1    "host-0ae6af76",
    65.1    "f2:65:73:19:d1:c4",
    66.1    "host-154b5a95",
    67.1    "e3:61:50:ea:0e:3d",
    68.2    ",X!",
    70.1    "host-66825229",
    72.2    ",X"",
    74.2    ",Xg",
    75.1    "5f:30:20:39:bc:3d",
    76.2    ",X[",
    77.1    "3d:1b:e6:a9:c9:8e",
    79.1    "d3:9c:d8:4b:1d:a8",
    80.2    ",Xx",
    81.1    "6e:03:1c:bc:cf:9f",
    82.2    ",Xg",
    83.2    ",X�",
    84.2    ",Xø",
    86.2    ",X×",
    87.1    "c2:e7:24:d6:e1:41",
    88.1    "25:f0:72:8f:0c:55",
    89.1    "b4:ef:71:41:02:21",
    90.2    ",Xá",
    92.2    ",X�",
    94.2    ",X½",
    95.2    ",X_",
    97.2    ",X·",
    99.1    "52:2a:10:33:f0:bb",
    100.2   ",X�",
    102.2   ",X}",
    104.2   ",X�",
    105.1   "91:7f:68:b4:7e:ca",
    106.2   ",X�",
    108.2   ",X�",
    109.1   "a8:c2:27:3a:5a:94",
    111.1   "69:46:4b:39:9e:0b",
    112.2   ",X",
    113.1   "7f:b3:95:5c:57:b6",
    117.1   "4e:09:ca:1c:8f:66",
    118.2   ",Xè",
    120.1   "65:f7:4f:5f:d2:a2",
    121.1   "db:57:0a:38:17:6e",
    122.1   "f0:e1:b8:31:fd:7d",
    124.2   ",X�",
    125.1   "4f:5e:56:92:02:b7",
    126.2   ",X�",
    127.1   "be:f3:7f:1a:87:64",
    128.2   ",X�",
    130.2   ",X®",
    131.1   "a7:21:78:78:57:4d",
    132.2   ",X8",
    134.2   ",X�",
    136.2   ",X^",
    139.1   "44:32:d5:42:d4:38",
    140.2   ",Xµ",
    142.2   ",X",
    145.1   "b4:6d:20:3f:19:70",
    146.2   ",Xç",
    147.1   "f9:f1:44:75:2c:89",
    148.2   ",X",
    151.1   "03:81:61:86:f0:c2",
    152.1   "1c:fe:52:ad:0c:74",
    153.1   "ea:24:af:c9:cf:af",
    154.2   ",X�",
    155.1   "6c:fb:bc:4a:8c:0b",
    156.2   ",X",
    157.1   "c2:9d:6b:32:b9:7d",
    158.2   ",X{",
    160.2   ",X",
    162.1   "94:b8:4c:85:19:06",
    163.1   "c8:b4:c5:25:58:9d",
    164.2   ",X·",
    167.1   "36:a1:ab:7b:65:48",
    168.1   "host-5fe01961",
    169.1   "32:4f:2f:a1:23:fe",
    171.2   ",Xt",
    172.2   ",Xl",
    174.2   ",X®",
    175.1   "83:54:e8:34:aa:fe",
    176.2   ",X�",
    182.1   "host-1eb00e2d",
    184.1   "c7:10:ee:29:fc:90",
    185.2   ",XÙ",
    186.2   ",X²",
    187.2   ",XA",
    191.1   "host-05140584",
    192.1   "host-0b3a3378"
}
[19501] 2017-07-13 10:49:57  info show: finished at Thu Jul 13 10:49:57 2017
[19501] 2017-07-13 10:49:57  info show: status done: Showed cdp_id response from 0.88.192.203.
[19505] 2017-07-13 10:49:59  info App::Netdisco version 2.036007 loaded.
[19505] 2017-07-13 10:49:59  info show: started at Thu Jul 13 10:49:59 2017
\ {
    3.2     "199.48.32.154",
    5.2     "80.171.108.136",
    6.2     "180.112.168.253",
    10.2    "138.116.13.118",
    12.2    "64.111.170.88",
    14.2    "199.174.4.109",
    16.2    "12.240.57.55",
    17.2    "205.118.213.178",
    21.2    "56.83.246.121",
    22.2    "167.204.100.43",
    24.2    "103.120.136.237",
    26.2    "253.241.197.110",
    30.2    "186.102.111.233",
    32.2    "23.11.209.29",
    33.1    "187.0.209.181",
    34.1    "250.154.124.33",
    35.1    "237.202.90.36",
    37.1    "40.82.237.85",
    38.1    "56.7.227.76",
    40.2    "141.166.249.213",
    41.1    "121.112.89.176",
    42.1    "206.110.17.56",
    43.2    "35.23.192.201",
    44.1    "86.207.135.198",
    47.1    "72.68.141.204",
    48.1    "72.68.141.204",
    50.1    "163.171.94.251",
    51.2    "39.48.71.188",
    55.2    "124.209.45.47",
    56.2    "43.128.93.75",
    57.2    "76.240.167.129",
    58.2    "127.68.106.118",
    61.2    "0.57.220.38",
    62.2    "119.142.41.143",
    64.1    "117.240.114.160",
    66.1    "195.250.31.180",
    68.2    "123.117.90.140",
    70.1    "88.110.159.34",
    72.2    "124.12.54.115",
    74.2    "247.142.245.177",
    76.2    "229.11.170.128",
    80.2    "245.206.154.13",
    82.2    "162.146.194.75",
    83.2    "28.208.126.68",
    84.2    "148.105.232.37",
    86.2    "66.132.174.167",
    90.2    "3.222.244.244",
    92.2    "160.61.12.162",
    94.2    "227.108.19.70",
    95.2    "234.18.118.34",
    97.2    "70.62.102.128",
    100.2   "119.5.13.223",
    102.2   "172.93.127.42",
    104.2   "20.253.210.17",
    106.2   "72.151.9.204",
    108.2   "119.181.20.183",
    112.2   "197.71.251.59",
    118.2   "12.38.198.140",
    124.2   "8.47.0.30",
    126.2   "66.169.248.164",
    128.2   "27.201.33.113",
    130.2   "0.176.168.72",
    132.2   "165.57.65.29",
    134.2   "255.194.135.65",
    136.2   "67.4.30.123",
    140.2   "168.176.84.114",
    142.2   "51.172.179.191",
    146.2   "85.168.31.206",
    148.2   "192.200.205.204",
    154.2   "254.17.196.131",
    156.2   "53.31.151.138",
    158.2   "250.65.245.81",
    160.2   "64.111.85.125",
    164.2   "138.164.36.63",
    168.1   "3.94.209.42",
    171.2   "24.218.239.35",
    172.2   "237.158.42.55",
    174.2   "226.71.142.69",
    176.2   "86.75.215.121",
    182.1   "238.213.196.79",
    185.2   "22.211.10.49",
    186.2   "89.239.9.26",
    187.2   "107.146.25.230",
    191.1   "123.14.118.9",
    192.1   "35.65.53.181"
}
[19505] 2017-07-13 10:50:00  info show: finished at Thu Jul 13 10:50:00 2017
[19505] 2017-07-13 10:50:00  info show: status done: Showed cdp_ip response from 0.88.192.203.
[19510] 2017-07-13 10:50:01  info App::Netdisco version 2.036007 loaded.
[19510] 2017-07-13 10:50:01  info show: started at Thu Jul 13 10:50:01 2017
\ {
    1.1     "�XÔ>×Y",
    3.2     1,
    5.2     1,
    6.2     1,
    9.1     "¤XSX�",
    10.2    1,
    11.1    "¼X[©Xð",
    12.2    1,
    13.1    "¤rXXæ",
    14.2    1,
    15.1    "¤rXX",
    16.2    1,
    17.2    1,
    18.1    "Ä4XXÕç",
    21.2    1,
    22.2    1,
    24.2    1,
    25.1    "Ä4XXçy",
    26.2    1,
    27.1    "Ä4XXÍV",
    29.1    "Ä4XXÍL",
    30.2    1,
    31.1    "Ô¾XXBA",
    32.2    1,
    33.1    "GigabitEthernet0",
    34.1    "GigabitEthernet0",
    35.1    "GigabitEthernet0",
    36.1    "�XX9¨¹",
    37.1    "GigabitEthernet0",
    38.1    "GigabitEthernet0",
    39.1    "Ô¾XX�/",
    40.2    1,
    41.1    "GigabitEthernet0",
    42.1    "GigabitEthernet0",
    43.2    1,
    44.1    "GigabitEthernet0",
    47.1    "D3",
    48.1    "B3",
    49.1    "¼0XXv÷",
    50.1    "GigabitEthernet0",
    51.2    1,
    53.1    "ð�XX",
    55.2    1,
    56.2    1,
    57.2    1,
    58.2    1,
    60.1    "ÐgXX",
    61.2    1,
    62.2    1,
    64.1    "GigabitEthernet0",
    65.1    "�ÜXX¨ª",
    66.1    "GigabitEthernet0",
    67.1    "¤rXX~",
    68.2    1,
    70.1    "GigabitEthernet0",
    72.2    1,
    74.2    1,
    75.1    " ÓXX�",
    76.2    1,
    77.1    "Ä4XXÏó",
    79.1    "ð�XXÿ",
    80.2    1,
    81.1    "Ä4XXÊ�",
    82.2    1,
    83.2    1,
    84.2    1,
    86.2    1,
    87.1    "ð�XX¶",
    88.1    "ð�XX�",
    89.1    "¤rXX�",
    90.2    1,
    92.2    1,
    94.2    1,
    95.2    1,
    97.2    1,
    99.1    "ð�XX®",
    100.2   1,
    102.2   1,
    104.2   1,
    105.1   "ÔXXÀ?",
    106.2   1,
    108.2   1,
    109.1   "Ô¾ÙXXg",
    111.1   "ðXXìÕ",
    112.2   1,
    113.1   "Ô¾XX¹I",
    117.1   "Ä4XXÍ`",
    118.2   1,
    120.1   " XX�o",
    121.1   "PXX",
    122.1   "�XX5ê�",
    124.2   1,
    125.1   "¤rXXV",
    126.2   1,
    127.1   "¤rXXµ",
    128.2   1,
    130.2   1,
    131.1   "ð�XXa",
    132.2   1,
    134.2   1,
    136.2   1,
    139.1   "�ÜXXco",
    140.2   1,
    142.2   1,
    145.1   "Ô¾XX»V",
    146.2   1,
    147.1   "¤rXXè",
    148.2   1,
    151.1   "¤rXXü",
    152.1   "ð�XXÍ",
    153.1   " ÓÁXX±",
    154.2   1,
    155.1   "¤rXX=",
    156.2   1,
    157.1   "�XX9¨°",
    158.2   1,
    160.2   1,
    162.1   "Ô¾XX9Ú",
    163.1   "¤rXX'",
    164.2   1,
    167.1   "¤rXX@",
    168.1   "GigabitEthernet0",
    169.1   "Ä4kXX�",
    171.2   1,
    172.2   1,
    174.2   1,
    175.1   "Ä4kXX�",
    176.2   1,
    182.1   "GigabitEthernet0",
    184.1   "Ä4kXXH",
    185.2   1,
    186.2   1,
    187.2   1,
    191.1   "GigabitEthernet0",
    192.1   "GigabitEthernet0"
}
[19510] 2017-07-13 10:50:02  info show: finished at Thu Jul 13 10:50:02 2017
[19510] 2017-07-13 10:50:02  info show: status done: Showed cdp_port response from 0.88.192.203.
[19514] 2017-07-13 10:50:02  info App::Netdisco version 2.036007 loaded.
[19514] 2017-07-13 10:50:03  info show: started at Thu Jul 13 10:50:03 2017
\ {
    0.3.2     [
        [0] "bridge",
        [1] "telephone"
    ],
    0.5.2     [
        [0] "bridge",
        [1] "telephone"
    ],
    0.6.2     [
        [0] "bridge",
        [1] "telephone"
    ],
    0.10.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.12.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.14.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.16.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.17.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.21.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.22.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.24.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.26.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.30.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.32.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.40.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.43.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.47.1    [
        [0] "bridge",
        [1] "router"
    ],
    0.48.1    [
        [0] "bridge",
        [1] "router"
    ],
    0.51.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.55.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.56.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.57.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.58.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.61.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.62.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.68.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.72.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.74.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.76.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.80.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.82.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.83.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.84.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.86.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.90.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.92.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.94.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.95.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.97.2    [
        [0] "bridge",
        [1] "telephone"
    ],
    0.100.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.102.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.104.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.106.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.108.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.112.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.118.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.124.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.126.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.128.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.130.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.132.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.134.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.136.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.140.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.142.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.146.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.148.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.154.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.156.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.158.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.160.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.164.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.171.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.172.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.174.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.176.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.185.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.186.2   [
        [0] "bridge",
        [1] "telephone"
    ],
    0.187.2   [
        [0] "bridge",
        [1] "telephone"
    ]
}
[19514] 2017-07-13 10:50:04  info show: finished at Thu Jul 13 10:50:04 2017
[19514] 2017-07-13 10:50:04  info show: status done: Showed lldp_cap response from 0.88.192.203.
[19518] 2017-07-13 10:50:04  info App::Netdisco version 2.036007 loaded.
[19518] 2017-07-13 10:50:05  info show: started at Thu Jul 13 10:50:05 2017
\ {
    0.1.1     "40:d8:d7:13:d2:9f",
    0.3.2     "199.48.32.154",
    0.5.2     "80.171.108.136",
    0.6.2     "180.112.168.253",
    0.9.1     "0b:f3:8d:fa:4e:64",
    0.10.2    "138.116.13.118",
    0.11.1    "a4:67:50:c0:db:24",
    0.12.2    "64.111.170.88",
    0.13.1    "18:95:39:03:54:c5",
    0.14.2    "199.174.4.109",
    0.15.1    "f8:81:12:f8:41:d9",
    0.16.2    "12.240.57.55",
    0.17.2    "205.118.213.178",
    0.18.1    "e7:08:68:9a:c5:04",
    0.21.2    "56.83.246.121",
    0.22.2    "167.204.100.43",
    0.24.2    "103.120.136.237",
    0.25.1    "16:41:d4:24:47:4c",
    0.26.2    "253.241.197.110",
    0.27.1    "66:6f:25:9b:16:67",
    0.29.1    "14:5a:31:bf:21:ee",
    0.30.2    "186.102.111.233",
    0.31.1    "06:73:d4:7d:1e:7a",
    0.32.2    "23.11.209.29",
    0.33.1    "host-4f71bf40",
    0.34.1    "host-48437dba",
    0.35.1    "host-50977e40",
    0.36.1    "4d:85:29:c1:33:32",
    0.37.1    "host-660ffd5b",
    0.38.1    "host-41c62969",
    0.39.1    "d3:bf:53:95:23:4e",
    0.40.2    "141.166.249.213",
    0.41.1    "host-773a0d11",
    0.42.1    "host-34c356af",
    0.43.2    "35.23.192.201",
    0.44.1    "host-4118779b",
    0.47.1    "4f:6a:84:7b:70:b0",
    0.48.1    "4f:6a:84:7b:70:b0",
    0.49.1    "fd:f7:d7:37:89:d4",
    0.50.1    "host-705eadf9",
    0.51.2    "39.48.71.188",
    0.53.1    "55:ab:93:82:06:c1",
    0.55.2    "124.209.45.47",
    0.56.2    "43.128.93.75",
    0.57.2    "76.240.167.129",
    0.58.2    "127.68.106.118",
    0.60.1    "84:ca:2d:f5:e6:34",
    0.61.2    "0.57.220.38",
    0.62.2    "119.142.41.143",
    0.64.1    "host-0ae6af76",
    0.65.1    "f2:65:73:19:d1:c4",
    0.66.1    "host-154b5a95",
    0.67.1    "e3:61:50:ea:0e:3d",
    0.68.2    "123.117.90.140",
    0.70.1    "host-66825229",
    0.72.2    "124.12.54.115",
    0.74.2    "247.142.245.177",
    0.75.1    "5f:30:20:39:bc:3d",
    0.76.2    "229.11.170.128",
    0.77.1    "3d:1b:e6:a9:c9:8e",
    0.79.1    "d3:9c:d8:4b:1d:a8",
    0.80.2    "245.206.154.13",
    0.81.1    "6e:03:1c:bc:cf:9f",
    0.82.2    "162.146.194.75",
    0.83.2    "28.208.126.68",
    0.84.2    "148.105.232.37",
    0.86.2    "66.132.174.167",
    0.87.1    "c2:e7:24:d6:e1:41",
    0.88.1    "25:f0:72:8f:0c:55",
    0.89.1    "b4:ef:71:41:02:21",
    0.90.2    "3.222.244.244",
    0.92.2    "160.61.12.162",
    0.94.2    "227.108.19.70",
    0.95.2    "234.18.118.34",
    0.97.2    "70.62.102.128",
    0.99.1    "52:2a:10:33:f0:bb",
    0.100.2   "119.5.13.223",
    0.102.2   "172.93.127.42",
    0.104.2   "20.253.210.17",
    0.105.1   "91:7f:68:b4:7e:ca",
    0.106.2   "72.151.9.204",
    0.108.2   "119.181.20.183",
    0.109.1   "a8:c2:27:3a:5a:94",
    0.111.1   "69:46:4b:39:9e:0b",
    0.112.2   "197.71.251.59",
    0.113.1   "7f:b3:95:5c:57:b6",
    0.117.1   "4e:09:ca:1c:8f:66",
    0.118.2   "12.38.198.140",
    0.120.1   "65:f7:4f:5f:d2:a2",
    0.121.1   "db:57:0a:38:17:6e",
    0.122.1   "f0:e1:b8:31:fd:7d",
    0.124.2   "8.47.0.30",
    0.125.1   "4f:5e:56:92:02:b7",
    0.126.2   "66.169.248.164",
    0.127.1   "be:f3:7f:1a:87:64",
    0.128.2   "27.201.33.113",
    0.130.2   "0.176.168.72",
    0.131.1   "a7:21:78:78:57:4d",
    0.132.2   "165.57.65.29",
    0.134.2   "255.194.135.65",
    0.136.2   "67.4.30.123",
    0.139.1   "44:32:d5:42:d4:38",
    0.140.2   "168.176.84.114",
    0.142.2   "51.172.179.191",
    0.145.1   "b4:6d:20:3f:19:70",
    0.146.2   "85.168.31.206",
    0.147.1   "f9:f1:44:75:2c:89",
    0.148.2   "192.200.205.204",
    0.151.1   "03:81:61:86:f0:c2",
    0.152.1   "1c:fe:52:ad:0c:74",
    0.153.1   "ea:24:af:c9:cf:af",
    0.154.2   "254.17.196.131",
    0.155.1   "6c:fb:bc:4a:8c:0b",
    0.156.2   "53.31.151.138",
    0.157.1   "c2:9d:6b:32:b9:7d",
    0.158.2   "250.65.245.81",
    0.160.2   "64.111.85.125",
    0.162.1   "94:b8:4c:85:19:06",
    0.163.1   "c8:b4:c5:25:58:9d",
    0.164.2   "138.164.36.63",
    0.167.1   "36:a1:ab:7b:65:48",
    0.168.1   "host-5fe01961",
    0.169.1   "32:4f:2f:a1:23:fe",
    0.171.2   "24.218.239.35",
    0.172.2   "237.158.42.55",
    0.174.2   "226.71.142.69",
    0.175.1   "83:54:e8:34:aa:fe",
    0.176.2   "86.75.215.121",
    0.182.1   "host-1eb00e2d",
    0.184.1   "c7:10:ee:29:fc:90",
    0.185.2   "22.211.10.49",
    0.186.2   "89.239.9.26",
    0.187.2   "107.146.25.230",
    0.191.1   "host-05140584",
    0.192.1   "host-0b3a3378"
}
[19518] 2017-07-13 10:50:06  info show: finished at Thu Jul 13 10:50:06 2017
[19518] 2017-07-13 10:50:06  info show: status done: Showed lldp_id response from 0.88.192.203.
[19522] 2017-07-13 10:50:06  info App::Netdisco version 2.036007 loaded.
[19522] 2017-07-13 10:50:07  info show: started at Thu Jul 13 10:50:07 2017
\ {
    0.3.2     "199.48.32.154",
    0.5.2     "80.171.108.136",
    0.6.2     "180.112.168.253",
    0.10.2    "138.116.13.118",
    0.12.2    "64.111.170.88",
    0.14.2    "199.174.4.109",
    0.16.2    "12.240.57.55",
    0.17.2    "205.118.213.178",
    0.21.2    "56.83.246.121",
    0.22.2    "167.204.100.43",
    0.24.2    "103.120.136.237",
    0.26.2    "253.241.197.110",
    0.30.2    "186.102.111.233",
    0.32.2    "23.11.209.29",
    0.33.1    "187.0.209.181",
    0.34.1    "250.154.124.33",
    0.35.1    "237.202.90.36",
    0.37.1    "40.82.237.85",
    0.38.1    "56.7.227.76",
    0.40.2    "141.166.249.213",
    0.41.1    "121.112.89.176",
    0.42.1    "206.110.17.56",
    0.43.2    "35.23.192.201",
    0.44.1    "86.207.135.198",
    0.47.1    "72.68.141.204",
    0.48.1    "72.68.141.204",
    0.50.1    "163.171.94.251",
    0.51.2    "39.48.71.188",
    0.55.2    "124.209.45.47",
    0.56.2    "43.128.93.75",
    0.57.2    "76.240.167.129",
    0.58.2    "127.68.106.118",
    0.61.2    "0.57.220.38",
    0.62.2    "119.142.41.143",
    0.64.1    "117.240.114.160",
    0.66.1    "195.250.31.180",
    0.68.2    "123.117.90.140",
    0.70.1    "88.110.159.34",
    0.72.2    "124.12.54.115",
    0.74.2    "247.142.245.177",
    0.76.2    "229.11.170.128",
    0.80.2    "245.206.154.13",
    0.82.2    "162.146.194.75",
    0.83.2    "28.208.126.68",
    0.84.2    "148.105.232.37",
    0.86.2    "66.132.174.167",
    0.90.2    "3.222.244.244",
    0.92.2    "160.61.12.162",
    0.94.2    "227.108.19.70",
    0.95.2    "234.18.118.34",
    0.97.2    "70.62.102.128",
    0.100.2   "119.5.13.223",
    0.102.2   "172.93.127.42",
    0.104.2   "20.253.210.17",
    0.106.2   "72.151.9.204",
    0.108.2   "119.181.20.183",
    0.112.2   "197.71.251.59",
    0.118.2   "12.38.198.140",
    0.124.2   "8.47.0.30",
    0.126.2   "66.169.248.164",
    0.128.2   "27.201.33.113",
    0.130.2   "0.176.168.72",
    0.132.2   "165.57.65.29",
    0.134.2   "255.194.135.65",
    0.136.2   "67.4.30.123",
    0.140.2   "168.176.84.114",
    0.142.2   "51.172.179.191",
    0.146.2   "85.168.31.206",
    0.148.2   "192.200.205.204",
    0.154.2   "254.17.196.131",
    0.156.2   "53.31.151.138",
    0.158.2   "250.65.245.81",
    0.160.2   "64.111.85.125",
    0.164.2   "138.164.36.63",
    0.168.1   "3.94.209.42",
    0.171.2   "24.218.239.35",
    0.172.2   "237.158.42.55",
    0.174.2   "226.71.142.69",
    0.176.2   "86.75.215.121",
    0.182.1   "238.213.196.79",
    0.185.2   "22.211.10.49",
    0.186.2   "89.239.9.26",
    0.187.2   "107.146.25.230",
    0.191.1   "123.14.118.9",
    0.192.1   "35.65.53.181"
}
[19522] 2017-07-13 10:50:07  info show: finished at Thu Jul 13 10:50:07 2017
[19522] 2017-07-13 10:50:07  info show: status done: Showed lldp_ip response from 0.88.192.203.
[19526] 2017-07-13 10:50:08  info App::Netdisco version 2.036007 loaded.
[19526] 2017-07-13 10:50:08  info show: started at Thu Jul 13 10:50:08 2017
\ {
    0.1.1     "40:d8:d7:13:d2:9f",
    0.3.2     1,
    0.5.2     1,
    0.6.2     1,
    0.9.1     "0b:f3:8d:fa:4e:64",
    0.10.2    1,
    0.11.1    "a4:67:50:c0:db:24",
    0.12.2    1,
    0.13.1    "18:95:39:03:54:c5",
    0.14.2    1,
    0.15.1    "f8:81:12:f8:41:d9",
    0.16.2    1,
    0.17.2    1,
    0.18.1    "e7:08:68:9a:c5:04",
    0.21.2    1,
    0.22.2    1,
    0.24.2    1,
    0.25.1    "16:41:d4:24:47:4c",
    0.26.2    1,
    0.27.1    "66:6f:25:9b:16:67",
    0.29.1    "14:5a:31:bf:21:ee",
    0.30.2    1,
    0.31.1    "06:73:d4:7d:1e:7a",
    0.32.2    1,
    0.33.1    "GigabitEthernet0",
    0.34.1    "GigabitEthernet0",
    0.35.1    "GigabitEthernet0",
    0.36.1    "4d:85:29:c1:33:32",
    0.37.1    "GigabitEthernet0",
    0.38.1    "GigabitEthernet0",
    0.39.1    "d3:bf:53:95:23:4e",
    0.40.2    1,
    0.41.1    "GigabitEthernet0",
    0.42.1    "GigabitEthernet0",
    0.43.2    1,
    0.44.1    "GigabitEthernet0",
    0.47.1    "D3",
    0.48.1    "B3",
    0.49.1    "fd:f7:d7:37:89:d4",
    0.50.1    "GigabitEthernet0",
    0.51.2    1,
    0.53.1    "55:ab:93:82:06:c1",
    0.55.2    1,
    0.56.2    1,
    0.57.2    1,
    0.58.2    1,
    0.60.1    "84:ca:2d:f5:e6:34",
    0.61.2    1,
    0.62.2    1,
    0.64.1    "GigabitEthernet0",
    0.65.1    "f2:65:73:19:d1:c4",
    0.66.1    "GigabitEthernet0",
    0.67.1    "e3:61:50:ea:0e:3d",
    0.68.2    1,
    0.70.1    "GigabitEthernet0",
    0.72.2    1,
    0.74.2    1,
    0.75.1    "5f:30:20:39:bc:3d",
    0.76.2    1,
    0.77.1    "3d:1b:e6:a9:c9:8e",
    0.79.1    "d3:9c:d8:4b:1d:a8",
    0.80.2    1,
    0.81.1    "6e:03:1c:bc:cf:9f",
    0.82.2    1,
    0.83.2    1,
    0.84.2    1,
    0.86.2    1,
    0.87.1    "c2:e7:24:d6:e1:41",
    0.88.1    "25:f0:72:8f:0c:55",
    0.89.1    "b4:ef:71:41:02:21",
    0.90.2    1,
    0.92.2    1,
    0.94.2    1,
    0.95.2    1,
    0.97.2    1,
    0.99.1    "52:2a:10:33:f0:bb",
    0.100.2   1,
    0.102.2   1,
    0.104.2   1,
    0.105.1   "91:7f:68:b4:7e:ca",
    0.106.2   1,
    0.108.2   1,
    0.109.1   "a8:c2:27:3a:5a:94",
    0.111.1   "69:46:4b:39:9e:0b",
    0.112.2   1,
    0.113.1   "7f:b3:95:5c:57:b6",
    0.117.1   "4e:09:ca:1c:8f:66",
    0.118.2   1,
    0.120.1   "65:f7:4f:5f:d2:a2",
    0.121.1   "db:57:0a:38:17:6e",
    0.122.1   "f0:e1:b8:31:fd:7d",
    0.124.2   1,
    0.125.1   "4f:5e:56:92:02:b7",
    0.126.2   1,
    0.127.1   "be:f3:7f:1a:87:64",
    0.128.2   1,
    0.130.2   1,
    0.131.1   "a7:21:78:78:57:4d",
    0.132.2   1,
    0.134.2   1,
    0.136.2   1,
    0.139.1   "44:32:d5:42:d4:38",
    0.140.2   1,
    0.142.2   1,
    0.145.1   "b4:6d:20:3f:19:70",
    0.146.2   1,
    0.147.1   "f9:f1:44:75:2c:89",
    0.148.2   1,
    0.151.1   "03:81:61:86:f0:c2",
    0.152.1   "1c:fe:52:ad:0c:74",
    0.153.1   "ea:24:af:c9:cf:af",
    0.154.2   1,
    0.155.1   "6c:fb:bc:4a:8c:0b",
    0.156.2   1,
    0.157.1   "c2:9d:6b:32:b9:7d",
    0.158.2   1,
    0.160.2   1,
    0.162.1   "94:b8:4c:85:19:06",
    0.163.1   "c8:b4:c5:25:58:9d",
    0.164.2   1,
    0.167.1   "36:a1:ab:7b:65:48",
    0.168.1   "GigabitEthernet0",
    0.169.1   "32:4f:2f:a1:23:fe",
    0.171.2   1,
    0.172.2   1,
    0.174.2   1,
    0.175.1   "83:54:e8:34:aa:fe",
    0.176.2   1,
    0.182.1   "GigabitEthernet0",
    0.184.1   "c7:10:ee:29:fc:90",
    0.185.2   1,
    0.186.2   1,
    0.187.2   1,
    0.191.1   "GigabitEthernet0",
    0.192.1   "GigabitEthernet0"
}
[19526] 2017-07-13 10:50:10  info show: finished at Thu Jul 13 10:50:10 2017
[19526] 2017-07-13 10:50:10  info show: status done: Showed lldp_port response from 0.88.192.203.

Observations:

  1. cdp_id contains entries with binary characters. It seems to report 4-octet raw IP there in certain cases.
  2. cdp_port contains entries with binary characters. It seems to report 6-octet raw MAC there in certain cases.
  3. cdp vs. lldp index differs by lldp being prefixed with a '0.'. This causes discovery code in ./lib/App/Netdisco/Core/Discover.pm:732 to handle both indexes. In most cases CDP wins, but it returns less data than LLDP (e.g. in c_cap results the 'telephone' capability is missing) causing certain devices classified incorrectly if CDP is enabled on switch.

Copied from original issue: netdisco/netdisco#329

@netdisco-automation
Copy link
Author

From @fabled on July 13, 2017 11:47

Apparently the LLDP '0' oid prefix is LLDP's TimeFilter index. It should probably be stripped away, and re-inserted on queries where needed.

@netdisco-automation
Copy link
Author

From @JeroenvIS on July 13, 2017 15:55

Please don't strip anything (like the LLDP '0' oid prefix) from the keys. Each key should already map to a local port, and all "0.x.y" and "x.y" keys should already map back to the same local port "x". So without modifying the keys it's already clear that CDP and/or LLDP report multiple neighbor records for the same local port.

The challenge is in deciding what records are "best", IMHO...

@netdisco-automation
Copy link
Author

From @fabled on July 14, 2017 5:10

Yes, it is true that all the indexes map correctly. But I find the c_cap and similar functions slightly futile if caller needs to anyway do manual job combining the different protocol type results. It might be simpler for netdisco to just call lldp_cap and cdp_cap in separate loops then. Another alternative is to first resolve each index to an interface index, and have logic to figure out which index wins - and only do discovery on the winning cdp/lldp indexes or similar. In any case it will require additional logic.

@netdisco-automation
Copy link
Author

From @ollyg on July 14, 2017 13:1

@JeroenvIS the intention is not to mess with lldp_* or cdp_* or the indexing, but I think we need to do one of two things with c_*:

  • rewrite code in Netdisco to handle multiple entries with different indexes and values which map to the same port
  • accept that "common neighbor table interface" simply cannot be done in a useful/meaninful way, and that c_* methods WILL return data incompatible with the underlying lldp or cdp methods from which they are composed.

Personally I am inclined to the latter... Netdisco should ask SNMP::Info for "normalised" neighbor information and that is what the whole common neighbor table interface is for. If a user wants the actual lldp or cdp tables they are still available. The normalised table should contain the rules for selecting interface indexes and prioritising results from different protocols that conflict or contradict.

@netdisco-automation
Copy link
Author

From @JeroenvIS on July 14, 2017 14:56

@ollyg Agreed, but then I'd like to suggest deprecating the c_* methods and implement new methods for this purpose in SNMP::Info; for example, methods like 'neigh_*'. That way other SNMP::Info users can migrate their code at their own pace.

The common topology table methods below will query the
device for information from the specified topology protocols and return a
single hash combining all information. As a result, there may be identical
topology information returned from the two protocols causing duplicate
entries. It is the calling program's responsibility to identify any
duplicate entries and remove duplicates if necessary.

@netdisco-automation
Copy link
Author

From @ollyg on July 14, 2017 15:1

Fair point, yes, we should do it that way.

@jeneric
Copy link
Member

jeneric commented May 2, 2018

Plan to modify the munge routines to handle the binary values returned in 'cdp_id' and 'cdp_port', issues 1 and 2.

It was a conscious decision to keep the timefilter in the lldp index so the combined results from the c_* methods would not lose data or randomly overwrite each other due to random hash ordering.

I'm not clear on the need to create new 'neigh_' methods. Each L2 topology protocol has methods where they can be polled independently. My position is that the SNMP::Info library does not have the information to effectively merge and de-duplicate the results from multiple protocols. For example, determining which protocol best identifies the remote port. That's why the documentation states it is the calling program's responsibility to remove duplicates from the combined results of the 'c_' methods.

I have noticed that some vendors have included a new proprietary MIB leaf to identify the protocol source of the topology information when they combine multiple protocols in the same MIB structure. For example, reporting CDP information in the LLDP table. We could add a new method to indicate the source and use the leafs when available, but I'm not sure that would be any better than just using the protocol specific methods.

@jeneric jeneric self-assigned this May 8, 2018
jeneric added a commit that referenced this issue May 10, 2018
@jeneric
Copy link
Member

jeneric commented May 10, 2018

The CDP class has been modified to unpack a binary MAC if present in cdp_port (issue 2).

However, I am unable to determine a reliable way to determine that we were given a packed IP in cdp_id (issue 1) since unpacking of a text system name will result in the return of what looks like an IPv4 address. The MIB states this should be a display string and it doesn't seem to be a common occurrence. So to avoid potentially returning a bogus IP, this has not been resolved.

The last issue CDP vs. LLDP (issue 3) was a conscious design decision to return the most information available to the calling application. The documentation states that it is the calling application's responsibility to remove duplicates and determine which information to keep, for example keep the entry that returns capability information or even merge the two results. The example code in the documentation illustrates that the entries should be cross referenced to the port on which the neighbor was seen. When this is done, the index becomes irrelevant.

There is the potential that a distinct CDP (or another proprietary protocol) and LLDP neighbors are present on the same port. Additionally, because protocols may use different information to represent neighbors and additional context is needed, such as correlating a MAC to a specific neighbor device and port, I think the analysis it best served by the calling application rather than the SNMP::Info library.

With this explanation I'm closing this ticket. It can be reopened if I've misunderstood the issue(s).

@jeneric jeneric closed this as completed May 10, 2018
@inphobia
Copy link
Member

78119d6

$port = SNMP::Info::munge_mac($port) || SNMP::Info::munge_null($port);

this actually breaks a whole lot. if the portname is exactly 6 characters long the munge_mac will convert it to an convert it to a formatted mac address and break topology.

for example, all of our phones return:

CISCO-CDP-MIB::cdpCacheDevicePort.10104.2 = STRING: Port 1
CISCO-CDP-MIB::cdpCacheDevicePort.10116.155 = STRING: Port 1
CISCO-CDP-MIB::cdpCacheDevicePort.10126.143 = STRING: Port 1
CISCO-CDP-MIB::cdpCacheDevicePort.10128.149 = STRING: Port 1
CISCO-CDP-MIB::cdpCacheDevicePort.10133.156 = STRING: Port 1
CISCO-CDP-MIB::cdpCacheDevicePort.10135.145 = STRING: Port 1

with this change snmp::info returns for cdp_port():

SNMP::Info::_load_attr cdp_dev_port : CISCO-CDP-MIB::cdpCacheDevicePort : .1.3.6.1.4.1.9.9.23.1.2.1.1.7
\ {
    10104.2     "50:6f:72:74:20:31",
    10116.155   "50:6f:72:74:20:31",
    10126.143   "50:6f:72:74:20:31",
    10128.149   "50:6f:72:74:20:31",
    10133.156   "50:6f:72:74:20:31",
    10135.145   "50:6f:72:74:20:31",
    10301.141   "GigabitEthernet1/1/3"
}

cdp_dev_port() works as expected:

SNMP::Info::_load_attr cdp_dev_port : CISCO-CDP-MIB::cdpCacheDevicePort : .1.3.6.1.4.1.9.9.23.1.2.1.1.7
\ {
    10104.2     "Port 1",
    10116.155   "Port 1",
    10126.143   "Port 1",
    10128.149   "Port 1",
    10133.156   "Port 1",
    10135.145   "Port 1",
    10301.141   "GigabitEthernet1/1/3"
}

i don't see an easy way to make both embedded mac addresses & valid port names work together.

as such i'm inclined to revert this part. the mib says this is a string, so just accept that.

perhaps a solution like #54 is a decent middle ground, where the fixup is only applied for certain known broken vendors/devices?

@inphobia
Copy link
Member

actual example from nexus6200 & vmware 6.7:
image

as seen on the esx host this mac address in bogus:

Name    PCI          Driver      Link Speed      Duplex MAC Address       MTU    Description
vmnic0  0000:06:00.0 nenic       Up   20000Mbps  Full   00:25:b5:08:10:ef 9000   Cisco Systems Inc Cisco VIC Ethernet NIC
vmnic1  0000:07:00.0 nenic       Up   20000Mbps  Full   00:25:b5:08:21:ef 9000   Cisco Systems Inc Cisco VIC Ethernet NIC
vmnic2  0000:08:00.0 nenic       Up   20000Mbps  Full   00:25:b5:08:10:bf 9000   Cisco Systems Inc Cisco VIC Ethernet NIC
vmnic3  0000:09:00.0 nenic       Up   20000Mbps  Full   00:25:b5:08:21:bf 9000   Cisco Systems Inc Cisco VIC Ethernet NIC
vmnic4  0000:0e:00.0 nenic       Up   20000Mbps  Full   00:25:b5:08:10:cf 1500   Cisco Systems Inc Cisco VIC Ethernet NIC
vmnic5  0000:0f:00.0 nenic       Up   20000Mbps  Full   00:25:b5:08:21:cf 1500   Cisco Systems Inc Cisco VIC Ethernet NIC
vmnic6  0000:10:00.0 nenic       Up   20000Mbps  Full   00:25:b5:08:10:af 1500   Cisco Systems Inc Cisco VIC Ethernet NIC
vmnic7  0000:11:00.0 nenic       Up   20000Mbps  Full   00:25:b5:08:21:af 1500   Cisco Systems Inc Cisco VIC Ethernet NIC

@inphobia
Copy link
Member

as discussed on irc fix 2 " Unpack binary MAC if present in cdp_port " will be reverted soon since it breaks devices that actaully do the right thing.

i tried to figure out which device the original poster was talking about be it seems he randomized all macs & such, so a device specific workaround can't be added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants