Chapter 4:   Exercises 5, 6, 8, & 9


Ex 5:
Using ASN.1 and the services of ROSE, specify a protocol to return the current time on a remote system.

CurrentTime DEFINITIONS ::=
BEGIN
    --  Definition of a protocol to return the current time on a remote system

    --  operations
    gettime OPERATION
        RESULT  CurrTime
        ERRORS  Other
        ::= 0

    --  error definitions
    Other  ERROR
               PARAMETER Explanation
               ::= 0

    --  Supporting Definitions
    Explanation  ::= IA5String
    CurrTime  ::= IA5String
END


Ex 6:
You are developing applications using ROSE.   What operations and errors would you define for each of the following protocols:

(a) Return the ratio of print queue length to number of users logged in.
-- operations
    getQueueCount
    getUserCount

-- errors
    QueueNotAvailable
    NoUsersAvailable
    Other

(b) Return the process identifier of the longest running process on the system.
-- operations
    getPID
    getProcessTime
-- errors
    ProcessNotAvailable
    Other

(c) Return directory information about a specified file (for example, the creation date, length, owner).
-- operations
    getFileName
    getFileCreationDate
    getFleLength
    getFileOwner

-- errors
    FileNotAvailable
    Other


Ex 8:
If you have access to a system with TCP/IP protocols, use PING to discover the round-trip time between your host and some other host known to you.

=> ping -s is071168 100 15
PING is071168.bell-atl.com: 100 data bytes
108 bytes from is071168.bellatlantic.com (151.200.242.11): icmp_seq=0. time=1. ms
108 bytes from is071168.bellatlantic.com (151.200.242.11): icmp_seq=1. time=0. ms
108 bytes from is071168.bellatlantic.com (151.200.242.11): icmp_seq=2. time=0. ms
108 bytes from is071168.bellatlantic.com (151.200.242.11): icmp_seq=3. time=0. ms
108 bytes from is071168.bellatlantic.com (151.200.242.11): icmp_seq=4. time=0. ms
108 bytes from is071168.bellatlantic.com (151.200.242.11): icmp_seq=5. time=0. ms
108 bytes from is071168.bellatlantic.com (151.200.242.11): icmp_seq=6. time=0. ms
108 bytes from is071168.bellatlantic.com (151.200.242.11): icmp_seq=7. time=0. ms
108 bytes from is071168.bellatlantic.com (151.200.242.11): icmp_seq=8. time=0. ms
108 bytes from is071168.bellatlantic.com (151.200.242.11): icmp_seq=9. time=0. ms
108 bytes from is071168.bellatlantic.com (151.200.242.11): icmp_seq=10. time=0. ms
108 bytes from is071168.bellatlantic.com (151.200.242.11): icmp_seq=11. time=0. ms
108 bytes from is071168.bellatlantic.com (151.200.242.11): icmp_seq=12. time=0. ms
108 bytes from is071168.bellatlantic.com (151.200.242.11): icmp_seq=13. time=0. ms
108 bytes from is071168.bellatlantic.com (151.200.242.11): icmp_seq=14. time=0. ms

----is071168.bell-atl.com PING Statistics----
15 packets transmitted, 15 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/0/1


=> ping -s eweb.verizon.com 100 15
PING is097208.verizon.com: 100 data bytes
108 bytes from is097208.bellatlantic.com (138.83.130.129): icmp_seq=0. time=67. ms
108 bytes from is097208.bellatlantic.com (138.83.130.129): icmp_seq=1. time=54. ms
108 bytes from is097208.bellatlantic.com (138.83.130.129): icmp_seq=2. time=70. ms
108 bytes from is097208.bellatlantic.com (138.83.130.129): icmp_seq=3. time=83. ms
108 bytes from is097208.bellatlantic.com (138.83.130.129): icmp_seq=4. time=57. ms
108 bytes from is097208.bellatlantic.com (138.83.130.129): icmp_seq=5. time=49. ms
108 bytes from is097208.bellatlantic.com (138.83.130.129): icmp_seq=6. time=50. ms
108 bytes from is097208.bellatlantic.com (138.83.130.129): icmp_seq=7. time=53. ms
108 bytes from is097208.bellatlantic.com (138.83.130.129): icmp_seq=8. time=79. ms
108 bytes from is097208.bellatlantic.com (138.83.130.129): icmp_seq=9. time=55. ms
108 bytes from is097208.bellatlantic.com (138.83.130.129): icmp_seq=10. time=54. ms
108 bytes from is097208.bellatlantic.com (138.83.130.129): icmp_seq=11. time=60. ms
108 bytes from is097208.bellatlantic.com (138.83.130.129): icmp_seq=12. time=63. ms
108 bytes from is097208.bellatlantic.com (138.83.130.129): icmp_seq=13. time=60. ms
108 bytes from is097208.bellatlantic.com (138.83.130.129): icmp_seq=14. time=59. ms

----is097208.verizon.com PING Statistics----
15 packets transmitted, 15 packets received, 0% packet loss
round-trip (ms) min/avg/max = 49/60/83


=> ping 151.200.24.93
no answer from 151.200.24.93


=> ping -s 151.200.24.93 100 15
PING 151.200.24.93 100 data bytes

----151.200.24.93 PING Statistics----
15 packets transmitted, 0 packets received, 100% packet loss


Ex 9:
If you have access to a system with TCP/IP protocols, use TRACEROUTE to determine what machines participated in sending your message from your machine to a designated other host.

C:\>tracert is071168

Tracing route to is071168.verizon.com [151.200.242.11]
over a maximum of 30 hops:

  1  <10 ms  <10 ms  <10 ms  phlapago_d02m1.verizon.com [151.200.5.3]
  2  <10 ms  <10 ms    20 ms  is071168.verizon.com [151.200.242.11]

Trace complete.


C:\>tracert eweb.verizon.com

Tracing route to is097208.verizon.com [138.83.130.129]
over a maximum of 30 hops:

  1    10 ms    10 ms    10 ms  phlapago_d02m1.verizon.com [151.200.5.3]
  2  <10 ms    10 ms    10 ms  frhdnjma_c01m1.verizon.com [151.200.103.66]
  3  <10 ms    10 ms  <10 ms  frhdnjma_c02m1.verizon.com [151.203.17.23]
  4  <10 ms    10 ms    10 ms  ir001302.verizon.com [141.152.170.8]
  5  <10 ms    10 ms    10 ms  ir001014.verizon.com [141.152.240.130]
  6  <10 ms    20 ms    10 ms  ir001015.verizon.com [141.152.113.194]
  7    10 ms    21 ms    10 ms  nycmnyps_cb1.verizon.com [198.23.9.6]
  8    20 ms    20 ms    30 ms  burlmasb_cb1.verizon.com [166.68.200.5]
  9    21 ms      *         20 ms  192.168.134.138
10    40 ms    40 ms    40 ms  burlmasb_f01m2.verizon.com [192.168.130.230]
11    30 ms    20 ms    30 ms  burlmasb_fb2.verizon.com [192.168.149.129]
12    30 ms    50 ms    30 ms  burbed-7513iwb02fa1-1-02.interwan.gte.com [138.83.97.118]
13    40 ms    30 ms    50 ms  burbed-8540iwb02fa1-0-01.interwan.gte.com [138.83.97.38]
14    70 ms    50 ms    60 ms  ftwicc-8540iwb01fa0-0-2.interwan.gte.com [138.83.1.118]
15    80 ms    60 ms    60 ms  ncfwvp01-ftwyin.interwan.gte.com [138.83.130.129]

Trace complete.