-1

Supose a simple home router gateway and the following:

lan0 - Network interface responsible for LAN-side of the router wan0 - Network interface responsible for WAN-side of the router

A default route exists like the following:

Destination Interface Mask

0.0.0.0 wan0 0.0.0.0

Also lan0 and wan0 have IP's assigned referencing local subnet and ISP subnet, respectively.

Question:

If a packet is sent from a connected host on the LAN-side of the router to an external host (e.g. Google DNS host) which one is true?

A) lan0's RX counter will be incremented; lan0's TX counter will be incremented; wan0's RX counter will be incremented; wan0's TX counter will be incremented;

B) lan0's RX counter will be incremented; wan0's TX counter will be incremented;

C) lan0's RX counter will be incremented;

D) wan0's TX counter will be incremented;

E) None of the above

If possible, a good explanation will be appreciated. Thank you.

Edit: Simplifying even more

When forwarding packets from one interface to another does RX counter on the receiving interface gets incremented?

  • 1
    This smells like a homework assignment. – psusi Jul 15 '15 at 1:05
  • It's not. I just formatted as a clear question. I could not find any documentation saying about forwarded packets between interfaces could increase counters internally. – Guilherme da Silva Sengès Jul 15 '15 at 2:49
0

Ok, I did a practical test with a home router gateway using OpenWRT, a local DHCP server and a laptop with the following connections:

           WAN                     LAN

DHCP Server <------> OpenWRT Router <------> Laptop

Sending single UDP packets from laptop through Google DNS server (8.8.8.8) I could confirm that only RX (LAN) and TX (WAN) were incremented. Also if no external connectivity were available, only RX (LAN) gets incremented.

Conclusion: Forwarding packets between interfaces will not increment counters between them. RX and TX only counts received and transmitted bytes to some endpoint.

Correct option: B)

  • Except for the fact that the DNS server sends a reply, and the reply increments the other two counters. – psusi Jul 16 '15 at 1:40
  • That's not correct for my scenario. I sent an UDP packet directly to IP 8.8.8.8. No name resolution was done and also UDP is connectionless so no replies are given by the host. – Guilherme da Silva Sengès Jul 17 '15 at 3:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.