routing table updation for gateway in DHCP configuration

Need help with C, C++, perl, python, etc?

routing table updation for gateway in DHCP configuration

Postby yogeshg » 2016-10-14 11:02

Our system has two Ethernet port and both are configured using DHCP.
To get assigned Gateway information, we are using ‘netstat –rn’ command. As we observed in below routing table, we are finding gateway information only for eth0. We are not finding the entry for eth1.
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.207.145.1 0.0.0.0 UG 0 0 0 eth0
10.207.145.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.207.145.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
How routing table gets updated in case of DHCP?
What is the reason the routing table is not updated with gateway detail for eth1 when Ethernet ports are configured in DHCP?
Do we need to take some special care while configuring Ethernet using DHCP so that the routing table will updated for eth0 and eth1?
yogeshg
 
Posts: 7
Joined: 2016-09-26 06:34

Re: routing table updation for gateway in DHCP configuration

Postby tomazzi » 2016-10-14 17:12

Consult the manpage for dhcp-options(5), after You'll read the RFC3442, which describes the DHCP protocol option 121.

Regards.
Odi profanum vulgus
tomazzi
 
Posts: 730
Joined: 2013-08-02 21:33

Re: routing table updation for gateway in DHCP configuration

Postby yogeshg » 2016-10-15 07:19

Thanks for the replay

I will go through the provided detail for detail understanding.
Meanwhile I came across one quick query as below.

During static configuration, we used to add gateway entry in routing table using route “add default gw xx.xx.xx.xx ethx” command
So during DHCP configuration, do we need to use the same command to add gateway entry into routing table?
yogeshg
 
Posts: 7
Joined: 2016-09-26 06:34


Return to Programming

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable