On CentOS:

    nano /etc/sysconfig/network-scripts/ifcfg-eth0

Update NETMASK line from 255.255.255.0 to 255.255.254.0, and save

    service network restart

Done :o)

Paul

Andy Smith wrote:
Hi,

BitFolk's IP assignment has grown from 212.13.194.0/24 (i.e.
212.13.194.0 -> 212.13.194.255) to 212.13.194.0/23 (i.e.
212.13.194.0 -> 212.13.195.255).  This means that almost all
customers in the UK need to change their netmask.

This is largely harmless since all it means is that you cannot
communicate with IPs in 212.13.195.x, and for some time to come that
will only be other customers.  However, eventually I will need to
start putting infrastructure into there too.

Here are some instructions on how to change the settings.  You
should be able to do this without losing any network connectivity.
These instructions are for Debian/Ubuntu, so Centos and Gentoo folks
you are on your own unfortunately, but this isn't complicated -- I
believe the only Debian-specific bit is step 4. 

1. Make sure you have access to your Xen shell console in case
   anything goes wrong. 

2. MAKE SURE YOU HAVE ACCESS TO YOUR XEN CONSOLE IN CASE ANYTHING
   GOES WRONG. REALLY. LOG IN AND CHECK.

3. Check that you actually need to do this. An example of a VPS
   that needs to make a change:

   $ /sbin/ip ro
   212.13.194.0/24 dev eth0  proto kernel  scope link  src 212.13.194.75
   default via 212.13.194.1 dev eth0

   Note the /24 -- it should be /23.

4. Fix your config file, /etc/network/interfaces. Here's an example
   of the content before it is fixed:

----[ /etc/network/interfaces ]--------------------------------------

   auto lo
   iface lo inet loopback

   auto eth0
   iface eth0 inet static
   address 212.13.194.75
   netmask 255.255.255.0
   gateway 212.13.194.1

----[ /etc/network/interfaces ]--------------------------------------

   Here's an example after fixing:

----[ /etc/network/interfaces ]--------------------------------------

   auto lo
   iface lo inet loopback

   auto eth0
   iface eth0 inet static
   address 212.13.194.75
   netmask 255.255.254.0
   gateway 212.13.194.1

----[ /etc/network/interfaces ]--------------------------------------

   The only line changed is the netmask.

   You should change this config file ready for the next boot, but
   it won't alter your current settings.

5. Find your current IP address:

   $ /sbin/ip -4 addr
   1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
       inet 127.0.0.1/8 scope host lo
   2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
       inet 212.13.194.75/24 scope global eth0

   In this example my IP address is 212.13.194.75.

6. Add it with the correct settings:

   $ /sbin/ip addr add 212.13.194.75/23 dev eth0

   That should complete without error.

7. Remove the old one:

   $ /sbin/ip addr del 212.13.194.75/24 dev eth0

   That should complete without error.

8. Check that your routing table is now correct:

   $ /sbin/ip ro
   212.13.194.0/23 dev eth0 proto kernel scope link src 212.13.194.75
   default via 212.13.194.1 dev eth0

That's it. You should not lose connectivity at any point during this
procedure.

If you're already using the /23 setup (anyone set up probably in the
last 2 weeks, but do check) then you don't need to do anything.

If you have your own net block routed to you then you don't need to
do anything.

If you have multiple IPs then your interfaces file might look a bit
like this:

----[ /etc/network/interfaces ]--------------------------------------

   auto lo
   iface lo inet loopback

   auto eth0
   iface eth0 inet static
   address 212.13.194.75
   netmask 255.255.255.0
   gateway 212.13.194.1

   auto eth0:1
   iface eth0:1 inet static
   address 212.13.194.116
   netmask 255.255.255.255

----[ /etc/network/interfaces ]--------------------------------------

The netmask of aliased IPs (eth0:1, eth0:2, ...) does not need to
change. IP aliases on the same network as another interface are
supposed to be 255.255.255.255 netmask.  So in this case you would
only need to be fixing the netmask for the eth0 entry, and
adding/deleting 212.13.194.75.

If you have any questions please feel free to mail me on or offlist
about it before you do anything.

If Centos/Gentoo folks could contribute a HOWTO for this then that
would be great.

Cheers,
Andy 

  

_______________________________________________ users mailing list users@lists.bitfolk.com https://lists.bitfolk.com/mailman/listinfo/users