Networking Forums

Networking Forums > Computer Networking > Linux Networking > sending pkts on wire even if dest is local

Reply
Thread Tools Display Modes

sending pkts on wire even if dest is local

 
 
Tejas Kokje
Guest
Posts: n/a

 
      02-14-2007, 11:12 PM
Hello folks,

I have a linux box with three gigabit network cards. All the three
network cards are on different subnets. and are connected to a
switch. The diagram is as shown below

A, B and C are the network interfaces with IP address 192.168.2.1,
192.168.3.1 and 192.168.4.1

I want to send a unicast packet from A to B and from A to C in order
to look if my software on switch is working fine. But I guess linux
kernel sees that both B and C are local interfaces and hence does not
send it on wire.
_______
A----------| |
| |
B--------- | X |
| |
C----------|______ |


Is there a way I can force kernel to send all unicast packets on wire
and not optimize it if destination is a local interface ? Being
limited on resources, I don't have another linux box :-(

Thanks,
Tejas Kokje

 
Reply With Quote
 
 
 
 
Pascal Hambourg
Guest
Posts: n/a

 
      02-15-2007, 08:38 PM
Hello,

Tejas Kokje a écrit :
>
> I have a linux box with three gigabit network cards. All the three
> network cards are on different subnets. and are connected to a
> switch.


In the same VLAN ? This may be a bad idea because it has known issues,
especially regarding ARP.

> A, B and C are the network interfaces with IP address 192.168.2.1,
> 192.168.3.1 and 192.168.4.1


Note that the owner of a local address is more the host itself than the
interface. For instance, by default Linux will answer and reply ARP
queries and accept traffic for any local address (except 127.0.0.0/8) on
any interface. This behaviour may be changed with parameters in
/proc/sys/net/ipv4/conf/ (check networking/ip-sysctl.txt in the kernel
documentation).

> I want to send a unicast packet from A to B and from A to C in order
> to look if my software on switch is working fine. But I guess linux
> kernel sees that both B and C are local interfaces and hence does not
> send it on wire.


Correct. Loopback routes have the highest priority.

> Is there a way I can force kernel to send all unicast packets on wire
> and not optimize it if destination is a local interface ?


Sure. Add static ARP entries associating a dummy IP address with the MAC
address of the target interface and send the packet to that dummy IP
address. Of course the IP stack will drop the packet because the
destination address is not a local address (or may forward it again if
ip_forward is enabled).

Or you may try to send the packet with an arbitrary packet generator at
link-level, by-passing the IP routing.

> Being limited on resources, I don't have another linux box :-(


What about virtual machines hosted by the physical box (seems most
trendy these days) ?
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
queuing pkts using nf_queue_handler in bridge (PF_BRIDGE) mode notworking in 2.6 kernel Ratnaraj Linux Networking 1 02-18-2009 10:30 AM
Changing XP login from Local to Domain While Maintaining Local User. TomTech Windows Networking 13 10-03-2007 01:28 AM
Checksum of ip headers : is it changed when switching source and dest addresses ? markryde@gmail.com Linux Networking 4 10-02-2006 08:26 AM
iptables: filtering on src/dest for large set of ip addr whatdoineed2do@yahoo.co.uk Linux Networking 0 10-16-2005 09:56 AM
scp (ssh) no file on dest host ?? Spam Usenet_alt_test Linux Networking 0 06-19-2004 02:41 PM



1 2 3 4 5 6 7 8 9 10 11