Ubuntu Networking :: Calculate Broadcast & Network?
Jul 13, 2010
i m setting up a linux server and i have to setup ip , in static mode. so i know everything except those two things. how do i calculate them?
example ip:200.49.142.91
submask 255.255.255.248
gateway 200.49.142.89
View 5 Replies
Jan 8, 2011
I wrote a script which sends the server,files from /proc/ like dev,netstat,loadavg etc of a client. i want to calculate the network load and the overall cpu performance of the client using the information from the files.I donot know how to calculate that as i have too many values in those. which values will be useful and how to calculate?
View 2 Replies
View Related
May 6, 2010
I have just installed FC12 on my machine - and gone Windows free for the first time ever. Now I do use various flavours of Linux on a daily basis but not from an installation/sys admin point of view so my questions here may seem a little basic but pleas eindulge me if you will!
Now, my network connection works perfectly well under the following scenarios.
1) FC12, wired to router
2) FC12, wireless, SSID broadcast enabled
3) Ubuntu (laptop), wireless, SSID broadcast DISABLED
The only scenario that does not work is FC12, wireless with SSID broadcast disabled.
I can only assume that it is an issue with my USB modem (a linksys WUSB54GS) since the same set-up works fine from my laptop running Ubuntu with an internal wireless card.
Now, I know from reading the forums that it's pretty easy to get around a disabled SSID broadcast but this is an itch I just have to scratch....what the hell is causing this problem?
nm-tool ouput is as follows:
I have tried using wpa_supplicant but I am not sure which driver I am using here - is it ndiswrapper per chance?
(Driver: rndis_wlan)
How I can connect once again to my wireless router with SSID broadcast turned off.
View 5 Replies
View Related
May 2, 2011
I have a Dell Vostro 1400 with a BCM4311 Broadcom wireless card that I just reinstalled with 11.04 from 10.04. I have the drives installed and it seams to be working when i run the 'Additional Drives', but I can't get the wireless adapter broadcasting. I followed the instructions given in the knowledge base on installing Broadcom Wireless, to see if I could get it running and that is where I saw the difference between the example and my computer when writing the 'sudo lshw -C network' command. In the example it said it was broadcasting under configuration (just like my wired networks below) and in mine it does not (see below for copy past).
I can't find a tickbox in the systemtray to enable the wirless networking that I had before the update to 11.04 (the 'Enable Networking' tickbox is still there and the wired network works fine - that is how I got online to do this post). I have the hardware switch turned on and I have been in the BIOS and made sure that the Wireless is enabled.Anyone who knows what could be wrong? Where could I go from here?Quote:
morgan@morgan-Vostro-1400:~$ sudo lshw -C network
[sudo] password for morgan:
*-network UNCLAIMED
[code]....
View 1 Replies
View Related
Nov 11, 2010
We have a DSL , how can we calculate the available bandwidth so that we can shape the packet, We can assume the bandwidth to be 100mbps on the ethernet interface However, in DSL devices, the train rate(Bandwidth rate ) is varies according to different situation. How can i get the available bandwidth rate(from varies)?. Any method is there for getting the available bandwidth value....
View 7 Replies
View Related
May 7, 2010
Here is my problems :I have two networks :1. LAN (10.1.x.x subnet 255.255.0.0), and2. my internet public (IP 202.xx.xxx.xxxx subnet 255.255.255.240)I have an application in my LAN PC (10.1.2.240) which broadcast udp packet to its client. The client in my LAN can receive the udp packet, no problem.My question is how netcat/socat can RELAY the udp broadcast packet to one of my IP public address so the message can be received by other client from internet ?
View 5 Replies
View Related
May 28, 2010
Link 1 = my network [url]
My network:
Subnet 1
Subnet 2
When someone creates a network loop (a cat 5 cable is plugged into two ports on a switch), the 2 subnet get flooded and become very slow.
How can I prevent subnet 1 from getting flood if someone create a loop on subnet 2.
- eth2 go offline automatically until the network loop is canceled.
View 2 Replies
View Related
Aug 16, 2011
I'm using F15 with two nics, each on different subnets 192.168.1.0/25 and 192.168.1.128/25. My issue is that on boot my 192.168.1.2/25 interface sets a broadcast address of 192.168.1.255 which is incorrect I believe. Its broadcast should be 192.168.1.127. I've tried setting the broadcast param in ifcfg-p3p1 file "BROADCAST=192.168.1.127" with no benefit.I can change this after boot of course, but that removes my default gateway for some reason.
View 2 Replies
View Related
Mar 24, 2010
So I just changed my network card settings recently, and I'm now getting no response when I ping the broadcast address for them... the cards are all connected through a switch with IP addresses 192.168.0.x, broadcast 192.168.0.255... ifconfig on all of them shows UP BROADCAST RUNNING MULTICAST, but nobody responds to a broadcast packet. Any thoughts?
EDIT: Pinging each machine individually works fine.
View 7 Replies
View Related
Sep 25, 2010
When setting up an alias for eth0, the interface works as expected for normal traffic, but does not receive broadcast traffic.
Host 1's setup:
Code:
Pinging host 1's normal interface from host 2 works as expected:
Code:
Pinging host 1's alias interface from host 2 works as expected:
Code:
Broadcast pinging from host 2 only gets a reply from host 1's real interface (as well as some other uninteresting devices on the network):
Code:
I have confirmed by listening on both interfaces using netcat, and broadcasting using netcat, and again only the real interface receives data.
Is this by design, or is it possible to get interface aliases to receive broadcast traffic?
View 1 Replies
View Related
Feb 24, 2011
I am working on uClinux/almost same as Linux. I am new to socket programming. I have two micro controllers running on same code. Simple run with arguments mean send merged string.
run 1st micro controller (Send): ./Name "anystring"
run 2st micro controller (Recive):/Name
My code is:
int receive() {
// Create socket
int sock_fd;
struct sockaddr_in addr;
char buffer[kBufferSize];
int bytes_received=0;
int addr_len = sizeof(addr);
printf("receive start ");
sock_fd = socket(AF_INET, SOCK_DGRAM, 0);
if ( sock_fd == -1 ) {
printf("receive Create ");
// Error occurred return 0; }
printf("Res Create sucee ");
// Create address from which we want to receive, and bind it
memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = INADDR_ANY;
addr.sin_port = htons(kPortNumber);
if ( bind(sock_fd, (struct sockaddr*)&addr, sizeof(addr)) < 0 ) {
printf("receive bind "); // Error occurred return 0; }
printf("Bind Succeful sucee ");
while ( 1 ) {
// Receive a message, waiting if there's nothing there yet
bytes_received = recvfrom(sock_fd, buffer, kBufferSize-0, 0,
(struct sockaddr*)&addr, &addr_len);
if ( bytes_received < 0 ) { // Error occurred
printf("receive bytes "); return 0; }
printf(" bytes_received succeful ");
printf("Ressocketstring : %s ",buffer);
memset(Ressocketstring,0x00 , sizeof(Ressocketstring));
strcpy(buffer,Ressocketstring); printf("Ressocketstring : %s
",Ressocketstring); printf(" ");
printf("Hello Receive finished");
// Now we have bytes_received bytes of data in buffer. Print it!
fwrite(buffer, sizeof(char), bytes_received, stdout); } }
int transmit(char * data, int length) {
int sock_fds[kMaxSockets];
// Obtain list of all network interfaces
/* struct ifaddrs *addrs;
if ( getifaddrs(&addrs) < 0 ) {
// Error occurred return 0; } */
// Loop through interfaces, selecting those AF_INET devices that support broadcast, but aren't loopback or point-to-point
struct sockaddr_in addr; int number_sockets = 0; struct hostent *he;
/* const struct ifaddrs *cursor = addrs;
while ( cursor != NULL && number_sockets < kMaxSockets ) {
if ( cursor->ifa_addr->sa_family == AF_INET
&& !(cursor->ifa_flags & IFF_LOOPBACK)
&& !(cursor->ifa_flags & IFF_POINTOPOINT)
&& (cursor->ifa_flags & IFF_BROADCAST) ) {
// Create socket*/
sock_fds[number_sockets] = socket(AF_INET, SOCK_DGRAM, 0);
if ( sock_fds[number_sockets] == -1 ) // Error occurred {
printf("Error Create "); return 0; }
he = gethostbyname((char *)BCASTADDRESS) ;
if (he==NULL ) {printf("Error gethostbyname ");
herror("gethostbyname"); printf("Error host "); exit(1);
} printf("Res He ");
// Create address from which we want to send, and bind it
memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET;
addr.sin_addr = *((struct in_addr *)he->h_addr);//((struct sockaddr_in *)cursor->ifa_addr)->sin_addr; addr.sin_port = htons(kPortNumber);
if ( bind(sock_fds[number_sockets], (struct sockaddr*)&addr, sizeof(addr)) < 0 )
{ // Error occurred printf("Error bind "); return 0; }
// Enable broadcast int flag = 1;
if ( setsockopt(sock_fds[number_sockets], SOL_SOCKET, SO_BROADCAST, &flag, sizeof(flag)) != 0 ) // Err occur { printf("Error Enable "); return 0; }
number_sockets =1; printf("Succes 1 "); printf("transmit Create ");
// Initialise broadcast address memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET; addr.sin_addr.s_addr = INADDR_BROADCAST;
addr.sin_port = htons(kPortNumber);
// Send through each interface int i;
for ( i=0; i<number_sockets; i++ ) {
if ( sendto(sock_fds[i], data, length, 0, (struct sockaddr*)&addr, sizeof(addr)) < 0 )
{ printf("Error Send "); // Error occurred return 0;
} printf("Succes 2 "); } return 1; } void MergeMessage( ) {
memset(socketstring,0x00,sizeof(socketstring));
sprintf(socketstring,"%s@%s@%s@%s@%s@%s@%s@%s@%s@%s@%s
",Tmeg.s1,Tmeg.s2,Tmeg.s3,Tmeg.s4,Tmeg.s5,Tm eg.s6,Tmeg.s7,Tmeg.s8,Tmeg.s9,Tmeg.s10,Tmeg.s11);
printf(" MergeSocketMessage : %s ",socketstring); }
int main (int argc, char** argv) {
int fd=0,bdc=0; struct ifreq ifr; printf("Tsarting man ");
fd = socket(AF_INET, SOCK_DGRAM, 0);
strncpy(ifr.ifr_name, "eth0", IFNAMSIZ-1);
ioctl(fd, SIOCGIFADDR, &ifr); close(fd);
memset(MYIP,'-',sizeof(MYIP));
memset(BCASTADDRESS,'-',sizeof(BCASTADDRESS));
strcpy(MYIP, inet_ntoa(((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr));
printf("Etho: %s ,len:%d ", MYIP,strlen(MYIP));
for(bdc=strlen(MYIP);MYIP[bdc-1]!='.';bdc--) {}
strncpy(BCASTADDRESS,MYIP,bdc-1); strcat(BCASTADDRESS,".255");
printf("BCASTADDRESS: %s ,len:%d
", BCASTADDRESS,strlen(BCASTADDRESS));
printf("Initial Broad Cast message "); {
/*s0"0" (id=76)
s1"500" (id=77)s2"100" (id=78)s3"100" (id=78)s4"startVD" (id=79)
s5"lighting" (id=80)s6"reading" (id=81)s7"Anna" (id=82)s8"0" (id=76)
s9"";s10"" (id=64)s11"" (id=64)*/
strcpy(Tmeg.s0,"0"); strcpy(Tmeg.s1,"500");strcpy(Tmeg.s2,"100");strcpy(Tmeg.s3,"100");
strcpy(Tmeg.s4,"startvd");strcpy(Tmeg.s5,"lighting");strcpy(Tmeg.s6,"reading");
strcpy(Tmeg.s7,"anna");strcpy(Tmeg.s8,"0"); }
MergeMessage (Tmeg); if( strlen(argv[1]) ) {
//strcpy(socketstring,Tmeg,sizeof(Tmeg));
if(transmit(socketstring, strlen(socketstring) ) ) {
printf(""%s" transmitted. ", socketstring); } else {
printf("Error occurred: %s ", strerror(errno)); return 1; } }
else { for( ; ; ) {
if ( argc < 2 ) // No argument: Just listen {
printf("Listening... "); if ( !receive() ) {
printf("Error occurred: %s ", strerror(errno)); return 1;
} return 0; } } } printf("Finished "); return 0;
} //////////////// .h file is /////////////
//#define WIN32_LEAN_AND_MEAN// Exclude rarely-used stuff from Windows headers
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <net/if.h>
#include <fcntl.h>
#include <netdb.h>
#include <signal.h>
#include <sys/wait.h>
#include <sys/ioctl.h>
#define SubLen50
//#include <ifaddrs.h>
#include <errno.h>
char MYIP[20];
char BCASTADDRESS[20];
typedef struct {
char s0[SubLen];
char s1[SubLen];
char s2[SubLen];
char s3[SubLen];
char s4[SubLen];
char s5[SubLen];
char s6[SubLen];
char s7[SubLen];
char s8[SubLen];
char s9[SubLen];
char s10[SubLen];
char s11[SubLen];
}msg_struct;
msg_struct Sendmsg;
msg_struct Tmeg; //Recivemsg;
Boolean pri[6];
char socketstring[SubLen*12];
char Ressocketstring[SubLen*12];
int kBufferSize = (SubLen*12);
View 2 Replies
View Related
May 11, 2011
I am on a 172.16.x.x network with about 60 Windows XP home and Vista home clients in a peer-to-peer workgroup that uses DHCP to assign addresses. About half the traffic on my LAN is netbios broadcast. I do not want to do a WINS server because I do not want to have to manually change the registry on every machine. This is only for local name resolution and I do not have any web servers or e-mail servers. I do not have access to a Windows server to use as a DNS server. I am on Debian and using BIND but am open to other suggestions.
View 1 Replies
View Related
Oct 23, 2010
I'm not sure if this is a problem with Ubuntu or with my router(s).
When I first installed Ubuntu about 6 months ago, I was able to connect to my wireless network without any problems. Becaue it's a laptop, I turn it off when I'm not using it.
But, starting about a month ago, if I don't use my Ubuntu computer for a few days at a time, it won't "see" my broadcast SSID when I turn it on. The SSID for my network just doesn't show up on the list of SSIDs that it detects in the area (but it still detects other people's SSIDs).
If I connect Ubuntu to my wireless network every day, it will automatically connect to my network without a problem, but if I don't use my computer for a few days, then it stops being able to "see" my SSID.
In order to connect, I have to connect to my router from my hardwired Win 7 desktop PC via 192.168.1.1 and re-save the wireless settings without changing them (the router is set to broadcast my SSID). Then my Linux machine is able to see my SSID again and connect wirelessly.
The problem is obviously with the router, right? So I bought a new router, and have the exact same problem!So now I'm not sure any more if the problem is with Linux or with both routers.
View 1 Replies
View Related
Jun 13, 2010
I was recently "playing" with ping in order to measure some RTT both in unicast and broadcast cases but ran into something that left me like O.o wtf! Here is the output of a ping to a private host in my LAN, a normal unicast case:
Code:
64 bytes from 192.168.2.3: icmp_seq=1 ttl=64 time=0.617 ms
64 bytes from 192.168.2.3: icmp_seq=2 ttl=64 time=1.27 ms
64 bytes from 192.168.2.3: icmp_seq=3 ttl=64 time=0.595 ms
[code]...
And here is the sudo ping -b 255.255.255.255 with the answers of the same host as in the unicast case:
Code:
64 bytes from 192.168.2.3: icmp_seq=1 ttl=64 time=1.87 ms
64 bytes from 192.168.2.3: icmp_seq=2 ttl=64 time=66.5 ms
64 bytes from 192.168.2.3: icmp_seq=3 ttl=64 time=88.9 ms
[code]...
Is there a different process that ping uses to calculate RTTs in the case of a broadcast. As far as i know the RTTs to a host should be more or less equal either in unicast or broadcast case.
View 6 Replies
View Related
May 29, 2010
I can't upgrade. I get:
Quote:
Could not calculate the upgrade
An unresolvable problem occurred while calculating the upgrade: The package 'skype-common' is marked for removal but it is in the removal blacklist.
This can be caused by:
* Upgrading to a pre-release version of Ubuntu
* Running the current pre-release version of Ubuntu
* Unofficial software packages not provided by Ubuntu
This is most likely a transient problem, please try again later.
I tried again several times in different days and it is the same. I have 10.4 recently updated from my original installation of 9.10. I think it was not a pre-release, I did it automatically from the website and it took a long time. As far as I know, all I have installed is official, except perhaps Skype itself. There seems to be something connected with Skype. But I have exactly the same Skype I had with 9.10, where I updated every few days with no trouble. It is something peculiar in 10.4
View 7 Replies
View Related
Apr 25, 2010
I can't add my facebook account to gwibber. Here is what i do:Click on envelope in the top panel. Click Broadcast.In Broadcast Accounts click dropdown and select Facebook. Then click Add.I then click Authorise. A blue facebook login page appears. I click on the small link at the bottom that says Log in with Facebook.Type in my credentials and click Connect. Wait a long time then goes back to Authorise window. With the words Facebook authorised.I click on Add and nothing happens. I did try to start using this on Alpha 2 but gave up but now I've done a full reinstall using RC version.
View 9 Replies
View Related