ispCP - Board - Support
ispcp_network is setting wrong mask and broadcast - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Development Area (/forum-1.html)
+--- Forum: Tickets / Roadmap / Timeline (/forum-50.html)
+--- Thread: ispcp_network is setting wrong mask and broadcast (/thread-8396.html)



ispcp_network is setting wrong mask and broadcast - techie - 11-11-2009 07:35 AM

I have 3 additional IPs and I added these IP address into control panel. When I start ispcp_network daemon, it sets netmask and broadcast like A class (Bcast:xxx.255.255.255 Mask:255.0.0.0) which I dont have.


Code:
ft:/etc/ispcp# ifconfig
eth0      Link encap:Ethernet  HWaddr 10:41:D0:B0:EB:E3  
          inet addr:xxx.xx5.71.71  Bcast:xxx.xx5.71.127 Mask:255.255.255.192
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0

ft:/etc/ispcp# /etc/init.d/ispcp_network start
Starting ispCP Network Traffic Logger: ispcp_network.

ft:/etc/ispcp# ifconfig
eth0      Link encap:Ethernet  HWaddr 10:41:D0:B0:EB:E3  
          inet addr:xxx.xx5.71.71  Bcast:xxx.xx5.71.127  Mask:255.255.255.192
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0:2    Link encap:Ethernet  HWaddr 10:41:D0:B0:EB:E3  
          inet addr:xxx.xx5.75.215  Bcast:xxx.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:35

eth0:3    Link encap:Ethernet  HWaddr 10:41:D0:B0:EB:E3  
          inet addr:xxx.xx5.75.220  Bcast:xxx.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:35

eth0:4    Link encap:Ethernet  HWaddr 10:41:D0:B0:EB:E3  
          inet addr:xxx.xx5.75.230  Bcast:xxx.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:35



RE: ispcp_network is setting wrong mask and broadcast - techie - 11-30-2009 08:50 PM

in /var/www/ispcp/engine/tools/

"ispcp-net-interfaces-mngr" file;

I added my real netmask 255.255.255.0 in virtual_netcard_add()
line 93:

Code:
if (defined($ip_card)){
                        push_el(\@main::el, 'virtual_netcard_add()', "$main::cfg{'CMD_IFCONFIG'} ${ip_card}:${ip_id} ${ip_number}
netmask 255.255.255.0  up");
                        $rs = sys_command("$main::cfg{'CMD_IFCONFIG'} ${ip_card}:${ip_id} ${ip_number} netmask 255.255.255.0 up");

and virtual_netcard_remove() function
line 125
Code:
my $ip_number  = @$_[1];
                my $ip_card = @$_[2];

                push_el(\@main::el, 'virtual_netcard_remove()', "$main::cfg{'CMD_IFCONFIG'} ${ip_card}:${ip_id} netmask
255.255.255.0 down");
                $rs = sys_command("$main::cfg{'CMD_IFCONFIG'} ${ip_card}:${ip_id} netmask 255.255.255.0 down");

It could be better that netmask also can be defined with alias ip adresses via control panel.


RE: ispcp_network is setting wrong mask and broadcast - gOOvER - 11-30-2009 09:12 PM

I think, for this is allready a Ticket open Wink