LinuxQuestions.org
Help answer threads with 0 replies.
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 05-01-2015, 06:12 PM   #1
majestik33
LQ Newbie
 
Registered: Aug 2014
Posts: 10

Rep: Reputation: Disabled
Routing problem


I have set up a virtual environment with Ubuntu server with two nic cards connected to two routers. From both routers i can ping the both server interfaces, which means that the routing is correctly configured on the router's side, but routers aren't able to ping each other, which brings me back to the Server. IP_forwarding is enabled on the Server side and the default policy of the Input,Forward and Output chains is set up to ACCEPT, without further rules given. Both Server interfaces belong to private networks. Any ideas where might be the problem?

The content of /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.1.33
netmask 255.255.255.0
gateway 192.168.1.1

auto eth1
iface eth1 inet static
address 192.168.2.33
netmask 255.255.255.0

Thanks in advanced
 
Old 05-02-2015, 12:39 AM   #2
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
What does the routing table on the routers look like? Do they know to pass traffic for the other router to the server?
 
Old 05-03-2015, 01:31 AM   #3
darthaxul
Member
 
Registered: Aug 2008
Distribution: Devuan; Gentoo; FreeBSD
Posts: 236

Rep: Reputation: 19
routes

You still to go one step further and configure the packet routing on the server, since the router can ping both interfaces thats fine. But once you start getting into routing packets between two different networks, you'll need iptables to do NAT for the other network.
 
Old 05-03-2015, 05:56 PM   #4
majestik33
LQ Newbie
 
Registered: Aug 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
I solved the problem with the help of Tcpdump. It helped me realizing I configured the static routes on the router with exit interface instead of next hop address, that way not allowing the interfaces to participate in the ARP process. That being said, now I'm faceing another problem. I appended the line [ up ip route add 192.168.0.0/16 via 192.168.2.33 ] to the /etc/network/interfaces conf file ( so that the internal networks can be reachable) and everything seems to be working fine, up until i reboot the system. During the boot up process i get "Waiting for network configuration...", and after the system is completely up the eth0 intarface is not initialized and the mentioned route is not imported into the kernel routing table. If i try to manually bring the interface up i get the error: RTNETLINK answers: File exists. Any solutions?
 
Old 05-05-2015, 05:02 PM   #5
majestik33
LQ Newbie
 
Registered: Aug 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
UPDATE: I did find out that after flushing all information from the interface by issuing the ip addr flush [interface] command and reinitializing the interface (ifdown && ifup) everything works fine. Can someone please explain what all this means and if there is some permanent workaround.

Thanks.
 
  


Reply

Tags
networking


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
Mutiple IPs and network cards routing (source policy routing?) shogun1234 Linux - Networking 1 01-17-2013 12:09 AM
Routing problem? or ppp connection problem? onim1978 Linux - Networking 1 09-09-2010 09:06 AM
Dynamic routing isn't done; static routing works for about 2 seconds for wireless gregorian Linux - Networking 7 02-19-2010 06:43 AM
need help with routing problem interndan Linux - Networking 3 11-24-2007 03:55 PM
another routing problem... dugu98cxw Linux - Networking 5 11-11-2005 10:15 AM

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

All times are GMT -5. The time now is 03:19 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