Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
net.eth0 doesn't establish default route retrieved from dhcp
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
ayvango
Tux's lil' helper
Tux's lil' helper


Joined: 08 Feb 2012
Posts: 118

PostPosted: Mon Jun 02, 2014 1:58 pm    Post subject: net.eth0 doesn't establish default route retrieved from dhcp Reply with quote

I had switched my internet provider and got strange problem: default route is not setting with /etc/init.d/net.eth0 start. All settings are retrieved from dhcp including route. IP address and netmask are set as usual, but route not. Every time I connect to this specific provider I need to add route manually. This behaviour is common for native gentoo installation and for calculate (gentoo derivative) installation.

Here is some infomration about network

Code:

# /etc/init.d/net.eth0 restart
# ip ro list
10.0.0.0/8 via 10.0.59.129 dev eth0  metric 10
10.0.59.128/26 dev eth0  proto kernel  scope link  src 10.0.59.178  metric 10
127.0.0.0/8 dev lo  scope host
127.0.0.0/8 via 127.0.0.1 dev lo
195.98.64.65 via 10.0.59.129 dev eth0  metric 10
195.98.64.66 via 10.0.59.129 dev eth0  metric 10

# ip ro get 8.8.8.8
RTNETLINK answers: Network is unreachable


Code:

# dhcpcd -T eth0
dhcpcd[23791]: version 6.2.0 starting
dhcpcd[23791]: DUID 00:01:00:01:1a:ce:8d:6d:b8:76:3f:0e:00:93
dhcpcd[23791]: eth0: IAID 84:60:3d:96
dhcpcd[23791]: eth0: soliciting an IPv6 router
dhcpcd[23791]: eth0: rebinding lease of 10.0.59.178
dhcpcd[23791]: eth0: leased 10.0.59.178 for 3600 seconds
interface=eth0
pid=23791
reason=TEST
skip_hooks=lookup-hostname
new_broadcast_address=10.0.59.191
new_classless_static_routes='195.98.64.65/32 10.0.59.129 195.98.64.66/32 10.0.59.129 10.0.0.0/8 10.0.59.129'
new_dhcp_lease_time=3600
new_dhcp_message_type=5
new_dhcp_server_identifier=10.255.249.194
new_domain_name_servers='195.98.64.65 195.98.64.66'
new_ip_address=10.0.59.178
new_ms_classless_static_routes='195.98.64.65/32 10.0.59.129 195.98.64.66/32 10.0.59.129 10.0.0.0/8 10.0.59.129'
new_network_number=10.0.59.128
new_ntp_servers=195.98.64.84
new_routers=10.0.59.129
new_sixrd='10 42 2a00:1af8:0a00:0000:0000:0000:0000:0000 10.63.255.254'
new_subnet_cidr=26
new_subnet_mask=255.255.255.192
dhcpcd[23791]: exited


And all is fixed after establishing route manually:

Code:

ip ro add default via 10.0.59.129


I search for solution in two forms: some triggered hardcoded script that would check if this specific provider is used and set this single route. Other solution, that I would prefere, is to patch basic network scripts that work with dhcp to make them interpret correctly dhcpcd output similar to provided in the question.

I can make this changes by myself, but I have no knowledge on where I should seek code (or scripts) that I need to write patch for.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6737
Location: Blighty

PostPosted: Tue Jun 03, 2014 9:59 pm    Post subject: Re: net.eth0 doesn't establish default route retrieved from Reply with quote

ayvango wrote:
I had switched my internet provider and got strange problem: default route is not setting with /etc/init.d/net.eth0 start. All settings are retrieved from dhcp including route. IP address and netmask are set as usual, but route not. Every time I connect to this specific provider I need to add route manually. This behaviour is common for native gentoo installation and for calculate (gentoo derivative) installation.

Here is some infomration about network

Code:

new_classless_static_routes='195.98.64.65/32 10.0.59.129 195.98.64.66/32 10.0.59.129 10.0.0.0/8 10.0.59.129'



Your ISP is not suppling a default route in the classless_static_routes option.
http://tools.ietf.org/html/rfc3442#page-5
Quote:

If the DHCP server returns both a Classless Static Routes option and
a Router option, the DHCP client MUST ignore the Router option.


Tell them to fix it.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum