Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#2681 - ISP's DHCP option 121 makes 18.06.5 get no default GW #8519

Closed
openwrt-bot opened this issue Dec 17, 2019 · 3 comments
Closed

FS#2681 - ISP's DHCP option 121 makes 18.06.5 get no default GW #8519

openwrt-bot opened this issue Dec 17, 2019 · 3 comments
Labels

Comments

@openwrt-bot
Copy link

HardWired:

HW: TP-Link TL-WR1043ND v1
Openwrt affected: tried 18.06.4, 18.06.5

DHCP offer from ISP:

22:48:09.365836 00:04:96:51:fe:50 > 74:ea:3a:d1:2d:16, ethertype IPv4 (0x0800), length 354: (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 340)
10.45.64.5.67 > 213.xx.xx.23.68: BOOTP/DHCP, Reply, length 312, hops 1, xid 0x3313791, secs 63, Flags [none]
Your-IP 213.xx.xx.23
Gateway-IP 10.45.64.5
Client-Ethernet-Address 74:ea:3a:d1:2d:16
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Offer
Server-ID Option 54, length 4: 46.xx.xx.202
Lease-Time Option 51, length 4: 43200
Subnet-Mask Option 1, length 4: 255.255.255.128
Default-Gateway Option 3, length 4: 213.xx.xx.5
Domain-Name-Server Option 6, length 8: 10.81.3.19,10.59.3.19
Domain-Name Option 15, length 10: "abcxyz.ru"
BR Option 28, length 4: 213.xx.xx.127
Classless-Static-Route Option 121, length 14: (213.xx.xx.0/25:213.xx.xx.5),(default:213.xx.xx.5)

18.06.5 reaction to Classless-Static-Route Option 121:

root@OpenWrt:~# ip r
192.168.1.0/24 dev br-lan scope link src 192.168.1.1
213.хх.хх.0/25 via 213.хх.хх.5 dev eth0.2 src 213.хх.хх.23

Fixing:

root@OpenWrt:# ip r del 213.xx.xx.0/25
root@OpenWrt:
# ip r add 213.xx.xx.0/25 dev eth0.2 src 213.xx.xx.23
root@OpenWrt:# ip r add default via 213.xx.xx.5 dev eth0.2
root@OpenWrt:
# ip r
default via 213.xx.xx.5 dev eth0.2
192.168.2.0/24 dev br-lan scope link src 192.168.2.1
213.xx.xx.0/25 dev eth0.2 scope link src 213.xx.xx.23

All things above rised from my attempt to switch from 15.05.1 to new stable 18.06.x branch of Openwrt
15.05.1 works without a glitch with this ISP.

@openwrt-bot
Copy link
Author

HardWired:

Workaround:

  1. Put 'option classlessroute 0' in section wan /etc/config/network
    OR
  2. Comment out line 39 in /lib/netifd/dhcp.script: '#[ -n "$staticroutes" ] && set_classless_routes $staticroutes'

Please notice that ISP provides in Option 121 the same GW as in Option 3.

@openwrt-bot
Copy link
Author

Reactor:

Same ISP, same problem. TP-Link TL-WR2543N/ND, OpenWrt 19.07.0.

@openwrt-bot
Copy link
Author

bjonglez:

It's strange that this ISP's DHCP server sends both a regular default route and a default route through option 121.

In our network, we are using option 121 to distribute default routes, and it works on openwrt 18.06.X

That being said, openwrt shouldn't fail like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant