Although we’ve seen how the router forward the packet until now, how do PC or server transfer the packet to the router?
Together with the setting of the IP address to a PC or server, you can put a parameter called “Default Gateway”. In the case of Windows, you can set with the following settings screen.
Windows key + R
⇒ type “ncpa.cpl”
⇒ Right-click the appropriate interface, click Properties
⇒ Click Internet Protocol Version 4 (TCP / IPv4)], click Properties
⇒ set the IP address of the default gateway
In addition, PC can have a route information other than the default gateway.
If you type route print -4 the IPv4 routing information of you can see in Windows in the command prompt.
In addition, the “route add” command of the command prompt, you can write the routing information to the terminal.
For more information on the terminal of the routing configuration, it can be found in the “route /?” At the command prompt.
For adding the route on Windows, type the following on command prompt.
By this, the NextHop of route to 192.168.1.0/24 is set to 10.1.1.1. the last character “-p” is option which the config is remained(persistent) even if the PC or Server is restarted.
If you want to delete, type below.