1

I understand that if I were to send a packet to a destination outside my LAN, it would have to reach the gateway first before it is being routed to the final destination. However, when I visit a website(which is clearly not hosted in my LAN), I do not see any packets being sent to or from my gateway ip from the wireshark window. The gateway ip is obtained from ipconfig. It seems that TCP and HTTP are both communicated directly between my PC and the external web server.

How do I find the real ip address of the gateway?Is the one given in ipconfig always the one where the packets are forwarded to first?

1 Answer 1

1

The IP address of the default gateway is learned by DHCP or is manually set.

I think you are confused about how the gateway works. The destination IP address of your packet does not change. The PC forwards the packet to the gateway by learning the MAC address of the gateway. So the destination MAC address of the Ethernet packet will be the default gateway. The IP address will be the website you're going to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.