If i understand right DHCP-Gataway-Ip-Address = dhcp relay ip address. In dhcp offer (maybe ack / not tested) i can't set DHCP-Gateway-Ip-Address. By default it should contain same as in discover/request (???) DHCP-Gateway-Ip-Address. In offer it's set to 0.0.0.0 .
Haralds Ulmanis wrote:
If i understand right DHCP-Gataway-Ip-Address = dhcp relay ip address. In dhcp offer (maybe ack / not tested) i can't set DHCP-Gateway-Ip-Address.
The gateway IP is contained in the offer, as set by the gateway.
By default it should contain same as in discover/request (???) DHCP-Gateway-Ip-Address. In offer it's set to 0.0.0.0 .
Because there's no gateway involved. Alan DeKok.
Config: dhcp DHCP-Discover { jradius update reply { DHCP-Message-Type = DHCP-Offer } update reply { DHCP-Gateway-IP-Address = 10.2.0.15 } } Sniffing packets: 3 8719.551007 10.2.0.15 x.x.x.x DHCP DHCP Discover - Transaction ID 0xa9f950b3 Relay agent IP address: 10.2.0.15 (10.2.0.15) 4 8719.631210 x.x.x.x 10.2.0.15 DHCP DHCP Offer - Transaction ID 0xa9f950b3 Relay agent IP address: 0.0.0.0 (0.0.0.0) Maybe i'm wrong ... I've problem .. that dhcp offer message is sent to switch (10.2.0.15, routes is ok) but client never receive message. In some documentation about DHCP i read that in offer message dhcp relay ip address is used by equipment to determine to which interface send back dhcp replay, so i tried to update DHCP offer message. I assumed, that DHCP-Gateway-Ip-Address attribute is that relay ip address i need. I tried to update using jradius also. And with dhcp config file. But always DHCP-Gateway-Ip-Address is set to 0.0.0.0. Maybe i'm doing wrong way. Updating wrong attribute. Maybe right question is ... how to set DHCP relay ip address in offer message ? There is some debug from radiusd also: Received DHCP-Discover of id 2851688627 from 10.2.0.15:68 to x.x.x.x:67 DHCP-Opcode = Client-Message DHCP-Hardware-Type = Ethernet DHCP-Hardware-Address-Length = 6 DHCP-Hop-Count = 1 DHCP-Transaction-Id = 2851688627 DHCP-Number-of-Seconds = 1024 DHCP-Flags = Broadcast DHCP-Client-IP-Address = 0.0.0.0 DHCP-Your-IP-Address = 0.0.0.0 DHCP-Server-IP-Address = 0.0.0.0 DHCP-Gateway-IP-Address = 10.2.0.15 DHCP-Client-Hardware-Address = 00:e0:4c:eb:23:2c DHCP-Message-Type = DHCP-Discover DHCP-Auto-Config = 1 DHCP-Client-Identifier = 00:e0:4c:eb:23:2c DHCP-Requested-IP-Address = y.y.y.y DHCP-Hostname = "user-300584604a" DHCP-Vendor-Class-Identifier = "MSFT 5.0" DHCP-Parameter-Request-List = DHCP-Subnet-Mask DHCP-Parameter-Request-List = DHCP-Domain-Name DHCP-Parameter-Request-List = DHCP-Router-Address DHCP-Parameter-Request-List = DHCP-Domain-Name-Server DHCP-Parameter-Request-List = DHCP-NETBIOS-Name-Servers DHCP-Parameter-Request-List = DHCP-NETBIOS-Node-Type DHCP-Parameter-Request-List = DHCP-NETBIOS DHCP-Parameter-Request-List = DHCP-Perform-Router-Discovery DHCP-Parameter-Request-List = DHCP-Static-Routes DHCP-Parameter-Request-List = 249 DHCP-Parameter-Request-List = DHCP-Vendor ------------ Sending DHCP-Offer of id 11 from x.x.x.x:67 to 10.2.0.15:68 DHCP-Opcode = Server-Message DHCP-Hardware-Type = Ethernet DHCP-Hardware-Address-Length = 6 DHCP-Hop-Count = 0 DHCP-Transaction-Id = 2851688627 DHCP-Number-of-Seconds = 0 DHCP-Flags = Broadcast DHCP-Client-IP-Address = 0.0.0.0 DHCP-Your-IP-Address = b.b.b.b DHCP-Server-IP-Address = 0.0.0.0 DHCP-Gateway-IP-Address = 0.0.0.0 DHCP-Client-Hardware-Address = 00:e0:4c:eb:23:2c DHCP-Server-Host-Name = "" DHCP-Boot-Filename = "" DHCP-Subnet-Mask = 255.255.240.0 DHCP-Router-Address = z.z.z.z DHCP-Domain-Name-Server = a.a.a.a DHCP-IP-Address-Lease-Time = 120 DHCP-DHCP-Server-Identifier = x.x.x.x On Wednesday 18 June 2008 04:43:56 Alan DeKok wrote:
Haralds Ulmanis wrote:
If i understand right DHCP-Gataway-Ip-Address = dhcp relay ip address. In dhcp offer (maybe ack / not tested) i can't set DHCP-Gateway-Ip-Address.
The gateway IP is contained in the offer, as set by the gateway.
By default it should contain same as in discover/request (???) DHCP-Gateway-Ip-Address. In offer it's set to 0.0.0.0 .
Because there's no gateway involved.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Haralds Ulmanis wrote: ...
Sniffing packets: 3 8719.551007 10.2.0.15 x.x.x.x DHCP DHCP Discover - Transaction ID 0xa9f950b3 Relay agent IP address: 10.2.0.15 (10.2.0.15) 4 8719.631210 x.x.x.x 10.2.0.15 DHCP DHCP Offer - Transaction ID 0xa9f950b3 Relay agent IP address: 0.0.0.0 (0.0.0.0)
Ah, ok. The code wasn't copying the gateway IP from the discover to the offer. I've fixed this in CVS.
Maybe right question is ... how to set DHCP relay ip address in offer message ?
Grab a copy of src/lib/dhcp.c from CVS. Alan DeKok.
Thanks, relay ip is ok now. Another problem. I couldn't receive it packet anyway. I launched standart dhcpd server on linux and everything worked fine. After analyzing packets i discover that replay messages to relay is sent back to port 67 not 68. So, it need to be fixed. :) Haralds ----- Original Message ----- From: "Alan DeKok" <aland@deployingradius.com> To: "FreeRadius users mailing list" <freeradius-users@lists.freeradius.org> Sent: Wednesday, June 18, 2008 8:46 AM Subject: Re: dhcp relay agent
Haralds Ulmanis wrote: ...
Sniffing packets: 3 8719.551007 10.2.0.15 x.x.x.x DHCP DHCP Discover - Transaction ID 0xa9f950b3 Relay agent IP address: 10.2.0.15 (10.2.0.15) 4 8719.631210 x.x.x.x 10.2.0.15 DHCP DHCP Offer - Transaction ID 0xa9f950b3 Relay agent IP address: 0.0.0.0 (0.0.0.0)
Ah, ok. The code wasn't copying the gateway IP from the discover to the offer. I've fixed this in CVS.
Maybe right question is ... how to set DHCP relay ip address in offer message ?
Grab a copy of src/lib/dhcp.c from CVS.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
EvilEzh wrote:
Thanks, relay ip is ok now. Another problem. I couldn't receive it packet anyway. I launched standart dhcpd server on linux and everything worked fine. After analyzing packets i discover that replay messages to relay is sent back to port 67 not 68. So, it need to be fixed. :)
Hmm... the reply just swaps the ports from the request. i.e.: X:68 -> Y:67 discover X:68 <- Y:67 offer What does debug mode say? It should print src/dst ip/port. Alan DeKok.
with dhcpd request client -> (255.255.255.255:68)->relay:68->server:67 replay server:67->relay:67->client:68 User Datagram Protocol, Src Port: bootps (67), Dst Port: bootps (67) (server to relay) with freeradius dhcp client -> (255.255.255.255:68)->relay:68->server:67 replay server:67->relay:68 !!!! So, if relay ip<>0.0.0.0 (?hops>0) replay port = 67. Something like that. ----- Original Message ----- From: "Alan DeKok" <aland@deployingradius.com> To: "FreeRadius users mailing list" <freeradius-users@lists.freeradius.org> Sent: Wednesday, June 18, 2008 4:24 PM Subject: Re: dhcp relay agent
EvilEzh wrote:
Thanks, relay ip is ok now. Another problem. I couldn't receive it packet anyway. I launched standart dhcpd server on linux and everything worked fine. After analyzing packets i discover that replay messages to relay is sent back to port 67 not 68. So, it need to be fixed. :)
Hmm... the reply just swaps the ports from the request. i.e.:
X:68 -> Y:67 discover X:68 <- Y:67 offer
What does debug mode say? It should print src/dst ip/port.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Thanks, it works now. Haralds ----- Original Message ----- From: "Alan DeKok" <aland@deployingradius.com> To: "FreeRadius users mailing list" <freeradius-users@lists.freeradius.org> Sent: Wednesday, June 18, 2008 5:04 PM Subject: Re: dhcp relay agent
EvilEzh wrote:
with dhcpd request client -> (255.255.255.255:68)->relay:68->server:67 replay server:67->relay:67->client:68
Ok. I've fixed CVS. See if that works...
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (3)
-
Alan DeKok -
EvilEzh -
Haralds Ulmanis