Setting up any system, laptop, desktop, server, virtual machines or containers one of the requirements is for the device or machine to be able to connect to other systems or other networks like the internet.
And having a working gateway, as it.is called in networking is the key that the machine is able to connect to ther internet or other devices.
In Linux, a simple command type on the terminal like:
- ip r
- or type the whole command: ip route
This will show a message something like:
default via 192.168.1.1 dev eth0 proto kernel
192.168.1.1 is the gateway IP address and if.everything is in place correctly then the system can connect to internet.
Other way to verify via command line is to type:
$ ip route get 8.8.8.8
Which will show an output like:
8.8.8.8 via 192.168.1.1 dev eth0 sec 192.168.1.24 uid 1000
cache
Shows that packet destined for 8.8.8.8 will be routed via the gateway 192.168.1.1
Source IP will be 192.168.1.24 and UID 1000 is the id of the user executing the command. UID. It is shown if in any case there are restrictions or policy routing for users.
Cache - means that route entry is known already or has been used before and is already cached on the Kernel's table
In Windows typing ipconfig, ipconfig all or using PowerShell, Get-NetIPconfiguration will also show the gateway configuration.
That's it,.learn the basics and it will go a long way. Till next time...
Pray always in Joy, in Pain for everything has a purpose. If you're in pain just remember everything is temporary.in this present life, the goal is to have an everlasting Joy in heaven.
Comments
Post a Comment