Skip to content

discovery doesnt work on LXC container and VM #3

@tobit6795

Description

@tobit6795

LXC

root@dev001:~/smrt# python3 discovery.py -i eth0 --loglevel DEBUG
DEBUG:__main__:addrs:{17: [{'addr': 'c2:18:1c:b1:51:ba', 'broadcast': 'ff:ff:ff:ff:ff:ff'}], 2: [{'addr': '10.10.0.130', 'netmask': '255.255.254.0', 'broadcast': '10.10.1.255'}], 10: [{'addr': 'fe80::c018:1cff:feb1:51ba%eth0', 'netmask': 'ffff:ffff:ffff:ffff::'}]}
DEBUG:__main__:('eth0', '10.10.0.130', 'c2:18:1c:b1:51:ba')
DEBUG:network:Sending Packet: 01 00 00 00 00 00 00 00 c2 18 1c b1 51 ba 00 90 00 00 00 00 00 24 00 00 00 00 00 00 00 00 00 00 ff ff 00 00
DEBUG:network:Sending Header:  {'version': 1, 'op_code': 0, 'switch_mac': b'\x00\x00\x00\x00\x00\x00', 'host_mac': b'\xc2\x18\x1c\xb1Q\xba', 'sequence_id': 144, 'error_code': 0, 'check_length': 36, 'fragment_offset': 0, 'flag': 0, 'token_id': 0, 'checksum': 0}
DEBUG:network:Sending Payload: {}
DEBUG:network:Receive Packet: 01 02 60 32 b1 ae 77 4d c2 18 1c b1 51 ba 00 90 00 00 00 00 00 a6 00 00 00 00 00 00 00 00 00 00 00 01 00 0a 54 4c 2d 53 47 31 30 38 45 00 00 02 00 0a 54 4c 2d 53 47 31 30 38 45 00 00 03 00 06 60 32 b1 ae 77 4d 00 07 00 1f 31 2e 30 2e 30 20 42 75 69 6c 64 20 32 30 31 39 31 30 32 31 20 52 65 6c 2e 35 33 33 36 30 00 00 08 00 0e 54 4c 2d 53 47 31 30 38 45 20 35 2e 30 00 00 09 00 01 01 00 04 00 04 0a 0a 00 05 00 05 00 04 ff ff fe 00 00 06 00 04 0a 0a 00 01 00 0d 00 01 01 00 0e 00 01 00 ff ff 00 00

KVM:

root@motioneye:~/smrt# python3.7 discovery.py -i eth0
Traceback (most recent call last):
  File "discovery.py", line 78, in <module>
    main()
  File "discovery.py", line 64, in main
    switches = discover_switches(args.interface)
  File "discovery.py", line 46, in discover_switches
    net.send(Protocol.DISCOVERY, {})
  File "/root/smrt/network.py", line 55, in send
    logger.debug('Sending Packet: ' + packet.hex(" "))
TypeError: hex() takes no arguments (1 given)

used this branch:

@philippechataignon

https://github.com/philippechataignon/smrt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions