Selecting interface based on source and destination ip address


 
Thread Tools Search this Thread
Special Forums IP Networking Selecting interface based on source and destination ip address
# 1  
Old 07-30-2009
Bug Selecting interface based on source and destination ip address

Hi all,

I have some doubts in selecting the interface to transfer packets and receive the packets.

--> Multiple interfaces :
--------------------

1) 0.0.0.0 --------> wild card address.
2) x.x.x.x --------> valid address.(192.168.1.156)
3) ff.ff.ff.ff --------> broad cast address.


1) If an socket is binded to 0.0.0.0 and its destination ip address is ff.ff.ff.ff

In order to transfer a packet, the packet should be transferred through all interfaces.(broadcasetd).

2) If an socket is binded to 0.0.0.0 and its destination ip address is x.x.x.x

Based on destination ip address an inetrface will be selected to transfer the packet.

Before receiving the packets, the selected interface is closed.
Now the received packets consists of destination ip address as closed interfaces ip address. Whether the received packets are valid or not.


Thanks in advance.........
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Open ports from source to destination

Is there a way to find out all the ports open between source IP & destination IP in any way ? (12 Replies)
Discussion started by: UnknownGuy
12 Replies

2. UNIX for Advanced & Expert Users

C program to detect duplicate ip address if any after assigning ip address to ethernet interface

Hi , Could someone let me know how to detect duplicate ip address after assigning ip address to ethernet interface using c program (3 Replies)
Discussion started by: Gopi Krishna P
3 Replies

3. Shell Programming and Scripting

Count the number of files copied from source to destination location

Hi Guys, how to count number of files successfully copied while coping files from source to destination path ex:10 files from source to target location copying if 8 files copied successfully then echo successfully copied=8 failure=2 files if two files get error to coping files from... (23 Replies)
Discussion started by: sravanreddy
23 Replies

4. UNIX for Advanced & Expert Users

Rsync error while running from destination to source

hi All, i have 2 server setup now for Rsync, i configured Rsync on both of the server and it worked well when i did run from source to destination. and while running back from destination to source it produced this error: bash-3.2$ ksh rsync_bravo_db.ksh usa0300uz1247.apps.mc.xerox.com... (0 Replies)
Discussion started by: lovelysethii
0 Replies

5. Linux

rpmbuild, how to specify a different source and destination path for files

I'd like to specify a different build and deployment path for files, by default the same path is used for both build and install, I wasn't able to find a way to make these different. With Solaris pkgadd, one can specify different paths in prototype, so I would assume something like that is possible... (0 Replies)
Discussion started by: tiburblium
0 Replies

6. Shell Programming and Scripting

Move all files from source to destination directory based on the filename

Move all files starting with a specific name to different directory. This shell script program should have three parameters File Name Source Directory Destination Directory User should be able to enter ‘AB_CD*' in file name parameter. In this case all the files starting with AB_CD will... (1 Reply)
Discussion started by: chetancrsp18
1 Replies

7. SCO

Change SCO - GUI or Desktop interface to DOS based interface

Hi all I have installed a demo version of SCO OpenServer 5.0.2, I finally found it is Desktop Interface, I would like to know how to change its interface to dos based interface? If you have any ideas, please tell me then. Thank you (2 Replies)
Discussion started by: TinhNhi
2 Replies

8. IP Networking

Selecting Interface based on Destination IP address

Hi all, How an interface is selected based on the destination ip address. Thanks in advance........ (5 Replies)
Discussion started by: vijaypdp2006
5 Replies

9. Shell Programming and Scripting

Count total unique destination for source

Hi, need help how to count unique destination for the source ip. The file is contains 4 number of fields. Example of the file is here src ip dest ip #of flows total bytes 192.168.6.0 88.0.33.2 12 128 192.168.6.0 88.0.33.2 1 168 192.168.6.0 ... (5 Replies)
Discussion started by: new_buddy
5 Replies

10. UNIX for Advanced & Expert Users

Byte Rate to/from a source/destination

is there a command in unix/linux that allows you to sample what the historic byte rate is from a local IP to a client IP. (1 Reply)
Discussion started by: cubs0729
1 Replies
Login or Register to Ask a Question
ifdata(1)																 ifdata(1)

NAME
ifdata - get network interface info without parsing ifconfig output SYNOPSIS
ifdata [options] {iface} DESCRIPTION
ifdata can be used to check for the existence of a network interface, or to get information abut the interface, such as its IP address. Un- like ifconfig or ip, ifdata has simple to parse output that is designed to be easily used by a shell script. OPTIONS
-h Print out a help summary. -e Test to see if the interface exists, exit nonzero if it does not. -p Prints out the whole configuration of the interface. -pe Prints "yes" or "no" if the interface exists or not. -pa Prints the IPv4 address of the interface. -pn Prints the netmask of the interface. -pN Prints the network address of the interface. -pb Prints the broadcast address of the interface. -pm Prints the MTU of the interface. Following options are Linux only. -ph Prints the hardware address of the interface. -pf Prints the flags of the interface. -si Prints out all the input statistics of the interface. -sip Prints the number of input packets. -sib Prints the number of input bytes. -sie Prints the number of input errors. -sid Prints the number of dropped input packets. -sif Prints the number of input fifo overruns. -sic Print the number of compressed input packets. -sim Prints the number of input multicast packets. -so Prints out all the output statistics of the interface. -sop Prints the number of output packets. -sob Prints the number of output bytes. -soe Prints the number of output errors. -sod Prints the number of dropped output packets. -sof Prints the number of output fifo overruns. -sox Print the number of output collisions. -soc Prints the number of output carrier losses. -som Prints the number of output multicast packets. -bips Prints the number of bytes of incoming traffic measured in one second. -bops Prints the number of bytes of outgoing traffic measured in one second. AUTHOR
Benjamin BAYART 2006-03-07 ifdata(1)