technical skills grow

Responsive Ads Here

Saturday, July 24, 2021

Configure step by step Nic card | nmap | tracepath | miitool | ifconfig in linux

# setup  (to setup the static network in RHEL - 2, 3, 4, 5 and 6)
# nmtui   (to setup the static network in GUI mode for RHEL - 7)
# nmcli device show  (It displays all the NIC devices network information of the
system )

# nmcli device show eth0 (to see all the network devices information of the
eth0)
# nmcli connection or nmcli connection show (to see all the network connection names)
# nmcli connection add con-name <connection name> ifname <NIC device name> type ethernet  (to create a new connection name for
eth0)

# nmcli connection show --activate  (it shows which connection is active currently)
# nmcli connection add con-name <connection name> ifname <NIC device name> type ethernet

To modify the connection as static and assign the IP, gateway, dns IP,
domain name)  

# nmcli connection modify <connection name> ipv4.addresses ' <IP address>/<netmask><default gateway> ' ipv4.dns <dns server IP address> ipv4.dsn-search <domain name> ipv4.method <static/manual>

# nmcli connection delete <connection name> (to delete the specified connection)
# nmcli connection modify <connection name> ipv4.method <static/manual>
(to modify dynamic connection to static connection)
# nmcli connection up <connection name> (to activate or up the specified connection)
# nmcli connection down <connection name>
(to disable or down the specified connection)
# nmcli connection show <connection name>
(to see the information about the specified NIC device)

# ping -I <NIC device name><IP address> (to check the connection from NIC device to IP address)
# hostname <fully qualified domain name>
(to set the hostname temporarily)
# hostnamectl set-hostname <fully qualified domain name>
(to set the hostname permanently in RHEL - 7)
NOTE: Whenever we change any parameters in /etc/sysconfig/network-scripts/ifcfg-<NIC device name> file, then we have to reload that file and again we have to up the connection (nothing but activate the connection by 

# nmcli connection reload
# nmcli connection reload
(to reload the configuration of the connection if any changes on it and it reloads all configuration files)

# hostnamectl status  (it displays full details of the hostname and works in RHEL - 7 only)
# nmcli networking off
(to disable all the connections at a time)
# nmcli device status
(to display all NIC device connections statuses)

# nmcli networking off (to disable all the connections at a time)
# nmcli device status (
to display all NIC device connections statuses)
# nmcli connection modify <connection name> + ipv4.dns <secondary dns server IP>
(to add a secondary dns server IP to the existing connection)

# nmap  (to check how many open ports are there in remote system)
# tracepath               
(it displays the routing information)
# miitool <NIC device name>
(to check the network cable is connected or not)
# ifconfig  
(to check the NIC card is enable or not)
# ifup <NIC device name> 
(to enable or up the NIC card)
#ifdown <NIC device name>
(to disable or down the NIC card)
# route -n 
(to check the gateway)
# cat /etc/resolve.conf 
(to check the dns server information)
# cat /etc/sysconfig/network-scripts/ifcfg-<NIC device name>
(to see the NIC device information)
# hostname or cat /etc/sysconfig/network
(to check the hostname in RHEL - 6)
# hostnamectl status or cat /etc/hostname
(to check the hostname in RHEL-7)
# ping <IP address> 
(to check the connection communication)
# chkconfig --list   (to list all the services which are running at boo
time in RHEL - 6 & 7)

# systemctl list-unit-files 
(to list all the processes which are running at boot time in RHEL - 7)

# netstat -r   (to see all routing table information)
# netstat -i   (to see all the NIC cards information)
# nmap        
(to see the network mapping ie., open ports list on remote system)

# nmap 172.25.0.11 - 50

# nmap -p 80 <remote IP>

# nmap -p 80 - 90 <remote IP>

# nmap -sp 172.25.0.0/24

No comments:

Post a Comment

Powered by Blogger.

Labels

Contact Form

Name

Email *

Message *

Search This Blog

Blog Archive

Ad Code

Responsive Advertisement

Recent Posts