1. Create a file ifcfg-eth0-iprange.
2. Add the following content in the file depending on your requirement.
3. Change IPADDR_START & IPADDR_END as per the need.
4. save the file.
5. service network restart
ONBOOT=yes
IPADDR_START=192.168.217.129
IPADDR_END=192.168.217.132
CLONENUM_START=0
NETMASK=255.255.255.0
NO_ALIASROUTING=yes
[root@rajlinux network-scripts]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:B7:4F:7C
inet addr:192.168.217.128 Bcast:192.168.217.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:feb7:4f7c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:44792 errors:0 dropped:0 overruns:0 frame:0
TX packets:32995 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3933587 (3.7 MiB) TX bytes:5143510 (4.9 MiB)
Interrupt:5 Base address:0x2024
eth0:0 Link encap:Ethernet HWaddr 00:0C:29:B7:4F:7C
inet addr:192.168.217.129 Bcast:192.168.217.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x2024
eth0:1 Link encap:Ethernet HWaddr 00:0C:29:B7:4F:7C
inet addr:192.168.217.130 Bcast:192.168.217.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x2024
eth0:2 Link encap:Ethernet HWaddr 00:0C:29:B7:4F:7C
inet addr:192.168.217.131 Bcast:192.168.217.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x2024
eth0:3 Link encap:Ethernet HWaddr 00:0C:29:B7:4F:7C
inet addr:192.168.217.132 Bcast:192.168.217.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x2024
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:13956 errors:0 dropped:0 overruns:0 frame:0
TX packets:13956 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:10042055 (9.5 MiB) TX bytes:10042055 (9.5 MiB)
Thanks.
No comments:
Post a Comment