Posted on March 11, 2019 8:15 pm
 |  Asked by Yuri Vizcarra
 |  189 views
0
0
Print Friendly, PDF & Email

Wake on lan configuration examples in an environment where the arista switch makes as the router between VLANs.

6
Posted by Alla Anunitya
Answered on August 12, 2019 4:52 am

Hi Yuri,

We can configure wake on lan using the concept of directed broadcast.

Directed broadcast is method of transfer to send a packet to recipients in a target subnet. This is done by sending a directed broadcast packet as a standard unicast packet until it reaches a switch connected to the target subnet. Then, the packet is broadcast to reach all recipients in the target subnet.

Directed broadcast packets are designated by having a IP destination address that is the broadcast address for the target subnet. When a directed broadcast is received, if the receiving switch is not connected to the target subnet, then packet is forwarded as a normal unicast packet. If the receiving switch is connected to the target subnet and the directed broadcast is enabled on the interface connected to the target subnet, then the destination MAC address in the packet is modified to the broadcast MAC address before being sent on that interface.

Following is a configuration example.

We are trying to implement wake on lan on vlan 20 on sw2, sw3 and sw4. We are initiating from the vlan 10 on sw1.

Following are the configs.

On sw1:

interface Vlan10
ip address 10.0.0.1/24

We have a static route on sw1 to reach 20.0.0.0/24 subnet (vlan 20)

sw1# sh ip route 20.0.0./24

S 20.0.0.0/24 [1/0] via 10.0.0.2, Vlan10

On sw2:

vlan 10,20
!
interface Vlan10
ip address 10.0.0.2/24
!
interface Vlan20
ip address 20.0.0.2/24
ip directed-broadcast

sw2(config)#sh ip interface vlan 20
Vlan20 is up, line protocol is up (connected)
Internet address is 20.0.0.2/24
Broadcast address is 255.255.255.255
IPv6 Interface Forwarding : None
IP Directed Broadcast enabled
Proxy-ARP is disabled
Local Proxy-ARP is disabled
Gratuitous ARP is ignored
IP MTU 1500 bytes

on sw3:

vlan 20
!
interface Vlan20
ip address 20.0.0.3/24

on sw4:

vlan 20
!
interface Vlan20
ip address 20.0.0.4/24

TESTING :

Now let’s ping from the int vlan 10 on sw1 (10.0.0.1) to the broadcast IP of vlan 20 (20.0.0.255). We have a route to vlan 20, through 10.0.0.2 (sw2)

sw1(config)#ping 20.0.0.255
PING 20.0.0.255 (20.0.0.255) 72(100) bytes of data.

If we take the tcpdump on the int vlan 10 on sw1, we see the packets egressing out with the DMAC of the sw2. The packet is routed till it reaches the target subnet.

SIP : 10.0.0.1 (int vlan 10 on sw1)
DIP : 20.0.0.255 (broadcast ip of vlan 20 )
SMAC : 28:99:3a:dd:37:84 (MAC od sw1)
DMAC : 28:99:3a:dd:32:9a (MAC od sw2)

sw1# tcpdump int vlan 10
04:23:39.516989 28:99:3a:dd:37:84 > 28:99:3a:dd:32:9a, ethertype IPv4 (0x0800), length 114: 10.0.0.1 > 20.0.0.255: ICMP echo request, id 29145, seq 1, length 80
04:23:39.527166 28:99:3a:dd:37:84 > 28:99:3a:dd:32:9a, ethertype IPv4 (0x0800), length 114: 10.0.0.1 > 20.0.0.255: ICMP echo request, id 29145, seq 2, length 80
04:23:39.537408 28:99:3a:dd:37:84 > 28:99:3a:dd:32:9a, ethertype IPv4 (0x0800), length 114: 10.0.0.1 > 20.0.0.255: ICMP echo request, id 29145, seq 3, length 80

On sw2 :

We notice that the route to 20.0.0.255 is tagged as Directed Broadcast.
Since we have given the command ip directed-broadcast on vlan 20, it rewrites the DMAC to broadcast and routes the packet in vlan 20.

sw2(config)#sh ip route host
R – receive, B – broadcast, F – FIB, A – attached, D – directed broadcast

B 20.0.0.0 to cpu
R 20.0.0.2 to cpu
A 20.0.0.3 on Vlan20
A 20.0.0.4 on Vlan20
D 20.0.0.255 on Vlan20

on sw3:

If we take tcpdump on int vlan 20, we see the following packets.
The DMAC of the packets is changed to broadcast.

SIP : 10.0.0.1 (int vlan 10 on sw1)
DIP : 20.0.0.255 (broadcast ip of vlan 20 )
SMAC : 28:99:3a:dd:37:84 (MAC od sw1)
DMAC : Broadcast (Broadcast IP of the vlan 20)

03:46:41.716293 28:99:3a:dd:32:9a > Broadcast, ethertype IPv4 (0x0800), length 114: 10.0.0.1 > 20.0.0.255: ICMP echo request, id 29145, seq 1, length 80
03:46:41.726459 28:99:3a:dd:32:9a > Broadcast, ethertype IPv4 (0x0800), length 114: 10.0.0.1 > 20.0.0.255: ICMP echo request, id 29145, seq 2, length 80
03:46:41.736688 28:99:3a:dd:32:9a > Broadcast, ethertype IPv4 (0x0800), length 114: 10.0.0.1 > 20.0.0.255: ICMP echo request, id 29145, seq 3, length 80
03:46:41.746906 28:99:3a:dd:32:9a > Broadcast, ethertype IPv4 (0x0800), length 114: 10.0.0.1 > 20.0.0.255: ICMP echo request, id 29145, seq 4, length 80

On sw4 :

We see the similar broadcast packets as on sw3.

04:14:19.149100 28:99:3a:dd:32:9a > Broadcast, ethertype IPv4 (0x0800), length 114: 10.0.0.1 > 20.0.0.255: ICMP echo request, id 29799, seq 1, length 80
04:14:19.159205 28:99:3a:dd:32:9a > Broadcast, ethertype IPv4 (0x0800), length 114: 10.0.0.1 > 20.0.0.255: ICMP echo request, id 29799, seq 2, length 80
04:14:19.169279 28:99:3a:dd:32:9a > Broadcast, ethertype IPv4 (0x0800), length 114: 10.0.0.1 > 20.0.0.255: ICMP echo request, id 29799, seq 3, length 80

Post your Answer

You must be logged in to post an answer.