[Kea-users] Multiple relay servers - problem

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Kea-users] Multiple relay servers - problem

Marcin Romanowski
I have problem with offering adresses.
Two relay agents (cisco) for public addresses .193 and .194 and one relay (cisco) .198 for private addresses. 
All listen on the same vlan, networks are different. agents for public addresses are redundant and always only one server relay dhcp to KEA. 
When client sends DISCOVER kea gets request from both relay agents, one from public .194 and one from private .194. In log, I see that proper address from proper network was assigned but  KEA sends OFFER to .194 this helper doesn't have private address so discards packet.

this is my config:

{
"Dhcp4": {
"shared-networks": [
    {
        "name": "company_public_network",
        "relay": {
            "ip-addresses": [
                "10.249.1.193",
                "10.249.1.194"
            ]
        },
        "subnet4": [
            {
                "id": 30,
                "subnet": "5.16.0.128/26",
                "pools": [],
                "option-data": [
                    {
                        "always-send": true,
                        "code": 3,
                        "csv-format": true,
                        "space": "dhcp4",
                        "name": "routers",
                        "data": "5.16.0.129"
                    }
                ],
                "reservations": [
                    {
                        "hw-address": "e4:8d:8c:6e:ff:02",
                        "ip-address": "5.16.0.131"
                    }
                    ]
                }
                // other public subnets
            ]
        },
        {
            "name": "company_private_network",
            "relay": {
                "ip-addresses": [
                    "10.249.1.198"
                ]
            },
            "subnet4": [
                {
                    "id": 369,
                    "subnet": "10.0.72.0/22",
                    "pools": [],
                    "option-data": [
                        {
                            "always-send": true,
                            "code": 3,
                            "csv-format": true,
                            "space": "dhcp4",
                            "name": "routers",
                            "data": "10.0.72.1"
                        }
                    ],
                    "reservations": [
                        {
                            "hw-address": "18:d0:71:fb:63:80",
                            "ip-address": "10.0.72.5"
                        },
                        {
                            "hw-address": "d0:96:fb:16:52:60",
                            "ip-address": "10.0.72.42"
                        }
                    ]
                }
                // Other private subnets
            ]
        }
    ],
    "subnet4": [],
    "t1-percent": 0.5,
    "t2-percent": 0.875,
    "valid-lifetime": 86400
    }
}


Shouldn't kea sent response to configured relay ip?

Best Regards

Marcin

_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.

Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] Multiple relay servers - problem

Marcin Romanowski
Please, anybody any hint?
I moved my configuration to GNS3 to check configuration, according to documentation I removed shared-networks to subnet4.
Now I have one relay's agent which has two interfaces with different subnets. On both subnet I have client with the same mac address "service computer". I want when client connects to one subnet get address from that subnet, when connects to other subnet get address from other subnet. Common thing is the same mac address

kea-dhcp4.config
{
  "Dhcp4": {
    .....
    "subnet4": [
     
      {
        "subnet":"192.168.0.0/24",
        "relay": {
          "ip-addresses": [ "10.249.1.202" ]
      },
        "pools": [],
        "reservations": [
          {
            "hw-address": "0C:F4:65:FE:0A:00",
            "ip-address": "192.168.0.11"
          }
        ]
      },
      {
        "subnet":"10.10.10.0/24",
        "relay": {
          "ip-addresses": [ "10.249.1.202" ]
      },
        "pools": [],
        "reservations": [
          {
            "hw-address": "0C:F4:65:FE:0A:00",
            "ip-address": "10.10.10.3"
          }
        ]
      }
     
    ]
  }
}


The relay's agent configuration
ip dhcp-relay information option server-override
ip dhcp relay information option vpn
ip dhcp relay information trust-all
no ip dhcp ping packets
!
interface GigabitEthernet8
 ip address 10.10.10.1 255.255.255.0
 ip helper-address 10.249.1.203
!
interface GigabitEthernet9
 ip address 192.168.0.1 255.255.255.0
 ip helper-address 10.249.1.203



With this configurations I always get address from the first declared subnet :(
Now, when I turn on clinet on gi8 (from network 10.10.10.0/24) kea offers address from first declared subnet :(

21:03:19.984354 IP (tos 0x0, ttl 255, id 201, offset 0, flags [none], proto UDP (17), length 328)
    10.249.1.202.67 > 10.249.1.203.67: [udp sum ok] BOOTP/DHCP, Request from 0c:f4:65:fe:0a:00, length 300, hops 1, xid 0x23416254, Flags [Broadcast] (0x8000)
 Gateway-IP 10.249.1.202
 Client-Ethernet-Address 0c:f4:65:fe:0a:00
 Vendor-rfc1048 Extensions
   Magic Cookie 0x63825363
   DHCP-Message Option 53, length 1: Discover
   Parameter-Request Option 55, length 8:
     Subnet-Mask, Classless-Static-Route, Default-Gateway, Static-Route
     Domain-Name-Server, NTP, Option 138, Vendor-Option
   Hostname Option 12, length 8: "MikroTik"
   Client-ID Option 61, length 7: ether 0c:f4:65:fe:0a:00
   Agent-Information Option 82, length 12:
     Unknown SubOption 150, length 4:
0x0000:  0a0a 0a00
     Unknown SubOption 152, length 4:
0x0000:  0a0a 0a01
   END Option 255, length 0
   PAD Option 0, length 0, occurs 13
21:03:19.986686 IP (tos 0x0, ttl 64, id 28210, offset 0, flags [DF], proto UDP (17), length 336)
    10.249.1.203.67 > 10.249.1.202.67: [bad udp cksum 0x1ad4 -> 0xebf9!] BOOTP/DHCP, Reply, length 308, hops 1, xid 0x23416254, Flags [Broadcast] (0x8000)
 Your-IP 192.168.0.11 <-- this should offer 10.10.10.3
 Gateway-IP 10.249.1.202
 Client-Ethernet-Address 0c:f4:65:fe:0a:00
 Vendor-rfc1048 Extensions
   Magic Cookie 0x63825363
   DHCP-Message Option 53, length 1: Offer
   Subnet-Mask Option 1, length 4: 255.255.255.0
   Domain-Name-Server Option 6, length 8: 8.8.8.8,4.4.4.4
   Hostname Option 12, length 8: "mikrotik"
   Lease-Time Option 51, length 4: 3600
   Server-ID Option 54, length 4: 10.249.1.203
   RN Option 58, length 4: 1000
   RB Option 59, length 4: 2000
   Agent-Information Option 82, length 12:
     Unknown SubOption 150, length 4:
0x0000:  0a0a 0a00
     Unknown SubOption 152, length 4:
0x0000:  0a0a 0a01
   END Option 255, length 0




Please help with configuration.

Best Regards
Marcin



_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.

Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users