Practical Assignment of CN I
Practical Assignment of CN I
Answer:- pvgit-HP-ProDesk-400-G4-SFF
3. hostname –f: - displays the fully qualified host and domain name
Answer:-pvgit-HP-ProDesk-400-G4-SFF
5. ping: -This command is used to test connectivity between two nodes. You can ping host
name or ip address. Using command ping <ip-address> or ping www.google.com
Answer:-
bytes from 127.0.1.1: icmp_seq=2 ttl=64 time=0.090 ms
64 bytes from 127.0.1.1: icmp_seq=3 ttl=64 time=0.050 ms
64 bytes from 127.0.1.1: icmp_seq=4 ttl=64 time=0.051 ms
10. netstat –l: - This command will lists sockets in listening mode
Answer:-
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 localhost:domain 0.0.0.0:* LISTEN
tcp 0 0 localhost:postgresql 0.0.0.0:* LISTEN
tcp 0 0 localhost:ipp 0.0.0.0:* LISTEN
tcp6 0 0 ip6-localhost:ipp [::]:* LISTEN
11. netstat –lt:- This command will lists all sockets of TCP ports in listening mode.
Answer:-
ctive Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 localhost:domain 0.0.0.0:* LISTEN
tcp 0 0 localhost:postgresql 0.0.0.0:* LISTEN
tcp 0 0 localhost:ipp 0.0.0.0:* LISTEN
tcp6 0 0 ip6-localhost:ipp [::]:* LISTEN
tcp6 0 0 [::]:http [::]:* LISTEN
12. netstat –lu: - This command will lists all sockets of UDP ports in listening mode.
Answer:-
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
udp 0 0 0.0.0.0:41720 0.0.0.0:*
udp 0 0 0.0.0.0:mdns 0.0.0.0:*
udp 0 0 0.0.0.0:47593 0.0.0.0:*
13. netstat –s :- This command shows the statistics for each protocol
Answer:-
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 pvgit-HP-ProDesk-:39530 93.243.107.34.bc.:https ESTABLISHED
tcp 0 0 pvgit-HP-ProDesk-:40604 bom12s15-in-f14.1:https ESTABLISHED
tcp 0 0 pvgit-HP-ProDesk-:45414 a23-193-114-57.de:https ESTABLISHED
udp 0 0 pvgit-HP-ProDesk:bootpc pvgcoe.home.arpa:bootps ESTABLISHED
14. netstat – st:- This command will show the statistics for TCP protocol
Answer:-
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 pvgit-HP-ProDesk-:39530 93.243.107.34.bc.:https ESTABLISHED
tcp 0 0 pvgit-HP-ProDesk-:40604 bom12s15-in-f14.1:https ESTABLISHED
tcp 0 0 pvgit-HP-ProDesk-:45414 a23-193-114-57.de:https ESTABLISHED
udp 0 0 pvgit-HP-ProDesk:bootpc pvgcoe.home.arpa:bootps ESTABLISHED
15. netstat –su:- This command will show the statistics for UDP protocol
Answer:-
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 pvgit-HP-ProDesk-:33732 209.100.149.34.bc:https ESTABLISHED
tcp 0 0 pvgit-HP-ProDesk-:33878 93.243.107.34.bc.:https ESTABLISHED
tcp 0 0 pvgit-HP-ProDesk-:40604 bom12s15-in-f14.1:https ESTABLISHED
tcp 0 0 pvgit-HP-ProDesk-:39676 pnbomb-ad-in-f5.1:https ESTABLISHED
16. traceroute: -traceroute is a network troubleshooting utility which shows number of hops
taken to reach destination also determine packets traveling path. For example: -traceroute
google.com
Answer:-
traceroute to google.com (142.250.192.14), 30 hops max, 60 byte packets
1 pvgcoe.home.arpa (172.16.8.1) 0.884 ms 0.830 ms 0.792 ms
2 122.15.218.161 (122.15.218.161) 0.756 ms 0.719 ms 0.665 ms
3 122.15.111.110 (122.15.111.110) 13.501 ms 13.454 ms 13.405 ms
17. ifconfig: -ifconfig is used for displaying network interface information. ifconfig (interface
configurator) command is use to initialize an interface, assign IP Address to interface and
Page | 33enable or disable interface on demand. With this command you can view IP Address and
Hardware / MAC address assign to interface and also MTU (Maximum transmission unit) size.
Answer:-
enp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.16.9.202 netmask 255.255.248.0 broadcast 172.16.15.255
inet6 fe80::cf66:502f:1a60:fb96 prefixlen 64 scopeid 0x20<link>
ether 10:e7:c6:b7:a3:f2 txqueuelen 1000 (Ethernet)
18. ifconfig –a:- This command will show all network configuration and settings.
Answer:-
np1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.16.9.202 netmask 255.255.248.0 broadcast 172.16.15.255
inet6 fe80::cf66:502f:1a60:fb96 prefixlen 64 scopeid 0x20<link>
ether 10:e7:c6:b7:a3:f2 txqueuelen 1000 (Ethernet)
19. nslookup
If you know the IP address it will display hostname. To find all the IP addresses for a given
domain name, the command nslookup is used. You must have a connection to the internet for
this utility to be useful.
Answer:-
google.com
Server: 127.0.0.53
Address: 127.0.0.53#53
Non-authoritative answer:
Name: google.com
Address: 142.250.192.14
Name: google.com
20. nmap
Network mapper tool to discover hosts and services on a computer network.
$ nmap<ip-address>
Answer:-
Starting Nmap 7.80 ( https://nmap.org ) at 2025-03-10 15:23 IST
Nmap scan report for pvgit-HP-ProDesk-400-G4-SFF (127.0.1.1)
Host is up (0.00011s latency).
Not shown: 999 closed ports
PORT STATE SERVICE
80/tcp open http