Routing trouble between multiple networks


 
Thread Tools Search this Thread
Operating Systems Linux Ubuntu Routing trouble between multiple networks
# 1  
Old 08-23-2012
Question [solved] Routing trouble between multiple networks

Hi everyone,

Hopefully there is someone here that can help me with the problem I got.
At my office I have 1 ubuntu firewall/gateway and several networks.

On the firewall/gateway I have three network cards, one for internet, one for network 192.168.100.0 and one for network 172.20.1.0

We use fwbuilder to make the firewall rules and have there defined the three network cards and the two networks.

The configuration in /etc/network/interfaces looks like this:

Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        address xx.xx.xx.xx
        netmask 255.255.255.0
        network xx.xx.xx.0
        broadcast xx.xx.xx.255
        gateway xx.xx.xx.225
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers xx.xx.xx.10
        dns-search internaldomain.com

auto eth1
iface eth1 inet static
        address 192.168.100.1
        netmask 255.255.255.0
        network 192.168.100.0
        broadcast 192.168.100.255

auto eth2
iface eth2 inet static
        address 172.20.1.1
        netmask 255.255.255.0
        network 172.20.1.0
        broadcast 172.20.1.255

If I connect an computer in the 192.168.100.0 network and try nslookup google.com it responds ang give me this information:

Code:
Server:         xx.xx.xx.10
Address:        xx.xx.xx.10#53

Non-authoritative answer:
Name:   google.com
Address: 173.194.32.35
Name:   google.com
Address: 173.194.32.36
Name:   google.com
Address: 173.194.32.37
Name:   google.com
Address: 173.194.32.38
Name:   google.com
Address: 173.194.32.39
Name:   google.com
Address: 173.194.32.40
Name:   google.com
Address: 173.194.32.41
Name:   google.com
Address: 173.194.32.46
Name:   google.com
Address: 173.194.32.32
Name:   google.com
Address: 173.194.32.33
Name:   google.com
Address: 173.194.32.34

Then I connect a computer in the network 172.20.1.0 and does the same task. Here is the output:

Code:
;; connection timed out; no servers could be reached

If I reorder the /etc/network/interfaces on the firewall/gateway to this:

Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        address xx.xx.xx.xx
        netmask 255.255.255.0
        network xx.xx.xx.0
        broadcast xx.xx.xx.255
        gateway xx.xx.xx.225
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers xx.xx.xx.10
        dns-search internaldomain.com

auto eth1
iface eth1 inet static
        address 172.20.1.1
        netmask 255.255.255.0
        network 172.20.1.0
        broadcast 172.20.1.255

auto eth2
iface eth2 inet static
        address 192.168.100.1
        netmask 255.255.255.0
        network 192.168.100.0
        broadcast 192.168.100.255

Then the nslookup works fine for 172.20.1.0 network but not for the 192.168.100.0 network.

IP4 forwarding is enabled on the firewall/gateway.

netstat -anr on firewall/gateway gives this output:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         xx.xx.xx.225  0.0.0.0         UG        0 0          0 eth0
172.20.1.0      0.0.0.0         255.255.255.0   U         0 0          0 eth2
192.168.100.0   0.0.0.0         255.255.255.0   U         0 0          0 eth1
xx.xx.xx.0    0.0.0.0         255.255.255.0   U         0 0          0 eth0

netstat -anr on a computer in 172.20.1.0 network gives this output:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         172.20.1.1      0.0.0.0         UG        0 0          0 eth0
172.20.1.0      0.0.0.0         255.255.255.0   U         0 0          0 eth0

netstat -anr on a computer in 192.168.100.0 network gives this output:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.100.1   0.0.0.0         UG        0 0          0 eth0
192.168.100.0   0.0.0.0         255.255.255.0   U         0 0          0 eth0

I think that I have included all information needed but if there is other things that's need to be checked let me know.

---------- Post updated at 11:42 PM ---------- Previous update was at 08:47 PM ----------

I'm so embarrassed, just figured out that the problem was NAT.

In fwbuilder I had forgotten to add all networks in the NAT rule, it was only the first network that was added.

Sorry for taking up everyones time about this when the problem was myself. The thread can be closed or deleted. Admin can deside.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. IP Networking

Server setup for multiple IP routing?

Hey there, I am a network administrator of a student dorm. Me and my team (we do this in our spare time) have the task to upgrade and rebuild our dorm intern network. But unfortunately we don't have that much experience with server setup and ip-routing and stuff. So here is the topic I want to... (8 Replies)
Discussion started by: mrgruen
8 Replies

2. UNIX for Dummies Questions & Answers

iptables / ip route packet routing with multiple gateways

Hi all. Linux noob here. I was hoping someone could help me with configuring some routing rules on my router, an Asus AC68. The router is connected to two gateways, wan0_gateway and wan1_gateway. I have rules set up in the router gui that will push all traffic from every IP other than my own... (0 Replies)
Discussion started by: Bishi
0 Replies

3. UNIX for Dummies Questions & Answers

routing multiple IPs

hi guys This is suse 11 sp1 I have a Server that has 4 NICs, I've created 2 bonds bond0(eth0-eth1) - 10.10.10.2 bond1(eth2-eth3) - 10.10.10.3 Each bound goes to a Storage Device which is directly connected so bond0 goes to Storage_Controller_1 and 2 like this Server_bond0 <-------->... (2 Replies)
Discussion started by: karlochacon
2 Replies

4. Solaris

solaris routing between two networks

ce0: flags=1100843<UP,BROADCAST,RUNNING,MULTICAST,ROUTER,IPv4> mtu 1500 index 2 inet 10.162.212.132 netmask ffffff00 broadcast 10.162.212.255 ether 0:14:4f:55:82:9 ce1: flags=1100843<UP,BROADCAST,RUNNING,MULTICAST,ROUTER,IPv4> mtu 1500 index 3 inet 10.231.11.232 netmask... (3 Replies)
Discussion started by: busyboy
3 Replies

5. IP Networking

solaris routing between two networks

ce0: flags=1100843<UP,BROADCAST,RUNNING,MULTICAST,ROUTER,IPv4> mtu 1500 index 2 inet 10.162.212.132 netmask ffffff00 broadcast 10.162.212.255 ether 0:14:4f:55:82:9 ce1: flags=1100843<UP,BROADCAST,RUNNING,MULTICAST,ROUTER,IPv4> mtu 1500 index 3 inet 10.231.11.232 netmask... (1 Reply)
Discussion started by: busyboy
1 Replies

6. Solaris

Multiple networks on same server

If I have 2 interfaces in a server on the same subnet/network does Solaris automatically choose to route packets destined for this network out the first interface. I.e if ce0 and ce1 were on same network ce0 would be chosen as it's first interface? (5 Replies)
Discussion started by: Actuator
5 Replies

7. Red Hat

Designating Default Gateway for multiple networks/adapters

Hi I have 4 NIC's connected to my RHEL 5.3 server. Two on one subnet creating bond0, and two on a second subnet which create bond1. Both bonds are set to use DHCP to obtain IP addresses. Here is the config file for ifcfg-bond0: DHCP_HOSTNAME=rrnltshckvmx001 DEVICE=bond0 BOOTPROTO=dhcp... (2 Replies)
Discussion started by: Padow
2 Replies

8. HP-UX

routing issues with multiple NIC cards

I am running HP_UX 11.23 with 4 NIC cards (this is our TSM server) I have 4 subnets we are backing across. trying to keep traffic on their subnets. I only have one route statment should I add more. route add net 123.99.8.0 netmask 255.255.255.0 123.99.8.254 route add net 123.99.67.0 netmask... (2 Replies)
Discussion started by: myork
2 Replies
Login or Register to Ask a Question