LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-16-2011, 08:34 AM   #1
adept
LQ Newbie
 
Registered: Sep 2011
Location: Poland
Distribution: Fedora
Posts: 6

Rep: Reputation: Disabled
IP Forwarding problem. Can not ping another interface


Hello!

My linux: Fedora 14, based on Redhat.

I have installed Fedora 14 linux on my VirtualBox environment. Virtual machine has two ethernet interfaces which are seen as eth0 and eth1. eth0 IP address is 192.168.1.53/255.255.255.0 (gateway 192.168.1.5). eth1 IP address is 192.168.2.3/255.255.255.0 (no gateway set). I can ping 192.168.1.53 and another existing addresses from this subnet (192.168.1.x). This is also true for 192.168.2.x subnet. But I can not ping addresses from the other side. For example, i can not: ping -I eth0 192.168.2.3. ping 192.168.2.3 works.
Command cat /proc/sys/net/ipv4/ip_forward shows 1.
Firewall is disabled.
I am quite convinced of virtualbox innocence.
Have You any idea?

Thanks

adept.
 
Old 09-16-2011, 08:52 AM   #2
Old_Brewer
LQ Newbie
 
Registered: Jul 2011
Location: Near Carmine, Texas USA
Distribution: Ubuntu 10.04 for primary use, also on dual boot with XP
Posts: 8

Rep: Reputation: Disabled
IP suggestion

Quote:
Originally Posted by adept View Post
Hello!

My linux: Fedora 14, based on Redhat.

I have installed Fedora 14 linux on my VirtualBox environment. Virtual machine has two ethernet interfaces which are seen as eth0 and eth1. eth0 IP address is 192.168.1.53/255.255.255.0 (gateway 192.168.1.5). eth1 IP address is 192.168.2.3/255.255.255.0 (no gateway set). I can ping 192.168.1.53 and another existing addresses from this subnet (192.168.1.x). This is also true for 192.168.2.x subnet. But I can not ping addresses from the other side. For example, i can not: ping -I eth0 192.168.2.3. ping 192.168.2.3 works.
Command ¨cat /proc/sys/net/ipv4/ip_forward shows¨ 1.
Firewall is disabled.
I am quite convinced of virtualbox innocence.
Have You any idea?

Thanks

adept.
Can you set a gateway for the 192.168.2.3 address? I'm a bit rusty on my IP knowledge, so this is just a suggestion.
 
Old 09-16-2011, 09:18 AM   #3
Old_Brewer
LQ Newbie
 
Registered: Jul 2011
Location: Near Carmine, Texas USA
Distribution: Ubuntu 10.04 for primary use, also on dual boot with XP
Posts: 8

Rep: Reputation: Disabled
IP suggestion

Quote:
Originally Posted by adept View Post
Hello!

My linux: Fedora 14, based on Redhat.

I have installed Fedora 14 linux on my VirtualBox environment. Virtual machine has two ethernet interfaces which are seen as eth0 and eth1. eth0 IP address is 192.168.1.53/255.255.255.0 (gateway 192.168.1.5). eth1 IP address is 192.168.2.3/255.255.255.0 (no gateway set). I can ping 192.168.1.53 and another existing addresses from this subnet (192.168.1.x). This is also true for 192.168.2.x subnet. But I can not ping addresses from the other side. For example, i can not: ping -I eth0 192.168.2.3. ping 192.168.2.3 works.
Command ¨cat /proc/sys/net/ipv4/ip_forward shows¨ 1.
Firewall is disabled.
I am quite convinced of virtualbox innocence.
Have You any idea?

Thanks

adept.
Can you set a gateway for the 192.168.2.3 address? I'm a bit rusty on my IP knowledge, so this is just a suggestion.
 
Old 09-19-2011, 06:15 AM   #4
adept
LQ Newbie
 
Registered: Sep 2011
Location: Poland
Distribution: Fedora
Posts: 6

Original Poster
Rep: Reputation: Disabled
After modification (and reboot) my /etc/sysconfig/network-scripts/ifcfg-eth1 has gateway line: GATEWAY=192.168.1.5
This not solve my problem. eth1 gateway set to 192.168.1.53 (eth0 interface IP address) does not make difference. But may be ping -I ethx sends packets only outside ethx segment (ping feature)? Now I can ping 192.168.1.53 (eth0) from 192.168.2.2 Windows machine connected to the eth1 subnet. But still can not ping 192.168.1.5 from 192.168.2.2. I can ping 192.168.1.5 from eth0 (Linux machine).

Some configuration info from the Windows machine:

C:\>route print
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...xx xx xx xx xx xx ...... xxxxxxxxxxxxxxxx (real value is hidden for e-mail)

===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.2.3 192.168.2.2 20
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.2.0 255.255.255.0 192.168.2.2 192.168.2.2 20
192.168.2.2 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.2.255 255.255.255.255 192.168.2.2 192.168.2.2 20
224.0.0.0 240.0.0.0 192.168.2.2 192.168.2.2 20
255.255.255.255 255.255.255.255 192.168.2.2 192.168.2.2 1
Default Gateway: 192.168.2.3
===========================================================================
Persistent Routes:
None

C:\>

and from the Linux machine:

[....]# ip route show
192.168.2.0/24 dev eth1 proto kernel scope link src 192.168.2.3 metric 1
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.53 metric 1
default via 192.168.1.5 dev eth0 proto static
[....]#
 
Old 09-19-2011, 10:57 AM   #5
Old_Brewer
LQ Newbie
 
Registered: Jul 2011
Location: Near Carmine, Texas USA
Distribution: Ubuntu 10.04 for primary use, also on dual boot with XP
Posts: 8

Rep: Reputation: Disabled
IP Forwarding problem. Can not ping another interface

Hello again

I must say that I am not very familiar with the virtual box environment. I have spent some time looking around for a solution. I must ask, what are you trying to do besides the ping -I? Can you connect to the outside world using the windows 192.168.2.2 computer? I do not know if the windows computer needs or has the 192.168.1.5 gateway in it's setup. It does not seem to be in your attached table of Active Routes.

In my searching, I found a few links that you might want to view:
http://linux.derkeiler.com/Mailing-L...5-07/1116.html
The above site talks about wired networks and briefly mentions gateways and binding interfaces and ports together.

http://wiki.openvz.org/Virtual_Ethernet_device
The above site talks about virtual Ethernet devices and containers.

I must say that if your windows computer can get to the outside world, I would leave everything alone, and just ponder about why ping -I works the way it does.

I hope someone else can help out, I apologize that I could not solve your problem.


Quote:
Originally Posted by adept View Post
After modification (and reboot) my /etc/sysconfig/network-scripts/ifcfg-eth1 has gateway line: GATEWAY=192.168.1.5
This not solve my problem. eth1 gateway set to 192.168.1.53 (eth0 interface IP address) does not make difference. But may be ping -I ethx sends packets only outside ethx segment (ping feature)? Now I can ping 192.168.1.53 (eth0) from 192.168.2.2 Windows machine connected to the eth1 subnet. But still can not ping 192.168.1.5 from 192.168.2.2. I can ping 192.168.1.5 from eth0 (Linux machine).

Some configuration info from the Windows machine:

C:\>route print
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...xx xx xx xx xx xx ...... xxxxxxxxxxxxxxxx (real value is hidden for e-mail)

===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.2.3 192.168.2.2 20
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.2.0 255.255.255.0 192.168.2.2 192.168.2.2 20
192.168.2.2 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.2.255 255.255.255.255 192.168.2.2 192.168.2.2 20
224.0.0.0 240.0.0.0 192.168.2.2 192.168.2.2 20
255.255.255.255 255.255.255.255 192.168.2.2 192.168.2.2 1
Default Gateway: 192.168.2.3
===========================================================================
Persistent Routes:
None

C:\>

and from the Linux machine:

[....]# ip route show
192.168.2.0/24 dev eth1 proto kernel scope link src 192.168.2.3 metric 1
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.53 metric 1
default via 192.168.1.5 dev eth0 proto static
[....]#

Last edited by Old_Brewer; 09-19-2011 at 10:58 AM.
 
Old 09-19-2011, 11:26 AM   #6
samtoddler
Member
 
Registered: Jul 2011
Location: Delhi
Distribution: Cent OS/RHEL
Posts: 37

Rep: Reputation: Disabled
Hi,

I can not figure out what you are trying to achieve.
Can you be more specific regarding the problem,may this can help to solve it.

samtoddler
 
Old 10-03-2011, 08:00 AM   #7
adept
LQ Newbie
 
Registered: Sep 2011
Location: Poland
Distribution: Fedora
Posts: 6

Original Poster
Rep: Reputation: Disabled
My problem came out of wrong understanding of a ping -I command. I wanted to check a router by sending ping from one subnet interface to a station connected to the second subnet. Ping -I ethx sends packets only outside the ethx interface and can not redirect packet to the internal router. After modifying gateway's (192.168.1.5) route table (subnet 192.168.2.0/24 by 192.168.1.53) sends ping response to my workstation (192.168.2.3).

Problem is solved.

Thank all of you

adept
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
forwarding the graphical interface to a macintosh laucian Linux - General 2 06-21-2008 08:58 AM
Forwarding from physical to virtual interface? heltendk Linux - Networking 8 01-11-2007 12:22 PM
ping an ip from an interface with an ip of another subnet kpachopoulos Linux - Networking 1 09-01-2006 05:05 AM
2 interface, ping error ! Mycado Linux - Networking 9 06-07-2006 08:21 AM
eth0 interface stops forwarding geustace Linux - Networking 4 03-09-2004 02:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:22 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration