This preview shows page 1. Sign up to view the full content.
Unformatted text preview: as not designed to
support broadcasting, such as TFTP? (We cover TFTP in more detail in Chapter 15.)
bsdi % tftp
tftp> connect 22.214.171.124 start the client
specify the IP address of the server file:///D|/Documents%20and%20Settings/bigini/Docu...homenet2run/tcpip/tcp-ip-illustrated/broadcas.htm (6 of 12) [12/09/2001 14.47.00] Chapter 12. Broadcasting and Multicasting tftp> get temp.foo
tftp: sendto: Permission
tftp> quit and try to fetch a file from the server terminate the client Here we get an error immediately, and nothing is sent on the cable. What's happening
here is that the sockets API doesn't allow a process to send a UDP datagram to the
broadcast address unless the process specifically states that it plans to broadcast. This is
intended to prevent users from mistakenly specifying a broadcast address (as we did here)
when the application was never intended to broadcast.
With the sockets API the application must set the SO_BROADCAST socket option before sending a UDP
datagram to a broadcast address.
Not all systems enforce this restriction. Some implementations allow any process to broadcast UDP
datagrams, without requiring the process to say so. Others are more restrictive and require a process to
have superuser privileges to broadcast. The next question is whether directed broadcasts are forwarded or not. Some kernels and
routers have an option to enable or disable this feature. (See Appendix E.)
If we enable this feature on our router bsdi and run ping from the host slip, we can
see if the subnet-directed broadcasts are forwarded by bsdi. Forwarding a directed
broadcast means the router takes the incoming unicast datagram, determines that the
destination address is the directed broadcast for one of its interfaces, and then forwards
the datagram onto the appropriate network using a link-layer broadcast.
slip % ping 126.96.36.199
PING 188.8.131.52 (184.108.40.206): 56 data bytes 64 bytes
from 220.127.116.11: icmp_seq=0 ttl=255 time=190 ms 64 bytes
from 18.104.22.168: i...
View Full Document
- Spring '12