- Explain OSI (Open System Interconnect) layers i.e. from Layer 1 to 7.
Ans:- Application Layer – It creates a web interface between the user machine and the destination server. Its example is just like we access google.com or yahoo.com or any other website using http or https. Here http or https are application layer protocol. Other example is when we access our network devices using SSH or Telnet . SSH and Telnet are applications or interfaces between user machine and the destination server or device. Other examples are SNMP, SMTP, POP3, FTP, TFTP, DNS. Its Layer 7 in OSI model.
Presentation Layer – It deals with presentation, design, layout, format and extension of the files or data. e.g. is an email when we send from our machine to other user and we still see that the emails design and content remains exactly same the way we had sent. All this is done by Presentation layer. Its Layer 6
Session Layer – It creates, maintains or delete sessions between source and destination.
Transport Layer – It takes the data from one place to another and does data delivery. It is done using TCP or UDP. TCP is connection oriented and UDP is connection less with difference of the way these operate. In this layer, data will be encapsulated and converted in Segments. TCP and UDP assign port numbers to every session or application to form Socket. It helps in identifying the session and connectivity to correct application. Its layer 4
Network Layer– This layer deals with routing and addressing of devices. Similar to job of Traffic police. Routers and layer 3 devices work on this layer. The segments are converted in to Packets once network layer encapsulates the segment with network header. Its layer 3.
Data Link Layer:- It deals with layer 2 addresses such as MAC or physical addresses. Switches work in this layer. Network packets are converted in to Frames in this layer after encapsulation with appropriate header tagging. ARP protocol works in this layer.
Physical Layer – Here frames are converted in to bits and bytes. All of the non-intelligent devices such as Hubs or Transistors work in this layer. It is the actual layer that sends the data further on physical cables. It is Layer 1.
- Difference between TCP and UDP and which layers these work on?
Ans:- Both TCP and UDP work on Transport- purpose is to carry data from source and deliver at the destination. Difference is the functionality e.g TCP makes sure that data is delivered correctly with no errors. TCP follows 3 way handshaking to initiate the session. TCP does error recovery , maintains flow control , Its connection oriented i.e. maintains connection between source and destination. TCP consumes lot of memory because it performs functions like 3-way handshaking, flow control, error recovery and therefor it is slow as well. UDP is very quick in transferring of data and does not consume memory, reason is simple – it does not do error recovery or does not maintain session or flow control. UDP is known as connectionless protocol and it does not do error recovery. UDP is generally used in real time application or in Voice apps.
- Explain what is PDU and how data is moved or encapsulated between the layers
Ans:- PDU stands for Protocol data unit. When a user starts communication, data goes thru all OSI layers i.e. from application to physical layer. From Application layer till Session layer, there is no change in format of PDU. When it goes to Transport layer- it becomes Segment because it gets encapsulated by TCP or UDP headers. When the Segment reaches Network layer- PDU becomes “Packet”. Once it moves to Data Link Layer- PDU becomes “Frame”. At Physical layer, it gets converted in to Bits and Bytes. So this is how PDU moves – data to segments to packets to frames to bit/bytes to 0 and 1.
- Difference between Routed Protocols and Routing Protocols
Ans:- Routed Protocols work on Layer 3 i.e Network layer for addressing , means providing Identification to workstations, routers or connecting devices. e.g. IP, IPx, Appletalk, IPv6. Routing protocols are Dynamic in nature which means they advertise or broadcast information of routed protocols or networks within their defined boundaries. Simple words, Routing protocols advertise routed protocols
- List out the differences between Router and Layer 3 switch
Ans:- Router is used for communication between the Subnets or Networks. In other words, it works over WAN. While Layer 3 switch also has functionality of routing, But, It also does the Layer 2 work i.e. switching of data thru data plane. So, Layer 3 switch does perform layer 2 work too.
- Does Router forward Broadcast by default? If No, how we can configure it to do so?
Ans:- Router does not forward broadcast by default. We need to use “IP helper address” command under the interface. This command will serve the purpose of sending broadcast.
- Explain concept of Subnetting and Summarization
Ans:- Subnetting means to divide a network in to small networks to make use of network IPs which don’t get used. Summarization is to combine small networks and make it a superset. We do it mainly when we have to reduce the advertisement of network which consumes memory.
- What are the Private IP Ranges in Class A , B and C
Ans :- Class A : – 10.0.0.0 – 10.255.255.255 , Class B 172.16.0.0 – 172.31.255.255 Class C 192.168.0.0 – 192.168.255.255
- What is the broadcast IP of subnet 10.1.1.0/28
Ans:- 10.1.1.15 is the broadcast IP. Range of this subnet is 10.1.1.0 – 10.1.1.15 . Broadcast is the last ip of the subnet
- If one of the IPs is 10.1.1.19/29, what will be its subnet or network number?
Ans:- 10.1.1.16/29 is the subnet because it’s range is 10.1.1.16 – 10.1.1.24 . So 10.1.1.16 falls in this range
- What will be Class C subnet mask if requirement is of 29 networks?
Ans:- 2 power 5 = 32 which covers 29 networks. So class C will have 24 +5 = 29 . So /29 is the answer
- If requirement is of 102 hosts what is the best possible subnet mask?
Ans:- /26 = 64-2=62 valid hosts , /25 = 128-2 = 126 valid hosts. So requirement is 102 which falls under /25
- Can the IP 192.168.100.7/29 be considered as Valid IP for assignment on user machine?
Ans:- this IP is part of 192.168.100.0/29 , range is 192.168.100.0 – 7 . and 7 is broadcast IP. So broadcast IP should not be assigned to machine. Hence it is not a valid.
- Why do we use subnet mask? Explain the purpose
Ans:- Subnet mask defines the boundaries. So it is very much needed. Network is like a city with multiple colonies. So there should be a mechanism that defines the boundaries of a Network. It will help limiting the exchange of information and broadcast.
- Why do we use Default Gateway on user machines and on network devices?
Ans:- Default Gateway is needed in routing to help in exchanging or communicating with other networks. Reason is that Router or Layer 3 device does not forward broadcast. Hence, there needed to be device which can forward information i.e. router. So on all machines, IP of router or layer 3 gateway has to be assigned so that Unicast can be forwarded.
- What is ARP (Address Resolution Protocol), Proxy ARP? Explain by giving an example
Ans:- ARP makes the communication happen of logical address with physical address. I.e layer 2 to layer 3 . MAC addresses of physical addresses are layer 2 and IP , IPx or IPv6 are later 3. So ARP protocol does this work .
- What is DNS? Why do we use it and on what TCP or UDP port does it use?
Ans:- DNS maintains public records of hostnames and IP addresses. It can also maintain private records if it’s being used internally in an ORG. It is not feasible for end users to remember IP address of every website, hence DNS comes in picture. DNS Server to DNS Server communication happens over TCP 53. Client to DNS Server communication happens over UDP 53.
- What is BOOTP packet? Why do we use DHCP, how it works? What TCP or UDP port numbers does it use?
Ans:- BOOTP are broadcast packets generated by workstations to get the IP addresses. DHCP is a centralized server which does the work of allocating details such as IP Addresses, Subnet, Gateway, DNS, WINS, PAC File details to user workstation as a response of BOOTP packet. If DHCP is configured and connected with in the VLAN or segment, then user machine will generate broadcast and DHCP will respond to it. After verifying the broadcast packet and scopes, it allocates IP from the range and makes note of it. It uses UDP port 67 when client makes request and UDP 68 when Server responds to it. If DHCP is not setup within the VLAN or Segment, then “ip helper address” has to be set under VLAN or default gateway to direct or forward broadcast to DHCP server. Same process follows thereafter.
- Can we setup DHCP on router or switch?
Ans:- Yes, we can setup DHCP server on router or switch which has IP address configured.
- What protocols work on Application layer? Give some names
Ans:- Http, Https, SNMP, Pop3, Telnet, FTP, SMTP, TFTP, SSH and many more.
- Explain the difference between FTP and TFTP?
Ans:- FTP and TFTP are both used for transferring of data. These applications work on Application layer but on different protocols. FTP is generally used for heavy file transfer. It uses two ports TCP 20 and 21. TFTP app is used for small data transfer and mostly used in network devices for uploading or downloading the configuration or IOS images. It works on UDP and therefor its overhead is very less and its unidirectional with no authentication due to its connectionless properties of UDP. FTP is bidirectional with option of authentication.
- What is the use of Floating Static Route? How it is different from Normal Static route
Ans:- If you have two static routes for the same network with different next hops – then load sharing will happen and both will come in routing table. To avoid this situation of load sharing, we can make use of Administrative Distance value set in one of the static route. By default AD is 1 for static route with next hop IP, if we set AD as 10, then preference will be given to static with AD 1. So, route with AD value will be known as Floating static route. It will come in action, when next hop of active route goes down.
- Why do we use Dynamic Routing Protocols? Name all protocols
Ans:- Dynamic Routing Protocols help in advertising the subnet or network information automatically within defined boundaries. This is to say, we do not have to manually add static routes. E.g. RIP, IGRP, EIGRP, OSPF, IS-IS, BGP
- What is Administrative Distance? and How it’s different from Route Metric
Ans:- It is the value defined to routing protocols. It tells which protocol to prefer when comparison happens for route to be added in routing table. Route Metric is the value or cost calculated from formula. Metric tells which route to prefer if comparison happens between two paths under the same Routing Protocol OR AD value.
- Tell AD numbers of all protocols including EIGRP Summary and External Routes
Ans:- Static Route with exit interface = 0, connected route= 0 , static route with next hop ip = 1, RIP =120, IGRP = 100 , EIGRP = 90 , External EIGRP = 170, Summary EIGRP = 5, OSPF = 110, IS-IS=115, EGP= 140, Internal BGP = 200, External BGP = 20
Ans:- RIPv1 uses Broadcast, Ripv2 uses multicast ip 188.8.131.52 , IGRP uses Broadcast, EIGRP uses multicast 184.108.40.206 , OSPF uses 220.127.116.11 and 18.104.22.168
- Difference between classful and classless routing?
Ans:- Classful routing does not support subnetting e.g if you are advertising 10.1.1.24/29 using RIP v1. It will be converted in to 10.0.0.0/8. Classless routing protocol will specifically advertise subnet or small subnets apart from complete /8, /16 and /24.