Skip to main content

Network Configuration - Linux OS

Configuring Network for a Linux System

Edit configuration files stored in /etc/sysconfig/network-scripts/

You can configure network card by editing text files stored in /etc/sysconfig/network-scripts/ directory.

First change directory to /etc/sysconfig/network-scripts/:

# cd /etc/sysconfig/network-scripts/

Edit / create files as follows:

• /etc/sysconfig/network-scripts/ifcfg-eth0 : First Ethernet card configuration file
• /etc/sysconfig/network-scripts/ifcfg-eth1 : Second Ethernet card configuration file

For edit/create first NIC file, type command:

# vi ifcfg-eth0

Modify as follows:

# Intel Corporation 82573E Gigabit Ethernet Controller (Copper)

DEVICE=eth0
BOOTPROTO=static
DHCPCLASS=
HWADDR=00:30:48:56:A6:2E
IPADDR=10.10.29.66
NETMASK=255.255.255.192
ONBOOT=yes
Save and close the file.

Define default gateway (router IP) and hostname in /etc/sysconfig//network file:

# vi /etc/sysconfig/network

Append/modify configuration as follows:

NETWORKING=yes
HOSTNAME=www1.nixcraft.in
GATEWAY=10.10.29.65
Save and close the file.

Restart networking:
# /etc/init.d/network restart

Make sure you have correct DNS server defined in /etc/resolv.conf file:

# vi /etc/resolv.conf

Setup DNS Server as follows:
nameserver 10.0.80.11
nameserver 10.0.80.12
nameserver 202.67.222.222

Save and close the file. Now you can ping the gateway/other hosts:

$ ping 10.0.80.12

PING 10.0.80.12 (10.0.80.12) 56(84) bytes of data.
64 bytes from 10.0.80.12: icmp_seq=1 ttl=251 time=0.972 ms
64 bytes from 10.0.80.12: icmp_seq=2 ttl=251 time=1.11 ms
You can also check for Internet connectivity with nslookup or host command:

$ nslookup citi.biz
Output:
Server: 10.0.80.11
Address: 10.0.80.11#53

Non-authoritative answer:
Name: citi.biz
Address: 75.126.43.232

Also you can use host command:

$ host nixcraft.in
Output:
nixcraft.in has address 75.126.43.232
nixcraft.in mail is handled by 10 mail.nixcraft.in.

Regards
Avinash Pillai
URL : http://avinashpillai.blogspot.com
Email: avinashp[AT]aztecsoft[DOT]com, avinashp25[AT]gmail[DOT]com

Comments

Popular posts from this blog

How To Manage Dell Servers using OMSA – OpenManage Server Administrator On Linux

OMSA is a web based application to manage DELL PowerEdge Servers. Using OMSA you can perform proactive system monitoring, system diagnosis, troubleshoot hardware issues and configure RAID etc., You can also view and manage hardware’s embedded system management (ESM) log using OMSA. This is an jumpstart guide that explains how to install Dell OMSA on Linux. I have also provided few screenshots of DELL OMSA web application. 1. Download DELL OMSA Go to DELL support website -> click on “Drivers & Downloads” -> choose your server model (in my case, I selected PowerEdge 2850) -> choose the operating system -> scroll-down and expand ‘Systems Management’ -> Click on ‘OpenManage Server Administrator Managed Node’ -> Click on OM_5.5.0_ManNode_A00.tar.gz to download it. You can directly download it to your Linux server as shown below. # mkdir -p /usr/local/omsa # cd /usr/local/omsa # wget http://ftp.us.dell.com/sysman/OM_5.5.0_ManNode_A00.tar.gz 2....

What is Cybersecurity Risk? Definition & Factors to Consider

  Cybersecurity risk has become a leading priority for organizations as they embrace digital transformation and leverage advanced technology solutions to drive business growth and optimize efficiencies. Additionally, many organizations are increasingly reliant on third-party and   fourth-party vendors   or programs.  In this post, we’ll explore what cybersecurity risk is and take a look at some key cybersecurity risk factors that organizations across all industries should keep in mind as they build and refine their   cybersecurity risk management strategy .   What is cybersecurity risk? Cybersecurity risk refers to   potential threats and vulnerabilities   in digital systems. It encompasses the likelihood of a cyberattack compromising data or systems, leading to financial,   reputational , or operational damage. A few examples of cybersecurity risks include   ransomware ,   malware ,   insider threats ,   phishing attacks ...

Ephone Hunt Groups and Voice Hunt Groups Comparison

SIP phones support Voice Hunt Groups. SCCP phones support Ephone Hunt Groups, and in Cisco Unified CME 4.3 and later versions, SCCP phones also support Voice Hunt Groups.  Table 69  compares the features of Ephone Hunt Groups and Voice Hunt Groups. Table 69 Feature Comparison of Ephone Hunt Groups and Voice Hunt Groups Feature Ephone Hunt Voice Hunt Group Endpoints Supported SCCP only SIP, SCCP, PSTN, and FXS Parallel Hunt Groups (Call Blast) No (for alternative, see the  "Shared-Line Overlays" section ) Yes Hunt Statistics Support Yes No B-ACD Support Yes No Features such as present-call and login/logout Yes No Thanks & Regards Avinash Pillai URL :  http://avinashpillai.blogspot.com Email: avinashp25[AT]gmail[DOT]com