LinuxQuestions.org
Review your favorite Linux distribution.
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 11-07-2013, 10:20 AM   #1
ptulpen
LQ Newbie
 
Registered: Oct 2013
Posts: 6

Rep: Reputation: Disabled
Routing issues


Hello everyone,
I try to setup a VirtualBox VM where everything internal is routed to a bridged NIC, whereas all other traffic (surfing) is router to a second NIC configured with NAT.

current setup:
Code:
eth0      Link encap:Ethernet  HWaddr 08:00:27:BB:6F:85  
          inet addr:10.16.6.232  Bcast:10.16.7.255  Mask:255.255.254.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

eth1      Link encap:Ethernet  HWaddr 08:00:27:E9:F8:FC  
          inet addr:172.16.0.15  Bcast:172.31.255.255  Mask:255.240.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5388 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5355 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2692118 (2.5 Mb)  TX bytes:673398 (657.6 Kb)
current routing:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         172.16.0.2      0.0.0.0         UG    0      0        0 eth1
10.16.0.0       10.16.6.1       255.255.0.0     UG    0      0        0 eth0
10.16.6.1       0.0.0.0         255.255.255.255 UH    0      0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth1
172.16.0.0      0.0.0.0         255.240.0.0     U     0      0        0 eth1
172.16.0.2 is the gateway of the NAT, 10.16.6.1 the gateway of the bridged network.

But when i ping something in the 10.16.x.x area, i get no response.
via ifconfig you can see the the packets are not even sent.

Can you please hint me where my mistake is?

Best regards,
Peter
 
Old 11-07-2013, 01:18 PM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Haven't you mixed up the subnet masks here (is there a reason for why you don't use "standard" netmasks 255.255.255.0 / 255.255.0.0)?
You have netmask 255.255.254.0 on eth0, but in routing table 255.255.0.0.
 
Old 11-08-2013, 03:18 AM   #3
ptulpen
LQ Newbie
 
Registered: Oct 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hi,
Well, my idea was to reach the whole area 10.16.0.1-10.16.255.255 with this rule (10.16.6.1 knows about the other networks as well)
But I am not sure if this is the way to get this.

Best regards,
Peter
 
Old 11-11-2013, 02:24 AM   #4
ptulpen
LQ Newbie
 
Registered: Oct 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
I found the issue myself: I wwas missing a line for the subnet itself. so adding this line did the trick
Code:
10.16.6.0    0.0.0.0    255.255.254.0  U  0  0  eth0

Best regards,
Peter
 
  


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
routing + squid issues adeelahmad99 Linux - Networking 1 08-06-2009 11:21 AM
Routing issues binary1011100 Linux - Networking 5 07-14-2007 01:41 PM
Routing issues... alunduil Linux - Wireless Networking 0 05-26-2005 08:42 PM
Routing issues - Plz help xmdms Linux - Networking 4 09-01-2004 12:21 PM
Routing Issues anisbet Linux - Networking 1 01-24-2002 06:13 PM

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

All times are GMT -5. The time now is 05:20 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
Open Source Consulting | Domain Registration