#petro1362 this is not exactly correct

1 messages · Page 1 of 1 (latest)

winter cypress
#

by default home routers have a DHCP server that gives each client an IP address, a network gateway (the router IP) so clients know where to send ip packets when who they are trying to talk to is not on the same LAN network, and a DNS ip

#

usually this DNS IP is again the router itself so it can foward all requests to an external DNS server on the internet. It can also directly advertise DNS servers like 1.1.1.1 so the clients bypass the router handing DNS but they still use the router gateway to access the internet

#

keeping it simple, LAN = layer2, router / DNS / Internet / other LANS = layer3

#

so on a ipv4 network there are a couple address types

#

unicast, which goes to a single client, multicast which goes to a group of clients and broadcast which goes to all clients

#

the next part is from wiki

#

When an mDNS client needs to resolve a hostname, it sends an IP multicast query message that asks the host having that name to identify itself

#

That target machine then multicasts a message that includes its IP address. All machines in that subnet can then use that information to update their mDNS caches. Any host can relinquish its claim to a name by sending a response packet with a time to live (TTL) equal to zero.

#

so for example with that guy with his .local name not working after a reboot, the claim on the mDNS name from the previous state of his server had not expired yet. thus when it was rebooted, could not advertise itself as homeassistent.local as its old self was homeassistent.local

#

mDNS works over multicasts which works over the layer2 lan

raw lion
#

so wouldn't simply rebooting the router clear or update that cache then?

winter cypress
#

no because every single client is cacheing this

#

the router is not involved, its a layer3 device

#

it does not care about layer2 opperations

raw lion
#

ok, so his PC or whatever he was using to access it would have to be

winter cypress
#

yes, which give it a few mins, it will clear itself

raw lion
#

ok, got it

winter cypress
#

now as for the real layer 1-7

#

now as for the real layer 1-7

#

1 is physical

#

2 is data, aka frames, aka uses MAC addresses to route

#

layer 3 is the network layer, thats when IP come into play along with routers

#

so like 192.168.4.4/24 can not talk to 192.168.5.4/24 without a router

#

the router would need to know about both networks

#

the client goes IDK who has this ip, its not in my network, let me send it to the router since that is my gateway to other network

raw lion
#

Yeah for some reason I thought this was all handled by the router. I.e. devices would ask the router and the router had the only cache

winter cypress
#

consumer routers have a default forward all traffic not apart of the lan network out this internet interface

#

easy to think that, it was designed for Peer to peer

#

basically clients subscribe to this multicast ip

#

they listen and process anything that is published there

cosmic spade
#

Sorry to jump in but this interests me. You can set individual host names in the ip reservation in opnsense. And I thought you could set a default host name for all hosts

#

I have always just used the ip but always see people using host names and never really understood

winter cypress
#

heh so in this case you are probably using the open sense device as your LAN network DNS server

cosmic spade
#

After the convo this am, I was able to hit several services using hostname.local

raw lion
#

The AM convo explained why I was able to access everything via .local even though I set things in their own domain.

winter cypress
#

so you can set records like make UNIFI go to 192.168.1.1 (thats how unifi devices do their auto discovery of the controller etc)

cosmic spade
#

Honestly I don’t totally understand what I am doing. I have Pihole on a seperate host. Somehow, Pihole is doing dns but also forwarding to the opnsense in certain situations

raw lion
#

ALways assumed that was Adguards DNS working it's magic

#

Yeah, same boat @cosmic spade

winter cypress
#

@cosmic spade you prob use the router ip as your dns and from the router get dns from pihole and from pihole from a dns server on the internet

raw lion
#

it would be great if there was a way to map this shit

cosmic spade
#

I should try and find the howto I followed on the internet. 🤣

#

I should try and find the howto I followed on the internet. 🤣

raw lion
#

like "everyone on my network, give me your tables"

winter cypress
#

welcome to networking, there are hundreds of tools that try to map this shit, its all about discovery and documentation

cosmic spade
#

Honestly, Pihole is blocking ads and my internet works so I was happy

winter cypress
#

and it can do dns rewrites do you can set your homeassistant domain to point to the local lan ip on your network when you are home to speed things up and be able to use valid TLS

raw lion
#

I have to redo my network as I'm using one that I set up 10 years ago that's been 'updated'. It has a ton of parameters that are left over from the old setup that are no longer accessible from the UI. So I can only change them by modifying the files via CLI.

#

I have to redo my network as I'm using one that I set up 10 years ago that's been 'updated'. It has a ton of parameters that are left over from the old setup that are no longer accessible from the UI. So I can only change them by modifying the files via CLI.

winter cypress
#

how did I learn about networking? cisco netacad classes for CCNA 😛

#

it helps a lot for fixing... issues

#

like setting your own dns server to use on your dns server host or you may have issues

#

if you do dns rewrites and want to get TLS certs through the dns verification process, you better set dns manually on that container if you have issues

raw lion
#

I've only gotten into networking in the past 7 years

winter cypress
#

I lost 4 hours troubleshooting cert-manager on my k8s system to this 😂

raw lion
#

and by 'get into' i mean, followed a video, understood most of it, promptly forgot, here we are 7 years later

winter cypress
#

I went deep into it, learned the ISO OSI networking model and learned the layout of the dataframes, ip packets etc

#

static routing, dynamic routing

raw lion
#

I thought I did pretty well, seeing that I follwed a video on a cisco router but I found the 'similiar' settings in my unifi setup

winter cypress
#

vlans are fun

#

firewalls more so

raw lion
#

yah, they are, and I feel like I understand both of them

#

however this dns crap I do not

#

however this dns crap I do not

winter cypress
#

like only allow the IoT vlan to talk back under a established network connection one of your devices did from your lan

#

oh they use multicast... mdns reflector

#

oh they use multicast... mdns reflector

winter cypress
#

I need to get a opensense router so I can do BGP connections to my cluster and do direct routing to my containers which would remove a lot of limitations :p

#

And let me do things like actually load balance