برای ‍یکر بندی یک کارت شبکه با چند ip ادرس می توان از ابزارهای ذیل استفاده کرد:

netconf :: A GUI interactive interface available on Redhat 6.1
linuxconf :: A GUI interactive interface available on Redhat 6.1 which includes netconf configuration.
netconfig :: A GUI step by step interface
ifconfig ::A text based program to configure the network interface. Type "man ifconfig" for info
.

که این ابزار ها مقادیرشان را در فایل های زیر تعریف می کنند:


/etc/sysconfig/network :: Defines your network and some of its characteristics.
/etc/HOSTNAME :: Shows the host name of this host. IF your name is "myhost" then that is exactly the text this file will contain.
/etc/resolv.conf :: Specifies the domain to be searched for host names to connect to, the nameserver address, and the search order for the nameservers.
/etc/host.conf :: Specifies the order nameservice looks to resolve names.
/etc/hosts :: Shows addresses and names of local hosts.
/etc/networks :: Provides a database of network names with network addresses similar to the /etc/hosts file. This file is not required for operation.
/etc/sysconfig/network-scripts/ifcfg-eth* ::There is a file for each network interface. This file contains the IP address of the interface and many other setup variables.
خوب....حال با توجه به این اطلاعات می توانیم اینترفیس دلخواهمان را با بیش از یک IP پیکربندی کنیم:
ifconfig dummy 192.168.1.102 netmask 255.255.255.0
که با این دستور از خاصیت Dummy برای حفظ این ip و درست کردن یک اینتر فیس مجازی با ip 192.168.1.102 استفاده کرده ایم...
برای Disable کردن این اینترفیس کافی است که از این دستور استفاده کنیم:
ifconfig dummy down
روش دوم:
در دایرکتوری /etc/sysconfig/network-scripts قوانین اینتر فیس جدیدمان را در ifcfg-eth0 به صورت ifcfg-eth0:0 کپی می کنیم:


cp /etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/network-scripts/ifcfg-eth0:0
حال آین فایل را ویرایش کرده و به "eth0:0" تغییر نام می دهیم...
همچنین برای تعریف آدرس های BROADCAST, NETWORK, یا NETMASK می توان به همین ترتیب و اضافه کردن اینتر فیس های:1, :2, مثل ifcfg-eth0:2 عمل کنیم...
vi /etc/sysconfig/network-scripts/ifcfg-eth0:0
DEVICE=eth0:0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.102
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
برای فعال کردن این اینتر فیس لازم است سیستم Reboot شود یا از این دستور استفاده کنیم:
"/etc/rc.d/init.d/network restart"
(البته باید با یوزر root وارد شده باشیم)
حال با اجرای دستور 'ifconfig' می توان وضعیت آدرس های جدید را مشاهده کرد و از هر کامپیوتر دیگری در شبکه می توان این آدرس ها را Ping کرد و جواب گرفت....

یک لینک مرتبط با این موضوع :
http://rtfm.dyndns.info/tips/2000/04/05/5.shtml



موضوعات مشابه: