cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
437
Views
0
Helpful
5
Replies

Routing Question

js358
Level 1
Level 1

Hello All:

The problem I'm having is on a linux box but it involves routing and there's no better place than here to get that topic addressed. Hoping someone can help out.

Linux 9.0 box 2 nics.

NIC1 - 10.0.2.150 gw 10.0.2.1

NIC2 - 209.178.228.150 gw 209.178.228.129

Nic2 is just an ethernet drop from our isp, going straight out to internet

Nics 2 connected to internal network whichis segmented by an internal router. The 10.0.2.1 gateway I am using is actually pointing to the router leading to the 2.x segment. There is a 4.x interface for entrance to 1.x segment.

No matter what I do, I cannot get all three segments seeing each other. Either 1x and 2x with no internet connectivity or 2x and internet with no 1x or vice versa. I cannot ger routing statements correct on the 2 Nics in the linux box to save my life.

Any help would be appreciated.

Thanks

5 Replies 5

Harold Ritter
Spotlight
Spotlight

You can't have two default gateway. The default route has to point toward your SP (209.178.228.129). You then need to have more specific routes (10.0.1.0/24 and 10.0.4.0/24) pointing to your internal router (10.0.2.1).

Hope this helps,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

sometimes I am confused about the two default gateway, most of time, it doesn't work.

there are 2 NICs in my PC, and both of them are dhcp client, and the 2 NICs can get IP from diffirent DHCP server and get 2 default gateway, and they worked.

Windows seems to do some type of load sharing when there are multiple default routes in the routing table. I haven't done any specific testing to attempt to narrow down how it behaves, but in my experience the behavior is inconsistent and unpredictable -- sometimes it load shares, sometimes it doesn't, and the failover mechanism (if there is one) isn't reliable.

The original posting is not reffering to a workstation with two default gateways but rather a Linux station being used as a router. In this scenario it doesn't make much sense to have a default gateway to the internal network.

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

deilert
Level 6
Level 6

I do not know the syntax for linux but you need to do something like this

nic 1

ip route 10.0.0.0 255.0.0.0 10.0.2.1

ip route 0.0.0.0 0.0.0.0 209.178.228.150

nic2

ip route 10.0.0.0 255.0.0.0 10.0.2.150

ip route 0.0.0.0 0.0.0.0 209.178.228.129