Adding an entire range of IPs to the server...

11 posts / 0 new
Last post
#1 Tue, 02/07/2012 - 07:50
NetDoc

Adding an entire range of IPs to the server...

I have been trying to add IP addresses to my CentOS 6.2 server running a fresh install of Virtualmin 3.90. Currently it has 192.168.2.70 attached to eth0 and 69.28.64.172 attached to eth1. I have tried to add an IP manually by cp ifcfg-eth0 to ifcfg-eth0:0 and making the proper edits, but when I restart the network service I get a "Bringing up interface eth0: SIOCADDRT: No such process" error. I deleted the ifcfg-eht0:0 record.

So, since I bought Virtualmin to make my life easier, I went to the Webmin => Network Configuration => Network Interfaces => Add a new interface. I got the same message when I restarted the network service. I went ahead and deleted the ifcfg-eth0:0 record it created. and network restarted just fine.

I have a range of IPs that I want to install. I see there is a way to add the entire range, but I don't understand what it's really asking me. Here is the range:

IPs 209.208.24.241 NetMask:255.255.255.240 secondary *13 usable starting at 209.208.24.243 - .255 (or is it 242-244???)

I see under adding range:

Interface description: Real interface: eth0, eth1 or lo (I'll stick to eth0) Range name: Starting address: Ending address: First virtual interface no.:

What values should I be putting in here? Your help is much appreciated.

Tue, 02/07/2012 - 07:57
NetDoc

DEVICE="eth0:0" HWADDR="00:30:48:35:2A:32" NM_CONTROLLED="yes" ONBOOT="yes" BOOTPROTO=dhcpNETMASK=255.255.255.240 NETWORK=255.255.255.0 BROADCAST=209.208.24.255 IPADDR=209.208.24.243

Tue, 02/07/2012 - 09:55
andreychek

Howdy,

Well, before attempting to add a range, I'd try to get to a point where you can at least add one. It sounds like something is going on there that's preventing it from working properly.

Are you using a dedicated server, or a VPS?

Also, what output do you receive if you run the command "/sbin/ifconfig"?

Lastly -- what are eth0 and eth1 -- are those two separate network cards? It's somewhat unusual to have both a public IP, and an internal IP, on the same system, I'm just trying to understand the setup you have there.

-Eric

Tue, 02/07/2012 - 11:24 (Reply to #3)
NetDoc

It's a dedicated server: epsilon.scubaboard.com and lives in a rack with 11 others. eth0 and eth1 are indeed two separate NICs. Here is the output:

[root@epsilon pjmu]# /sbin/ifconfig eth0 Link encap:Ethernet HWaddr 00:30:48:35:2A:32
inet addr:192.168.2.70 Bcast:192.168.2.255 Mask:255.255.255.0 inet6 addr: fe80::230:48ff:fe35:2a32/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1640575 errors:0 dropped:0 overruns:0 frame:0 TX packets:3569 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:392465310 (374.2 MiB) TX bytes:431600 (421.4 KiB) Interrupt:18 Memory:d8000000-d8020000

eth1 Link encap:Ethernet HWaddr 00:30:48:35:2A:33
inet addr:69.28.64.172 Bcast:69.28.64.175 Mask:255.255.255.240 inet6 addr: fe80::230:48ff:fe35:2a33/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1786175 errors:0 dropped:0 overruns:0 frame:0 TX packets:97670 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:587060372 (559.8 MiB) TX bytes:9437712 (9.0 MiB) Interrupt:19 Memory:d8020000-d8040000

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:27897 errors:0 dropped:0 overruns:0 frame:0 TX packets:27897 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2933850 (2.7 MiB) TX bytes:2933850 (2.7 MiB)

Here is my system info:

System System hostname epsilon.scubaboard.com (69.28.64.172) Operating system CentOS Linux 6.2 Webmin version 1.570 Virtualmin version 3.90 Pro Theme version 8.2 Time on server 07/Feb/2012 12:19 , Up 3 days, 20 hours, 01 minutes Kernel and CPU Linux 2.6.32-220.el6.x86_64 on x86_64 CPU load averages 0.03 (1 min) 0.04 (5 mins) 0.00 (15 mins) Running processes 248 Real memory 15.57 GB total, 966.77 MB used

Virtual memory 17.70 GB total, 0 bytes used

Local disk space 899.46 GB total, 47.26 GB used

Package updates All Virtualmin packages are up to date. 14 updates to system packages are available. Use the Virtualmin Package Updates module to install them selectively.

Wed, 02/08/2012 - 05:14 (Reply to #4)
NetDoc

Anyone have an idea here, or am I stuck with using one IP address per device?

Wed, 02/08/2012 - 09:01
andreychek

Howdy,

Well, can you describe your setup there a bit?

Which NIC is plugged into the Internet, is it eth0, or eth1?

It almost looks like eth0 is plugged into a LAN port, and eth1 into an Internet port... meaning that you'd want to add the additional IP's as aliases to eth1.

Also, are these all IP's your host gave you? The range you're trying to add seems much different from the public IP that's already setup.

I'm just trying to understand your setup a bit more so that I can offer useful advice. Something seems a little unusual with your setup, and I'm not quite sure why yet :-)

-Eric

Thu, 02/09/2012 - 15:50
NetDoc

This server sits in a server cabinet at Atlantic.net. Both NICs are connected to the internet. If I delete eth0:0, I can ssh in from one of the local servers on the local address or from the internet on the public address.

Here are the outputs for vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth0"
HWADDR="00:30:48:35:2A:32"
NM_CONTROLLED="yes"
ONBOOT="yes"
NETWORK=192.168.2.0
NETMASK=255.255.255.0
IPADDR=192.168.2.70

And vi /etc/sysconfig/network-scripts/ifcfg-eth1...

DEVICE="eth1"
HWADDR="00:30:48:35:2A:33"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE=Ethernet
BOOTPROTO=static
IPADDR=69.28.64.172
NETMASK=255.255.255.240
DEFROUTE="yes"
PEERDNS="yes"
PEERROUTES="yes"
IPV4_FAILURE_FATAL="yes"
IPV6INIT="no"

If I delete ifcfg-eth0:0 then service network restart runs just fine.

Thu, 02/09/2012 - 15:49
NetDoc
[root@epsilon pjmu]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
209.208.24.240  0.0.0.0         255.255.255.240 U     0      0        0 eth0
69.28.64.160    0.0.0.0         255.255.255.240 U     0      0        0 eth1
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1003   0        0 eth1
0.0.0.0         69.28.64.161    0.0.0.0         UG    0      0        0 eth1
Tue, 02/14/2012 - 06:49
NetDoc

No one has anything to add to this??? This sucks

Wed, 06/20/2012 - 06:15
NetDoc

I have never received a solution to this...

I am now trying to add the range 209.208.92.34 thru .63 using the Webmin Networking module. It's not letting me assign it to either NIC.

Wed, 06/20/2012 - 15:44
DaveOverton

Just a bit of probably useless help, but a quick search provided this:

http://www.cyberciti.biz/faq/linux-creating-or-adding-new-network-alias-...

Its accurate too, just tried it, look way down at the bottom. Be sure you are adding the addresses to eth1, your "outside" facing interface.

Dave

Topic locked