Results 1 to 3 of 3
Hi I am trying to make loopback driver for linux 2.4.20. For this I made two network interfaces that are logical and not bound to any hardware. They both have ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-05-2007 #1
- Join Date
- Dec 2006
Can we send packet from one interface to another that are on the same machine?
I am trying to make loopback driver for linux 2.4.20. For this I made two network interfaces that are logical and not bound to any hardware. They both have to run on the same machine.
And what I am doing in each driver is : when a packet comes on one interface change the destination address to that of the other network interface IP address. I am giving more details on this:
applications : udp_client udp_server
two interfaces : mydev0 mydev1
IP addr : 184.108.40.206 220.127.116.11
A packet from udp_client is send with "destination address": 18.104.22.168
This packet automatically goes to mydev0 so "Source address": 22.214.171.124
Now when this packet is recvd at mydev0 it change the "Dest Address":126.96.36.199
"Source Addr" :188.8.131.52
This way the packet reaches from udp_cli to udp_srv.
Packet from udp_srv to udp_cli is also changed and send as defined above.Up till now everything is clear....
Problem: When I change the source IP address to one of the IP addresses assigned to network interfaces the packet is dropped and does not reach to the other end.
But when I assign packet any arbitrary IP_address other than that of any of the machine's interfaces this does work.
I am not getting why the packet is dropped when the source IP address of the packet is changed to that of one of the network interface IP adresses.
And also what is martian source or martian destination?
- 01-10-2007 #2
The packet is dropped by the kernel... .It considers the packet as a spoofed one when itz source address is changed to any one of the ip addresses on the same system.
(please someone correct me, if i am wrong )
A Martian packet is considered to be a packet with ambiguous source/destination...
- 01-10-2007 #3
- Join Date
- Dec 2006
Thanx Cyberinstru...I was also thinking on the same line but I was not having any proof of that..by your reply I am now sure for this..