0% found this document useful (0 votes)
24 views6 pages

Experiment 1

Uploaded by

shafna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views6 pages

Experiment 1

Uploaded by

shafna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Experiment No 1

Date: 30/12/24

Getting started with Basics of Network configurations files


and Networking Commands in Linux.

Aim
To familiarize with Network configuration files and Networking commands
in Linux

Theory
The following are some of the important network configuration files in Linux
operating systems

1. /etc/hosts

This file is used to resolve hostnames on small networks with no DNS


server. This text file contains a mapping of an IP address to the
corresponding host name in each line. This file also contains a line
specifying the IP address of the loopback device i.e, 127.0.0.1 is mapped
to localhost.

A typical hosts file is as shown

127.0.0.1 localhost

127.0.1.1 anil-300E4Z-300E5Z-300E7Z

2. /etc/resolv.conf

This configuration file contains the IP addresses of DNS servers and the
search domain.

A sample file is shown


# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE
OVERWRITTEN

nameserver 127.0.1.1

3. /etc/sysconfig/network

This configuration file specifies routing and host information for all
network interfaces. It contains directives that are global specific. For
example if NETWORKING=yes, then /etc/init.d/network activates
network devices.

4. /etc/nsswitch.conf

This file includes database search entries. The directive specifies which
database is to be searched first.

5.
The important Linux networking commands are

1. ifconfig

This command gives the configuration of all

interfaces in the system. It can be run with an

interface name to get the details of the

interface.

ifconfig wlan0

Link encap:Ethernet HWaddr b8:03:05:ad:6b:23

inet addr:192.168.43.15 Bcast:192.168.43.255 Mask:255.255.255.0

inet6 addr:

2405:204:d206:d3b1:ba03:5ff:fead:6b23/64

Scope:Global inet6 addr:

fe80::ba03:5ff:fead:6b23/64 Scope:Link

inet6 addr:

2405:204:d206:d3b1:21ee:5665:de59:bd4e/64

Scope:Global UP BROADCAST RUNNING

MULTICAST MTU:1500 Metric:1

RX packets:827087 errors:0

dropped:0 overruns:0 frame:0 TX

packets:433391 errors:0 dropped:0

overruns:0 carrier:0 collisions:0

txqueuelen:1000
RX bytes:1117797710 (1.1 GB) TX bytes:53252386 (53.2 MB)

This gives the IP address, subnet mask, and broadcast address of

the wireless LAN adapter. Also tells that it can support

multicasting.

If eth0 is given as the parameter, the command gives the details of the Ethernet
adapter.

2. netstat

This command gives network status information.

3. ping

This is the most commonly used command for checking connectivity.

4.ip
It is the latest version of ifconfig command and is used to show or
manipulate routing and network devices.
Syntax: ip a o r i p a d d r

5.traceroute

The traceroute command is a network trouble shooting utility which help us to


determine number of hops and packets travelling path required to reach a
destination.

Syntax: traceroute <destination>


6.tracepath

It traces the network path of the specified destination


Syntax: tracepath <destination>

7.ss

The SS command is a replacement for netstat command.


This command gives more information in comparison to the netstat

Syntax: SS
8.dig
It stands for Domain Information Groper.
This command is used for task related to DNS lookup to query the DNS
name server.

Syntax: dig <domain name>

9.nslookup

This command is also used to find DNS related Query

Syntax: nslookup <domain name>

10.route

The route command display and manipulate IP routing table for your system
Syntax: route

11.host
It displays the domain name for a given IP address and IP address for
a given hostname. It can also be used for DNS lookup.

12.arp
It is used to view and add content to the kernel’s ARP table.
Syntax: arp
13.iwconfig
It is used to configure the wireless network interface.
Syntax: iwconfig [options]

14.hostname

It is used to view and set the hostname of the system.


Syntax: hostname

15.curl or wget
To download a file from the internet

16.mtr

Combine Ping and Tracepath into a single command

17.ifplugstatus

Tells whether a cable is plugged in or not

You might also like