Red Hat / Fedora :: Determine Network Interface That Will Be Used To Send Packet For An IP?
Apr 9, 2010
I'm writing to you because I encountered the following problem. My program displayes all network interfaces that are available in the system, but I would like to adda functionality in which a user can enter a destination address IP (ex. the IP address of the Google search engine) and will get information which network interface will be used to send it. As I know it is associated with reading information from routing table in the system. Maybe you know the API (functions/methods) which I could use to do it in RedHat ? I program in C/C++, but if you know how to do it in other programming languages (Java, Perl, Python) I will be grateful for any information.
View 4 Replies
ADVERTISEMENT
Jul 12, 2010
I am the new user to ns-2. I would like to know is it possible to send the keys or some value as the packet data (content of the packet) in ns-2 (for wireless environment).
View 1 Replies
View Related
Jul 19, 2009
I get this ifconfig output for eth0:1 :
eth0:1
Where are all the packet statistics?
View 2 Replies
View Related
Nov 19, 2010
I have to interfaces eth0(10.0.0.7) and wlan1(10.0.0.8) in my box. An application is listening (say, udp socket) at 10.0.0.7:5888.
Now if someone sends packet at 10.0.0.8:5888, I want to forward them to 10.0.0.7:5888.
I have tried this - iptables -t nat -A PREROUTING -p udp --dport 5888 -d 10.0.0.8 -j DNAT --to-destination 10.0.0.7
But Packets(with destination addr 10.0.0.8) are not received by the application (But they are received by the box, I have checked using wireshark). I have also enabled ip_forwarding.
View 1 Replies
View Related
Jun 16, 2010
How can i send udp packet to the DNS using netcat in opensuse.
View 7 Replies
View Related
Apr 1, 2011
As i am posting in this forum you might already have guessed that I am a total linux noob, but I am a pretty faster learner. I know a few basic things but I feel like I am stuck with my problem.I want to send the Magic packet (wake on LAN) from my linux machine to another, but I am unsure how to approach this. I have google�ed my ass off but I am none the wiser. I found a few forums posts and programs that can do the trick and guides in how to use the programs but I have no idea how to install them.You have to know that my linux machine is a NAS server and has therefore only Konsole access (no GUI). As I said before I am pretty much a noob
View 16 Replies
View Related
Feb 1, 2011
Can someone help me with this problem,trying to send a packet,using tcp/ip,the packet should look like this:
Code:
field 1: SOCKS protocol version, 1 byte (0x05 for this version)
field 2: status, 1 byte:
0x00 = request granted
0x01 = general failure
0x02 = connection not allowed by ruleset
0x03 = network unreachable
0x04 = host unreachable
0x05 = connection refused by destination host
0x06 = TTL expired
0x07 = command not supported / protocol error
0x08 = address type not supported
field 3: reserved, must be 0x00
field 4: address type, 1 byte:
0x01 = IPv4 address
0x03 = Domain name
0x04 = IPv6 address
field 5: destination address of
4 bytes for IPv4 address
1 byte of name length followed by the name for Domain name
16 bytes for IPv6 address
field 6: network byte order port number, 2 bytes
and this is my code:
Code:
int domainLen = strlen(domain);
char reply[domainLen + 7];
reply[0] = 5; // version
reply[1] = 0; // succed
reply[2] = 0; // reserved
reply[3] = 3; // its a domain
reply[4] = domainLen;; // lenght of domain
for(int j = 0; j < domainLen; ++j)
{
reply[j + 5] = domain[j];
}
reply[5 + domainLen] = 80; // port
reply[20] = '�';
Send(reply, sizeof(reply));
domain is "www.google.com". Am I doing it right ? I dont know much about bits.
View 6 Replies
View Related
Jan 25, 2010
I am trying to generate a UDP syslog packet from my C application. But I am facing a problem with a Cisco Router ACE that does not like the Source Port being '0' and thus drops the packet.How can I specify the Source Port in the UDP header to '514' as stated in RFC3164 (Section 2: Transport Layer Protocol)? "It is RECOMMENDED that the source port also be 514 to indicate that the message is from the syslog process of the sender"
View 1 Replies
View Related
Oct 10, 2010
I am facing problem(system gets crash) while I try to send IPv6 packet by using my kernel module. I have given the code and makefile for my module. I will appreciate if any one shares any tester module for sending IPv6 packets.The kernel version that I am using is 2.6.9 and it supports for IPv6.
file name: rtp_pkt_tx.c
#include "linux/kernel.h"
#include "linux/module.h"
#include "linux/skbuff.h"
#include "linux/init.h"
[Code]...
View 1 Replies
View Related
Apr 1, 2010
I have found many examples out on the www for creating udp servers with sockets. The problem I am running into is after I receive the packet from a host I need to be able to send a custom made packet(I'm using RawIP / NetPacket to make my packet) back to this host. The only way to do this is seemingly through the send() function. This function however doesn't appear to allow me to specify which host to send my packet to.
View 2 Replies
View Related
Sep 28, 2010
On Linux, is root privilege required to send a wake-on-lan magic packet? If it depends on how you send the magic packet, please let me know under what situation root is required.
View 1 Replies
View Related
Dec 26, 2010
I have a laptop connected to the the net thru an adsl modem, when I switch off the laptop network interface,(thru system-config-network) the light of the laptop network card plugged in the router stays on ( green) where as in my pc, when i do the same thing , the light of my pc network card goes off in the modem
View 5 Replies
View Related
Jul 18, 2011
I have a ppp0 entry with post-up options like this
mapping ppp0
map none photon-plus motorola
map timeout: 12
[code]...
View 8 Replies
View Related
Jan 5, 2011
I install from openSUSE-11.3-NET-x86_64.iso. Installation was succesfull, but after install all packet on test internet / update was error. And after log in in installed system internet not work. I use router with DHCP
View 8 Replies
View Related
Jan 25, 2010
after restarting my Fedora 10 the eth0 interface is not up
after i manually restart the network service everything is OK but after restarting it is the same problem.
this is the interface config file:
/etc/sysconfig/networking/devices/ifcfg-eth0 /etc/sysconfig/networking/devices/ifcfg-eth0
# Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
DEVICE=eth0
HWADDR=00:0c:29:8b:82:6b
ONBOOT=yes
SEARCH="mydomainname"
[Code]....
i know i can put the restart service command in the rc.local file but it not suppose to work this way.
View 4 Replies
View Related
Apr 14, 2011
I found multiple sites explaining how to add IPs to a network interface as virtual interface like eth0:0. However I can add IPs to an interface as well using the ip command: ip a a 192.168.2.2/24 dev eth0 What I want to know is how I can make this persistent on rhel/centos.
View 2 Replies
View Related
Jun 30, 2009
I'm facing some problems with FC11 in my PPC G4. I tried installing and everything went well until it reaches a stage where I'm being prompted to select my network interface.
The options are: wlan and eth0
But no matter which one I choose I still get this error "An error occurred trying to bring up the wlan0 (or eth0) network interface". And if I click cancel, the installation aborts. how can I can FC installed??
View 3 Replies
View Related
Aug 29, 2009
tell me how to activate my wired NIC permanently?Also, how do I disable the 'work offline' check box in Firefox.At present I am required to action both before accessing internet.
View 2 Replies
View Related
May 9, 2010
I simply cannot get this to work, has anybody managed it?
My problem is related to tuncfg I believe. I make the modification to the source of tuncfg to change ifconfig to /sbin/ifconfig. If I run hamachi start debug I get the following output:
It appears it cannot create the hamachi network interface because it doesn't appear under ifconfig.
Code:
09 23:14:39.810 [ 117] [ 3338] ipc: login
09 23:14:39.810 [ 117] [ 3338] ses: set_reconn(no)
09 23:14:39.810 [ 117] [ 3338] ses: go_online
09 23:14:39.810 [ 117] [ 3338] ses: state 1.1 -> 2.0
[Code].....
View 4 Replies
View Related
Apr 6, 2011
My setup is as follows,
Machine-1
- Two network interface cards on same network with different MAC say MAC-1 and MAC-2
- IP 10.209.193.130 and 10.209.193.131
- Firewall IP tables empty iptables -F
Machine-2
- One NIC with IP 10.209.193.135
switch
- both machines are connected to common switch and can ping happily.
Problem:
when I send ping request from Machine-2 to Machine-1 arp tables are initialized for IP MAC pair. Surprisingly both IP are get resolved to one MAC i.e MAC-1. general observation is, MAC of first interface which has route in kernel route table. I cross checked this on Suse11 and RHEL5 same result. but In suse10 I am getting expected behavior [i.e IP1-MAC1 and IP2-MAC2 pair in arp cache]. Do any one know why kernel is using same NIC for two different interfaces?
Output for Suse11 and RHEL 5
Code: ? (10.209.193.131) at 00:0c:29:34:e7:6f [ether] on eth3
? (10.209.193.130) at 00:0c:29:34:e7:6f [ether] on eth3 Output for Suse10
Code: ? (10.209.193.128) at 00:0c:29:02:9a:7c [ether] on eth3 <-------- Suse 10 machine-1
? (10.209.193.131) at 00:0c:29:34:e7:6f [ether] on eth3
? (10.209.193.127) at 00:0c:29:02:9a:72 [ether] on eth3 <-------- Suse 10 machine-2
? (10.209.192.1) at 00:00:0c:07:ac:07 [ether] on eth3
View 6 Replies
View Related
Apr 20, 2010
do you know if there is any possibility to route/force non-vlan packet to a vlan interface in Linux?
View 2 Replies
View Related
Sep 6, 2009
I'm a newbie on Linux and trying to find my feet so please be kind.I have installed vmware on my XP laptop and have installed fedora core 9. Network setting on the VMware is set to bridged. My interface eth0 which is using the wireless does not start on boot. I have to run ifup ifcfg-eth0.The file ifcfg-eth0 had onboot=yes and NM=no, so i changed it so that the NM=yes.However this does not resolve the problem at all. I have put the file back to its original configuration and I have disabled network manager and have had no luck
View 2 Replies
View Related
Mar 9, 2009
Someone just erased my HWADDR line from /etc/sysconfig/network-scripts/ifcfg-eth0. How can I obtain my original MAC address?
Code:
ifconfig eth0 does not work (it shows the wrong MAC address) since the HWADDR line from the file I mentioned above was erased. Also there is no ifcfg-eth0.bak backup configuration file.
View 2 Replies
View Related
Mar 21, 2011
I use chrony on my laptop thinking it would be better for it than ntp because I'm frequently connecting and disconnecting from wireless cafe access points and going in and out of suspend mode. But I've also noticed that if chrony is started before the access point is connected it never syncs to the time servers. I have to manually restart it via the service command after I connect. This doesn't seem right to me, if chrony fails to find a network at start time, doesn't it periodically try again ?
View 1 Replies
View Related
Sep 17, 2009
I got a problem with my CentOS server. Somebody told me OpenVPN Requires different changes inside my firewall settings. That could be the problem why openvpn wont load..I receive this error on my CentOS panel when im trying to connect into the centos openvpn (with my winxp pc):
Thu Sep 17 20:31:36 2009 TLS Error: incoming packet authentication failed from 84.xx.62.122:2622
Thu Sep 17 20:31:38 2009 Authenticate/Decrypt packet error: packet HMAC authentication failed
Thu Sep 17 20:31:38 2009 TLS Error: incoming packet authentication failed from 84.xx.62.122:2622
[code]....
View 5 Replies
View Related
Dec 10, 2009
I have b43 wireless. In network Configuration on system->administration the interface it appears as inactive it appers in hardware also as b43 associated to wlan0 but i cannot have access to any wireless network. What i have to do to put this b43 to work.
View 11 Replies
View Related
Nov 12, 2010
anyone know network packet editor for Linux? or modify network packet in wireshark?
View 1 Replies
View Related
Jan 23, 2010
I try to setup a locale network between 10 (Web) Servers (openSuse 11.2), each Server is connected to the internet (eth0) which works fine on all servers.
A 2nd NIC eth1 (1GBit rtl-8169) on each Server is connect to a Switch and should function as a LAN. I installed/configured the 2nd NIC with yast, and than added a route for the local network (192.168.20.0) to use eth1. So far every thing works (ssh for example), but I have a packet loss of 10%-60% (ping) on the local network, and I cant find the reason for the packet loss. I already installed a Debian Lenny on 2 Servers (just to test) but I have the same problem on Debian.
No firewall or any other application is in the way. With tcpdump I could figure out that the packages are send but never show up on the destination server.
I put some more information about how I configured the LAN below. I have not done this my first time and from my experience if something is wrong with the network configuration (wrong routing, firewall in the way, etc.) this usually leads to a packet loss of 100% or the destination is simply not reachable.
The 2nd NIC is installed with either yast on suse , or by editing /etc/network/interfaces on debian. The Kernel module rtl8169 is loaded.
They are configured with the following values:
Route is added by:
Output example. of ifconfig :
Output of route (same on all servers):
Output of ping:
View 14 Replies
View Related
Sep 20, 2010
When CentOS boots up, it tries to determine the IP for a network device (eth0) and fails.
'Determining IP information for eth0... failed; no link present.'
I'm curious to know how, after booting up, I could set the IP information for a wireless device, wlan0, manually. Another way of putting this questions is: if CentOS is able to determine IP information for a network device on bootup, what settings is it configuring exactly?
View 2 Replies
View Related
Jan 12, 2010
I am trying to remember how to determine the number of subnets there are in a given subnet range. The example range is shown below:Quote:217.133.64.0-217.133.127.255nce I did the binary conversions of the two addresses shown, the address that I got when comparing the two was the following:Quote:217.133.192.0he number of subnets I got from his was 63.Correct me if I am wrong, but is the number of subnets the difference between the number, in this case, the third octet and 255? If there is another, or correct, way of determining the number subnets what would it entail?
View 8 Replies
View Related