209
Step Command Remarks
broadcasts destined for the
directly connected network.
forward directed broadcasts
destined for the directly connected
network.
Configuration example
Network requirements
As shown in Figure 79, the default gateway of the host is the IP address 1.1.1.2/24 of the interface
GigabitEthernet 1/0/1 of Router A. Configure a static route destined for the host on Router B. Router
B can receive directed broadcasts from the host to IP address 2.2.2.255.
Figure 79 Network diagram
Configuration procedure
1. Configure Router A:
# Specify IP addresses for GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2.
<RouterA> system-view
[RouterA] interface gigabitethernet 1/0/1
[RouterA-GigabitEthernet1/0/1] ip address 1.1.1.2 24
[RouterA-GigabitEthernet1/0/1] quit
[RouterA] interface gigabitethernet 1/0/2
[RouterA-GigabitEthernet1/0/2] ip address 2.2.2.2 24
# Enable GigabitEthernet 1/0/2 to forward directed broadcasts destined for the directly
connected network.
[RouterA-GigabitEthernet1/0/2] ip forward-broadcast
2. Configure Router B:
# Configure a static route to the host.
<RouterB> system-view
[RouterB] ip route-static 1.1.1.1 24 2.2.2.2
# Specify an IP address for GigabitEthernet 1/0/2.
[RouterB] interface gigabitethernet 1/0/2
[RouterB-GigabitEthernet1/0/2] ip address 2.2.2.1 24
# Enable GigabitEthernet 1/0/2 to receive directed broadcasts destined for the directly
connected network.
[RouterB-GigabitEthernet1/0/2] ip forward-broadcast
After the configurations are completed, if you ping the subnet-directed broadcast address 2.2.2.255
on the host, the interface GigabitEthernet 1/0/2 of Router B can receive the ping packets. If you
delete the ip forward-broadcast configuration on any router, the interface GigabitEthernet 1/0/2 of
Router B cannot receive the ping packets.