E
E
Eugene2018-09-12 16:15:44
Computer networks
Eugene, 2018-09-12 16:15:44

How is the default gateway determined?

Colleagues,
how does the computer determine the default gateway? I understand that the computer can learn this from the interface parameters, where the gateway is written. But let's say only the IP address and mask are registered on the host - how to find out in this case? Does the IP packet contain information about this?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Stanislav Bodrov, 2018-09-12
@Eujene

How does a computer determine the default gateway?
No way. This is a mindless piece of iron. Either this is done by manual settings, or it is assigned by the dhcp server, where they also indicate the gateway of last resort with their hands.
But let's say only the IP address and mask are registered on the host - how to find out in this case?
No way. The mask indicates the subnet. IP - address in this subnet.
Does the IP packet contain information about this?
There is no such field in the IP packet that indicates the default gateway.

R
Ruslan Fedoseev, 2018-09-12
@martin74ua

for normal network operation on the computer, it is necessary to configure:
the address on the interface
its mask
the default gateway
dns server
these parameters can either be entered manually or received via dhcp

C
cssman, 2018-09-12
@cssman

In the interface config. if it is not there, then the gateway is not specified.
The package has only src\dst addresses + ports

G
Griboks, 2018-09-12
@Griboks

It is assumed that the first address in the network is the gateway, and the last one is the broadcast.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question