Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D dhcp
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 109
    • Issues 109
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source Projects
  • dhcp
  • Issues
  • #102

Closed
Open
Created Apr 30, 2020 by L6NqLW@L6NqLW

dhcp-relay unnecessarily relays unicast packets

  • Tested on: 4.3.1-6 and 4.4.1-2.
  • Run as: /usr/sbin/dhcrelay -q -4 -a -m discard -iu eth0 -id eth1 172.16.0.254
  • DHCP address: 172.16.0.254 (LAN2)
  • Relay address: 10.10.10.1 (LAN1)
  • Network topology: LAN1 <> eth1_dhcprelay_eth0 <> LAN2

It seems that isc-dhcp-relay unnecessarily relays even unicast packets (bug?) and as result the following is observed:

  • DHCP RELEASE is duplicated
  • DHCP REQUEST is duplicated during DHCP RENEW

This is seen on the client side:

10.10.10.10.68 > 172.16.0.254.67: [bad udp cksum 0xc267 -> 0x105c!] BOOTP/DHCP, Request from 0c:e2:df:02:5a:00, length 300, xid 0x2a69a862, Flags [none] (0x0000)
	  Client-IP 10.10.10.10
	  Client-Ethernet-Address 0c:e2:df:02:5a:00
	  Vendor-rfc1048 Extensions
	    Magic Cookie 0x63825363
	    DHCP-Message Option 53, length 1: Release
	    Server-ID Option 54, length 4: 172.16.0.254
	    Hostname Option 12, length 4: "user"
	    END Option 255, length 0
	    PAD Option 0, length 0, occurs 44

This is seen on the server:

Apr 29 17:54:08 debian dhcpd[2367]: DHCPRELEASE of 10.10.10.10 from 0c:e2:df:02:5a:00 (user) via ens3 (found)
Apr 29 17:54:08 debian dhcpd[2367]: DHCPRELEASE of 10.10.10.10 from 0c:e2:df:02:5a:00 via 10.10.10.1 (found)

It is similar with DHCP REQUEST during RENEW. This is seen on the client:

07:44:19.410867 IP (tos 0x0, ttl 64, id 8555, offset 0, flags [DF], proto UDP (17), length 328)
    10.10.10.10.68 > 172.16.0.254.67: [bad udp cksum 0xc267 -> 0xb75a!] BOOTP/DHCP, Request from 0c:e2:df:02:5a:00, length 300, xid 0x53a6b839, Flags [none] (0x0000)
	  Client-IP 10.10.10.10
	  Client-Ethernet-Address 0c:e2:df:02:5a:00
	  Vendor-rfc1048 Extensions
	    Magic Cookie 0x63825363
	    DHCP-Message Option 53, length 1: Request
	    Hostname Option 12, length 4: "user"
	    Parameter-Request Option 55, length 7: 
	      Subnet-Mask, BR, Default-Gateway, Domain-Name-Server
	      Classless-Static-Route, Domain-Name, MTU
	    END Option 255, length 0
	    PAD Option 0, length 0, occurs 41
07:44:19.418395 IP (tos 0x0, ttl 63, id 51340, offset 0, flags [DF], proto UDP (17), length 328)
    172.16.0.254.67 > 10.10.10.10.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0x53a6b839, Flags [none] (0x0000)
	  Client-IP 10.10.10.10
	  Your-IP 10.10.10.10
	  Client-Ethernet-Address 0c:e2:df:02:5a:00
	  Vendor-rfc1048 Extensions
	    Magic Cookie 0x63825363
	    DHCP-Message Option 53, length 1: ACK
	    Server-ID Option 54, length 4: 172.16.0.254
	    Lease-Time Option 51, length 4: 120
	    Subnet-Mask Option 1, length 4: 255.255.255.0
	    Default-Gateway Option 3, length 4: 10.10.10.1
	    END Option 255, length 0
	    PAD Option 0, length 0, occurs 32
07:44:19.418836 IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
    10.10.10.1.67 > 10.10.10.10.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, hops 1, xid 0x53a6b839, Flags [none] (0x0000)
	  Client-IP 10.10.10.10
	  Your-IP 10.10.10.10
	  Gateway-IP 10.10.10.1
	  Client-Ethernet-Address 0c:e2:df:02:5a:00
	  Vendor-rfc1048 Extensions
	    Magic Cookie 0x63825363
	    DHCP-Message Option 53, length 1: ACK
	    Server-ID Option 54, length 4: 172.16.0.254
	    Lease-Time Option 51, length 4: 120
	    Subnet-Mask Option 1, length 4: 255.255.255.0
	    Default-Gateway Option 3, length 4: 10.10.10.1
	    END Option 255, length 0
	    PAD Option 0, length 0, occurs 32

And this is seen on the server:

Apr 29 18:09:40 debian dhcpd[2367]: DHCPREQUEST for 10.10.10.10 from 0c:e2:df:02:5a:00 (user) via ens3
Apr 29 18:09:40 debian dhcpd[2367]: DHCPACK on 10.10.10.10 to 0c:e2:df:02:5a:00 (user) via ens3
Apr 29 18:09:40 debian dhcpd[2367]: DHCPREQUEST for 10.10.10.10 from 0c:e2:df:02:5a:00 (user) via 10.10.10.1
Apr 29 18:09:40 debian dhcpd[2367]: DHCPACK on 10.10.10.10 to 0c:e2:df:02:5a:00 (user) via 10.10.10.1
Edited Apr 30, 2020 by L6NqLW
Assignee
Assign to
Time tracking