{"action":"created","issue":{"url":"https://api.github.com/repos/vincentbernat/lldpd/issues/117","labels_url":"https://api.github.com/repos/vincentbernat/lldpd/issues/117/labels{/name}","comments_url":"https://api.github.com/repos/vincentbernat/lldpd/issues/117/comments","events_url":"https://api.github.com/repos/vincentbernat/lldpd/issues/117/events","html_url":"https://github.com/vincentbernat/lldpd/issues/117","id":87603549,"number":117,"title":"FreeBSD: IPv4 address in CDP packets is wrong","user":{"login":"kostikbel","id":2607252,"avatar_url":"https://avatars.githubusercontent.com/u/2607252?v=3","gravatar_id":"","url":"https://api.github.com/users/kostikbel","html_url":"https://github.com/kostikbel","followers_url":"https://api.github.com/users/kostikbel/followers","following_url":"https://api.github.com/users/kostikbel/following{/other_user}","gists_url":"https://api.github.com/users/kostikbel/gists{/gist_id}","starred_url":"https://api.github.com/users/kostikbel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kostikbel/subscriptions","organizations_url":"https://api.github.com/users/kostikbel/orgs","repos_url":"https://api.github.com/users/kostikbel/repos","events_url":"https://api.github.com/users/kostikbel/events{/privacy}","received_events_url":"https://api.github.com/users/kostikbel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-06-12T04:32:14Z","updated_at":"2015-06-12T08:13:42Z","closed_at":"2015-06-12T08:13:42Z","body":"I have lldpd 0.7.14 installed on the FreeBSD/amd64 stable/9.  This is the version from ports.\r\n```\r\n$ ifconfig vlan1\r\nvlan1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500\r\n        options=103<RXCSUM,TXCSUM,TSO4>\r\n        ether 00:22:4d:7a:47:f6\r\n        inet 192.168.102.80 netmask 0xffffff00 broadcast 192.168.102.255\r\n        inet6 fe80::222:4dff:fe7a:47f6%vlan1 prefixlen 64 scopeid 0xa\r\n        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>\r\n        media: Ethernet autoselect (1000baseT <full-duplex>)\r\n        status: active\r\n        vlan: 1 parent interface: em0\r\n```\r\n\r\nI noted the strangeness in the IP address displayed on other network elements for the FreeBSD box:\r\n```\r\n[kostik@switch1] > ip neighbor print detail \r\n 0 interface=ether1 address=192.168.80.80 address4=192.168.80.80 \r\n   mac-address=00:22:4D:7A:47:F6 identity=\"tom.home\" platform=\"FreeBSD\" \r\n   version=\" FreeBSD 9.3-STABLE FreeBSD 9.3-STABLE #5 r284286: Fri Jun 12 \r\n        04:24:17 EEST 2015     root@tom.home:/usr/obj/usr/home/bsd/src/sys/TOM \r\n        amd64\" \r\n   unpack=none age=26s interface-name=\"vlan1\" \r\n```\r\nNote the 192.168._80_.80, while the correct address is 192.168._102_.80.\r\n\r\nAnd indeed, from the tcpdump:\r\n```\r\ntom% sudo tcpdump -i vlan1 -n -p -s 0 -vvv -e not ip and not ip6 and not arp  ~\r\nzsh: correct 'ip' to 'kp' [nyae]? n\r\ntcpdump: listening on vlan1, link-type EN10MB (Ethernet), capture size 65535 bytes\r\n07:21:21.477522 00:22:4d:7a:47:f6 > 01:00:0c:cc:cc:cc, 802.3, length 225: LLC, dsap SNAP (0xaa) Individual, ssap SNAP (0xaa) Command, ctrl 0x03: oui Cisco (0x00000c), pid CDP (0x2000): CDPv1, ttl: 120s, checksum: 376 (unverified), length 203\r\n        Device-ID (0x01), length: 8 bytes: 'tom.home'\r\n        Address (0x02), length: 13 bytes: IPv4 (1) 192.168.80.80\r\n        Port-ID (0x03), length: 5 bytes: 'vlan1'\r\n        Capability (0x04), length: 4 bytes: (0x00000011): Router, L3 capable\r\n        Version String (0x05), length: 138 bytes:\r\n           FreeBSD 9.3-STABLE FreeBSD 9.3-STABLE #5 r284286: Fri Jun 12 04:24:17 EEST 2015     root@tom.home:/usr/obj/usr/home/bsd/src/sys/TOM amd64\r\n        Platform (0x06), length: 7 bytes: 'FreeBSD'\r\n07:21:21.477554 00:22:4d:7a:47:f6 > 01:00:0c:cc:cc:cc, 802.3, length 225: LLC, dsap SNAP (0xaa) Individual, ssap SNAP (0xaa) Command, ctrl 0x03: oui Cisco (0x00000c), pid CDP (0x2000): CDPv2, ttl: 120s, checksum: 632 (unverified), length 203\r\n        Device-ID (0x01), length: 8 bytes: 'tom.home'\r\n        Address (0x02), length: 13 bytes: IPv4 (1) 192.168.80.80\r\n        Port-ID (0x03), length: 5 bytes: 'vlan1'\r\n        Capability (0x04), length: 4 bytes: (0x00000011): Router, L3 capable\r\n        Version String (0x05), length: 138 bytes:\r\n           FreeBSD 9.3-STABLE FreeBSD 9.3-STABLE #5 r284286: Fri Jun 12 04:24:17 EEST 2015     root@tom.home:/usr/obj/usr/home/bsd/src/sys/TOM amd64\r\n        Platform (0x06), length: 7 bytes: 'FreeBSD'\r\n```\r\n\r\nAnother thing I noted is that two PDUs are sent in rapid succession by the daemon, but this is definitely not critical."},"comment":{"url":"https://api.github.com/repos/vincentbernat/lldpd/issues/comments/111405681","html_url":"https://github.com/vincentbernat/lldpd/issues/117#issuecomment-111405681","issue_url":"https://api.github.com/repos/vincentbernat/lldpd/issues/117","id":111405681,"user":{"login":"kostikbel","id":2607252,"avatar_url":"https://avatars.githubusercontent.com/u/2607252?v=3","gravatar_id":"","url":"https://api.github.com/users/kostikbel","html_url":"https://github.com/kostikbel","followers_url":"https://api.github.com/users/kostikbel/followers","following_url":"https://api.github.com/users/kostikbel/following{/other_user}","gists_url":"https://api.github.com/users/kostikbel/gists{/gist_id}","starred_url":"https://api.github.com/users/kostikbel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kostikbel/subscriptions","organizations_url":"https://api.github.com/users/kostikbel/orgs","repos_url":"https://api.github.com/users/kostikbel/repos","events_url":"https://api.github.com/users/kostikbel/events{/privacy}","received_events_url":"https://api.github.com/users/kostikbel/received_events","type":"User","site_admin":false},"created_at":"2015-06-12T08:13:42Z","updated_at":"2015-06-12T08:13:42Z","body":"Thank you for the diagnostic.  I do not have cisco hw to test, my impression was that it should use a ll address for CDP.  Anyway, I see why it is done this way."}}