What happens if I make a mistake in...

31
03

What happens if I make a mistake in setting the default gateway?

A default gateway is a router that is an exit to a different network. Therefore, if you do not set the default gateway address, you will not be able to communicate with other networks. What is happening at this time?

What is the role of the default gateway?

A default gateway is a type of router used for "routing" (routing control). Routing is to control the route by which a packet is transmitted from the source computer to the destination computer.

There are two routing methods: "direct routing" in which the source computer itself sends the packet directly to the destination computer, and "indirect routing" in which the router is requested to relay the packet.

The method of sending a packet to a computer is determined by using the "routing table" (routing table) in the computer. In the routing table, items that serve as a reference for which LAN card (network interface) should be used to send a packet from which router to which network or computer are registered.

デフォルトゲートウェイの設定を間違えるとどうなる?

Each network interface can connect to a different subnet. Each subnet uses a router as a relay point and is connected to an outer network. This relay point is the "gateway". Beyond the gateway, there are other networks and computers. In other words, in the routing table, the exit when the packet is sent from the computer, the relay point for going from the exit to the outer network, and the network or computer which is the final destination of the packet are registered.

Direct routing is used when sending packets to computers in the subnet. The subnet range is automatically registered in the routing table for each network interface. Computers in the same subnet can send data using only Ethernet and ARP mechanisms without a router.

If direct routing cannot be used, use indirect routing to have the router relay the packet. In the case of indirect routing, the route to the destination computer is selected from the three "host route", "network route", and "default route" registered in the routing table (Fig. 1).

Figure 1 There are various methods for routing.

A host route is a route to a specific destination computer. For example, let's say you have a laptop computer that has a wired Ethernet port connected to your company LAN and AirH to the provider's network at the same time. In Windows, a dial-up connection that the user connects arbitrarily has a higher priority. , Sometimes I try to access the server of the company LAN via AirH ”.

However, since the provider's network should not be connected to the corporate LAN, the server of the corporate LAN cannot be used as it is. Therefore, specify the server of the company LAN with the IP address and subnet mask, and register the router and network interface that will be the route in the routing table. The route to this particular host is the host route. Also, if you specify the entire corporate LAN with the IP address and subnet mask instead of the specific host, you can specify the route to the specific network. This is the network route.

On the other hand, the default route refers to an "other" route that is neither a direct route, a host route, nor a network route. When it comes to sending a packet to a computer, the OS's TCP / IP feature attempts to select a route in the routing table. At this time, the default route is used when the appropriate route cannot be found in the routing table.

You can view your computer's routing table by running "route print" at the command prompt. Among several items, the default route is that both "Network Destination" and "Net Mask" are "0.0.0.0". It can also be seen that the router set as the default gateway is registered in the routing table as the IP address in the "Gateway" of the default route. The default gateway means the gateway for the default route.

(Continued on the next page, "Trying to make a mistake in the default gateway")