LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-12-2019, 08:34 PM   #1
gadrenayan
LQ Newbie
 
Registered: Dec 2019
Posts: 1

Rep: Reputation: Disabled
Ping does not work on TAP interfaces with bridge


I am trying to understand the linux bridging and local ip rules,

I have following topology on my linux laptop.

Code:
                  br0 
         ___________|__________
         |                    |    
      |tap0                  tap1|
      |________Application_______|
The application above is creating 2 tap interfaces tap0 and tap1

I create the bridge and plug the tap interfaces to the bridge:
Code:
    brctl addif br0 tap0
    brctl addif br0 tap1
For ping to work, i need to add ip address to the interfaces,
So I add `192.168.13.1 to tap0` and `192.168.13.2 to tap1`

The application reads from one interface and writes to another interface, for both the interfaces.

Now if I run "ping 192.168.13.2 -I tap0"

Code:
  PING 192.168.13.2 (192.168.13.2) from 192.168.13.1 tap0: 56(84) bytes of data.
    From 192.168.13.1 icmp_seq=1 Destination Host Unreachable
tcpdump was showing arp could not be resolved, so I added static ARP entries:

Code:
  arp -i tap0 -s 192.168.13.1 62:34:58:e7:8a:3a
    arp -i tap1 -s 192.168.13.2 4a:6d:fa:51:7d:2d

    brctl showmacs br0
    port no	mac addr		is local?	ageing timer
      2	4a:6d:fa:51:7d:2d	yes		   0.00
      2	4a:6d:fa:51:7d:2d	yes		   0.00
      1	62:34:58:e7:8a:3a	yes		   0.00
      1	62:34:58:e7:8a:3a	yes		   0.00
The bridge also seems to have learnt the MAC addresses.

However, the application and the tcpdump still receive 42 bytes packets
showing ARP packets not resolved yet, and ping give Host unreachable mesg.

My current routing table is:

Code:
 ip route ls table main
    169.254.0.0/16 dev virbr0  scope link  metric 1000 linkdown 
    192.168.13.0/24 dev tap1  proto kernel  scope link  src 192.168.13.2 
    192.168.13.0/24 dev tap0  proto kernel  scope link  src 192.168.13.1 
    192.168.122.0/24 dev virbr0  proto kernel  scope link  src 192.168.122.1 linkdown
My current local routing table:

Code:
 broadcast 192.168.13.0 dev tap1  proto kernel  scope link  src 192.168.13.2 
    broadcast 192.168.13.0 dev tap0  proto kernel  scope link  src 192.168.13.1 
    local 192.168.13.1 dev tap0  proto kernel  scope host  src 192.168.13.1 
    local 192.168.13.2 dev tap1  proto kernel  scope host  src 192.168.13.2 
    broadcast 192.168.13.255 dev tap1  proto kernel  scope link  src 192.168.13.2 
    broadcast 192.168.13.255 dev tap0  proto kernel  scope link  src 192.168.13.1
I am having a feel that routing might not come into picture here: since this is a layer 2 broadcast domain. But since I am not well versed with linux bridging, I need some advice to proceed.

How can we make the ping work between tap0 and tap1.

Thanks
Nayan
 
Old 12-13-2019, 06:59 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,819

Rep: Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144
I don't have a definitive answer, but just in case the following is of relevance here...

https://serverfault.com/questions/60...ith-ip-on-same
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
TAP to TAP tunnel with UDP broadcasts bitblit Linux - Networking 1 02-16-2012 02:51 PM
I cannot ping with command 'ping IP' address but can ping with 'ping IP -I eth0' sanketmlad Linux - Networking 2 07-15-2011 05:32 AM
[SOLVED] vmachine on bridge with tap interf: ping ok, start file transfer and net stops work tirab Linux - Networking 5 02-22-2011 08:47 AM
*tap tap tap* Is this thing on? narcos LQ Suggestions & Feedback 8 09-26-2009 07:57 PM
routing b/w two tap interfaces connected to bridge w/o using loopback interface jesus_diehard Linux - Networking 0 08-18-2007 03:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration