Junos OS

 View Only
last person joined: 2 days ago 

Ask questions and share experiences about Junos OS.

dhcp-relay adding additional option 82 incorrectly

  • 1.  dhcp-relay adding additional option 82 incorrectly

    Posted 01-10-2023 00:40
    I have a dhcp-relay configured on an MX104 and the intention is for the MX to run a basic forward-only relay that adds NO option82 information and simply trusts any exiting option 82 information, however the MX is appending an entire option 82 RAI segment to the packets.  Here is a pcap:

        100.64.3.1.67 > 10.192.32.2.67: [udp sum ok] BOOTP/DHCP, Request from [snip], length 382, xid 0xa186905, secs 3, Flags [none] (0x0000)
    	  Gateway-IP 100.64.3.1
    	  Client-Ethernet-Address [snip]
    	  Vendor-rfc1048 Extensions
    	    Magic Cookie 0x63825363
    	    DHCP-Message Option 53, length 1: Request
    	    Requested-IP Option 50, length 4: 100.64.3.3
    	    Server-ID Option 54, length 4: 100.64.3.1
    	    MSZ Option 57, length 2: 576
    	    Parameter-Request Option 55, length 11:
    	      Subnet-Mask, Default-Gateway, Domain-Name-Server, Hostname
    	      Domain-Name, BR, NTP, Vendor-Option
    	      Option 120, Classless-Static-Route, Option 125
    	    Vendor-Class Option 60, length 24: "GS4220E.ONT.dslforum.org"
    	    Agent-Information Option 82, length 31:
    	      Circuit-ID SubOption 1, length 22: [snip]:1/xp5:
    	      Remote-ID SubOption 2, length 5: 77816
    	    Agent-Information Option 82, length 47:
    	      Circuit-ID SubOption 1, length 22: [snip]:1/xp5:
    	      Remote-ID SubOption 2, length 5: 77816
    	      Unknown SubOption 9, length 14:
    		0x0000:  0000 0a4c 0904 0761 6530 3a33 3030​


    As you can see, there are 2 op 82 sections.  I did do a pcap of the DHCP req coming into the MX and there is only 1, but it leaves the MX with 2.  My config does NOT have a relay-option-82 stanza so it shouldn't be adding that vendor-specific sub-option 9.  I have tried configuring always-write-option-82 as well as playing with relay-option-82 and no matter what I do it's always appending another op82 and that screws up my DHCP server.

    Here is my config:

    CGN-INET-1 {
        instance-type vrf;
        forwarding-options {
            dhcp-relay {
                dhcpv6 {
                    group all {
                        interface ae0.300;
                    }
                    server-group {
                        glttwy {
                            [snip]
                        }
                    }
                    active-server-group glttwy;
                }
                server-group {
                    glttwy {
                        10.192.32.2;
                        10.192.32.6;
                    }
                }
                active-server-group glttwy;
                group all {
                    overrides {
                        trust-option-82;
                    }
                    forward-only;
                    interface ae0.300;
                }
            }
        }
        interface ae0.300;
        route-distinguisher [snip]:701;
        vrf-target target:[snip]:701;
        vrf-table-label;
    }​

    Also the MX is only appending a second option 82 for the initial dhcprequest.  It does not do that for the subsequent unicast renewal.

    I don’t mind the suboption 9 being appended it just needs to be to the original Op82 instead of duplicating it.