You are on page 1of 11

http://cse.svpcet.org/downloads/cv-cse-np-bits-118.pdf (bits with answers) CSE/NP- BITS 1.

The TCP option used to prevent data corruption caused by old delayed or duplicated segments is__________. a)Mss b) timestamp c)Window scale d)byte manipulation. 2.TCP sequences data by associating a ________with everybyte that it sends. a)synchronous number b)sequence number c) assynchronous no d)socket no. 3.In TCP 3-way handshake min. no.of packets required are_____. a)1 b)2 c)3 d)0. 4.IPV6 provides packet delivery service for_______. a)TCP b)UDP c)SCTP d)ICMP. 5.A common way to describe the layers in a network. a)ISO b)OSI c)MTU d)IP. 6.DLPI also provides access to _______layer. a)physical b)datalink c)network d)transport. 7.TCP is a___protocol. a)complex b)unreliable c)connection oriented d)both a and c 8.UDP is a ______protocol.[PR] a)complex b)unreliable c)connection oriented d)both a and c 9.TCP establishes connection using ____way handshake and terminates using ___packet exchange. a)3,4 b)2,3 c)4,3 d)3,2 10.___________ is diagnostic application that use ICMP. a)PING b)RIP c)TELNET d)SUN RPC 11._____ protocol handles error and control information between routers and hosts. a)SCTP b)ICMP c)IGMP d)ARP.

12.The client issues an active open by calling___________. a)socket b)bind c)listen d)connect. 13.In TCP termination, the end that receives FIN performs _______. a)active close b)passive close c)active open d)passive open. 14._______layer of OSI participates in end to end communication. a)data link b)network c)transport d)physical. 15.The maximum size of an IPV4 datagram is ________. a)65,535B b)64KB c) 65,585B d)both a and b. 16.The smallest MTU in the path between two hosts is called______. a)ethernet MTU b)path MTU c)wireless MTU d)link MTU. NP BITS are present in a router .[@PR] a) 1 b) 3 c)4 d)7. 18.The minimum link MTU for IPV4 is ________. a)64B b)1280B c)68B d)1500B. 19.__________is not a part of a socket pair. a)foreign IP address b)local port c)foreign port d)Sequence number. 20.___________is broadcast address. a)0.0.0.0 b)1.1.1.1 c)255.255.255.255 d)both a&b. 21.A process sends messages into, and recives from, the network through its ____. a)link adapter b)socket c)physical link d)datalink. 22.________layers are present in a switch. a)1 b)2 c)3 d)7. 23.The version of the FAQ will only cover sockets of the_____family. a)AF_UNIX b)AF_INET c)I_LINGER d)so_LINGER 24.Sockets are either______ 117.______layers

a)connection less b)connection oriented c)both d)SIGPIPE 25.AF_UNIX is used for_____ a)UNIX IPC b)AF_INET c)FAQ d)AF_UNIX 26.shut down is useful for deliniating when you are done providing a request to a server by using_______ a)UDP b)TTCP c)TCP d)ARP 27.TCP guarantees all data transmitted when you close a socket,the server goes into a_______state a)TIME_WAIT b)REQUEST_STATE c)RESPONSE_STATE d)TIME_DELAY 28.Instead of Berkeley_derived implementations normally used for_______ a)60 sec b)80 sec c)120 sec d)30 sec [@PR] 29.In both select() and poll() are being standardised by_________ a)BSD/OS 2.1 b)POSIX 1003.lg c)RFC 1014 d)4.4 BSD 30.Non_unix systems may not allow______on sockets a)recv/send() b)get()/close() c)read()/write() d)send()/recv 31.A connection that has been closed by the one end to another ends TCP responds with an_____ a)RST b)FIN c)FQDN d)TTCP 32.In TCPOut- of-bound data is called as_______ a)main data b)in_band data c)priority_data d)urgent_data 33.The practical upshot of the binding a port number<1024 is reserved to processes having an NP BITS UID==________ a)node b)port c)root d)bind 34.______allows your server to bind to an address which is in a time_wait state a) so_reuseport b)so_reuseaddr c)inaddr_any d)inport_any 35.If you get a_____,it will be followed by two more characters. a)oxfb b)ox03 c)oxof3 d)oxff 2effective

36.on some stacks,apparently only those with multi cast support,i get duplicate incoming messages on the_____ socket. a)INADDR_BROADCAST b)INADDR_ANY c)SO_REUSEADDR d) SO_REUSEPORT 37.____must be used to multicast messages at the same time a)UDP b)TCP c)TTCP d)ICMP 38.UDP socket must be connected to receive_____ errors. a)TCP b)IP c)ICMP d)IGMP 39.LINUX will return them on ____ sockets a)connected b)inter connected c)un connected d)fully connected 40.TCP/IP implementations must support a minimum IP datagram size of _____ bytes a)65516 b)556 c)65517 d)576 41.TCP or UDP port number are always stored in the structure in network_____order a)bit b)byte c)char d)string 42.socket address structures are used only on a given_____ a)host b)client c)server d)port 43.The sockaddr_storage structure is defined by including the _____header. a)#define SIN6_LEN b)in_addr_t c) d) 44.The socket address structures all contain a____byte length field. a)256 b)2 c)1 d)232 45.Bind,connect and send to pass a socket address structure from the process to the_______ a)kernel b)o.s c)s/w d)h/w 46.The ifc_len member of the____ structure. a)sysctl b)ifconf c)sock addr_un d)sock addr_in6 47.Byte ordering used by a given system as the ____byte order a)client b)host c)server d)port

48.most internet standards use the term octet instead of byte to mean an ______quantity. a)8 bit b)4 bit c)8 byte d)4 byte 49.Berkely_derived functions the only one we use in this text is______ a)ANSIC b)bcopy c)bcmp d)bzero NP BITS ANSIC____function must be used when the fields overlap. a)memset b)memmove c)memcpy d)memcmp 51.The strptr argument to____ cannot be a null pointer. a)inet_pton b)inet_addrstrlen c)inet_ntop d)inet6_addrstrlen 52._____ is it requires the caller to pass a pointer to a binary address. a)sock_ntop b)inet_ntop c)af_inet d)sock_bind_wild 53.Most TCP/IP implementations provide echo server using ______ protocol A) TCP B) UDP C)both TCP, UDP D)ICMP 54._____ is used to read data from socket A)read B)writen C)readline D)fgets 55.______ function is used to write data to standard o/p [@PR] A)writen B) fputs C)fgets D)read 56.______ returns null pointer when it encounters EOF/error A)fputs B)fgets C) read D)readline 57.fgets and fputs are used in _____ function A)str_echo B)str_cli C)readline D)writen 58.If client & server are running on different hosts, then client host would display only _____ socket A)server parent B)server child C)client D)both server sockets 59._____ command is uses to check status and relationships of processes A)ps B)tcpserver01 C)netstat D)tcpcli01 350.The

60.PPID of child is _____ A)parents PID B)shell C)bash PPID D)PID of child 61.WCHAN column in ps command o/p shows tcp-data-wait condition when process is blocked in A)accept B)socket i/p or output C) terminal i/o D)connect 62.Terminal EOF character which terminates the client is A)D B)S C)control+D D)Z 63._______ function terminates by calling exit A)str_cli B)str_echo C)child function D)client main function 64.When readline returns 0, str_echo function returns to A)server child main B)client main C)str_cli D)server main 65.____ signal is sent to server when server child enters Z state. A)SIGKILL B)SIGCHLD C)SIGSTOP D)SIG_IGN NP BITS cannot be ignored by setting its disposition to SIG_IGN A)SIGCHLD B)SIGKILL C) SIGSTO D)both b&c 67.When signal being caught is SIGALRM, then ____ is set A)SA_RESTART B)SA_MASK C)SA_HANDLER D)SA_INTERRUPPT 68._____ is set to empty set to mean that no additional signals are blocked other than signal being caught A)SA_RESTART B)SA_MASK C)SA_HANDLER D)SA_INTERRUPT 69._____ is used to selectively block and unblock a set of signals A)SA_MASK B)SIGKILL C)SIGSTOP D)SIGPROCMASK 70.Berkeley derived implementations never automatically restart _____ function A)select B)accept C)recvfrom D)read 71._____ value of PID says to wait for first of our children to terminate in waitpid function 466.Signal that

A)0 B)-1 C)1 D)-2 72._______ must be coded correctly using waitpid to prevent any Zombies from being left around A)SIGCHLD B)SA_HANDLER C)STR_CLI D) SA_INTERRUPT 73.When a process writes to socket that has received an RST, ______ signal is sent to process A)SIGCHLD B)SIGPIPE C)SIGKILL D)SIG_IGN 74.Assuming server host is crashed and if there were no responses at all to clients data segment, then error is [@PR] A)EHOSTUNREACH B)ECONNABORTED C) ETIMEDOUT D)ENETUNREACH 75.Berkeley derived implementations retransmit data segments ____ times A)13 B)10 C)11 D)12 76.Even if the client is no actively sending data, techniques used to detect crashing of server host is[@PR] A)ECONNRESET B)SO_KEEPALIVE C)WNOHANG D)ETIMEDOUT 77.When a UNIX system is shutdown, init process normally sends _____ signal to all processes first A)SIGKILL B)SIGSTOP C)SIGTERM D)SIGCHLD 78._____ function is used in our client to detect termination of server process as soon as it occur[@PR] A)select B)poll C)both a & b D)accept 79.________ option must be specified in order to tell waitpid not to block if there are running children that have not yet terminated A)ETIMEDOUT B)WNOHANG C)SO_KEEPALIVE D)SIGTERM 80.POSIX way to establish the disposition of a signal is to call ____ function NP BITS B)SIG_INT C)sigaction D)SIG_DFL 5A)signal

81.UNIX signals are {@PRS} A) Queued B)not queued C)stacked D)None 82.Which of the following is not a choice for the disposition of signal when sigaction function is called A)SIG_IGN PR B)SIG_DFL C)handler D)SIGCHLD 89.____________ is the process in which application sits in a loop calling recvform on a non blocking descriptor. a) Select b) polling c) both d) blocking I/O 90. Error is returned instead of putting the process to sleep in ___Model a) Blocking I/O b) Non blocking I/O c) Signal driven I/O d) asynchronous I/O 91. The signal which is used to tell that descriptor is ready is ________ a) Select PR b)Ewould block c) SIGIO d) str-cli 92.For wait forever condition the time out pointer in the select function is declared as_________ a)always true PR b)always false c)zero d)null 93.The macro word void FD_CLR(int fd,fd_set *fdset) indicates ____ a)clear all bits in fd set b)turn on the bit for fd in fd set c)turn off the bit for fd in fd set d)none 94.If a descriptor is not ready then all the bits in the descriptor are____ a)clear PR b)set to garbage value c)set to initial value d)set to null value 95.A write operation on the socket will generate _____after the write half connection is closed a)SO_RCVLOWAT b)SIGIO c)SIGPIPE d)str_cli 96.The operation of close depends on the value of _________[@PR] a)STR_CLI b)SO_LINGER c)stdine of d)ping program 97.By default all sockets are_____ a)blocking b)Non-blocking c)synchronous d)asynchronous

98.The result testing of existing client connection by checking descriptors is returned by_____ a)str_cli b)poll c)select d)both b&c 99.The solution to the denial of service attack is_________ 1)use Non-blocking I/O 2)identify the identity of client before accepting state 3)place a time out a)only 3 b)both 1&2 c)both 1&3 d) all the above 100.The signal mask is used to ____ a)to test the global variables b)disable the delivery of certain signals c)both 1&2 d)none 101.In poll ___________is considered priority band. NP BITS error b)TCPs out of band data c)regular TCP data d)all the above 102._______is called to wait for new connections or existing connection[@PR] a)poll b)pselect c)select d)none 103.If the time out is INFTIM then it describes a)wait for certain period b)wait for ever c)return immediate d)none 104.__________function is the posix way to set a socket for non-blocking I/O a)get sockopt b)setsockopt c)fcntl d)ioctl 105.________option in TCP gives detailed information about all the packets sent and received a)SO_BROADCAST b) SO_DEBUG c)SO_LINGER d)SO_KEEPALIVE 106.______socket option specifies how the close function operates in connection oriented protocol a)SO_CLOSE b)SO_LINGER c)SO_DEBUG d)none 107.In the function if close ,1_onoff=0 then its functionality will be__ a)no more receives on the socket b)no more sends on the socket c) descriptor reference will be -1 d)both a&b 108.Bandwidth delay product is [@PR] 6a)the presence of

a)bandwidth*RTT b)bandwidth*time to leave c)both a&b d)none 109.The receive low_watermark and send low_watermark are used by a)select b)poll c)pselect d)all 110.________allows a listening server to start and bind its well known port a)SO_RCVLOAMAT b)SO_SNOLOWAT c)SO_SNDTIMO d)SO_REUSEADDR 111.___is used with multicasting to allow some application to run many times on same host a)so_RESUSEPORTS completely duplicate binding b)so_REUSEADDR completely duplicate binding c)both a&b d)none 112.___option specifies the receive IPv6 routing header is returned as ancillary data by recvmsg a)IPv6_RTHDR b)IPv6_NEXTHOP c)IPv6_PKTINFO d)IPv6_HOPOPTS 113.________option specifies that any received IPv6 destination options are to be returned as ancillary data by recvmsg a)IPv6_RTHDR b)IPv6_NEXTHOP c)IPv6_PKTINFO d)IPv6_DSTOPTS 114.____TCP option specifies the amount of time in seconds before a connection is closed a)TCP_keepalive b)TCP_MAXRT c)TCP_MAXSEG d)TCP_NONDELAY 115.The common generator of smaller packet(s) is/are a)Rlogin client b)TELNET client c)both a&b d)none NP BITS 7116._______option automatically terminates half open connection a)SO_KEEPALIVE b) SO_LINGER c)SO_REUSEADDR d)none 117.Non-blocking I/O can be set using ______command a)F_SETFLAG b)F_SETFL c)f_SETOWN d)F_GETDOWN 118.If a socket creates a socket then a)it has no owner

b)inherits the owner of the socket by which it is created c)it has default owner d)none NP BITS 8

You might also like