Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

 

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
New Webmasters ask "How-To" questions here. This is where other fucking Webmasters help.

 
Thread Tools
Old 10-14-2013, 01:50 PM   #1
EN1GMA
Confirmed User
 
EN1GMA's Avatar
 
Industry Role:
Join Date: Nov 2005
Posts: 1,251
Incorrect netmask in network configuration

Hi guys,

I had some problems with netmask of my additional IPs that was showing 255.255.255.0 instead of 255.255.255.255.
I fixed that and contacted my hosting provider support to confirm if everything was correct with the new IP configuration showing the log of the command "ifconfig":

Quote:
root@server [~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:22:15:AB:96:62
inet addr:46.105.121.215 Bcast:46.105.121.255 Mask:255.255.255.0
inet6 addr: fe80::222:15ff:feab:9662/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:24879514 errors:0 dropped:0 overruns:0 frame:0
TX packets:37628599 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2963209878 (2.7 GiB) TX bytes:45812951640 (42.6 GiB)
Interrupt:20 Memory:fe500000-fe520000

eth0:cp1 Link encap:Ethernet HWaddr 00:22:15:AB:96:62
inet addr:94.23.78.68 Bcast:94.23.78.255 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:20 Memory:fe500000-fe520000

eth0:0 Link encap:Ethernet HWaddr 00:22:15:AB:96:62
inet addr:178.32.52.69 Bcast:178.32.52.69 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:20 Memory:fe500000-fe520000

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

And they said this:
Quote:
"Regarding the interface 'eth0:0', everything seems to be correct now. However, the interface 'eth0:cp1' IP broadcast is incorrect. As IP has a subnet mask '/32' the broadcast IP should be the IP itself (94.23.78.68)."
I tried to fix by running the command:
Code:
sed -i 's/94.23.78.255/94.23.78.68/g' /etc/ips; /etc/init.d/ipaliases restart
But I think that something is wrong.
Here goes the log:
Quote:
root@server [~]# sed -i 's/94.23.78.255/94.23.78.68/g' /etc/ips; /etc/init.d/ipaliases restart
Shutting down eth0:0 [ OK ]
UnRouting 94.23.78.68 [ OK ]
Shutting down eth0:cp1 [ OK ]
Bringing up eth0:cp1 [ OK ]
Routing 94.23.78.68 [ OK ]
Bringing up eth0:cp2 [ OK ]
Routing 178.32.52.69 [ OK ]

root@server [~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:22:15:AB:96:62
inet addr:46.105.121.215 Bcast:46.105.121.255 Mask:255.255.255.0
inet6 addr: fe80::222:15ff:feab:9662/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:26237619 errors:0 dropped:0 overruns:0 frame:0
TX packets:39680507 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3122661542 (2.9 GiB) TX bytes:48244727511 (44.9 GiB)
Interrupt:20 Memory:fe500000-fe520000

eth0:cp1 Link encap:Ethernet HWaddr 00:22:15:AB:96:62
inet addr:94.23.78.68 Bcast:94.23.78.68 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:20 Memory:fe500000-fe520000

eth0:cp2 Link encap:Ethernet HWaddr 00:22:15:AB:96:62
inet addr:178.32.52.69 Bcast:178.32.52.255 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:20 Memory:fe500000-fe520000

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:1571468 errors:0 dropped:0 overruns:0 frame:0
TX packets:1571468 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:725252851 (691.6 MiB) TX bytes:725252851 (691.6 MiB)
I notice two things:

1- I don't have 'eth0:0' anymore,now I have a 'eth0:cp1' and 'eth0:cp2', it seems that was renamed. Is this ok?

2- It seems that eth0:cp1 is fine now:
inet addr:94.23.78.68 Bcast:94.23.78.68 Mask:255.255.255.255

But eth0:cp2 (old eth0:0 that was already fine) is not:
inet addr:178.32.52.69 Bcast:178.32.52.255 Mask:255.255.255.255


Any ideas? Can someone help me with these?

Thank you guys!

Regards!!
EN1GMA is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 10-14-2013, 07:06 PM   #2
AMSM
Guest
 
Posts: n/a
Why would you even need a netmask.
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 10-16-2013, 06:17 AM   #3
Spudstr
Confirmed User
 
Spudstr's Avatar
 
Industry Role:
Join Date: Jan 2003
Location: In a Tater Patch
Posts: 2,321
Quote:
Originally Posted by EN1GMA View Post
Hi guys,

I had some problems with netmask of my additional IPs that was showing 255.255.255.0 instead of 255.255.255.255.
I fixed that and contacted my hosting provider support to confirm if everything was correct with the new IP configuration showing the log of the command "ifconfig":




And they said this:


I tried to fix by running the command:
Code:
sed -i 's/94.23.78.255/94.23.78.68/g' /etc/ips; /etc/init.d/ipaliases restart
But I think that something is wrong.
Here goes the log:


I notice two things:

1- I don't have 'eth0:0' anymore,now I have a 'eth0:cp1' and 'eth0:cp2', it seems that was renamed. Is this ok?

2- It seems that eth0:cp1 is fine now:
inet addr:94.23.78.68 Bcast:94.23.78.68 Mask:255.255.255.255

But eth0:cp2 (old eth0:0 that was already fine) is not:
inet addr:178.32.52.69 Bcast:178.32.52.255 Mask:255.255.255.255


Any ideas? Can someone help me with these?

Thank you guys!

Regards!!
According to documentation..
These are subinterfaces and a method of adding additional IP addresses along with their subnets to an interface. The part after the colon is arbitrary.

iptables cannot reference subinterfaces, so any rules required would be based on IP addresses, but bound to the physical interface if required.

As far as netmasks go. having a /32 netmask on an alias ip is fine actually. since the only one that matters is the netmask that defines the default route which is accessible is the main IP on the box, well you could use any actually as long as your default gateway is pointing to an aces sable IP on that netmask. Since they are different ips not in the same broadcast domain issuing a /32 on each IP is the correct way to do this masking.

Now with that being said this is actually HORRIFIC practice and VERY poor network design which will lead into a lot of "shit talking" on the broadcast domain, lots of crap traffic and actually you are vulnerable to a broadcast flood on the broadcast domain, which would take you down and everyone else on that broadcast domain if it was to happen.

In short this his horrible, while I realize this is OVH.. its not a real good design to do.
__________________
Managed Hosting - Colocation - Network Services
Yellow Fiber Networks
icq: 19876563
Spudstr is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 10-16-2013, 07:56 AM   #4
EN1GMA
Confirmed User
 
EN1GMA's Avatar
 
Industry Role:
Join Date: Nov 2005
Posts: 1,251
Spudstr, thank you for your reply buddy.

So what do you suggest to do?

Thanks once again!
EN1GMA is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 10-16-2013, 09:52 AM   #5
Spudstr
Confirmed User
 
Spudstr's Avatar
 
Industry Role:
Join Date: Jan 2003
Location: In a Tater Patch
Posts: 2,321
Quote:
Originally Posted by EN1GMA View Post
Spudstr, thank you for your reply buddy.

So what do you suggest to do?

Thanks once again!
Stick with the /32's and don't change the netmasks on them.

Unless they just don't work? then that is a different set of issues.
__________________
Managed Hosting - Colocation - Network Services
Yellow Fiber Networks
icq: 19876563
Spudstr is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
 
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.