LinuxSay - A Discussion Forum for Linux Enthusiasts

Ping from eth0 to eth1 on same machine doesn't route through router


#1

Hi Experts,

My requirement is to test a router throughput.

I have CentOS machine with two NICs. eth0 and eth1 .

eth0 IP 192.168.1.2 gw 192.168.1.1 (Router fa 0/0)
eth1 IP 192.168.2.2 gw 192.168.2.1 (Router fa 0/1)

I can ping router interface 192.168.2.1 from source 192.168.1.2. This actually goes to router.
But, ping works from 192.168.1.2 to 192.168.2.2, but traffic is not routed through router. Traffic is routed within the CentOS machine.

May I know what I am missing here?