How does a router find it's default gateway?

خرید بک لینک

This is where DHCP Servers come in. It will send a discovery request on the network using the ip 255.255.255.255 and the source ip being 0.0.0.0 since it doesn't know its own ip yet.

However this is where MAC Addresses come into play as well as the Discover packet is encapsulated into a Data Link Layer Etheet frame to the target MAC Address of FF:FF:FF:FF:FF:FF and the source being whatever the network interface MAC address is.

The first Switch that recieves the packet for FF:FF:FF:FF:FF:FF will forward that discover packet on out of every single switch port except the one it came from since it doesn't know who FF:FF:FF:FF:FF:FF is either until the DHCP server sees it. If the DHCP servers is the first switch it won't forward the request as the switch is the DHCP server, it will recieve this frame and then it will send back information to the IP 255.255.255.255 since it doesn't know who is contacting them as the source ip is 0.0.0.0 but it does know the mac address that contacted them so it will encapsulate the offer packet with source mac being the dhcp server and the destination mac being whatever the device that sent the discover packet and its sent as a unicast and not as a broadcast.

The device then recieves this offer, than requests to lease, DHCP server than acknowledges the lease

Also note that if the default gateway means your communication has to go through other devices it usually means the route is statically set or in other words manually put in place as opposed to being a dynamic route as certain setups would make it impossible for a device to know which device is actually the default gateway.

Recent Questions...

ما را در سایت Recent Questions دنبال می‌کنید

برچسب: how does a bill become a law,how does apple pay work,how does a toado form,how does apple music work,how does audible work,how does apple tv work,how does a hurricane form,how does a compass work,how does a credit card work,how does an iud work, نویسنده: استخدام کار بازدید: 479 تاريخ: پنجشنبه 21 مرداد 1395 ساعت: 11:05

صفحه بندی