Get your Internet routable IP address with the command line. [[email protected] ~]$ curl ‘https://api.ipify.org’ ; echo[[email protected] ~]$ curl ‘https://api.ipify.org’ ; echo Get the startup time of your Linux PC with Systemd. [[email protected] ~]$ systemd-analyze Startup finished in 1.186s (kernel) + 9.653s (initrd) + 2min 37.144s (userspace) = 2min 47.984s[[email protected] ~]$ systemd-analyze Startup finished in 1.186s …

To get just the IP address of your Internet facing Linux machine, use this command. [email protected]:~/Documents/ipinfo/src$ curl [email protected]:~/Documents/ipinfo/src$ curl icanhazip.com This will return just your IP address. This is another way to get this information. [email protected]:~/Documents$ curl ipinfo.io/[email protected]:~/Documents$ curl ipinfo.io/ip To get information about a DNS server, use the dig command. [email protected]:~/Documents/ipinfo/src$ dig 8.8.8.8   …

To set an IP address on a VLAN on a Cisco switch, firstly access the configuration section for the VLAN in configuration mode. arya(config)#interface vlan 1arya(config)#interface vlan 1 Then the administrator may set an IP address for the VLAN. arya(config-if)#ip address 172.18.31.210 255.255.255.0arya(config-if)#ip address 172.18.31.210 255.255.255.0 Then you are all set. To save the running …

This program will return the IP address of a specified network interface. Use the –ip parameter to get the IP. For example, this will show the IP address of an ethernet interface: ./a.out –ip eth0. #include <stdio.h> #include <string.h> /* for strncpy */ #include <unistd.h> // for close #include <sys/types.h> #include <sys/socket.h> #include <sys/ioctl.h> #include …

Adding an IP address to the management interface of a Cisco switch allows connection over an Ethernet connection to manage the switch configuration. Firstly, switch to privileged exec mode. tyrion>en tyrion#tyrion>en tyrion# Then enter the configure terminal command to configure terminal settings. tyrion#configure terminaltyrion#configure terminal Now we are configuring settings for vlan 99. tyrion(config)#interface vlan …

Get your gateway IP address with curl on the command line. [[email protected] ~]$ echo $(curl -# http://ipecho.net/plain) ######################################################################## 100.0% 153.107.97.164[[email protected] ~]$ echo $(curl -# http://ipecho.net/plain) ######################################################################## 100.0% 153.107.97.164 Another way to list the IP addresses of your network interfaces. Using the ip command. [[email protected] ~]$ ip a | grep inet* inet 127.0.0.1/8 scope host lo …

The sipcalc command is very useful for calculating an IP subnet. This command shows the amount of hosts available for a given subnet. [email protected]:/home/homer# sipcalc 192.168.100.1/24 -[ipv4 : 192.168.100.1/24] – 0   [CIDR] Host address – 192.168.100.1 Host address (decimal) – 3232261121 Host address (hex) – C0A86401 Network address – 192.168.100.0 Network mask – 255.255.255.0 …

How to get the geographical location of an IP address. This simple command will get this for you. [[email protected]:~] curl ipinfo.io/203.113.124.148 ; echo "" { "ip": "203.113.124.148", "hostname": "No Hostname", "city": "", "region": "", "country": "TH", "loc": "13.7500,100.4667", "org": "AS9737 TOT Public Company Limited" }[[email protected]:~] curl ipinfo.io/203.113.124.148 ; echo "" { "ip": "203.113.124.148", "hostname": "No …