UNIX - LINUX Interview Questions and Answers : Advanced

1. How are devices represented in UNIX?

All devices are represented by files called special files that are located in/dev directory. Thus, device files and other files are named and accessed in the same way. A 'regular file' is just an ordinary data file in the disk. A 'block special file' represents a device with characteristics similar to a disk (data transfer in terms of blocks). A 'character special file' represents a device with characteristics similar to a keyboard (data transfer is by stream of bits in sequential order).

2. What is 'inode'?

All UNIX files have its description stored in a structure called 'inode'. The inode contains info about the file-size, its location, time of last access, time of last modification, permission and so on. Directories are also represented as files and have an associated inode. In addition to descriptions about the file, the inode contains pointers to the data blocks of the file. If the file is large, inode has indirect pointer to a block of pointers to additional data blocks (this further aggregates for larger files). A block is typically 8k.
Inode consists of the following fields:

  • File owner identifier
  • File type
  • File access permissions
  • File access times
  • Number of links
  • File size
  • Location of the file data

3. Brief about the directory representation in UNIX

A Unix directory is a file containing a correspondence between filenames and inodes. A directory is a special file that the kernel maintains. Only kernel modifies directories, but processes can read directories. The contents of a directory are a list of filename and inode number pairs. When new directories are created, kernel makes two entries named '.' (refers to the directory itself) and '..' (refers to parent directory).
System call for creating directory is mkdir (pathname, mode).

4. What are the Unix system calls for I/O?

  • open(pathname,flag,mode) - open file
  • creat(pathname,mode) - create file
  • close(filedes) - close an open file
  • read(filedes,buffer,bytes) - read data from an open file
  • write(filedes,buffer,bytes) - write data to an open file
  • lseek(filedes,offset,from) - position an open file
  • dup(filedes) - duplicate an existing file descriptor
  • dup2(oldfd,newfd) - duplicate to a desired file descriptor
  • fcntl(filedes,cmd,arg) - change properties of an open file
  • ioctl(filedes,request,arg) - change the behaviour of an open file

The difference between fcntl anf ioctl is that the former is intended for any open file, while the latter is for device-specific operations.

5. How do you change File Access Permissions?

Every file has following attributes:
owner's user ID ( 16 bit integer )
owner's group ID ( 16 bit integer )
File access mode word

'r w x -r w x- r w x'


(user permission-group permission-others permission)
r-read, w-write, x-execute
To change the access mode, we use chmod(filename,mode).
Example 1:
To change mode of myfile to 'rw-rw-r–' (ie. read, write permission for user - read,write permission for group - only read permission for others) we give the args as:
chmod(myfile,0664) .
Each operation is represented by discrete values

'r' is 4
'w' is 2
'x' is 1


Therefore, for 'rw' the value is 6(4+2).
Example 2:
To change mode of myfile to 'rwxr–r–' we give the args as:

chmod(myfile,0744).

6. What are links and symbolic links in UNIX file system?

A link is a second name (not a file) for a file. Links can be used to assign more than one name to a file, but cannot be used to assign a directory more than one name or link filenames on different computers.
Symbolic link 'is' a file that only contains the name of another file.Operation on the symbolic link is directed to the file pointed by the it.Both the limitations of links are eliminated in symbolic links.
Commands for linking files are:

Link ln filename1 filename2
Symbolic link ln -s filename1 filename2


7. What is a FIFO?

FIFO are otherwise called as 'named pipes'. FIFO (first-in-first-out) is a special file which is said to be data transient. Once data is read from named pipe, it cannot be read again. Also, data can be read only in the order written. It is used in interprocess communication where a process writes to one end of the pipe (producer) and the other reads from the other end (consumer).

8. How do you create special files like named pipes and device files?

The system call mknod creates special files in the following sequence.
1. kernel assigns new inode,
2. sets the file type to indicate that the file is a pipe, directory or special file,
3. If it is a device file, it makes the other entries like major, minor device numbers.
For example:
If the device is a disk, major device number refers to the disk controller and minor device number is the disk.

9. Discuss the mount and unmount system calls

The privileged mount system call is used to attach a file system to a directory of another file system; the unmount system call detaches a file system. When you mount another file system on to your directory, you are essentially splicing one directory tree onto a branch in another directory tree. The first argument to mount call is the mount point, that is , a directory in the current file naming system. The second argument is the file system to mount to that point. When you insert a cdrom to your unix system's drive, the file system in the cdrom automatically mounts to /dev/cdrom in your system.

10. How does the inode map to data block of a file?

Inode has 13 block addresses. The first 10 are direct block addresses of the first 10 data blocks in the file. The 11th address points to a one-level index block. The 12th address points to a two-level (double in-direction) index block. The 13th address points to a three-level(triple in-direction)index block. This provides a very large maximum file size with efficient access to large files, but also small files are accessed directly in one disk read.

11. What is a shell?

A shell is an interactive user interface to an operating system services that allows an user to enter commands as character strings or through a graphical user interface. The shell converts them to system calls to the OS or forks off a process to execute the command. System call results and other information from the OS are presented to the user through an interactive interface. Commonly used shells are sh,csh,ks etc.

12. Brief about the initial process sequence while the system boots up.

While booting, special process called the 'swapper' or 'scheduler' is created with Process-ID 0. The swapper manages memory allocation for processes and influences CPU allocation. The swapper inturn creates 3 children:

  • the process dispatcher,
  • vhand and
  • dbflush

with IDs 1,2 and 3 respectively.
This is done by executing the file /etc/init. Process dispatcher gives birth to the shell. Unix keeps track of all the processes in an internal data structure called the Process Table (listing command is ps -el).

13. What are various IDs associated with a process?

Unix identifies each process with a unique integer called ProcessID. The process that executes the request for creation of a process is called the 'parent process' whose PID is 'Parent Process ID'. Every process is associated with a particular user called the 'owner' who has privileges over the process. The identification for the user is 'UserID'. Owner is the user who executes the process. Process also has 'Effective User ID' which determines the access privileges for accessing resources like files.

  • getpid() -process id
  • getppid() -parent process id
  • getuid() -user id
  • geteuid() -effective user id

14. Explain fork() system call.

The `fork()' used to create a new process from an existing process. The new process is called the child process, and the existing process is called the parent. We can tell which is which by checking the return value from `fork()'. The parent gets the child's pid returned to him, but the child gets 0 returned to him.

15. Predict the output of the following program code

main()
{
fork();
printf("Hello World!");
}


Answer:

Hello World!Hello World!


Explanation:

The fork creates a child that is a duplicate of the parent process. The child begins from the fork().All the statements after the call to fork() will be executed twice.(once by the parent process and other by child). The statement before fork() is executed only by the parent process.

16. Predict the output of the following program code

main()
{
fork(); fork(); fork();
printf("Hello World!");
}


Answer:
"Hello World" will be printed 8 times.
Explanation:
2^n times where n is the number of calls to fork()

17. List the system calls used for process management:

System calls Description

  • fork() To create a new process
  • exec() To execute a new program in a process
  • wait() To wait until a created process completes its execution
  • exit() To exit from a process execution
  • getpid() To get a process identifier of the current process
  • getppid() To get parent process identifier
  • nice() To bias the existing priority of a process
  • brk() To increase/decrease the data segment size of a process.

18. How can you get/set an environment variable from a program?

Getting the value of an environment variable is done by using `getenv()'. Setting the value of an environment variable is done by using `putenv()'.

19. How can a parent and child process communicate?

A parent and child can communicate through any of the normal inter-process communication schemes (pipes, sockets, message queues, shared memory), but also have some special ways to communicate that take advantage of their relationship as a parent and child. One of the most obvious is that the parent can get the exit status of the child.

20. What is a zombie?

When a program forks and the child finishes before the parent, the kernel still keeps some of its information about the child in case the parent might need it - for example, the parent may need to check the child's exit status. To be able to get this information, the parent calls `wait()'; In the interval between the child terminating and the parent calling `wait()', the child is said to be a `zombie' (If you do `ps', the child will have a `Z' in its status field to indicate this.)

21. What are the process states in Unix?

As a process executes it changes state according to its circumstances. Unix processes have the following states:
Running : The process is either running or it is ready to run .
Waiting : The process is waiting for an event or for a resource.
Stopped : The process has been stopped, usually by receiving a signal.
Zombie : The process is dead but have not been removed from the process table.

Continue reading UNIX - LINUX Interview Questions and Answers : Advanced

Linux Interview Questions And Answers

You need to see the last fifteen lines of the files dog, cat and horse. What command should you use?
tail -15 dog cat horse

The tail utility displays the end of a file. The -15 tells tail to display the last fifteen lines of each specified file.

Who owns the data dictionary?
The SYS user owns the data dictionary. The SYS and SYSTEM users are created when the database is created.

You routinely compress old log files. You now need to examine a log from two months ago. In order to view its contents without first having to decompress it, use the _________ utility.
zcat

The zcat utility allows you to examine the contents of a compressed file much the same way that cat displays a file.

You suspect that you have two commands with the same name as the command is not producing the expected results. What command can you use to determine the location of the command being run?
which

The which command searches your path until it finds a command that matches the command you are looking for and displays its full path.

You locate a command in the /bin directory but do not know what it does. What command can you use to determine its purpose.
whatis

The whatis command displays a summary line from the man page for the specified command.

You wish to create a link to the /data directory in bob's home directory so you issue the command ln /data /home/bob/datalink but the command fails. What option should you use in this command line to be successful.
Use the -F option

In order to create a link to a directory you must use the -F option.

When you issue the command ls -l, the first character of the resulting display represents the file's ___________.
type

The first character of the permission block designates the type of file that is being displayed.

What utility can you use to show a dynamic listing of running processes_________?
top

The top utility shows a listing of all running processes that is dynamically updated.

Where is standard output usually directed?
to the screen or display

By default, your shell directs standard output to your screen or display.

You wish to restore the file memo.ben which was backed up in the tarfile MyBackup.tar. What command should you type?
tar xf MyBackup.tar memo.ben

This command uses the x switch to extract a file. Here the file memo.ben will be restored from the tarfile MyBackup.tar.

You need to view the contents of the tarfile called MyBackup.tar. What command would you use?
tar tf MyBackup.tar

The t switch tells tar to display the contents and the f modifier specifies which file to examine.

You want to create a compressed backup of the users' home directories. What utility should you use?
tar

You can use the z modifier with tar to compress your archive at the same time as creating it.

What daemon is responsible for tracking events on your system?
syslogd

The syslogd daemon is responsible for tracking system information and saving it to specified log files.

You have a file called phonenos that is almost 4,000 lines long. What text filter can you use to split it into four pieces each 1,000 lines long?
split

The split text filter will divide files into equally sized pieces. The default length of each piece is 1,000 lines.

You would like to temporarily change your command line editor to be vi. What command should you type to change it?
set -o vi

The set command is used to assign environment variables. In this case, you are instructing your shell to assign vi as your command line editor. However, once you log off and log back in you will return to the previously defined command line editor.

What account is created when you install Linux?
root

Whenever you install Linux, only one user account is created. This is the superuser account also known as root.

What command should you use to check the number of files and disk space used and each user's defined quotas?

repquota

n order to run fsck on the root partition, the root partition must be mounted as
readonly

You cannot run fsck on a partition that is mounted as read-write.

In order to improve your system's security you decide to implement shadow passwords. What command should you use?
pwconv

The pwconv command creates the file /etc/shadow and changes all passwords to 'x' in the /etc/passwd file.

Bob Armstrong, who has a username of boba, calls to tell you he forgot his password. What command should you use to reset his command?
passwd boba

The passwd command is used to change your password. If you do not specify a username, your password will be changed.

The top utility can be used to change the priority of a running process? Another utility that can also be used to change priority is ___________?
nice

Both the top and nice utilities provide the capability to change the priority of a running process.

What command should you type to see all the files with an extension of 'mem' listed in reverse alphabetical order in the /home/ben/memos directory.
ls -r /home/ben/memos/*.mem

The -c option used with ls results in the files being listed in chronological order. You can use wildcards with the ls command to specify a pattern of filenames.

What file defines the levels of messages written to system log files?
kernel.h

To determine the various levels of messages that are defined on your system, examine the kernel.h file.

What command is used to remove the password assigned to a group?
gpasswd -r

The gpasswd command is used to change the password assigned to a group. Use the -r option to remove the password from the group.

What command would you type to use the cpio to create a backup called backup.cpio of all the users' home directories?
find /home | cpio -o > backup.cpio

The find command is used to create a list of the files and directories contained in home. This list is then piped to the cpio utility as a list of files to include and the output is saved to a file called backup.cpio.

What can you type at a command line to determine which shell you are using?
echo $SHELL

The name and path to the shell you are using is saved to the SHELL environment variable. You can then use the echo command to print out the value of any variable by preceding the variable's name with $. Therefore, typing echo $SHELL will display the name of your shell.

What type of local file server can you use to provide the distribution installation materials to the new machine during a network installation?
A) Inetd
B) FSSTND
C) DNS
D) NNTP
E) NFS

E - You can use an NFS server to provide the distribution installation materials to the machine on which you are performing the installation. Answers a, b, c, and d are all valid items but none of them are file servers. Inetd is the superdaemon which controls all intermittently used network services. The FSSTND is the Linux File System Standard. DNS provides domain name resolution, and NNTP is the transfer protocol for usenet news.

If you type the command cat dog & > cat what would you see on your display? Choose one:
a. Any error messages only.
b. The contents of the file dog.
c. The contents of the file dog and any error messages.
d. Nothing as all output is saved to the file cat.

d

When you use & > for redirection, it redirects both the standard output and standard error. The output would be saved to the file cat.

You are covering for another system administrator and one of the users asks you to restore a file for him. You locate the correct tarfile by checking the backup log but do not know how the directory structure was stored. What command can you use to determine this?
Choose one:
a. tar fx tarfile dirname
b. tar tvf tarfile filename
c. tar ctf tarfile
d. tar tvf tarfile


d

The t switch will list the files contained in the tarfile. Using the v modifier will display the stored directory structure.

You have the /var directory on its own partition. You have run out of space. What should you do? Choose one:
a. Reconfigure your system to not write to the log files.
b. Use fips to enlarge the partition.
c. Delete all the log files.
d. Delete the partition and recreate it with a larger size.


d

The only way to enlarge a partition is to delete it and recreate it. You will then have to restore the necessary files from backup.

You have a new application on a CD-ROM that you wish to install. What should your first step be?
Choose one:
a. Read the installation instructions on the CD-ROM.
b. Use the mount command to mount your CD-ROM as read-write.
c. Use the umount command to access your CD-ROM.
d. Use the mount command to mount your CD-ROM as read-only.


d

Before you can read any of the files contained on the CD-ROM, you must first mount the CD-ROM.

When you create a new partition, you need to designate its size by defining the starting and ending _____________.
cylinders

When creating a new partition you must first specify its starting cylinder. You can then either specify its size or the ending cylinder.

What key combination can you press to suspend a running job and place it in the background?
ctrl-z

Using ctrl-z will suspend a job and put it in the background.

The easiest, most basic form of backing up a file is to _____ it to another location.
copy

The easiest most basic form of backing up a file is to make a copy of that file to another location such as a floppy disk.

What type of server is used to remotely assign IP addresses to machines during the installation process?
A) SMB
B) NFS
C) DHCP
D) FT
E) HTTP


C - You can use a DHCP server to assign IP addresses to individual machines during the installation process. Answers a, b, d, and e list legitimate Linux servers, but these servers do not provide IP addresses. The SMB, or Samba, tool is used for file and print sharing across multi-OS networks. An NFS server is for file sharing across Linux net-works. FTP is a file storage server that allows people to browse and retrieve information by logging in to it, and HTTP is for the Web.

Which password package should you install to ensure that the central password file couldn't be stolen easily?
A) PAM
B) tcp_wrappers
C) shadow
D) securepass
E) ssh


C - The shadow password package moves the central password file to a more secure location. Answers a, b, and e all point to valid packages, but none of these places the password file in a more secure location. Answer d points to an invalid package.

When using useradd to create a new user account, which of the following tasks is not done automatically.
Choose one:
a. Assign a UID.
b. Assign a default shell.
c. Create the user's home directory.
d. Define the user's home directory.


c

The useradd command will use the system default for the user's home directory. The home directory is not created, however, unless you use the -m option.

You want to enter a series of commands from the command-line. What would be the quickest way to do this?
Choose One
a. Press enter after entering each command and its arguments
b. Put them in a script and execute the script
c. Separate each command with a semi-colon (;) and press enter after the last command
d. Separate each command with a / and press enter after the last command


c

The semi-colon may be used to tell the shell that you are entering multiple commands that should be executed serially. If these were commands that you would frequently want to run, then a script might be more efficient. However, to run these commands only once, enter the commands directly at the command line.

You attempt to use shadow passwords but are unsuccessful. What characteristic of the /etc/passwd file may cause this?
Choose one:
a. The login command is missing.
b. The username is too long.
c. The password field is blank.
d. The password field is prefaced by an asterisk.


c

The password field must not be blank before converting to shadow passwords.

When you install a new application, documentation on that application is also usually installed. Where would you look for the documentation after installing an application called MyApp?
Choose one:
a. /usr/MyApp
b. /lib/doc/MyApp
c. /usr/doc/MyApp
d. In the same directory where the application is installed.


c

The default location for application documentation is in a directory named for the application in the /usr/doc directory.

What file would you edit in your home directory to change which window manager you want to use?
A) Xinit
B) .xinitrc
C) XF86Setup
D) xstart
E) xf86init


Answer: B - The ~/.xinitrc file allows you to set which window man-ager you want to use when logging in to X from that account.
Answers a, d, and e are all invalid files. Answer c is the main X server configuration file.

What command allows you to set a processor-intensive job to use less CPU time?
A) ps
B) nice
C) chps
D) less
E) more


Answer: B - The nice command is used to change a job's priority level, so that it runs slower or faster. Answers a, d, and e are valid commands but are not used to change process information. Answer c is an invalid command.

While logged on as a regular user, your boss calls up and wants you to create a new user account immediately. How can you do this without first having to close your work, log off and logon as root?
Choose one:
a. Issue the command rootlog.
b. Issue the command su and type exit when finished.
c. Issue the command su and type logoff when finished.
d. Issue the command logon root and type exit when finished.


Answer: b
You can use the su command to imitate any user including root. You will be prompted for the password for the root account. Once you have provided it you are logged in as root and can do any administrative duties.

There are seven fields in the /etc/passwd file. Which of the following lists all the fields in the correct order?
Choose one:
a. username, UID, GID, home directory, command, comment
b. username, UID, GID, comment, home directory, command
c. UID, username, GID, home directory, comment, command
d. username, UID, group name, GID, home directory, comment
Answer: b
The seven fields required for each line in the /etc/passwd file are username, UID, GID, comment, home directory, command. Each of these fields must be separated by a colon even if they are empty.

Which of the following commands will show a list of the files in your home directory including hidden files and the contents of all subdirectories?
Choose one:
a. ls -c home
b. ls -aR /home/username
c. ls -aF /home/username
d. ls -l /home/username


Answer: b
The ls command is used to display a listing of files. The -a option will cause hidden files to be displayed as well. The -R option causes ls to recurse down the directory tree. All of this starts at your home directory.

In order to prevent a user from logging in, you can add a(n) ________at the beginning of the password field.
Answer: asterick

If you add an asterick at the beginning of the password field in the /etc/passwd file, that user will not be able to log in.

You have a directory called /home/ben/memos and want to move it to /home/bob/memos so you issue the command mv /home/ben/memos /home/bob. What is the results of this action?
Choose one:
a. The files contained in /home/ben/memos are moved to the directory /home/bob/memos/memos.
b. The files contained in /home/ben/memos are moved to the directory /home/bob/memos.
c. The files contained in /home/ben/memos are moved to the directory /home/bob/.
d. The command fails since a directory called memos already exists in the target directory.


Answer: a
When using the mv command to move a directory, if a directory of the same name exists then a subdirectory is created for the files to be moved.

Which of the following tasks is not necessary when creating a new user by editing the /etc/passwd file?
Choose one:
a. Create a link from the user's home directory to the shell the user will use.
b. Create the user's home directory
c. Use the passwd command to assign a password to the account.
d. Add the user to the specified group.


Answer: a
There is no need to link the user's home directory to the shell command. Rather, the specified shell must be present on your system.

You issue the following command useradd -m bobm But the user cannot logon. What is the problem?
Choose one:
a. You need to assign a password to bobm's account using the passwd command.
b. You need to create bobm's home directory and set the appropriate permissions.
c. You need to edit the /etc/passwd file and assign a shell for bobm's account.
d. The username must be at least five characters long.


Answer: a
The useradd command does not assign a password to newly created accounts. You will still need to use the passwd command to assign a password.

You wish to print the file vacations with 60 lines to a page. Which of the following commands will accomplish this? Choose one:
a. pr -l60 vacations | lpr
b. pr -f vacations | lpr
c. pr -m vacations | lpr
d. pr -l vacations | lpr


Answer: a
The default page length when using pr is 66 lines. The -l option is used to specify a different length.

Which file defines all users on your system?
Choose one:
a. /etc/passwd
b. /etc/users
c. /etc/password
d. /etc/user.conf


Answer: a
The /etc/passwd file contains all the information on users who may log into your system. If a user account is not contained in this file, then the user cannot log in.

Which two commands can you use to delete directories?
A) rm
B) rm -rf
C) rmdir
D) rd
E) rd -rf


Answer(s): B, C - You can use rmdir or rm -rf to delete a directory. Answer a is incorrect, because the rm command without any specific flags will not delete a directory, it will only delete files. Answers d and e point to a non-existent command.

Which partitioning tool is available in all distributions?
A) Disk Druid
B) fdisk
C) Partition Magic
D) FAT32
E) System Commander


Answer(s): B - The fdisk partitioning tool is available in all Linux distributions. Answers a, c, and e all handle partitioning, but do not come with all distributions. Disk Druid is made by Red Hat and used in its distribution along with some derivatives. Partition Magic and System Commander are tools made by third-party companies. Answer d is not a tool, but a file system type. Specifically, FAT32 is the file system type used in Windows 98.

Which partitions might you create on the mail server's hard drive(s) other than the root, swap, and boot partitions?
[Choose all correct answers]
A) /var/spool
B) /tmp
C) /proc
D) /bin
E) /home

Answer(s): A, B, E - Separating /var/spool onto its own partition helps to ensure that if something goes wrong with the mail server or spool, the output cannot overrun the file system. Putting /tmp on its own partition prevents either software or user items in the /tmp directory from overrunning the file system. Placing /home off on its own is mostly useful for system re-installs or upgrades, allowing you to not have to wipe the /home hierarchy along with other areas. Answers c and d are not possible, as the /proc portion of the file system is virtual-held in RAM-not placed on the hard drives, and the /bin hierarchy is necessary for basic system functionality and, therefore, not one that you can place on a different partition.

When planning your backup strategy you need to consider how often you will perform a backup, how much time the backup takes and what media you will use. What other factor must you consider when planning your backup strategy? _________

what to backup
Choosing which files to backup is the first step in planning your backup strategy.

What utility can you use to automate rotation of logs?
Answer: logrotate
The logrotate command can be used to automate the rotation of various logs.

In order to display the last five commands you have entered using the history command, you would type ___________ .

Answer: history 5
The history command displays the commands you have previously entered. By passing it an argument of 5, only the last five commands will be displayed.

What command can you use to review boot messages?
Answer: dmesg
The dmesg command displays the system messages contained in the kernel ring buffer. By using this command immediately after booting your computer, you will see the boot messages.

What is the minimum number of partitions you need to install Linux?
Answer: 2
Linux can be installed on two partitions, one as / which will contain all files and a swap partition.

What is the name and path of the main system log?
Answer: /var/log/messages
By default, the main system log is /var/log/messages.

Of the following technologies, which is considered a client-side script?
A) JavaScript
B) Java
C) ASP
D) C++


Answer: A - JavaScript is the only client-side script listed. Java and C++ are complete programming languages. Active Server Pages are parsed on the server with the results being sent to the client in HTML

Continue reading Linux Interview Questions And Answers

Top networking questions

  1. What are 10Base2, 10Base5 and 10BaseT Ethernet LANs ?
  2. What is the difference between an unspecified passive open and a fully specified passive open
  3. Explain the function of Transmission Control Block
  4. What is a Management Information Base (MIB)
  5. What is anonymous FTP and why would you use it?
  6. What is a pseudo tty?
  7. What is REX?
  8. What does the Mount protocol do ?
  9. What is External Data Representation?
  10. What is the Network Time Protocol?
  11. What is a DNS resource record?
  12. What protocol is used by DNS name servers?
  13. What is the difference between interior and exterior neighbor gateways?
  14. What is the HELLO protocol used for?
  15. What are the advantages and disadvantages of the three types of routing tables?
  16. What is source route?
  17. What is RIP (Routing Information Protocol)?
  18. What is SLIP (Serial Line Interface Protocol)?
  19. What is Proxy ARP?
  20. What is OSPF?
  21. What is Kerberos?
  22. What is a Multi-homed Host?
  23. What is NVT (Network Virtual Terminal)?
  24. What is Gateway-to-Gateway protocol?
  25. What is BGP (Border Gateway Protocol)?
  26. What is autonomous system?
  27. What is EGP (Exterior Gateway Protocol)?
  28. What is IGP (Interior Gateway Protocol)?
  29. What is Mail Gateway?
  30. What is wide-mouth frog?
  31. What are Digrams and Trigrams?
  32. What is silly window syndrome?
  33. What is region?
  34. What is multicast routing?
  35. What is traffic shaping?
  36. What is packet filter?
  37. What is virtual path?
  38. What is virtual channel?
  39. What is logical link control?
  40. Why should you care about the OSI Reference Model?
  41. What is the difference between routable and non- routable protocols?
  42. What is MAU?
  43. Explain 5-4-3 rule.
  44. What is the difference between TFTP and FTP application layer protocols?
  45. What is the range of addresses in the classes of internet addresses?
  46. What is the minimum and maximum length of the header in the TCP segment and IP datagram?
  47. What is difference between ARP and RARP?
  48. What is ICMP?
  49. What are the data units at different layers of the TCP / IP protocol suite?
  50. What is Project 802?
  51. What is Bandwidth?
  52. Difference between bit rate and baud rate?
  53. What is MAC address?
  54. What is attenuation?
  55. What is cladding?
  56. What is RAID?
  57. What is NETBIOS and NETBEUI?
  58. What is redirector?
  59. What is Beaconing?
  60. What is terminal emulation, in which layer it comes?
  61. What is frame relay, in which layer it comes?
  62. What do you meant by “triple X” in Networks?
  63. What is SAP?
  64. What is subnet?
  65. What is Brouter?
  66. How Gateway is different from Routers?
  67. What are the different type of networking / internetworking devices?
  68. What is mesh network?
  69. What is passive topology?
  70. What are the important topologies for networks?
  71. What are major types of networks and explain?
  72. What is Protocol Data Unit?
  73. What is difference between baseband and broadband transmission?
  74. What are the possible ways of data exchange?
  75. What are the types of Transmission media?
  76. What are the types of Transmission media?
  77. What is point-to-point protocol?
  78. What are the two types of transmission technology available?
  79. Difference between the communication and transmission?
  80. What is a different between switch and Hub?
  81. What are the Advantages and Disadvantages of DHCP?
  82. What is Recovery Console?
  83. What is ERD(Emergency Repair Disk)?
  84. What is the difference between POP3 and IMAP Mail Server?
  85. what is .ost file?
  86. Whatz the difference between DNS and WINS?
  87. How can we create VPN to connect to branch office of the same office.what would be the priliminary requirment?
  88. Why should we care about the OSI Reference Model ? What is the main purpose for creating this osi model? why it is a layered model?
  89. What is layer-3 switch?
  90. What is an email client? what is differnce between email client and web mail?
  91. what is the vlan ? how it is work?
  92. Name three network tools used to determine where a network connectivity is lost between two sites A&B.
  93. Which protocol is used for retrieving mails?
  94. What is piggy backing?
  95. What is the default subnet mask for an ipv6 address ?
  96. What is fragmentation of a packet ?
  97. What is MTU of a link ?
  98. Name any field of IP header that can prevent a packet to loop infinitely ?
  99. Under what situations a packet can go into infinite loop in a network ?
  100. Describe a 3-way TCP/IP Handshake.
Continue reading Top networking questions

Some Basic Interview Question : Linux Based

  1. You attempt to use shadow passwords but are unsuccessful. What characteristic of the /etc/passwd file may cause this? Choose one: a. The login command is missing. b. The username is too long. c. The password field is blank. d. The password field is prefaced by an asterick.
  2. You create a new user account by adding the following line to your /etc/passwd file. bobm:baddog:501:501:Bob Morris:/home/bobm:/bin/bash Bob calls you and tells you that he cannot logon. You verify that he is using the correct username and password. What is the problem? Choose one: a. The UID and GID cannot be identical. b. You cannot have spaces in the line unless they are surrounded with double quotes. c. You cannot directly enter the password; rather you have to use the passwd command to assign a password to the user. d. The username is too short, it must be at least six characters long.
  3. Which of the following tasks is not necessary when creating a new user by editing the /etc/passwd file? Choose one: a. Create a link from the user’s home directory to the shell the user will use. b. Create the user’s home directory c. Use the passwd command to assign a password to the account. d. Add the user to the specified group.
  4. You create a new user by adding the following line to the /etc/passwd file bobm::501:501:Bob Morris:/home/bobm:/bin/bash You then create the user’s home directory and use the passwd command to set his password. However, the user calls you and says that he cannot log on. What is the problem? Choose one: a. The user did not change his password. b. bobm does not have permission to /home/bobm. c. The user did not type his username in all caps. d. You cannot leave the password field blank when creating a new user.
  5. When using useradd to create a new user account, which of the following tasks is not done automatically. Choose one: a. Assign a UID. b. Assign a default shell. c. Create the user’s home directory. d. Define the user’s home directory.
  6. You issue the following command useradd -m bobm But the user cannot logon. What is the problem? Choose one: a. You need to assign a password to bobm’s account using the passwd command. b. You need to create bobm’s home directory and set the appropriate permissions. c. You need to edit the /etc/passwd file and assign a shell for bobm’s account. d. The username must be at least five characters long.
  7. You have created special configuration files that you want copied to each user’s home directories when creating new user accounts. You copy the files to /etc/skel. Which of the following commands will make this happen? Choose one: a. useradd -m username b. useradd -mk username c. useradd -k username d. useradd -Dk username
  8. Mary has recently gotten married and wants to change her username from mstone to mknight. Which of the following commands should you run to accomplish this? Choose one: a. usermod -l mknight mstone b. usermod -l mstone mknight c. usermod -u mknight mstone d. usermod -u mstone mknight
  9. After bob leaves the company you issue the command userdel bob. Although his entry in the /etc/passwd file has been deleted, his home directory is still there. What command could you have used to make sure that his home directory was also deleted? Choose one: a. userdel -m bob b. userdel -u bob c. userdel -l bob d. userdel -r bob
  10. All groups are defined in the /etc/group file. Each entry contains four fields in the following order. Choose one: a. groupname, password, GID, member list b. GID, groupname, password, member list c. groupname, GID, password, member list d. GID, member list, groupname, password
  11. You need to create a new group called sales with Bob, Mary and Joe as members. Which of the following would accomplish this? Choose one: a. Add the following line to the /etc/group file: sales:44:bob,mary,joe b. Issue the command groupadd sales. c. Issue the command groupadd -a sales bob,mary,joe d. Add the following line to the /etc/group file: sales::44:bob,mary,joe
  12. What command is used to remove the password assigned to a group?
  13. You changed the GID of the sales group by editing the /etc/group file. All of the members can change to the group without any problem except for Joe. He cannot even login to the system. What is the problem? Choose one: a. Joe forgot the password for the group. b. You need to add Joe to the group again. c. Joe had the original GID specified as his default group in the /etc/passwd file. d. You need to delete Joe’s account and recreate it.
  14. You need to delete the group dataproject. Which two of the following tasks should you do first before deleting the group? A. Check the /etc/passwd file to make sure no one has this group as his default group. B. Change the members of the dataproject group to another group besides users. C. Make sure that the members listed in the /etc/group file are given new login names. D. Verify that no file or directory has this group listed as its owner. Choose one: a. A and C b. A and D c. B and C d. B and D
  15. When you look at the /etc/group file you see the group kmem listed. Since it does not own any files and no one is using it as a default group, can you delete this group?
  16. When looking at the /etc/passwd file, you notice that all the password fields contain ‘x’. What does this mean? Choose one: a. That the password is encrypted. b. That you are using shadow passwords. c. That all passwords are blank. d. That all passwords have expired.
  17. In order to improve your system’s security you decide to implement shadow passwords. What command should you use?
  18. What file contains the default environment variables when using the bash shell? Choose one: a. ~/.profile b. /bash c. /etc/profile d. ~/bash
  19. You have created a subdirectory of your home directory containing your scripts. Since you use the bash shell, what file would you edit to put this directory on your path? Choose one: a. ~/.profile b. /etc/profile c. /etc/bash d. ~/.bash
  20. Which of the following interprets your actions when typing at the command line for the operating system? Choose One a. Utility b. Application c. Shell d. Command
  21. What can you type at a command line to determine which shell you are using?
  22. You want to enter a series of commands from the command-line. What would be the quickest way to do this? Choose One a. Press enter after entering each command and its arguments b. Put them in a script and execute the script c. Separate each command with a semi-colon (;) and press enter after the last command d. Separate each command with a / and press enter after the last command
  23. You are entering a long, complex command line and you reach the right side of your screen before you have finished typing. You want to finish typing the necessary commands but have the display wrap around to the left. Which of the following key combinations would achieve this? Choose One a. Esc, /, Enter b. /, Enter c. ctrl-d, enter d. esc, /, ctrl-d
  24. After typing in a new command and pressing enter, you receive an error message indicating incorrect syntax. This error message originated from.. Choose one a. The shell b. The operating system c. The command d. The kernel
  25. When typing at the command line, the default editor is the _____________ library.
  26. You typed the following at the command line ls -al /home/ hadden. What key strokes would you enter to remove the space between the ‘/’ and ‘hadden’ without having to retype the entire line? Choose one a. Ctrl-B, Del b. Esc-b, Del c. Esc-Del, Del d. Ctrl-b, Del
  27. You would like to temporarily change your command line editor to be vi. What command should you type to change it?
  28. After experimenting with vi as your command line editor, you decide that you want to have vi your default editor every time you log in. What would be the appropriate way to do this? Choose one a. Change the /etc/inputrc file b. Change the /etc/profile file c. Change the ~/.inputrc file d. Change the ~/.profile file
  29. You have to type your name and title frequently throughout the day and would like to decrease the number of key strokes you use to type this. Which one of your configuration files would you edit to bind this information to one of the function keys?
  30. In your present working directory, you have the files maryletter memo1 MyTelephoneandAddressBook What is the fewest number of keys you can type to open the file MyTelephoneandAddressBook with vi? Choose one a. 6 b. 28 c. 25 d. 4
  31. A variable that you can name and assign a value to is called a _____________ variable.
  32. You have installed a new application but when you type in the command to start it you get the error message Command not found. What do you need to do to fix this problem? Choose one a. Add the directory containing the application to your path b. Specify the directory’s name whenever you run the application c. Verify that the execute permission has been applied to the command. d. Give everyone read, write and execute permission to the application’s directory.
  33. You telnet into several of your servers simultaneously. During the day, you sometimes get confused as to which telnet session is connected to which server. Which of the following commands in your .profile file would make it obvious to which server you are attached? Choose one a. PS1=’\h: \w>’ b. PS1=’\s: \W>’ c. PS1=’\!: \t>’ d. PS1=’\a: \n>’
  34. Which of the following environment variables determines your working directory at the completion of a successful login? Choose one a. HOME b. BASH_ENV c. PWD d. BLENDERDIR
  35. Every time you attempt to delete a file using the rm utility, the operating system prompts you for confirmation. You know that this is not the customary behavior for the rm command. What is wrong? Choose one a. rm has been aliased as rm -i b. The version of rm installed on your system is incorrect. c. This is the normal behavior of the newest version of rm. d. There is an incorrect link on your system.
  36. You are running out of space in your home directory. While looking for files to delete or compress you find a large file called .bash_history and delete it. A few days later, it is back and as large as before. What do you need to do to ensure that its size is smaller? Choose one a. Set the HISTFILESIZE variable to a smaller number. b. Set the HISTSIZE to a smaller number. c. Set the NOHISTFILE variable to true. d. Set the HISTAPPEND variable to true.
  37. In order to display the last five commands you have entered using the history command, you would type ___________.
  38. In order to display the last five commands you have entered using the fc command, you would type ___________.
  39. You previously ran the find command to locate a particular file. You want to run that command again. What would be the quickest way to do this? Choose one a. fc -l find fc n b. history -l find history n c. Retype the command d. fc -n find
  40. Using command substitution, how would you display the value of the present working directory? Choose one a. echo $(pwd) b. echo pwd c. $pwd d. pwd | echo
  41. You need to search the entire directory structure to locate a specific file. How could you do this and still be able to run other commands while the find command is still searching for your file? Choose one a. find / -name filename & b. find / -name filename c. bg find / -name filename d. &find / -name filename &
  42. In order to create a file called DirContents containing the contents of the /etc directory you would type ____________.
  43. What would be displayed as the result of issuing the command ps ef? Choose one a. A listing of the user’s running processes formatted as a tree. b. A listing of the stopped processes c. A listing of all the running processes formatted as a tree. d. A listing of all system processes formatted as a tree.
  44. What utility can you use to show a dynamic listing of running processes? __________
  45. The top utility can be used to change the priority of a running process? Another utility that can also be used to change priority is ___________?
  46. What key combination can you press to suspend a running job and place it in the background?
  47. You issue the command jobs and receive the following output: [1]- Stopped (tty output) pine [2]+ Stopped (tty output) MyScript How would you bring the MyScript process to the foreground? Choose one: a. fg %2 b. ctrl-c c. fg MyScript d. ctrl-z
  48. You enter the command cat MyFile | sort > DirList & and the operating system displays [4] 3499 What does this mean? Choose one a. This is job number 4 and the PID of the sort command is 3499. b. This is job number 4 and the PID of the job is 3499. c. This is job number 3499 and the PID of the cat command is 4. d. This is job number 4 and the PID of the cat command is 3499.
  49. You attempt to log out but receive an error message that you cannot. When you issue the jobs command, you see a process that is running in the background. How can you fix this so that you can logout? Choose one a. Issue the kill command with the PID of each running command of the pipeline as an argument. b. Issue the kill command with the job number as an argument. c. Issue the kill command with the PID of the last command as an argument. d. Issue the kill command without any arguments.
  50. You have been given the job of administering a new server. It houses a database used by the sales people. This information is changed frequently and is not duplicated anywhere else. What should you do to ensure that this information is not lost? Choose one a. Create a backup strategy that includes backing up this information at least daily. b. Prepare a proposal to purchase a backup server c. Recommend that the server be made part of a cluster. d. Install an additional hard drive in the server.
  51. When planning your backup strategy you need to consider how often you will perform a backup, how much time the backup takes and what media you will use. What other factor must you consider when planning your backup strategy? _________
  52. Many factors are taken into account when planning a backup strategy. The one most important one is how often does the file ____________.
  53. Which one of the following factors does not play a role in choosing the type of backup media to use? Choose one: a. How frequently a file changes b. How long you need to retain the backup c. How much data needs to be backed up d. How frequently the backed up data needs to be accessed
  54. When you only back up one partition, this is called a ______ backup. Choose one a. Differential b. Full c. Partial d. Copy
  55. When you back up only the files that have changed since the last backup, this is called a ______ backup. Choose one a. Partial b. Differential c. Full d. Copy
  56. The easiest, most basic form of backing up a file is to _____ it to another location.
  57. When is the most important time to restore a file from your backup? Choose one a. On a regular scheduled basis to verify that the data is available. b. When the system crashes. c. When a user inadvertently loses a file. d. When your boss asks to see how restoring a file works.
  58. As a system administrator, you are instructed to backup all the users’ home directories. Which of the following commands would accomplish this? Choose one a. tar rf usersbkup home/* b. tar cf usersbkup home/* c. tar cbf usersbkup home/* d. tar rvf usersbkup home/*
  59. What is wrong with the following command? tar cvfb / /dev/tape 20 Choose one a. You cannot use the c option with the b option. b. The correct line should be tar -cvfb / /dev/tape20. c. The arguments are not in the same order as the corresponding modifiers. d. The files to be backed up have not been specified.
  60. You need to view the contents of the tarfile called MyBackup.tar. What command would you use? __________
  61. After creating a backup of the users’ home directories called backup.cpio you are asked to restore a file called memo.ben. What command should you type?
  62. You want to create a compressed backup of the users’ home directories so you issue the command gzip /home/* backup.gz but it fails. The reason that it failed is that gzip will only compress one _______ at a time.
  63. You want to create a compressed backup of the users’ home directories. What utility should you use?
  64. You routinely compress old log files. You now need to examine a log from two months ago. In order to view its contents without first having to decompress it, use the _________ utility.
  65. Which two utilities can you use to set up a job to run at a specified time? Choose one: a. at and crond b. atrun and crontab c. at and crontab d. atd and crond
  66. You have written a script called usrs to parse the passwd file and create a list of usernames. You want to have this run at 5 am tomorrow so you can see the results when you get to work. Which of the following commands will work? Choose one: a. at 5:00 wed usrs b. at 5:00 wed -b usrs c. at 5:00 wed -l usrs d. at 5:00 wed -d usrs
  67. Several of your users have been scheduling large at jobs to run during peak load times. How can you prevent anyone from scheduling an at job? Choose one: a. delete the file /etc/at.deny b. create an empty file called /etc/at.deny c. create two empty files: /etc/at.deny and /etc/at.allow file d. create an empty file called /etc/at.allow
  68. How can you determine who has scheduled at jobs? Choose one: a. at -l b. at -q c. at -d d. atwho
  69. When defining a cronjob, there are five fields used to specify when the job will run. What are these fields and what is the correct order? Choose one: a. minute, hour, day of week, day of month, month b. minute, hour, month, day of month, day of week c. minute, hour, day of month, month, day of week d. hour, minute, day of month, month, day of week
  70. You have entered the following cronjob. When will it run? 15 * * * 1,3,5 myscript Choose one: a. at 15 minutes after every hour on the 1st, 3rd and 5th of each month. b. at 1:15 am, 3:15 am, and 5:15 am every day c. at 3:00 pm on the 1st, 3rd, and 5th of each month d. at 15 minutes after every hour every Monday, Wednesday, and Friday
  71. As the system administrator you need to review Bob’s cronjobs. What command would you use? Choose one: a. crontab -lu bob b. crontab -u bob c. crontab -l d. cronq -lu bob
  72. In order to schedule a cronjob, the first task is to create a text file containing the jobs to be run along with the time they are to run. Which of the following commands will run the script MyScript every day at 11:45 pm? Choose one: a. * 23 45 * * MyScript b. 23 45 * * * MyScript c. 45 23 * * * MyScript d. * * * 23 45 MyScript
  73. Which daemon must be running in order to have any scheduled jobs run as scheduled? Choose one: a. crond b. atd c. atrun d. crontab
  74. You want to ensure that your system is not overloaded with users running multiple scheduled jobs. A policy has been established that only the system administrators can create any scheduled jobs. It is your job to implement this policy. How are you going to do this? Choose one: a. create an empty file called /etc/cron.deny b. create a file called /etc/cron.allow which contains the names of those allowed to schedule jobs. c. create a file called /etc/cron.deny containing all regular usernames. d. create two empty files called /etc/cron.allow and /etc/cron.deny
  75. You notice that your server load is exceptionally high during the hours of 10 am to 2 noon. When investigating the cause, you suspect that it may be a cron job scheduled by one of your users. What command can you use to determine if your suspicions are correct? Choose one: a. crontab -u b. crond -u c. crontab -l d. crond -l
  76. One of your users, Bob, has created a script to reindex his database. Now he has it scheduled to run every day at 10:30 am. What command should you use to delete this job. Choose one: a. crontab -ru bob b. crontab -u bob c. crontab -du bob d. crontab -lu bob
  77. What daemon is responsible for tracking events on your system?
  78. What is the name and path of the default configuration file used by the syslogd daemon?
  79. You have made changes to the /etc/syslog.conf file. Which of the following commands will cause these changes to be implemented without having to reboot your computer? Choose one: a. kill SIGHINT `cat /var/run/syslogd.pid` b. kill SIGHUP `cat /var/run/syslogd.pid` c. kill SIGHUP syslogd d. kill SIGHINT syslogd
  80. Which of the following lines in your /etc/syslog.conf file will cause all critical messages to be logged to the file /var/log/critmessages? Choose one: a. *.=crit /var/log/critmessages b. *crit /var/log/critmessages c. *=crit /var/log/critmessages d. *.crit /var/log/critmessages
  81. You wish to have all mail messages except those of type info to the /var/log/mailmessages file. Which of the following lines in your /etc/syslogd.conf file would accomplish this? Choose one: a. mail.*;mail!=info /var/log/mailmessages b. mail.*;mail.=info /var/log/mailmessages c. mail.*;mail.info /var/log/mailmessages d. mail.*;mail.!=info /var/log/mailmessages
  82. What is the name and path of the main system log?
  83. Which log contains information on currently logged in users? Choose one: a. /var/log/utmp b. /var/log/wtmp c. /var/log/lastlog d. /var/log/messages
  84. You have been assigned the task of determining if there are any user accounts defined on your system that have not been used during the last three months. Which log file should you examine to determine this information? Choose one: a. /var/log/wtmp b. /var/log/lastlog c. /var/log/utmp d. /var/log/messages
  85. You have been told to configure a method of rotating log files on your system. Which of the following factors do you not need to consider? Choose one: a. date and time of messages b. log size c. frequency of rotation d. amount of available disk space
  86. What utility can you use to automate rotation of logs?
  87. You wish to rotate all your logs weekly except for the /var/log/wtmp log which you wish to rotate monthly. How could you accomplish this. Choose one: a. Assign a global option to rotate all logs weekly and a local option to rotate the /var/log/wtmp log monthly. b. Assign a local option to rotate all logs weekly and a global option to rotate the /var/log/wtmp log monthly. c. Move the /var/log/wtmp log to a different directory. Run logrotate against the new location. d. Configure logrotate to not rotate the /var/log/wtmp log. Rotate it manually every month.
  88. You have configured logrotate to rotate your logs weekly and keep them for eight weeks. You are running our of disk space. What should you do? Choose one: a. Quit using logrotate and manually save old logs to another location. b. Reconfigure logrotate to only save logs for four weeks. c. Configure logrotate to save old files to another location. d. Use the prerotate command to run a script to move the older logs to another location.
  89. What command can you use to review boot messages?
  90. What file defines the levels of messages written to system log files?
  91. What account is created when you install Linux?
  92. While logged on as a regular user, your boss calls up and wants you to create a new user account immediately. How can you do this without first having to close your work, log off and logon as root? Choose one: a. Issue the command rootlog. b. Issue the command su and type exit when finished. c. Issue the command su and type logoff when finished. d. Issue the command logon root and type exit when finished.
  93. Which file defines all users on your system? Choose one: a. /etc/passwd b. /etc/users c. /etc/password d. /etc/user.conf
  94. There are seven fields in the /etc/passwd file. Which of the following lists all the fields in the correct order? Choose one: a. username, UID, GID, home directory, command, comment b. username, UID, GID, comment, home directory, command c. UID, username, GID, home directory, comment, command d. username, UID, group name, GID, home directory, comment
  95. Which of the following user names is invalid? Choose one: a. Theresa Hadden b. thadden c. TheresaH d. T.H.
  96. In order to prevent a user from logging in, you can add a(n) ________at the beginning of the password field.
  97. The beginning user identifier is defined in the _________ file.
  98. Which field is used to define the user’s default shell?
  99. Bob Armstrong, who has a username of boba, calls to tell you he forgot his password. What command should you use to reset his command?
  100. Your company has implemented a policy that users’ passwords must be reset every ninety days. Since you have over 100 users you created a file with each username and the new password. How are you going to change the old passwords to the new ones? Choose one: a. Use the chpasswd command along with the name of the file containing the new passwords. b. Use the passwd command with the -f option and the name of the file containing the new passwords. c. Open the /etc/passwd file in a text editor and manually change each password. d. Use the passwd command with the -u option.
Continue reading Some Basic Interview Question : Linux Based

Some Interview Question: CCNA & Basic Networking

Basics Q & A {Switching}

1) What is unicast and how does it work?

** Unicast is a one-to-one transmission method. A single frame is sent from the source to a destination on a network. When this frame is received by the switch, the frame is sent on to the network, and the network passes the frame to its destination from the source to a specific destination on a network.

2) What is multicast and how does it work?

** Multicast is a one-to-many transmission method. A single frame is sent from the source to multiple destinations on a network using a multicast address. When this frame is received by the switch, the frame is sent on to the network and the network passes the frame to its intended destination group.

3: What is broadcast and how does it work?

** Broadcast is a one-to-all transmission method. A single frame is sent from the source to a destination on a network using a multicast address. When this frame is received by the switch, the frame is sent on to the network. The network passes the frame to all nodes in the destination network from the source to an unknown destination on a network using a broadcast address. When the switch receives this frame, the frame is sent on to all the networks, and the networks pass the frame on to all the nodes. If it reaches a router, the broadcast frame is dropped.

4: What is fragmentation?

** Fragmentation in a network is the breaking down of a data packet into smaller pieces to accommodate the maximum transmission unit (MTU) of the network.

5:What is MTU? What's the MTU for traditional Ethernet?

** MTU is the acronym for maximum transmission unit and is the largest frame size that can be transmitted over a network. Messages longer than the MTU must be divided into smaller frames. The network layer (Layer 3) protocol determines the MTU from the data link layer (Layer 2) protocol and fragments the messages into the appropriate frame size, making the frames available to the lower layer for transmission without further fragmentation. The MTU for Ethernet is 1518 bytes.

6: What is a MAC address?

** A MAC address is the physical address of a network device and is 48 bits (6 bytes) long. MAC addresses are also known as physical addresses or hardware addresses.

7) What is the difference between a runt and a giant, specific to traditional Ethernet?

** In Ethernet a runt is a frame that is less than 64 bytes in length, and a giant is a frame that is greater than 1518 bytes in length. Giants are frames that are greater than the MTU used, which might not always be 1518 bytes.

8: What is the difference between store-and-forward and cut-through switching?

** Cut-through switching examines just the frame header, determining the output switch port through which the frame will be forwarded. Store-and-forward examines the entire frame, header and data payload, for errors. If the frame is error free, it is forwarded out its destination switch port interface. If the frame has errors, the switch drops the frame from its buffers. This is also known as discarding the frame to the bit bucket.

9: What is the difference between Layer 2 switching and Layer 3 switching?

* * Layer 2 switches make their forwarding decisions based on the Layer 2 (data link) address, such as the MAC address. Layer 3 switches make their forwarding decisions based on the Layer 3 (network) address.

10: What is the difference between Layer 3 switching and routing?

** The difference between Layer 3 switching and routing is that Layer 3 switches have hardware to pass data traffic as fast as Layer 2 switches. However, Layer 3 switches make decisions regarding how to transmit traffic at Layer 3 in the same way as a router. A Layer 3 switch cannot use WAN circuits or use routing protocols; a router is still required for these functions.

Materials About CCNA

OSI

(ISO) International organization for standardization

Iso has designed a reference model called osi reference model(open system interconnection).
It has 7 layers. It says ठाट Any n/w for comunication needs 7 layers


7.Application layer:

The user uses application layer to send the data। The protocols@ this layer are ftp,http,smtp(e-mail) telenet etc.

6.Presentation layer:

Presentation layer takes the data from application layer and presentIn different formats for securing reason. The services offered @This layer areCompression – decompressionCoding – decodingEncryption - decryption

5. Session layer:

Establishing the session or the conectivity n/w n/w 1 & n/w 2 is doneBy the session layer.It 1. Establishes a session2. maintains it &3. Terminates it b/w the application

4. Transport layer:

End-end connectivity during a session b/w two application is doneBy the transport layer. It also decides the type of connection like tcpor udp i.e. connection oriented or connection less.Services:SequencingFlow ctrl, error detection & correctionTransport layer info + data is called segment

3. Netwrok layer :

Logical addressing is done at thenetwork layer i.e. source address &destination address are attached to the data.Protocols @network layerRouted protocols routing protocolsEg: ip,ipx eg: rip,igrp,ospfRouted protocols: they always carry the data along with themRouting protocol: they identify the path for routed protocol tocarry the dataAt this layer routers & layer 3 switches forms packets.

2.Data link layer:

It has two Sub layersa)MAC{Media access control } b) LLC {logical link control framing of data}Ip address is lik the pincode & MAC address is like house number.Here layer2 switches are used.Wab protocols used at this layer are PPP,HDLC,FP,X.25 etc.Here error checking CRC bits are added to the packetsDLL info+ packets --> frames

1. physical layer:

Takes care of physical connectivity i.e connector,cable etc. hereFrames are converted to bits (1’s & 0’s).The devices like hubs, repeaters,cables & connectors are used atthis layer

Important Networking Q & A

1: What information must be stored in the route table?

** At a minimum, each entry of the routing table must include a destination address and the address of a next-hop router or an indication that the destination address is directly connected.

2: What does it mean when a route table says that an address is variably subnetted?

**Variably subnetted means that the router knows of more than one subnet mask for subnets of the same major IP address.

3: What are discontiguous subnets?

** Discontiguous subnets are two or more subnets of a major IP network address that are separated by a different major IP address.

4: What command is used to examine the route table in a Cisco router?

** show ip route is used to examine the routing table of a Cisco router.

5: What are the two bracketed numbers associated with the non-directly connected routes in the route table?

**The first bracketed number is the administrative distance of the routing protocol by which the route was learned. The second number is the metric of the route.

6: When static routes are configured to reference an exit interface instead of a next-hop address, in what way will the route table be different?

**When a static route is configured to reference an exit interface instead of a next-hop address, the destination address will be entered into the routing table as directly connected.

7: What is a summary route? In the context of static routing, how are summary routes useful?

**A summary route is a single route entry that points to multiple subnets or major IP addresses. In the context of static routes, summary routes can reduce the number of static routes that must be configured.

8: What is an administrative distance?

**An administrative distance is a rating of preference for a routing protocol or a static route. Every routing protocol and every static route has an administrative distance associated with it. When a router learns of a destination via more than one routing protocol or static route, it will use the route with the lowest administrative distance.

9: What is a floating static route?

** A floating static route is an alternative route to a destination. The administrative distance is set high enough that the floating static route is used only if a more-preferred route becomes unavailable.

10: What is the difference between equal-cost and unequal-cost load sharing?

**Equal-cost load sharing distributes traffic equally among multiple paths with equal metrics. Unequal-cost load sharing distributes packets among multiple paths with different metrics. The traffic will be distributed inversely proportional to the cost of the routes

OSPF Q & A

1: What is an OSPF neighbor?

*** From the perspective of an OSPF router, a neighbor is another OSPF router that is attached to one of the first router's directly connected links.


2: What is an OSPF adjacency?

***An OSPF adjacency is a conceptual link to a neighbor over which LSAs can be sent.

3: What is an LSA? How does an LSA differ from an OSPF Update packet?


***A router originates a link state advertisement to describe one or more destinations. An OSPF Update packet transports LSAs from one neighbor to another. Although LSAs are flooded throughout an area or OSPF domain, Update packets never leave a data link.

4: What is a link state database? What is link state database synchronization?

***The link state database is where a router stores all the OSPF LSAs it knows of, including its own. Database synchronization is the process of ensuring that all routers within an area have identical link state databases.

5: What is the default HelloInterval?

***The default OSPF HelloInterval is 10 seconds.

6: What is the default RouterDeadInterval?

***The default RouterDeadInterval is four times the HelloInterval.

7: What is a Router ID? How is a Router ID determined?

***A Router ID is an address by which an OSPF router identifies itself. It is either the numerically highest IP address of all the router's loopback interfaces, or if no loopback interfaces are configured, it is the numerically highest IP address of all the router's LAN interfaces.


8: What is an area?

***An area is an OSPF sub-domain, within which all routers have an identical link state database.

9: What is the significance of area 0?

***Area 0 is the backbone area. All other areas must send their inter-area traffic through the backbone.

10: What is MaxAge?

***MaxAge, 1 hour, is the age at which an LSA is considered to be obsolete.


EIGRP Q & A

1: Is EIGRP a distance vector or a link state routing protocol?

*** EIGRP is a Hybrid routing protocol,it have features of both distance vector and link state routing protocol.

2: What is the maximum configured bandwidth EIGRP will use on a link? Can this percentage be changed?

*** By default, EIGRP uses no more than 50% of the link's bandwidth, based on the bandwidth configured on the router's interface. This percentage to be changed with the command ip bandwidth-percent eigrp.

3: How do EIGRP and IGRP differ in the way they calculate the composite metric?

*** EIGRP and IGRP use the same formula to calculate their composite metrics, but EIGRP scales the metric by a factor of 256.

4: In the context of EIGRP, what does the term reliable delivery mean? Which two methods ensure reliable delivery of EIGRP packets?

*** Reliable delivery means EIGRP packets are guaranteed to be delivered, and they are delivered in order. RTP uses a reliable multicast, in which received packets are acknowledged, to guarantee delivery; sequence numbers are used to ensure that they are delivered in order.

5: Which mechanism ensures that a router is accepting the most recent route entry?

*** Sequence numbers ensure that a router is receiving the most recent route entry.

6: What is the multicast IP address used by EIGRP?

*** EIGRP uses the multicast address 224.0.0.10.

7: At what interval, by default, are EIGRP Hello packets sent?

*** The default EIGRP Hello interval is 5 seconds, except on some slow-speed (T1 and below) interfaces, where the default is 60 seconds.

8: What is the default hold time?

*** The EIGRP default hold time is three times the Hello interval.

9: What is the difference between the neighbor table and the topology table?

*** The neighbor table stores information about EIGRP-speaking neighbors; the topology table lists all known routes that have feasible successors.


10: What is the feasibility condition?

*** The feasibility condition is the rule by which feasible successors are chosen for a destination. The feasibility condition is satisfied if a neighbor's advertised distance to a destination is lower than the receiving router's feasible distance to the destination. In other words, a router's neighbor meets the feasibility condition if the neighbor is metrically closer to the destination than the router. Another way to describe this is that the neighbor is "downstream" relative to the destination

OSPF Q & A Part -II

1: What are the five OSPF packet types? What is the purpose of each type?

*** The five OSPF packet types, and their purposes, are:

Hellos, which are used to discover neighbors, and to establish and maintain adjacencies

Updates, which are used to send LSAs between neighbors

Database Description packets, which a router uses to describe its link state database to a neighbor during database synchronization

Link State Requests, which a router uses to request one or more LSAs from a neighbor's link state database

Link State Acknowledgments, used to ensure reliable delivery of LSAs


2: What are LSA types 1 to 5 and LSA type 7? What is the purpose of each type?

*** The most common LSA types and their purposes are:

Type 1 (Router LSAs) are originated by every router and describe the originating router, the router's directly connected links and their states, and the router\xd5 s neighbors.

Type 2 (Network LSAs) are originated by Designated Routers on multiaccess links and describe the link and all attached neighbors.

Type 3 (Network Summary LSAs) are originated by Area Border Routers and describe inter-area destinations.

Type 4 LSAs (ASBR Summary LSAs) are originated by Area Border Routers to describe Autonomous System Boundary Routers outside the area.

Type 5 (AS External LSAs) are originated by Autonomous System Boundary Routers to describe destinations external to the OSPF domain.

Type 7 (NSSA External LSAs) are originated by Autonomous System Boundary Routers within not-so-stubby areas.

3: What are the four OSPF router types?

***The four OSPF router types are:

# Internal Routers, whose OSPF interfaces all belong to the same area

# Backbone Routers, which are Internal Routers in Area 0

# Area Border Routers, which have OSPF interfaces in more than one area

# Autonomous System Boundary Routers, which advertise external routes into the OSPF domain


4: What are the four OSPF path types?

***The four OSPF path types are:

Intra-area paths

Inter-area paths

Type 1 external paths

Type 2 external paths


5: What are the five OSPF network types?

*** The five OSPF network types are:

i)Point-to-point networks

ii) Broadcast networks

iii) Non-broadcast multi-access (NBMA) networks

iv) Point-to-multipoint networks

v) Virtual links


6: What is a Designated Router?

***A Designated Router is a router that represents a multiaccess network, and the routers connected to the network, to the rest of the OSFP domain.


7: How does a Cisco router calculate the outgoing cost of an interface?

***Cisco IOS calculates the outgoing cost of an interface as 108/BW, where BW is the configured bandwidth of the interface.


8: What is a partitioned area?

***An area is partitioned if one or more of its routers cannot send a packet to the area's other routers without sending the packet out of the area.


9: What is a virtual link?

*** A virtual link is a tunnel that extends an OSPF backbone connection through a non-backbone area.


10: What is the difference between a stub area, a totally stubby area, and a not-so-stubby area?

***A stub area is an area into which no type 5 LSAs are flooded. A totally stubby area is an area into which no type 3, 4, or 5 LSAs are flooded, with the exception of type 3 LSAs to advertise a default route. Not-so-stubby areas are areas through which external destinations are advertised into the OSPF domain, but into which no type 5 LSAs are sent by the ABR.


11: What is the difference between OSPF network entries and OSPF router entries?

*** OSPF network entries are entries in the route table, describing IP destinations. OSPF router entries are entries in a separate route table that record only routes to ABRs and ASBRs.


12: Why is type 2 authentication preferable over type 1 authentication?

***Type 2 authentication uses MD5 encryption, whereas type 1 authentication uses clear-text passwords.


13: Which three fields in the LSA header distinguish different LSAs? Which three fields in the LSA header distinguish different instances of the same LSA?

***The three fields in the LSA header that distinguish different LSAs are the Type, Advertising Router, and the Link State ID fields. The three fields in the LSA header that distinguish different instances of the same LSA are the Sequence Number, Age, and Checksum fields

Routing Information Protocol Version 2

1: Which three fields are new to the RIPv2 message format?

*** The Route Tag field, the Subnet Mask field, and the Next Hop field are RIPv2 extensions that do not exist in RIPv1 messages. The basic format of the RIP message remains unchanged between the two versions; version 2 merely uses fields that are unused in version 1.

2: Besides the extensions defined by the three fields of question 1, what are the other two major changes from RIPv1?

***In addition to the functions that use the new fields, RIPv2 supports authentication and multicast updates.

3: What is the multicast address used by RIPv2? What is the advantage of multicasting messages over broadcasting them?

***RIPv2 uses the multicast address 224.0.0.9. Multicasting of routing messages is better than broadcasting because hosts and non-RIPv2 routers will ignore the multicast messages .

4: What is the purpose of the Route Tag field in the RIPv2 message?

*** When another routing protocol uses the RIPv2 domain as a transit domain, the protocol external to RIPv2 can use the Route Tag field to communicate information to its peers on the other side of the RIPv2 domain.

5: What is the purpose of the Next Hop field?

*** The Next Hop field is used to inform other routers of a next-hop address on the same multiaccess network that is metrically closer to the destination than the originating router.

6: What is the UDP port number used by RIPv2?

***RIPv2 uses the same UDP port number as RIPv1, port number 520.

7: Which one feature must a routing protocol have to be a classless routing protocol?

***A classless routing protocol does not consider the major network address in its route lookups, but just looks for the longest match.

8: Which one feature must a routing protocol have to use VLSM?

*** To support VLSM, a routing protocol must be able to include the subnet mask of each destination address in its updates.

9: Which two types of authentication are available with Cisco's RIPv2? Are they both defined in RFC 1723?

*** Cisco's implementation of RIPv2 supports clear-text authentication and MD5 authentication. Only clear-text authentication is defined in RFC 1723.

Routing Information Protocol

1:What port does RIP use?

* RIP uses UDP port 520.

2:What metric does RIP use? How is the metric used to indicate an unreachable network?

* RIP uses a hop count metric. An unreachable network is indicated by setting the hop count to 16, which RIP interprets as an infinite distance.

3:What is the update period for RIP?

* RIP sends periodic updates every 30 seconds minus a small random variable to prevent the updates of neighboring routers from becoming synchronized.

4:How many updates must be missed before a route entry will be marked as unreachable?

* A route entry is marked as unreachable if six updates are missed.

5:What is the purpose of the garbage collection timer?

* The garbage collection timer, or flush timer, is set when a route is declared unreachable. When the timer expires, the route is flushed from the route table. This process allows an unreachable route to remain in the routing table long enough for neighbors to be notified of its status

V-LAN

1. What is a VLAN? When is it used?

Answer: A VLAN is a group of devices on the same broadcast domain, such as a logical subnet or segment. VLANs can span switch ports, switches within a switch block, or closets and buildings. VLANs group users and devices into common workgroups across geographical areas. VLANs help provide segmentation, security, and problem isolation.

2. When a VLAN is configured on a Catalyst switch port, in how much of the campus network will the VLAN number be unique and significant?

Answer: The VLAN number will be significant in the local switch. If trunking is enabled, the VLAN number will be significant across the entire trunking domain. In other words, the VLAN will be transported to every switch that has a trunk link supporting that VLAN.

3. Name two types of VLANs in terms of spanning areas of the campus network.

Answer: Local VLAN
End-to-end VLAN

4. What switch commands configure Fast Ethernet port 4/11 for VLAN 2?

Answer: interface fastethernet 4/11
switchport mode access
switchport access vlan 2


5. Generally, what must be configured (both switch and end-user device) for a port-based VLAN?

Answer: The switch port

6. What is the default VLAN on all ports of a Catalyst switch?

Answer: VLAN 1

7. What is a trunk link?

Answer: A trunk link is a connection between two switches that transports traffic from multiple VLANs. Each frame is identified with its source VLAN during its trip across the trunk link.

8. What methods of Ethernet VLAN frame identification can be used on a Catalyst switch trunk?

Answer: 802.1Q
ISL

9. What is the difference between the two trunking methods? How many bytes are added to trunked frames for VLAN identification in each method?

Answer: ISL uses encapsulation and adds a 26-byte header and a 4-byte trailer. 802.1Q adds a 4-byte tag field within existing frames, without encapsulation.

10. What is the purpose of the Dynamic Trunking Protocol (DTP)?

Answer: DTP allows negotiation of a common trunking method between endpoints of a trunk link.

11. What commands are needed to configure a Catalyst switch trunk port Gigabit 3/1 to transport only VLANs 100, 200 through 205, and 300 using IEEE 802.1Q? (Assume that trunking is enabled and active on the port already. Also assume that the interface gigabit 3/1 command already has been entered.)

Answer: switchport trunk allowed vlan 100, 200-205, 300


12. Two neighboring switch trunk ports are set to the auto mode with ISL trunking encapsulation mode. What will the resulting trunk mode become?

Answer: Trunking will not be established. Both switches are in the passive auto state and are waiting to be asked to start the trunking mode. The link will remain an access link on both switches.

13. Complete the following command to configure the switch port to use DTP to actively ask the other end to become a trunk:
switchport mode _________________


Answer: switchport mode dynamic desirable


14. Which command can set the native VLAN of a trunk port to VLAN 100 after the interface has been selected?

Answer: switchport trunk native vlan 100


15. What command can configure a trunk port to stop sending and receiving DTP packets completely?

Answer: switchport nonegotiate

16. What command can be used on a Catalyst switch to verify exactly what VLANs will be transported over trunk link gigabitethernet 4/4?

Answer: show interface gigabitethernet 4/4 switchport
or
show interface gigabitethernet 4/4 switchport trunk


17. Suppose that a switch port is configured with the following commands. A PC with a nontrunking NIC card then is connected to that port. What, if any, traffic will the PC successfully send and receive?

interface fastethernet 0/12
switchport trunk encapsulation dot1q
switchport trunk native vlan 10
switchport trunk allowed vlan 1-1005
switchport mode trunk

Answer: The PC expects only a single network connection, using a single VLAN. In other words, the PC can't participate in any form of trunking. Only untagged or unencapsulated frames will be understood. Recall that an 802.1Q trunk's native VLAN is the only VLAN that has untagged frames. Therefore, the PC will be capable of exchanging frames only on VLAN 10, the native VLAN.

Networking Basics

1: What is the definition of a network?

** A network is a system of lines or channels that cross or interconnect, or a group or system of electrical components and connecting circuitry designed to function in a specific manner.

2: What are network models?

** Network models provide the guiding principles behind the development of network standards.

3: What is a network standard, and why are there network standards?

** Network standards define the rules of network communication and are like laws that must be followed for different equipment vendors to work together.

4: What is a proprietary feature?

** If a vendor implements a feature that does not adhere to any network standards, it is called a proprietary feature.

5: What are the three data transmission modes, and how do they operate?

** Simplex mode, half-duplex mode, and full-duplex mode. Simplex mode is one-way communication only. Half-duplex mode is two-way communication, but not at the same time. Full-duplex mode is simultaneous two-way communication.

6: List the major characteristics of a LAN.

** The primary characteristic of a LAN is its geographic coverage. LANs are found in a small geographic area where there is a short distance between connected computers, as in small offices or on each floor of a larger office building. LANs enable the sharing of office resources, such as file servers for file sharing among users or print servers for shared printers.

7: List the major characteristics of a MAN.

** MANs are found in a metropolitan, or citywide, geographic area, interconnecting two or more office buildings in a broader geographic region than a LAN would support, but not so broad that a WAN would be required.

8: List the major characteristics of a WAN.

** WANS are found in broad geographic areas, often spanning states and countries, and are used to connect LANs and WANs together.

9: What are the three parts of a frame? What is a function of each part?

** Header, data (or payload), trailer. The header is the beginning of the frame, significant in that the frame's source and destination are found in the frame header. The payload is the data part of the frame, the user's information. The trailer identifies the end of the frame.

10: What function in a network does cabling provide?

** Cabling provides the physical interconnection between network devices and nodes.

11: List some examples of user data.

** Examples of user data include e-mail, web-browsing traffic, word-processed documents, spreadsheets, database updates.

12: What is the best definition of network topology?

** Network topology refers to the physical or logical geometric arrangement of interconnected network devices.

13: What is the best definition of network protocol?

** A network protocol is the communication rules and formats followed by all interconnected devices on a network requiring communication with one another.

14: What is the definition of network media?

** Network media refers to the physical component of a network. Communication signals traverse network media from source to destination. Some examples of network media are copper and fiber-optic cabling.

15: What is a network origination point?

** A network connection has two ends: the origination and termination points. The origination point is the source of the data—the location from which the data is being sent.

16: What is a network termination point?

** A network connection has two ends: the origination and termination points. The termination point is the destination of the data—the location to which the data is being sent.

Layer 3 Switching

1. What might you need to implement interVLAN routing?

** One or more Layer 3 interfaces

One or more SVIs

Static routes

A dynamic routing protocol

2. Can interVLAN routing be performed over a single trunk link?

** Yes. Packets can be forwarded between the VLANs carried over the trunk.

3. To configure an SVI, what commands are needed?

** First, make sure the VLAN is defined on the switch.

interface vlan vlan-id
ip address ip-address mask
no shutdown


4. What command can verify the VLAN assignments on a Layer 2 port?

** show interface type mod/num switchport

or

show interface status


5. A switch has the following interface configurations in its running configuration:

interface fastethernet 0/1
switchport access vlan 5
!
interface vlan 5
ip address 192.168.10.1 255.255.255.0
no shutdown


What is necessary for packets to get from the FastEthernet interface to the VLAN 5 SVI?

Answer: Nothing. Both are assigned to VLAN 5, so normal Layer 2 transparent bridging will take care of all forwarding between the two.

6. What is the source of FIB information?

** The routing table, as computed by the Layer 3 engine portion of a switch.

7. How often is the FIB updated?

** As needed. It is downloaded or updated dynamically by the Layer 3 engine whenever the routing topology changes or an ARP entry changes.

8. What is meant by the term "CEF punt"?

** A packet can't be forwarded or switched by CEF directly because it needs further processing. The packet is "punted" to the Layer 3 engine, effectively bypassing CEF for a more involved resolution.

9. What happens to the FIB when distributed CEF (dCEF) is used?

** It is simply replicated to each of the independent CEF engines. The FIB itself remains intact so that each engine receives a duplicate copy.

10. What happens during a "CEF glean" process?

** The MAC address (ARP reply) for a next-hop FIB entry is not yet known. The Layer 3 engine must generate an ARP request and wait for a reply before CEF forwarding can continue to that destination.

11. What does a multilayer switch do to the IP TTL value just before a packet is forwarded?

** The TTL is decremented by one, as if a router had forwarded the packet.

12. What is fallback bridging?

** On switch platforms that cannot multilayer-switch (route) all routable protocols, those protocols can be bridged transparently between VLANs instead.

13. Is it possible for an SVI to go down? If so, for what reasons?

** Yes. The SVI can be shut down administratively with the shutdown command, as with any other interface. Also, if the VLAN associated with the SVI is not defined or active, the SVI will appear to be down

OSPF Q & A in CCNP

1: Which command in OSPF shows the network LSA information?

** The command show ip ospf [process-id area-id] database network displays the network link-state information.

2: What command would you use to create a totally stubby area?

** The command area area-id stub no-summary will create a totally stubby area. This is a subcommand to the router ospf process-id command. It is necessary only on the ABR, but all the other routers in the area must be configured as stub routers.

3: What is a virtual link, and what command would you use to create it?

** A virtual link is a link that creates a tunnel through an area to the backbone (Area 0). This allows an area that cannot connect directly to the backbone to do so virtually. The command to create the link is area area-id virtual-link router-id. Note that the area-id that is supplied is that of the transit area, and the router-id is that of the router at the other end of the link. The command needs to be configured at both ends of the tunnel.

4: Where would you issue the command to summarize IP subnets? State the command that is used.

** Summarization is done at area boundaries. The command to start summarization is the area range command, with the syntax area area-id range address mask. To summarize external routes, use the summary-address command on the ASBRs.

5: How would you summarize external routes before injecting them into the OSPF domain?

** The command summary-address address mask is the command that you would use.

6: When is a virtual link used?

** A virtual link is used when an area is not directly attached to the backbone area (Area 0). This may be due to poor design and a lack of understanding about the operation of OSPF, or it may be due to a link failure. The most common cause of an area separating from the backbone is link failure, which can also cause the backbone to be segmented. The virtual link is used in these instances to join the two backbone areas together. Segmented backbone areas might also be the result of two companies merging.

7: Give the command for defining the cost of a default route propagated into an area.

** The command to define the cost of a default route propagated into another area is area area-id default-cost cost.

8: Give an example of when it would be appropriate to define a default cost.

** It is appropriate to define a default cost for the default route when a stub area has more than one ABR. This command allows the ABR or exit point for the area to be determined by the network administrator. If this link or the ABR fails, the other ABR will become the exit point for the area.

9: On which router is the area default cost defined?

** The default cost for the default route is defined on the ABR. The ABR will then automatically generate and advertise the route cost along with the default route.

10: Give the command to configure a stub area and state on which router it is configured.

** The command syntax to configure a stub area is area area-id stub. This command is configured on the ABR connecting to the area and on all the routers within the area. Once the configuration is completed, the Hellos are generated with the E bit set to 0. All routers in the area will only form adjacencies with other routers that have the E bit set.

11: What is the purpose of the area range command, and why is it configured on the ABR?

** The area range command is configured on an ABR because it dictates the networks that will be advertised out of the area. It is used to consolidate and summarize the routes at an area boundary.

12: Give the commands to configure a router to place subnets 144.111.248.0 through to 144.111.255.0 in Area 1 and to put all other interfaces into Area 0.

** The commands are as follows:


network 144.111.248.0 0.0.7.255 area 1



network 0.0.0.0 255.255.255.255 area 0


13: Give the syntax to summarize the subnets 144.111.248.0 to 144.111.254.255 into another autonomous system.

** The syntax is as follows:


summary-address 144.111.248.0 255.255.248.0


14: Explain briefly the difference between the area range command and the summary-address command.

** The area range command is used to summarize networks between areas and is configured on the ABR. The summary-address command is used to summarize networks between autonomous systems and is configured on the ASBR.

15: Explain the following syntax and what it will achieve: area 1 stub no-summary.

** The command area 1 stub no-summary creates a totally stubby area. The number after the word area indicates the area that is being defined as a totally stubby area. This is necessary because the router might be an ABR with connections to many areas. Once this command is issued, it prevents summarized and external routes from being propagated by the ABR into the area. To reach the networks and hosts outside the area, routers must use the default route advertised by the ABR into the area.

16: Why would you configure the routing process to log adjacency changes as opposed to turning on debug for the same trigger?

** The reason to configure the router process to log adjacency changes to syslog as opposed to running debug is an issue of resources. It takes fewer router and administrator resources to report on a change of state as it happens than to have the debugger running constantly. The debug process has the highest priority and thus everything waits for it.

17: Give some of the common reasons that neighbors fail to form an adjacency.

** Many OSPF problems stem from adjacency problems that propagate throughout the network. Many problems are often traced back to neighbor discrepancies.

If a router configured for OSPF routing is not seeing an OSPF neighbor on an attached network, do the following:

- Make sure that both routers are configured with the same IP mask, MTU, Interface Hello timer, OSPF Hello interval, and OSPF dead interval.

- Make sure that both neighbors are part of the same area and area type.

- Use the debug and show commands to trace the problem.

18: When configuring a virtual link, which routers are configured?

** The configuration is between the ABRs, where one of the ABRs resides in Area 0 and the other in the area that is disconnected from the backbone. Both of the ABRs are also members of the transit area. Having created the virtual link, both ABRs are now members of Area 0, the disconnected area, and the transit area.

19: What does the command area 1 default-cost 15 achieve?

** The command area 1 default-cost 15 will assign a cost of 15 to the default route that is to be propagated into the stub area. This command is configured on the ABR attached to the stub area.

20: Explain what is placed in the parameters area-id and router-id for the command area area-id virtual-link router-id.

** The parameter area-id is the area ID of the transit area. So if the ABR in Area 0 is creating a virtual link with the ABR in Area 3 through Area 2, the area ID stated in the command is Area 2. The router ID is the router ID of the router with whom the link is to be formed and a neighbor relationship and adjacency established.

Continue reading Some Interview Question: CCNA & Basic Networking