Solve_2008_2006

download Solve_2008_2006

of 28

Transcript of Solve_2008_2006

  • 7/31/2019 Solve_2008_2006

    1/28

    SYSTEM SOFTWARE&

    ADMINISTRATION

    2006 SOLUTION1.A)STATE WHETHER THE STATEMENTS ARE TRUE OR FALSE:

    i)Two pass assembler is used to remove the problem of forward referencing.(T)ii)There are 6 run levels available in Linux.(F)iii)Kernel is loaded before the boot strap loader is loaded.(F)iv)Assembler always generates machine dependent codes.(T)v)fsck command is used to format the file system.(F)

    1.B)GIVE ANSWERS IN BRIEF OF THE FOLLOWING:a)What is the full form of DLL file?Ans.Dynamic Link Library.b)What is inode?

    Ans.An inode is a data structure on a filesystem on Linux and other Unix-like operating systems that storesall the information about a file except its name and its actual data. When a file system is created inUNIX, a set amount of inodes is created, as well. Usually, about 1 percent of the total file system diskspace is allocated to the inode table.

    c)How ext2 file system differs from FAT32 file system?Ans.:ext2 was designed to make it easier for new features to be added, so that it can constantlyevolve into a better file system. Users can take advantage of new features withoutreformatting their old ext2 file systems. ext2 has theadded bonus of being designed to be

    POSIX-compliant.

    FAT is one of a few different file systems used with Windows over the years.Almostevery computer user has used FAT at one time or another, since it was the sparse baseoperating system at the heart of all Windows operating systems.FAT was originally created forQDOS and used on 360K (double density, double-sided) floppy disks. Its address space hassince been extended from 12 bit to 32 bit, so it can handle very large file systems.

    d)Why /etc/hosts file is used?Ans.Linux gives us the ability to store a list of hostnames and their corresponding IP addresses in

  • 7/31/2019 Solve_2008_2006

    2/28

    /etc/hosts, so that we dont have to look them up in DNS every time we use them. While weshouldnt do this with every hostname we ever use, one of the advantages gained byconfiguring often-used hostnames in this way includes the ability to alias a fully qualifiedhostname to a shorter version of itself.We should put the hostnames and IP addresses of allour monitored servers in /etc/hosts. Thisway, our monitoring software looks into /etc/hosts toget the proper IP addresses, instead of relying on DNS.

    e)What is the name of the daemon used in DNS configuration in Linux?

    Ans.BIND(Berkeley Internet Name Daemon)

    MODULE-I2.a)Describe the process of 2-pass assembler using flowchart.

    Ans.Explained in Note PNO-15

    b)Why 2-pass assembler is used instead of 1-pass assembler?Ans.Module-1 notes (page 13 q.6).

    c)What are the functions of POT & MOT?

    Ans..

    POT : POT stands for Pseudo-Operation Table.It indicates the symbloic mnemonic and actionto be taken for each pseudo-op in Pass-1 and Pass-2.

    MOT : MOT stands for Machine Operation Table.It indicates the symbolic mnemonic for eachinstruction and its length.

    d)Why different tables are used for handling literals and symbols?Ans. It is used to store the literals that are encountered during the processing and itscorresponding location value. Whereas the Symbol Table is used to store the label and its

    corresponding value prepared by Pass-I.

    3.a)Describe the basic difference between MACRO and subroutine.Ans. A macro represents a commonly used group of statements in the source programminglanguage. The macro processor replaces each macro instruction with the corresponding groupof source language statements. This is called expanding the macros.Whereas a subroutine is a group of instructions that performs a well-defined task when it iscalled.

  • 7/31/2019 Solve_2008_2006

    3/28

    3.b)Describe the algorithm using using flow charts to expand macro statements(sequential) used in assembly language program.Describe the difficulty faced when nestedmacro definition or macro call within macro is used.Ans. IN THE NOTE PNO-5

    3.c)What is compile-and-go loader?How does it differ from absolute loader?Ans. One method of performing the loader functions is to have the assembler run in one part ofmemory and place the assembled machine instructions and data,as they are assembled directlyinto their assigned memory locations. When the assembly is completed,the assembler causes atransfer to the starting instruction of the program. Such a loading scheme is called compile-and-go loader. It is relatively easy to implement. The assembler simply places the code into coreand the loader consists of one instruction that transfers to the starting instruction of the newlyassembled program.Absolute loader is the simplest type of loader scheme. In this case,the assembler outputs themachine language translation of the source program in almost the same form as in the 'compile-

    and-go' loader,except that the data is punched on objects instead of being placed directly inmemory. The loader in turn simply accepts the machine language text and places it into core atthe location prescribed by the assembler. These are simple to implement. It must be specified tothe assembler the address in the core where the program is to be loaded. If there are multiplesubroutines,the address of each must be remembered and must be used explicitly in othersubroutines to perform subroutine linkage.

    4.a)Describe the functions maintained by the system administrator.Ans.i)Installing and configuring servers.:Whenever a server is connected to outside one'sphysical control,security issues arise.One wants users to have secure access to the things they

    need but at the same time not let the system open up to the whole world.

    ii)Installing and configuring application software.:Although it is possible for individualusers to install some applications intheir home directories drive space set aside for their own files andcustomizations these applications may not be available to other users withoutthe intervention of the user who installed the program or the systemadministrator. Besides, if an application is to be used by more than one user, itprobably needs to be installed higher up in the Linux file hierarchy, which is a

    job that only the system administrator can perform.

    iii)Creating and maintaining user accounts.Not just anyone can show up and log on to a Linux machine. An account must

    be created for each user and no one but the systemadministrator can do this.

    iv)Backing up and restoring files.there is considerable need to back up important files so that the system can be up andrunning again with minimal disruption in the eventof hardware, security, or administration failure. Only the system administratormay do this.

    v)Monitoring and tuning performance.On a modern standalone system, Linux runs pretty quickly. If it doesnt,theres something wrong something the system administrator can fix.System tuning is an

  • 7/31/2019 Solve_2008_2006

    4/28

    ongoing process aided by a variety of diagnostic andmonitoring tools. Some performance decisions are made at installation time,while others are added or tweaked later.

    vi)Configuring a secure system.The system administrators task,first and foremost, is to make certain that no data on the machine or network islikely to become corrupted, whether by hardware or power failure, misconfiguration

    or user error (to the extent that the latter can be avoided), or malicious orinadvertent intrusion from elsewhere.

    4.b)Using GRUB as the boot loader and assuming all the required files are in the /bootdirectory describe the process of loading the kernel and starting the OS.

    Ans.When we turn on our PC it runs a program called the basic I/o system(BIOS).The BIOS isthe only way to communicate with the system components until the OS is up and running andable to take over system management functions.After the BIOS loads,it performs some diagnosis on the system hardware,checks the installedcomponents to be sure they are functioning and checks the system RAM.Next the BIOS tries to find a system drive from which it can load the boot program to begin theprocess of starting the OS.We can specify the search order for the drives by the settings in the system BIOS configurationwhich we can typically access by entering some key combiinations while the system isperforming its POST(power on self test).The master IDE device is the frist drive to boot.The first sector of the drive has an area calledthe MBR(master boot record) which holds the program that is used to begin the actual loadingof the OS.As soon as the BIOS finds the MBR,it gives up control of the boot process.A bootloader begins the loading of the OS.The boot loader program used is called GRUB.The GRUB program uses a 2 step process to begin loading the OS.these two steps are typically

    refered to as stage one and two.In stage one a program on the MBR is used to find the secondstage program that will begin the process of loading the OS into the system memory.GRUBuses a configuration file called /boot/grub/grub.conf to provide information to the second stageloader.The next step in the boot process is the actual loading of the kernel.The kernel is alwayslocated in the /boot directory.GRUb has one more task to do and that is to load a ramdisk image called initrd that has thesame version number as the kernel we are going to load into system memory.initrd loads anyspecial drivers that might be needed by the kernel to load the OS.The first thing the kernel does after taking over from GRUB is to prepare the system memory

    for use.Next,all system hardware is probed and configured if possible.The kernel uncompressesthe initrd in RAM,mount it as a ramdisk and then runs linuxrc in the ramdisk.this can be acommand file like a regular rc file or a symlink to init on initrd.If the former it runs thecommands in there,sets the real root device at the end and returns the commands in /etc/inittabon the ramdisk like amy other Linux boot process.Initrd files use /Linux as a command script,the initrd and its linux scripts are very importantnow a days because that's what mounts /proc,/sys,/dev/shm,starts udev and hotplug,insmodsspecial drivers such as SCSI drivers.Most of the time the kernel is able to auto-detect and

  • 7/31/2019 Solve_2008_2006

    5/28

    configure hardware devices but sometimes especially with new devices,the kernel can'tproperly configure them.After the kernel has configured all the system devices and mountedthe system drives,it runs the /sbin/init command.The /sbin/init command is the first system process that runs after the kernel has configured thesystem devices and mounted the system drives.the /init program is like a project manager of thesystem because it manages the remaining staps of booting the system and is the parent or grand

    parent of all the rest of the automatically started system boot processes.Basically the initprogram co-ordinates the order of the many scripts ,it will run to complete system set up.Thefirst script init runs is the /etc/rc.d/rc.sysinit script.This script starts system swap,checks the filesystem and performs other system initialization.Then the init command refers to the /etc/inittabscript to get information about how to start the system,which system initialization script to runand bring the system to the runlevel indicated in the intatb script.After a typical installation thedefault run level is set to runlevel 5.

    4.c)How to change the current run level of a system without restarting the machine?

    Ans.i)open the /etc/initab file which contains the default runlevel of a system.ii)edit the line that says 'id:5:initdefault'.Here 5 indicates that the current runlevel is set to 5.iii)put any run level desired in place of 5.Put the desired runlevel value in place of 5.Now therunlevel will be changed.Setting the default runlevel to 0 or 6 is strictly prohibited.iv)save and close the file.Make the changes permanent.v)run level will changed to the modified value.

    4.d)How to boot the machine in sigle user mode from LILo boot loader prompt?ANS.

    At the LILO boot prompt if graphical LILO is used then first following key combination[CTRL] & [-] & [x]needs to be pressed. This should be done to exit the graphical screen and go to the boot: prompt.In the boot prompt following command is used to enter as a single user mode from LILO boot loaderprompt.

    Boot : linux single

    4.e)Describe the functions of runlevel 3,4,5 and explain what will happen if the default runlevel is set to 6 or 0.

    ANS. run level 3 Full multiuser mode(with TUI)run level 4 Not used.Run level 5- Full multiuser mode with GUI.

    The task of run level 6 is to rebbot the system and that of run leve 0 is to halt the system.Thatswhy it is advised not to set the default run level set to these two values.

    5.a)Create the user with the following configuration:user name : test

  • 7/31/2019 Solve_2008_2006

    6/28

    password : test 123user id : 1000group id : 1000 (create the group first)home : /home/testlogin shell : /bin/bash

    Ans. To add a user with the given parameters we have to create the group with id 1000:groupadd -g 1000 mygroup

    Now we can add the user as follows:useradd -g mygroup -p test123 -s /bin/bash -u 1000 test

    OPTIONS DESCRIPTIONS-g group Sets the user's primary group membership or login group to 'group'-p passwd Sets the account password to the encrypted password passwd.-s shell Sets the user's default shell to shell.-u uid Sets the user's uid which must a unique number(by default the name of the home directory would be /home/test)

    5.b)Describe the format used used in /etc/passwd and /etc/shadow file.

    Ans. In /etc/passwd there are 7 fields in each row separated by : s.The fields are as follows:i)user name ii)password iii)user id iv)group id v) uidgid (for user related comments)

    vi) user home address vii)user shell addressOn the other hand the /etc/shadow file stores secure user account information.This file containsthe following fields separated by : s:-i)The account nameii)The account's encrypted password

    iii)The number of days since jan 1,1970 that the password was last changed.iv)The number of days permitted before the password can be changed.v)The number of days after which the password must be changed.vi)The number of days before the password expires that the user is warned the account willexpire.vii)The number of days after the password expires before the account is disabled.viii)The number of days since jan 1,1970 after which the account is disabled.ix)Reserved for future use.

    5.c)Configure the ethernet interface with the following parameters:IP address: 10.10.4.100 netmask: 255.255.0.0 using ifconfig.

    Ans.With root previleges,we have to open the terminal and type the following commands.#ifconfig 10.10.4.100 netmask 255.255.0.0 gateway 192.168.1.10

    #service network restartThe ethernet interface will be up and running after this.Graphical method:Using the Network Configuration tool, we can easily make the necessarychanges. Start the Network Configuration tool as follows:

  • 7/31/2019 Solve_2008_2006

    7/28

    1. In Enterprise Linux choose Applications System Settings Network.In Fedora Core 4 choose Desktop System Settings Network.2. Highlight the device that we want to modify, and then click Edit (onthe toolbar).3. The three tabs available from this dialog box are used for the following:s s General Here we can enter a nickname for the device and choosewhether the device is activated when the system starts. We can also

    choose to allow other users to be able to enable and disable thedevice. We can choose to obtain IP information automatically byusing DHCP, or we can manually enter the IP information for the device.s s Route Here we can enter static routes to other networks. Weneed to enter the network IP number as well as the gateway IP number.In most cases, we dont need to enter any information here ifwe are using DHCP.s s Hardware Device This tab contains information about the hardwareassociated with the Ethernet device. We can assign devicealiases here if we desire.

    5.d)Change the routing table of the required machines such that when 10.10.4.100 tries to

    connect to 10.10.4.102 it needs to go through 10.10.4.101.Ans.The route command is used to give the system a little more information aboutinterfaces.After the route command we have to specify the target netwok address,the netmaskand the gateway thrugh which the communication will be accomplished.Here for the givenparameters the following command has to be used:route add -net 10.10.4.0 netmask 255.0.0.0 gw 10.10.4.101

    5.e)How to mount the CDROM drive using mount command?Ans.The necessary command is:#mount /dev/cdrom

    The /dev/* files are special files that are used to recognize devices.The CDROM drive ismounted under this /dev directory with the command 'mount'.Likewise to unmount theCDROM drive we can use umount command.

    5.f)Change the permission of the file xyz.txt such that the file is accessible in read onlymode and others will not be able to access the file in any form.Ans. The permission of a file has 10 bits.First one is the sticky bit.Next owner(user),group andothers have 3 bits each.Now a file has 3 possible types of permissionread(r),write(w) andexecute(x) which can be represented by those 3 bits.4 represents read permission(100),2represents write permission(010) and 1 represents execute permission(001).0 represents thewithdrawal of all permissions.The following command provides the necessary permissionsneeded for xyz.txt file.The chmod command is used for this purpose.#chmod 440 xyz.txt

    5.g)What is swap space and virtual memory?How do they differ from each other?

    Ans.A systems virtual memory is a combination of the available random access memory(RAM) and disk space. Portions of the virtual memory are reserved as swap space. Swap

  • 7/31/2019 Solve_2008_2006

    8/28

    space can be defined as a temporary storage location that is used when systems memory

    requirements exceed the size of available RAM.

    Swap slices are used as virtual memory storage areas when the system does not haveenough physical memory to handle current processes.

    The virtual memory system maps physical copies of files on disk to virtual addresses in memory.

    Physical memory pages which contain the data for these mappings can be backed by regular files in thefile system, or by swap space. If the memory is backed by swap space it is referred toas anonymous memory because there is no identity assigned to the disk space backing the memory.

    Solaris uses the concept of virtual swap space, a layer between anonymous memory pages and thephysical storage (or disk-backed swap space) that actually back these pages. A system's virtual swapspace is equal to the sum of all its physical (disk-backed) swap space plus a portion of the currentlyavailable physical memory.

    Virtual swap space has these advantages:

    The need for large amounts of physical swap space is reduced because virtual swap space doesnot necessarily correspond to physical (disk) storage.

    A pseudo file system called SWAPFS provides addresses for anonymous memory pages.Because SWAPFS controls the allocation of memory pages, it has greater flexibility in decidingwhat happens to a page. For example, it might change the page's requirements for disk-backedswap storage.

    6.a)What are the different methods of attack possible in networked environment?

    Ans.Attack takes place at the application layer or at the network layer of ISO/OSI referencemodel.Attacks are generally of two types :

    i)PASSIVE ATTACK:Pasive attacks are those where the attacker aims to obtain information that is in transit.The termpassive attack indicates that the attacker does not attempt to perform any modifications to theoriginal data.It is hard to detect as it does not involve any alternation of data.So,it does notaffect the system resources.ii)ACTIVE ATTACK:Active attacks are based on modifications of the original message in some manner or oncreation of a false message.The attacks can not be prevented easily.These attacks can be in theform of interruption,modification and fabrication.

    Intrerruption: Here unauthorized entity pretends to be another entity.

    Modification: Some portions of the message are delayed or recorded to produce anunauthorized effect.

    Fabrication:It causes denial of service attack which is an attempt to prevent legitimateusers from accessing some services which they are eligible for.

    Various types of attack are: Script kiddie,Denial of Service,Man -in -the -middle,Root kits.

  • 7/31/2019 Solve_2008_2006

    9/28

    6.b)Configure the firewall using iptables as follows:Machine will receive all incomingicmp packets (only echo request) from any source. It will reject all outgoing TCPconnections to a particular destination. It will only receive ftp connection from a specificmachine.Show the final configuration of each available chain.

    Ans.Step 1:(Configuring for the icmp packets)

    #iptables -A INPUT -p icmp -j ACCEPTStep 2:(Configuring for the outgoing tcp connections)

    #iptables -A OUTPUT -p tcp -d 192.168.1.102 -j DROPStep 3:(Configuring for ftp connection)

    #iptables -A INPUT -p ftp -S 172.16.1.0 -j ACCEPTHere the first command appends (-A) a rule to the INPUT chain which accepts(ACCEPT) allicmp packets(-p icmp).In other words this command will instruct the input chain to accept allthe packets that arrives with icmp protocol.-j indicates what action to take.The second command instructs the OUTPUT chain to drop all the TCP packets which areoutbound with a destination address of 192.168.1.102.

    The third command instructs the INPUT chain to accept (-j ACCEPT) all FTP packets (-p ftp)which are inbound from a source address (-S) of 172.16.1.0.

    6.c)What is IP accounting?How it helps the administrator to analyze the security threatsin a network?Ans. IP Accounting (Layer 3) collects the number of bytes and packets processed by the networkelement on a source and destination IP address basis. Only transit traffic that enters andleaves the router is measured, and only on an outbound basis. Traffic generated by the routeror traffic terminating in the router is not included in the accounting statistics. IP Accounting(Layer 3) collects individual IP address details, so it can be used to identify specific usersfor usage-based billing. To provide the operator with the opportunity of snapshotcollections in the network, IP Accounting (Layer 3) maintains two accounting databases:

    an active database and a checkpoint database. The active collection process always updatesthe active database and therefore constantly increments the counters while packets pass therouter. To get a snapshot of the traffic statistics, a CLI command or SNMP request can beexecuted to copy the current status from the active database to the checkpoint database. Thiscopy request can be automated across the network to be executed at the same time, and aNetwork Management application can later retrieve the accounting details from thecheckpoint database to present consistent accounting data to the operator. The checkpointdatabase offers a frozen snapshot of the complete network. Trying to achieve the sameresult by synchronously polling entire MIB tables across multiple network elements wouldintroduce some inaccuracies, and hence no real frozen snapshots. The collected data canbe used for performance and trending applications that require collections at regularintervals. The snapshot function is unique to IP Accounting.

    7.a)What is IP filtering?Describe with proper diagram how IP filtering can beimplemented in kernel for different types of traffic?Ans.

    IP filtering is simply a mechanism that decides which types of IP datagrams will beprocessed normally and which will be discarded. By discarded we mean that thedatagram is deleted and completely ignored, as if it had never been received. We can

  • 7/31/2019 Solve_2008_2006

    10/28

    apply many different sorts of criteria to determine which datagrams we wish to filter;some examples of these are:

    Protocol type: TCP, UDP, ICMP, etc.

    Socket number (for TCP/UPD)

    Datagram type: SYN/ACK, data, ICMP Echo Request, etc.

    Datagram source address: where it came from

    Datagram destination address: where it is going to

    Consider how a Unix machine, or in fact any machine capable of IP routing, processes IPdatagrams. The basic steps, shown in Figure 9-2 are:

    Figure 9-2. The stages of IP datagram processing

    The IP datagram is received. (1)

    The incoming IP datagram is examined to determine if it is destined for a process on thismachine.

    If the datagram is for this machine, it is processed locally. (2)

    If it is not destined for this machine, a search is made of the routing table for an appropriateroute and the datagram is forwarded to the appropriate interface or dropped if no route can befound. (3)

    Datagrams from local processes are sent to the routing software for forwarding to theappropriate interface. (4)

    The outgoing IP datagram is examined to determine if there is a valid route for it to take, if not,it is dropped.

    The IP datagram is transmitted. (5)

    In our diagram, the flow 135 represents our machine routing data between a host on our Ethernet

    network to a host reachable via our PPP link. The flows 12 and 45 represent the data input andoutput flows of a network program running on our local host. The flow 432 would represent dataflow via a loopback connection. Naturally data flows both into and out of network devices. Thequestion marks on the diagram represent the points where the IP layer makes routing decisions.

    http://www.iitk.ac.in/LDP/LDP/nag2/x-087-2-firewall.filteringmethods.html#X-087-2-FIREWALL.METHODS.GRAPHIChttp://www.iitk.ac.in/LDP/LDP/nag2/x-087-2-firewall.filteringmethods.html#X-087-2-FIREWALL.METHODS.GRAPHIC
  • 7/31/2019 Solve_2008_2006

    11/28

    7.b)What is IP masquerade?

    Ans.

    IP masquerading allows you to use a private (reserved) IP network address on your LAN and have yourLinux-based router perform some clever, real-time translation of IP addresses and ports. When itreceives a datagram from a computer on the LAN, it takes note of the type of datagram it is, TCP,UDP, ICMP, etc., and modifies the datagram so that it looks like it was generated by the routermachine itself (and remembers that it has done so). It then transmits the datagram onto the Internet withits single connected IP address. When the destination host receives this datagram, it believes thedatagram has come from the routing host and sends any reply datagrams back to that address. When theLinux masquerade router receives a datagram from its Internet connection, it looks in its table ofestablished masqueraded connections to see if this datagram actually belongs to a computer on theLAN, and if it does, it reverses the modification it did on the forward path and transmits the datagramto the LAN computer.

    A simple example is illustrated in Figure 11-1.

    Figure 11-1. A typical IP masquerade configuration

    We have a small Ethernet network using one of the reserved network addresses. The network has aLinux-based masquerade router providing access to the Internet. One of the workstations on thenetwork (192.168.1.3) wishes to establish a connection to the remote host 209.1.106.178 on port 8888.The workstation routes its datagram to the masquerade router, which identifies this connection requestas requiring masquerade services. It accepts the datagram and allocates a port number to use (1035),substitutes its own IP address and port number for those of the originating host, and transmits thedatagram to the destination host. The destination host believes it has received a connection requestfrom the Linux masquerade host and generates a reply datagram. The masquerade host, upon receivingthis datagram, finds the association in its masquerade table and reverses the substution it performed onthe outgoing datagram. It then transmits the reply datagram to the originating host.

    The local host believes it is speaking directly to the remote host. The remote host knows nothing about

    the local host at all and believes it has received a connection from the Linux masquerade host. TheLinux masquerade host knows these two hosts are speaking to each other, and on what ports, andperforms the address and port translations necessary to allow communication.

    7.c)How Network address Translation helps the network users to use it efficiently and theadministrators to manage it?

    Ans. Network address translation is a netfilter feature that allows a firewall/gateway toalter the source or destination address of packets that pass through it.This is mostcommonly done to allow all traffic going out the gateway to apppear as though it is

    http://www.iitk.ac.in/LDP/LDP/nag2/x-087-2-ipmasq.html#X-087-2-MASQUERADE.NEThttp://www.iitk.ac.in/LDP/LDP/nag2/x-087-2-ipmasq.html#X-087-2-MASQUERADE.NET
  • 7/31/2019 Solve_2008_2006

    12/28

    coming from a single address.This reduces the number of routable IP addresses anorganization must purchase and also makes it more difficult for outsiders to learndetails about the number of machines on an internal network,the addressing schemeused therein and so forth.It is much easier to guard a single point of entry than it is togurad many potential points of entry.The principal behind the internal firewall is amachine that divides the network into the inside and outside with all traffic passingthrough the firewall.By protecting a single network firewall,the entire internal networkcan be protected.

    7.d)Write the command to reinitialize all the counters to NULL of IP accounting.

    Ans.The necessary command is:

    iptables -F

    According to the iptables command -F denotes the flushing operation.Providing -F asargument to iptables will reinitialize all counters.

    8.a)What is NIS?How it helps the administrator to manage the user in networkedenvironment?

    Ans.A common challenge facing administrators charged with maintaining a network ofLinux machines is sharing information across the network while maintaining that

    information centrally. The Network Information System(NIS) is one solution to such achallenge. Nis distributes information that needs to be shared throughout a Linuxnetwork to all machines that participate in the NIS domain.

    The information most commonly shared using NIS consists of user authenticationinformation,such as /etc/passwd,/etc/group.If users' password entries are accessible toall login hosts via NIS,any user can log in on any machine on the network that isrunning an NIS client.

    8.b)Describe the process of setting up the NIS server with proper domainselection. List the services also required to configure NIS.Configure NIS client.

    Ans.1)We need to change the domain name permanently. So,enter the following linein /etc/init.d/network file after the initial comments are over in that file.

    #set the NIS domain name

    domainname iiht

    2)Open the file /var/yp/Makefile and edit as follows:

    NOPUSH=true (if there are no slave servers)

    #nisdomainname

    nisdomainname [domain name]

    3.Specify the information for which databases have to be built:

  • 7/31/2019 Solve_2008_2006

    13/28

    109:all:passwd shadow group hosts

    4.NIs uses RPC to execute remote functions.In order for RPC request to work the targetsystem must have a way of converting RPS requests into a location of a program torun.This functionality is achieved thriugh portmap.Start the service.

    #service portmap start

    5.Start NIS server daemon

    #service ypserv start

    6.Once the NIS server is running,we can create maos or databases on the server for it toserve to nis clients.We use ypinit command to build maps on server.ypinit buildsdatabases for the server and places them in a sub-directory with the name of NISdomain under the sub-directory of /varyp.These databases built,are in .dbm format

    which may include /etc/passwd,/etc/networks file.

    Initiate the database for NIS server

    #/usr/lib/yp/ypinit -m (to specify this as master server)

    Check for any errors

    #/usr/lib/yp/ypinit -s 192.168.0.1 (to configure as a slave)

    7.Start the server passwrod daemon

    #service yppasswdd start

    8.start the NIS transfer daemon

    #service ypxfrd start

    9.Edit the file /var/yp/securenets that contains network number and netmask pairsthat define the list of hosts that are permitted to access NIS server maps.

    255.255.255.0 192.168.1.0

    10.edit /etc/sysconfig/network file to have nisdomain name permanently.

    NISDOMAINNAME=[FQDN]

    11.Daemon process should also be initialized at the boot time and this can be done asfollows:

    #chkconfig level 35 ypserv on

    #chkconfig level 35 yppasswdd on

    -->Services on NIS server: ypserv,yppasswd

    Services on NIS client: ypbind.

  • 7/31/2019 Solve_2008_2006

    14/28

    -->1.set up NIS domain name

    #nisdomainname [domain name]

    2.Open the file /etc/yp.conf and edit as follows:

    domain iiht server Linux

    domain iiht broadcast (to broadcast the client request)ypserver Linux or 192.168.1.0 (server's IP address)

    3.#authconfig

    or setup->Authentication configuration

    check[*] use nis Domain:...

    Server:...

    ->next Remove the * at the following options:

    [ ]use shadow passwords[ ]use MD5 passwords

    4.Enter the host entry in /etc/hosts file

    e.g. 192.168.0.1 Linux

    5.Start the client daemon

    #service ypbind restart

    6.Edit the /etc/nsswitch.conf file to configure order in which lookup is performed foruser and group authentication.

    passwd: nis files nisplus (first one must be nis)

    hosts: files nisplus dns (files means /etc/hosts)

    8.Edit /etc/sysconfig/network file to have nisdomain name permanently.

    NISDOMAINNAME=[domain name]

    9.#chkconfig level 35 ypbind on

    10.Reboot both the server and the clients.

    11.#ypwhich (to find NIS server to which the clients has bound.Communicates

    with ypbind and displays NIS server)

    #ypcat /etc/passwd (Displays the passwd file of nis domain)

  • 7/31/2019 Solve_2008_2006

    15/28

    8.d)Configure the NFS server with the following requirements:Machine 10.10.4.1is able to mount /home/test directory of the server in read only mode .Machine10.10.4.2 is able to mount /home/temp directory of the server in read-writemode.he range of machines 10.10.4.64 to 10.10.4.128 is able to mount /home inread-write mode.

    Ans.1)#service iptables stop2)#chkconfig iptables off

    3)OPen /etc/exports and edit as:

    /home/test 10.10.4.1(ro)

    /home/temp 10.10.4.2(rw,sync)

    /home 10.10.4.64-10.10.4.128(rw,sync)

    svae and close the file.

    4)#exportfs -a5)#service nfs start

    6)#chkconfig nfs on

    9.Write short notes on the following:

    i)DNS service and DNS server.

    Ans.The Domain Name System (DNS) is a hierarchical naming system built on a distributeddatabase for computers, services, or any resource connected to the Internet or a private network.

    Most importantly, it translates domain names meaningful to humans into the numerical identifiersassociated with networking equipment for the purpose of locating and addressing these devicesworldwide.

    An often-used analogy to explain the Domain Name System is that it serves as the phone book for

    the Internet by translating human-friendly computer hostnames into IP addresses. For example, the

    domain name www.example.com translates to the addresses 192.0.32.10 (IPv4)

    and2620:0:2d0:200::10 (IPv6).

    A DNS hosting service is a service that runs Domain Name System servers. Most, but notall, domain name registrars include DNS hosting service with registration. Free DNS hosting servicesalso exist. Many third-party DNS hosting services provide Dynamic DNS.

    DNS hosting service is better when the provider has multiple servers in various geographic locations

    that provide resilience and minimize latency for clients around the world.

    DNS can also be self-hosted by running DNS software on generic Internet hosting services.

    (Sir,can't precisely define DNS server)

    ii)Network Security and firewall

    Ans.(study material of network security)

  • 7/31/2019 Solve_2008_2006

    16/28

    iii)Directory structure in Linux

    Ans.

    The root directory. The starting point of your directory structure. This is where theLinux system begins. Every other file and directory on your system is under theroot directory. Usually the root directory contains only subdirectories, so it's a bad

    idea to store single files directly under root./Boot:As the name suggests, this is the place where Linux keeps information that itneeds when booting up. For example, this is where the Linux kernel is kept. If youlist the contents of /boot, you'll see a file called vmlinuz - that's the kernel.

    /etc:

    The configuration files for the Linux system. Most of these files are text files andcan be edited by hand. Some interesting stuff in this directory:/etc/inittabA text file that describes what processes are started at system bootup and during

    normal operation. For example, here you can determine if you want the X WindowSystem to start automatically at bootup, and configure what happens when a userpresses Ctrl+Alt+Del./etc/fstabThis file contains descriptive information about the various file systems and theirmount points, like floppies, cdroms, and so on./etc/passwdA file that contains various pieces of information for each user account. This iswhere the users are defined.

    /bin, /usr/bin:

    These two directories contain a lot of programs (binaries, hence the directory'sname) for the system. The /bin directory contains the most important programsthat the system needs to operate, such as the shells, ls, grep, and other essentialthings. /usr/bin in turn contains applications for the system's users. However, insome cases it really doesn't make much difference if you put the programin/bin or /usr/bin.

    /sbin, /usr/sbin:

    Most system administration programs are stored in these directories. In manycases you must run these programs as the root user.

    /usr:

    This directory contains user applications and a variety of other things for them,like their source codes, and pictures, docs, or config files they use. /usr is thelargest directory on a Linux system, and some people like to have it on a separatepartition. Some interesting stuff in /usr:/usr/docDocumentation for the user apps, in many file formats.

  • 7/31/2019 Solve_2008_2006

    17/28

    /usr/shareConfig files and graphics for many user apps./usr/srcSource code files for the system's software, including the Linux kernel./usr/includeHeader files for the C compiler. The header files define structures and constants

    that are needed for building most standard programs. A subdirectoryunder /usr/include contains headers for the C++ compiler./usr/X11R6The X Window System and things for it. The subdirectories under /usr/X11R6 maycontain some X binaries themselves, as well as documentation, header files,config files, icons, sounds, and other things related to the graphical programs.

    /usr/local:

    This is where you install apps and other files for use on the local machine. If yourmachine is a part of a network, the /usr directory may physically be on anothermachine and can be shared by many networked Linux workstations. On this kind

    of a network, the/usr/local directory contains only stuff that is not supposed to beused on many machines and is intended for use at the local machine only.Most likely your machine isn't a part of a network like this, but it doesn't meanthat /usr/local is useless. If you find interesting apps that aren't officially a part ofyour distro, you should install them in /usr/local. For example, if the app wouldnormally go to/usr/bin but it isn't a part of your distro, you should install itin /usr/local/bin instead. When you keep your own programs away from theprograms that are included in your distro, you'll avoid confusion and keep thingsnice and clean.

    /lib

    The shared libraries for programs that are dynamically linked. The shared librariesare similar to DLL's on Winblows.

    /home

    This is where users keep their personal files. Every user has their own directoryunder /home, and usually it's the only place where normal users are allowed towrite files. You can configure a Linux system so that normal users can't even listthe contents of other users' home directories. This means that if your familymembers have their own user accounts on your Linux system, they won't see allthe w4r3z you keep in your home directory. ;-)

    /root

    The superuser's (root's) home directory. Don't confuse this with the root directory(/) of a Linux system.

    /var

    This directory contains variable data that changes constantly when the system isrunning. Some interesting subdirectories:

  • 7/31/2019 Solve_2008_2006

    18/28

    /var/logA directory that contains system log files. They're updated when the system runs,and checking them out can give you valuable info about the health of yoursystem. If something in your system suddenly goes wrong, the log files maycontain some info about the situation./var/mail

    Incoming and outgoing mail is stored in this directory./var/spoolThis directory holds files that are queued for some process, like printing.

    /tmp

    Programs can write their temporary files here.

    /dev

    The devices that are available to a Linux system. Remember that in Linux, devicesare treated like files and you can read and write devices like they were files. Forexample, /dev/fd0 is your first floppy drive, /dev/cdrom is your CD

    drive, /dev/hda is the first IDE hard drive, and so on. All the devices that a Linuxkernel can understand are located under /dev, and that's why it contains hundredsof entries.

    /mnt

    This directory is used for mount points. The different physical storage devices (likethe hard disk drives, floppies, CD-ROM's) must be attached to some directory inthe file system tree before they can be accessed. This attaching iscalled mounting, and the directory where the device is attached is calledthe mount point.

    The /mnt directory contains mount points for different devices, like /mnt/floppy forthe floppy drive, /mnt/cdrom for the CD-ROM, and so on. However, you're notforced to use the /mnt directory for this purpose, you can use whatever directoryyou wish. Actually in some distros, like Debian and SuSE, the default is touse /floppy and /cdrom as mount points instead of directories under /mnt.

    /proc

    This is a special directory. Well, actually /proc is just a virtual directory, because itdoesn't exist at all! It contains some info about the kernel itself. There's a bunch ofnumbered entries that correspond to all processes running on the system, andthere are also named entries that permit access to the current configuration of the

    system. Many of these entries can be viewed.

    /lost+found

    Here Linux keeps the files that it restores after a system crash or when a partitionhasn't been unmounted before a system shutdown. This way you can recover filesthat would otherwise have been lost.

  • 7/31/2019 Solve_2008_2006

    19/28

    SOLUTION OF YEAR:2008

    GROUP A:

    1.i)a.EQUii)c.Direct linking loaderiii)a.Superblockiv)a.Mountv)c.Dumpvi)b.ddvii)a.ifconfigviii)a.The system is reachable

    ix)b.#ypinit -c barneyx)b.#ypinit -c backup

    GROUP B:

    2)LIST THE IMPORTANT TABLES AND DATA STRUCTURES OF A 2-PASS ASSEMBLER.Ans.The tables and data structures of a two-pass assembler used in pass-I are as follows:a)TABLES:i)Machine-Operation Table(MOT)-It indicates the symbolic mnemonic for each instruction and

    its length.ii)Pseudo-Operation Table(POT)-It indicates the symbolic mnemonics and action to be taken for each

    pseudo-op in pass-I.iii)Symbol Table(ST)-it is used to store each label and its corresponding value.iv)Literal Table(LT)-It is used to store each literal encountered and its corresponding assigned location.

    b)DATA STRUCTURES:

    i)Loaction counter(LC)-It is used to keep track of each instructions's location.ii)Input Source Programiii)A copy of the input to be used later by pass-II.The tables and data structures of a two pass assembler used in pass-II are as follows:a)TABLES:i)Machine-Operation table(MOT)-It indicates symbolic mnemonic,length,binary machine opcodeand format for each instruction.ii)Pseudo-Operation Table(POT)-It indicates for each psuedo-op the symbolic mnemonic and the actionto be taken by pass-II.iii)Symbol Tbale(ST)-It contains each label & its corresponding value prepared by pass-I.iv)Base Table(BT)-It indicates which registers are currently specified as base registers by using pseud-ops & what the specified contents of these registers are.

  • 7/31/2019 Solve_2008_2006

    20/28

    b)DATA STRUCTURES:i)Location Counter(LC)-It is used to keep track of each instruction's location.ii)Copy of source program input to pass-I.iii)A work-space INST-It is used to hold each instruction as its various parts are being assembletogether.iv)A wrok-space PRINT LINE- It is used to produce a printed listing.

    v)A work-space PUNCH CARD-It is used prior to actual outputting for converting the assembleinstructions into the format needed by the loader.vi)An output deck of assembled instructions in the format needed by the loader.

    3)HOW WILL YOU SEE THE CURRENT RUN LEVEL OF YOUR SYSTEM?STATE THEDIFFERENT RUN LEVELS AVAILABLE.HOW IS 'INIT' RELATED TO RUNLEVEL?

    ANS.To see the current run level of the system,we need to type the following command:

    # who -r-->Run levels define what services or processes be running on the system.The run levels of a Linuxsystem are:

    0 Halt system(to shutdown the system)1 Single user mode2 Multiuser mode (without NFS)3 Full multiuser mode(text based)4 Unused5 Multiuser mode with GUI.6 Reboot system

    The /etc/inittab file has information on which run level to start the system at and lists the processes tobe run at each run level.-->INIT scripts determine which programs start up at boot time.Red Hat & other Unix distros havedifferent run levels.So,there are a different set of programs that are started at each run level.The systemboots into the default run level set in /etc/inittab file.

    4)What is the working principle of DNS server?

    Ans.Name address resolution is, simply stated, the conversion of people friendly names intocomputer friendly numbers.IP address is expressed as a group of numbers referred to as adotted quad group. These groups of numbers present no problem to the computers in thenetwork, but it is difficult for humans to remember many groups of numbers. So, we need tobe able to enter names and then have these names converted into numbers. Each time we

    type a Web sites address into your browser, the Domain Name System (DNS) goes to work.We enter names that are easy for us to remember, and the names are resolved into numbersthat computers find easy to understand. Enabling efficient human/machine interaction is thefunction of name address resolution.The Domain Name System,provides this name addressresolution. Large domains may be further broken down into subdomains. For example, thetactechnology site is www.tatctechnology.com. Perhaps the accounting department runs theirown Web server. To find their Web server, tactechnology contains the subdomainacct.tactechnology.com. An individual computer in the accounting department also has ahostname, for example, payables. The complete name for this computer is thenpayables.acct.tactechnology.com, and we can find its IP address by using the DNS to look it

  • 7/31/2019 Solve_2008_2006

    21/28

    up. When we type in a hostname, our system uses its resources to resolve names into IPaddresses. One of these files is /etc/nsswitch.conf (nsswitch means name service switch),which contains a line telling the system where to look for host information. The informationfollowing the word hosts tells the system to first look at the local files, and then to use theDomain Name Service (DNS) to resolve the names into IP numbers. One of the local filessearched is the /etc/hosts file. The hosts file contains IP addresses and hostnames that weused on our sample network.We could do so on a small internal network that we controlled

    and that did not have very many IP addresses. But, the hosts file is not a manageable solutionon a large network, because it is an impossible task to keep it up to date. We could not havecontrol over every IP address. After the system looks in the hosts file and fails to find theaddress, the next file checked is /etc/resolv.conf. This file contains the IP addresses ofcomputers that are known as domain name servers, and these are listed in /etc/resolv.conf as

    just name servers.

    5)WHAT IS I-NODE?WHAT IS SHADOW PASSWORD?WHAT IS SUBNET-MASK ORNETMASK?

    Ans.-->An i-node is a data structure of Linux file system.I-node has the following contents:group id,file type,access node(permission),modification time,data access time,number of hard disk,size

    of the file.-->The shadow password is contained in /etc/shadow file.The /etc/shadow file stores actual passwordsin encrypted format for user's account with additional properties related to user password,i.e.it storessecure user account information.All fields are separated by a colon(:) symbol.It contains one entry perline for each user.The fields in each line are as follows:user name,password,last password change,minimum,maximum,warn,inactive,expire.-->A netmask is a 32-bit number used to divide an IP address into subnets and specify the

    networks available hosts.If an ip address is x.y.z.t/n then n leftmost bits of the mask are 1s and32-n rightmost bits are 0s.A netmask helps us to find the netid and the hostid.

    6)WHAT IS DAEMON?WRITE TWO DAEMONS AND ITS UTILITY.WHAT IS THE

    MACROPROCESSOR?WHY WE USE THIS?

    Ans.-->A daemon is a computer program that runs in the background,rather than under thedirect control of a user.Typically,daemons have names that end with the letter 'd' e.g. syslogd.-->Two daemons are as follows:i)initd initial process daemon.ii)kerneld automaticallyloads and unloads kernel modules.

    -->A macroprocessor is a program that copies a stream of text from one place to

    another,making a systematic set of replacements as it does so.Macroprocessors are oftenembedded in other programs such assemblers and compilers.-->i)The processor stores the macro instruction definitions.ii)The processors reorganizes macro calls that appear as an operation mnemonic.iii)The processor substitutes dummy or macro definition arguments from a macro call.

    GROUP C:

    8)a)What do you mean by firewalling?Classify firewalls.State which type is effective on a

  • 7/31/2019 Solve_2008_2006

    22/28

    particular situation.Explain in breif the details of command ipfwadm.

    Ans.It is a software that acts as a security filter that can restrict types of networkcommunication.Most often used between a LAN and Internet.In order to provide some level ofseparation between an organization's intranet and internet,firewalls have been employed.A

    firewall is simply a group of components that collectively form a barrier between twonetworks.--> Ther are two basic types of firewalls as follows:1.Application Gateways:The first firewalls were application gateways and are sometimes known as proxygateways.These are made up of bastion hosts that run spaecial software to act as a proxyserver.this software runs at the Application Layer of ISO/OSI Reference model,hence thename.Clients behind the firewall must be proxitized in order to use internetservices.Traditionally these have been the most secure,because they don't allow anything topass by default but need to have the programs written and turned on in order to begin passingtraffic.

    2.Packet Filtering:Packet Filetering is a technique whereby royters have ACLs turned on.By Default a router willpass all traffic sent it,and will do so without any sort of restrictions.Employing ACLs is amethod for enforcing your security policy with regard to what sorts of access you allow theoutside world to have to your internal network and vice versa.There is less overhead in packet filtering than with an application gateway,because the featureof access control is performed at a lower ISO/OSI layer.Due to the lower overhead and the factthat packet filtering is done with routers which are specialized computers optimized for tasksrelated to networking,a packet filtering gateway is often much faster than its application layercousins.

    -->The ipfwadm command is the configuration tool for the second generation Linux IPfirewall.The syntax of the command is:

    ipfwadm category command parameters [options]**Categories:i)-Iinput ruleii)-Ooutput ruleiii)-FForwarding rule

    **Commands:-a [policy]append a new rule-i [policy]insert a new rule-d [policy]delete an existing rule-p [policy]

  • 7/31/2019 Solve_2008_2006

    23/28

    set the default policyetc.**Policies:i)accept

    Allows matching datagrams to be received,forwarded or transmitted.ii)deny

    Blocks matching datagrams from being received,forwarded or transmitted.iii)reject

    Blocks matching datagrams from being received,forwarded or transmitted and sends thehosts that sent the datagram and ICMP error message.**Parameters:i)-P protocolcan be TCP,UDP,ICMPii)-S address[/mask][port]e.g. -S 172.29.16.1/24 smtp

    iii)-V addresse.g172.29.16.1

    iv)-W namee.g. -W ppp0

    8.b)What is the difference between antivirus and firewall?

    Ans. Firewalls are programs that attempt to block threats and unwanted access to a network. Anetwork protected by a firewall will have to pass data entering or leaving the network throughthe firewall, and if it does not meet the firewall's security standards, the message will beblocked. A firewall can be thought of as a screen or sieve that categorically strains out

    potentially harmful data.Antivirus programs are software packages designed to scan the registry and files on thecomputer itself for the activity of malicious programs, and then attempt to remove any threatsit finds. Antivirus programs can actively search and destroy threats, and have virus definitionsthat can allow them to identify specific threats.Firewalls and antivirus software are important components of Internet safety. Firewalls areused to limit incoming transmissions to those that are least likely to contain bad data, whileantivirus programs actually look at the effect that the incoming data has on the system.Firewalls cannot be used to remove threats if they happen to get past the firewall.

    8.c)How many run levels are there in Linux?Describe their function.

    Ans.(Same as Q3)

    8.d)How to ditinguish between SNAT & DNAT?Ans.SNAT has some connection tracking advantages where if your link goes down for a short while,it will remember the connections that are still open/active and continue on when the linkreturns (depending on timeouts etc..). Masq does not, it clears the state each time it comes upas a saveguard.DNAT changes the destination address of a packet before it is subject to routing

  • 7/31/2019 Solve_2008_2006

    24/28

    (PREROUTING), and is mostly used to allow external (global) IPs into your private network byredirecting it. There are after requirements needed also (input/forward etc..).SNAT would be better for you than MASQUERADE, but they both work on outbound (leavingthe server) packets. They replace the source IP address in the packets for their own externalnetwork device, when the packet returns, the NAT function knows who sent the packet andforwards it back to the originating workstation inside the network.

    iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE(same as)

    iptables -t nat -A POSTROUTING -o ppp0 -j SNAT --to-source

  • 7/31/2019 Solve_2008_2006

    25/28

    9.c)Explain the structure and uses of /etc/hosts and /etc/networks files.

    Ans.The hosts file contains lines of text consisting of an IP address in the first text field followed byone or more hostnames, each field is separated by white space (blanks or tabulationcharacters). Comment lines may be included; they are indicated by a hash character (#) in the

    first position of such lines. Entirely blank lines in the file are ignored. For example a typicalhosts file may contain the following:#This is an example of the hosts file127.0.0.1 localhost loopback::1 localhostThis example only contains entries for the loopback addresses of the system and theirhostnames, a typical default content of the host file. The example illustrates that an IP addressmay have multiple hostnames, and that a hostname may be mapped to several IP addresses.

    The /etc/networks file contains information about the known networks that comprise theDARPA Internet. Each network is represented by a single line in the networks file. The format

    for the entries in the networks file is:

    Name Number Aliases

    The fields are described as follows:

    Name Specifies an official network name.Number Specifies a network number.

    Aliases Specifies any unofficial names used for the network.

    Items on a line are separated by one or more spaces or tab characters. Comments begin with a# (pound sign). Routines that search the networks file do not interpret characters from thebeginning of a comment to the end of that line. Network numbers are specified in dotted-decimal notation. A network name can contain any printable character except a field delimiter,new-line character, or comment character.The networks file is normally created from the official network database maintained at theNetwork Information Center (NIC). The file can be modified locally to include unofficialaliases or unknown networks.This file is part of TCP/IP in Network Support Facilities.The /etc/networks file contains symbolic names for networks, in a similar format to the the

    /etc/hosts file. A sample networks file is:loopback 127 # Intra-machine communication network

    private 10.5.3 # Local private network9.c)We have two networksCSE(172.16.1.0/24) and ECE(172.16.2.0/24).They are linkedthrough a gateway Host,Kanad.Kanad also has a connection to Internet.Write down the stepsfor configuring the gateway. Kanad first and then steps for routing through the gateway byhosts of two given networks.

    Ans.Given:Address of CSE -172.16.1.0/24Address of ECE 172.16.2.0/24

    Suppose the network interface between kanad and CSE is eth0,interface between kanad and

  • 7/31/2019 Solve_2008_2006

    26/28

    ECE is eth1 and that between kanad and the Internet is eth2. The Ip address of all theinterfaces of Kanad are:

    eth0 172.16.1.3eth1 172.16.2.3eth2 Dynamically assigned by ISP

    Kanad communicates with CSE and ECE through the addresses 172.16.1.3 & 172.16.2.3respectively.

    To establish communication from CSE to ECE the following command is needed:#route add -net 172.16.1.0 netmask 255.255.0.0 gw 172.17.2.3

    Where 172.17.2.3 is the IP adress of the kanad interface to which 172.17.2.0 or ECE networkis connected.

    To establish communication from ECE to CSE the following command is needed:#route add -net 172.16.2.0 netmask 255.255.0.0 gw 172.17.1.3

    Where 172.17.1.3 is the IP adress of the kanad interface to which 172.17.1.0 or CSE networkis connected.

    10.a)What is 'Eavesdropping'?How do you protest against this type of attack?10.b)What is Firewall?10.c)Expalin and configure the firewall using ipfwadm as follows:

    Machine will connect the network,the Internet and the users of that network to be able toaccess web servers on the internet,but no other traffic will be allowed topass.Additionally,users will be able to log into FTP servers on the Internet to read and write

    files but people on the internet will not be able to log into our FTP server.

    10.d)What is the use of IP Accounting facility?Write the general syntax foripfwadm,ipchains,iptables commands for IP Accounting.How do accounting rules differfromfirewalling rules for all the three schemes.

    Ans.In the Firewall Note (IPFWDM)

    11.a)What are the advantages of using NIS?What are the differences between DNS and NISapproaches?

    Ans.--> i)A common challenge facing administrators charged with maintaining a networkof Linux machines is sharing information across the network while maintainingthat information centrally. The Network Information Service (NIS) isone solution to such a challenge.ii)NIS distributes information that needs to be shared throughout a Linux networkto all machines that participate in the NIS domain.iii)The information most commonly shared using NIS consists of user authenticationinformation, such as /etc/passwd and /etc/group. If users passwordentries are accessible to all login hosts via NIS, any user can log in on anylogin host on the network that is running an NIS client.

  • 7/31/2019 Solve_2008_2006

    27/28

    iv)Any information that needs to be distributed across a network and that can or should becentrally administered is a viable candidate for sharing via NIS.

    v)NIS servers can be further subdivided into master and slave servers. Amasterserver maintains the authoritative copies of the NIS maps. A slave servermaintains copies of the maps, which it receives from the master. If the maps onthe master server change, the slaves receive updated copies.The purpose of slave servers isto provide redundancy.

    On a busy network, slave servers can reduce the load on the master server.More importantly,if the master server becomes unavailable for some reason,slave servers can function asbackup servers until the master is again available.

    -->A DNS name is the official name that uniquely identifies a system to the Internet domainname system.In fact although doing so is common practice,most NIS experts recommend notnaming an NIS domain with the same name used in a DNS name.Such a naming convention isconfusing and makes it easier for crackers to guess the name of your NIS domain.

    11.b)What are the different NIS maps and explain their uses.Give the names of two tools forchecking NIS configuration.

    Ans.Master File Map(s) Description/etc/hosts hosts.byname, hosts.byaddr Maps IP addresses to host names

    /etc/networks networks.byname, networks.byaddr Maps IP network addresses tonetwork names

    /etc/passwd passwd.byname, passwd.byuid Maps encrypted passwords to userlogin names

    /etc/group group.byname, group.bygid Maps Group IDs to group names/etc/services services.byname, services.bynumber Maps service descriptions to servicenames

    /etc/rpc rpc.byname, rpc.bynumber Maps Sun RPC service numbers toRPC service names

    /etc/protocols protocols.byname, protocols.bynumber Maps protocol numbers to protocolnames

    /usr/lib/aliases mail.aliases Maps mail aliases to mail aliasnamesTwo tools for cheking NIS configuration are:ypwhich and yptest.11.c)What are the different features offered by NFS?

    Ans.i)File System name spaceii)RPC and communications transport.iii)File Sharing.iv)No load tolerence.

    v)Configured only on trusted networks.

    11d)Write the command to mount /abc directory from host H1 to /xyz on Host H2.What arethe differences between hard mount and soft mount of a volume?

    Ans.-->mount is invoked using the command:#mount -t nfs nfs_volume local_dir options

    Here,nfs_volume=H1:/abclocal_dir=/xyz

  • 7/31/2019 Solve_2008_2006

    28/28

    So,the required command would be:#mount -t nfs H1:/abc /xyz

    -->The mounting of NFS volumes closely resembles regular file systems.mount is invoked using thefollowing syntax# mount -t nfsnfs_volume local_dir options

    nfs_volume is given as remote_host:remote_dir. Since this notation is unique to NFS filesystems,wecan leave out the t nfs option.

    There are a number of additional options that we can specify to mount upon mounting an NFS volume.These may be given either following the o switch on the command line or in the options field ofthe /etc/fstab entry for the volume. In both cases, multiple options are separated by commas and mustnot contain any whitespace characters. Options specified on the command line always override thosegiven in the fstab file.

    Here is a sample entry from /etc/fstab :# volume mount point type optionsnews:/var/spool/news /var/spool/news nfs timeo=14,intr

    This volume can then be mounted using this command:# mount news:/var/spool/news

    In the absence of an fstab entry, NFS mount invocations look a lot uglier. For instance, suppose wemount our users' home directories from a machine named moonshot, which uses a default block size of4 K for read/write operations. We might increase the block size to 8 K to obtain better performance by

    issuing the command:# mount moonshot:/home /home -o rsize=8192,wsize=8192

    The following is a partial list of options we would probably want to use:hardExplicitly mark this volume as hard-mounted. This is on by default. This option causes the server toreport a message to the console when a major timeout occurs and continues trying indefinitely.

    soft

    Soft-mount (as opposed to hard-mount) the driver. This option causes an I/O error to be reported to theprocess attempting a file operation when a major timeout occurs.