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

Seven Personal Qualities Found In A Good Leader

Whether in fact a person is born a leader or develops skills and abilities to become a leader is open for debate. There are some clear characteristics that are found in good leaders. These qualities can be developed or may be naturally part of their personality. Let us explore them further. Seven Personal Qualities Found In A Good Leader: 1. A good leader has an exemplary character. It is of utmost importance that a leader is trustworthy to lead others. A leader needs to be trusted and be known to live their life with honestly and integrity. A good leader “walks the talk” and in doing so earns the right to have responsibility for others. True authority is born from respect for the good character and trustworthiness of the person who leads.   2.A good leader is enthusiastic about their work or cause and also about their role as leader. People will respond more openly to a person of passion and dedication. Leaders need to be able to be a source of inspiration, and be a

Defining AI Ethics

                           Defining AI Ethics Welcome to Defining AI Ethics. Humans rely on culturally agreed-upon morals and standards of action — or ethics — to guide their decision-making, especially for decisions that impact others. As AI is increasingly used to automate and augment decision-making, it is critical that AI is built with ethics at the core so its outcomes align with human ethics and expectations. AI ethics is a multidisciplinary field that investigates how to maximize AI's beneficial impacts while reducing risks and adverse impacts. It explores issues like data responsibility and privacy, inclusion, moral agency, value alignment, accountability, and technology misuse …to understand how to build and use AI in ways that align with human ethics and expectations.  There are five pillars for AI ethics: explainability, fairness, robustness, transparency, and privacy.  These pillars are focus areas that help us take action to build and use AI ethically.  Explainability 

Command to Find Version of Linux OS

Command to Find Version of Linux OS # cat /etc/redhat-release Regards Avinash Pillai URL : http://avinashpillai.blogspot.com Email: avinashp[AT]aztecsoft[DOT]com, avinashp25[AT]gmail[DOT]com