Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a system attached by two ports to a DHCP server which gives out the following information:

Port 1  
Ip Address     Mask                 Gateway

10.170.99.38   255.255.255.128       10.170.99.1

Port 2
Ip Address Mask Gateway

10.170.99.131   255.255.255.192       10.170.99.129

From this the system needs to create a valid routing table for the Ip traffic.

At present the routing table looks like this:

Destination    Mask               Gateway

10.170.99.0     0xffffff80         10.170.99.1

10.170.99.128   0xffffffc0         10.170.99.129

However this does not work presumably because there is no defined route to the port address.

The question is what should the routing table from this sort of DHCP request look like, based on the need to route traffic to the two gateways?

share|improve this question

migrated from stackoverflow.com Mar 20 '13 at 12:53

This question came from our site for professional and enthusiast programmers.

1 Answer 1

The answer appears to be to setup gateways with different subnet masks. So the routing table would look something like this

Destination      Mask       Gateway          

0.0.0.0          0xffffffc0 10.170.99.129

0.0.0.0          0xffffff80 10.170.99.1 

0.0.0.0          0          10.170.99.1     

10.170.99.0      0xffffff80 10.170.99.38 

10.170.99.128    0xffffffc0 10.170.99.131

The data is routed to the various gateway by the subnet mask

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.