Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

configuration: host(H1-10.10.10.55/24) has a default gateway(g1) 10.10.10.1/24.

Question 1:H1 sends a packet to 255.255.255.255. What should be the destination MAC address in the outgoing frame?

Should it be the MAC address of the gateway(g1) or FF:FF:FF:FF:FF:FF?

Question 2:H1 sends a packet to 10.10.10.255. What should be the destination MAC address in the outgoing frame?

Should it be the MAC address of the gateway(g1) or FF:FF:FF:FF:FF:FF?

share|improve this question

migrated from stackoverflow.com Mar 10 '11 at 12:30

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers 2

If you're using a broadcast IP, you should be using a broadcast MAC. Use FF:FF:FF:FF:FF:FF for both cases.

When a device sends a packet to the broadcast MAC address (FF:FF:FF:FF:FF:FF), it is delivered to all stations on the local network. It needs to be used in order for all devices to receive your packet at the datalink layer.

For IP, 255.255.255.255 is the broadcast address for local networks. On top of Ethernet, this address will make sure that the packet is received by all nodes on your local network.

10.10.10.255 is the broadcast address for the 10.10.10.0/24 subnet. Here again, a broadcast MAC is appropriate.

share|improve this answer
add comment

Q1: G1, cause the host isn't in the same subnet. Q2: FF:FF:FF:FF:FF:FF cause the host is in the same network.

share|improve this answer
    
I believe Q1 is the broadcast address, so it should be FF:FF:FF:FF:FF:FF in both cases. –  Jeff Mar 10 '11 at 6:28
    
when you use FF:FF:FF:FF:FF:FF in bouth cases in Q1 the package will not get out of the network.when you send a frame for broadcast and no host in the network will response (cause the destination is on other subnet) then what? –  neosatan Mar 10 '11 at 6:38
    
@neosatan 255.255.255.255 is the broadcast address for the local network. It's not supposed to make it past a gateway. –  Jeff Mar 10 '11 at 6:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.