How to Broadcast Across Subnets

How to Broadcast Across Subnets

April 6, 2012 0 By Eric Shanks

Many services such as DHCP or TFTP use broadcast packets to find a particular server. In the case of DHCP, a device when connecting to a network will send out a broadcast to find a DHCP server to get an IP address to use. But what if you have multiple subnets on your network? You could have a DHCP server on each of your subnets, but this seems a bit overkill.

Review on Broadcast Domains

Just as a quick review, devices in most cases, use unicast addresses, meaning that they send an Ethernet frame to a specific device.  A switch then should know which port the device is on and forward that frame to the destination device.

In the below example we see the basic unicast frame being forwarded to the destination.

Now if the same PC tries to contact a service like DHCP it will send a frame to the broadcast address of the network.  The switch will then flood the frame to all devices on the same vlan.  Don’t forget that it will also forward the frame to any trunk ports on the switch.

The below example shows the same computer sending a broadcast frame.  Notice that it can’t reach the DHCP server since it’s on a different vlan.

Helper Addresses

Now that we can visualize the problem at hand we can learn how to forward the broadcast frame to the DHCP Server as well.   If we log into the router we would need to configure a UDP helper address.


Cisco and HP accomplish this by using the ip-helper address command.

If our router is a cisco router we would do something like:

router(config) int Eth0

router(config-if) ip-helper address 10.200.1.10

HP would be similar to below

switch(Config)#Vlan 100 ip helper-address 10.200.1.10

 

Once the helper address is added we can then broadcast to the DHCP Server as expected.

I should mention that not all broadcasts are forwarded. By default Cisco forwards 8 services.

Time
TACACS
DNS
BOOTP/DHCP Server
BOOTP/DHCP Client
TFTP
NetBIOS name service
NetBIOS datagram service

If you need to forward other services you can use “ip forward protocol” to add additional protocols to the default list.