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

Running but not reflecting #39

Open
merlinthemagic opened this issue Nov 3, 2022 · 0 comments
Open

Running but not reflecting #39

merlinthemagic opened this issue Nov 3, 2022 · 0 comments

Comments

@merlinthemagic
Copy link

OS: 20.04.3 LTS
GO version: 1.19.3 arm64
Platform Raspberry Pi4

Compiled bonjour-reflector and built a simple config to allow access to a chrome-cast from another vlan:

netplan config (not sure it matters):

network:
        version: 2
        ethernets:
                eth0:
                        dhcp4: false
        vlans:
                vlan1000:
                        id: 1000
                        addresses: [10.16.191.14/24]
                        gateway4: 10.16.191.1
                        nameservers:
                                addresses: [8.8.8.8,8.8.4.4]
                        link: eth0

config.toml:

net_interface = "eth0"
[devices]
        [devices."A4:77:33:89:20:E6"]
        description = "Chromecast in Lab"
        origin_pool = 702
        shared_pools = [701]

excuting: ./bonjour-reflector -config=./config.toml

Output snippet.

PACKET: 86 bytes, wire length 86 cap length 86 @ 2022-11-03 10:30:45.739136 +0000 UTC
- Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..72..] SrcMAC=a4:77:33:89:20:e6 DstMAC=01:00:5e:00:00:fb EthernetType=Dot1Q Length=0}
- Layer 2 (04 bytes) = Dot1Q    {Contents=[2, 190, 8, 0] Payload=[..68..] Priority=0 DropEligible=false VLANIdentifier=702 Type=IPv4}
- Layer 3 (20 bytes) = IPv4     {Contents=[..20..] Payload=[..48..] Version=4 IHL=5 TOS=0 Length=68 Id=0 Flags=DF FragOffset=0 TTL=255 Protocol=UDP Checksum=35723 SrcIP=10.16.5.18 DstIP=224.0.0.251 Options=[] Padding=[]}
- Layer 4 (08 bytes) = UDP      {Contents=[..8..] Payload=[..40..] SrcPort=5353(mdns) DstPort=5353(mdns) Length=48 Checksum=39814}
- Layer 5 (40 bytes) = Payload  40 byte(s)

PACKET: 398 bytes, wire length 398 cap length 398 @ 2022-11-03 10:30:45.739454 +0000 UTC
- Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..384..] SrcMAC=a4:77:33:89:20:e6 DstMAC=01:00:5e:00:00:fb EthernetType=Dot1Q Length=0}
- Layer 2 (04 bytes) = Dot1Q    {Contents=[2, 190, 8, 0] Payload=[..380..] Priority=0 DropEligible=false VLANIdentifier=702 Type=IPv4}
- Layer 3 (20 bytes) = IPv4     {Contents=[..20..] Payload=[..360..] Version=4 IHL=5 TOS=0 Length=380 Id=0 Flags=DF FragOffset=0 TTL=255 Protocol=UDP Checksum=35411 SrcIP=10.16.5.18 DstIP=224.0.0.251 Options=[] Padding=[]}
- Layer 4 (08 bytes) = UDP      {Contents=[..8..] Payload=[..352..] SrcPort=5353(mdns) DstPort=5353(mdns) Length=360 Checksum=5335}
- Layer 5 (352 bytes) = Payload 352 byte(s)

PACKET: 107 bytes, wire length 107 cap length 107 @ 2022-11-03 10:30:54.06189 +0000 UTC
- Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..93..] SrcMAC=46:63:7e:ea:a5:49 DstMAC=01:00:5e:00:00:fb EthernetType=Dot1Q Length=0}
- Layer 2 (04 bytes) = Dot1Q    {Contents=[2, 189, 8, 0] Payload=[..89..] Priority=0 DropEligible=false VLANIdentifier=701 Type=IPv4}
- Layer 3 (20 bytes) = IPv4     {Contents=[..20..] Payload=[..69..] Version=4 IHL=5 TOS=0 Length=89 Id=41119 Flags= FragOffset=0 TTL=2 Protocol=UDP Checksum=12221 SrcIP=10.16.253.44 DstIP=224.0.0.251 Options=[] Padding=[]}
- Layer 4 (08 bytes) = UDP      {Contents=[..8..] Payload=[..61..] SrcPort=5353(mdns) DstPort=5353(mdns) Length=69 Checksum=51551}
- Layer 5 (61 bytes) = Payload  61 byte(s)

PACKET: 107 bytes, wire length 107 cap length 107 @ 2022-11-03 10:30:55.064249 +0000 UTC
- Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..93..] SrcMAC=46:63:7e:ea:a5:49 DstMAC=01:00:5e:00:00:fb EthernetType=Dot1Q Length=0}
- Layer 2 (04 bytes) = Dot1Q    {Contents=[2, 189, 8, 0] Payload=[..89..] Priority=0 DropEligible=false VLANIdentifier=701 Type=IPv4}
- Layer 3 (20 bytes) = IPv4     {Contents=[..20..] Payload=[..69..] Version=4 IHL=5 TOS=0 Length=89 Id=41127 Flags= FragOffset=0 TTL=2 Protocol=UDP Checksum=12213 SrcIP=10.16.253.44 DstIP=224.0.0.251 Options=[] Padding=[]}
- Layer 4 (08 bytes) = UDP      {Contents=[..8..] Payload=[..61..] SrcPort=5353(mdns) DstPort=5353(mdns) Length=69 Checksum=51551}
- Layer 5 (61 bytes) = Payload  61 byte(s)

PACKET: 86 bytes, wire length 86 cap length 86 @ 2022-11-03 10:31:14.24797 +0000 UTC
- Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..72..] SrcMAC=a4:77:33:89:20:e6 DstMAC=01:00:5e:00:00:fb EthernetType=Dot1Q Length=0}
- Layer 2 (04 bytes) = Dot1Q    {Contents=[2, 190, 8, 0] Payload=[..68..] Priority=0 DropEligible=false VLANIdentifier=702 Type=IPv4}
- Layer 3 (20 bytes) = IPv4     {Contents=[..20..] Payload=[..48..] Version=4 IHL=5 TOS=0 Length=68 Id=0 Flags=DF FragOffset=0 TTL=255 Protocol=UDP Checksum=35723 SrcIP=10.16.5.18 DstIP=224.0.0.251 Options=[] Padding=[]}
- Layer 4 (08 bytes) = UDP      {Contents=[..8..] Payload=[..40..] SrcPort=5353(mdns) DstPort=5353(mdns) Length=48 Checksum=35207}
- Layer 5 (40 bytes) = Payload  40 byte(s)

A capture on the interface shows mDNS packets are forwarded out the port for the host running bonjour-reflector, but nothing comes back.

I have avahi running fine, i obviously disable it before running bonjour-reflector.

What am i doing wrong and once i get that sorted is there a process for demonizing the process?

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

No branches or pull requests

1 participant