Tuesday, July 28, 2009

Setting up a Network

Checking IP Address Details

#ifconfig

This will define the IP address of one interface. If the PC has two NICs, then it could have two IPs. The Networl configuration file could be found in

#cd /etc/sysconfig/network-scripts

In this there are several files. "ifcfg-eth0" contains the Network Card information. The file looks as follows.

DEVICE = eth0 [This is the first NIC interface]
BOOTPROTO = [dhcp OR static ---> If it is DHCP the card will listen to a DHCP Server]
HWADDR = 00:06:5B:22:FS:8E [MAC Address]
ONBOOT = yes [For the Network to load at boot-up]
TYPE = Ethernet

To add a IP Address change the file as

BOOTPROTO = static
and add
IPADDR = 192.168.190.1[The IP you wish to assign]

Optionally you could perform the same thing by

#netconfig

OR

#ifconfig 192.168.190.1/24

After completing the Network Services should be restarted.

#service network restart

Once again if you check out the IP address you may see

#ifconfig

'etho' will have an IP Address
'l0' is for the Loop Back IP


Now you Computer has been set up for the network. Try to 'ping' another PC on the WORKGROUP. It should work.

Good Luck....!

No comments:

Post a Comment