Check NIC and Network setting in Linux / Unix

Network Setting in Linux Based Platforms

Check the Network setting on you machine with the following commands. It will let you see your network setting in Linux operation system but also change it.
Please follows the command as mentioned below:

1. View Network Settings of an Ethernet Adapter

# ifconfig

Ifconfig, when invoked with no arguments will display all the details of currently active interfaces.
If you give the interface name as an argument, the details of that specific interface will be displayed.

# ifconfig eth0

eth0   Link encap:Ethernet  HWaddr 00:2D:32:3E:39:3B
inet addr:10.10.10.1  Bcast:10.10.10.255  Mask:255.255.255.0
inet6 addr: fe80::21d:92ff:fede:499b/64 Scope:Link

2. Display Details of All interfaces Including Disabled Interfaces

# ifconfig -a

3. Disable an Interface

# ifconfig eth0 down

4. Enable an Interface

# ifconfig eth0 up

5. Assign IP-address to an Interface

Assign 10.10.10.1 as the IP address for the interface eth0.

# ifconfig eth0 10.10.10.1

Change Subnet mask of the interface eth0.

# ifconfig eth0 netmask 255.255.255.0

Change Broadcast address of the interface eth0.

# ifconfig eth0 broadcast 10.10.10.255

Assign IP-address, netmask and broadcast at the same time to interface eht0.

# ifconfig eth0 10.10.10.1 netmask 255.255.255.0 broadcast 10.10.10.255

Leave a Reply