Ccna: Osi Tcp/Ip Cheat Sheet
Ccna: Osi Tcp/Ip Cheat Sheet
Ccna: Osi Tcp/Ip Cheat Sheet
1
CCNA: OSI TCP/IP CHEAT SHEET
TCP/IP Model
TCP/IP is framework for computer network protocols created by DARPA in 1970s. It has four layers:
Link Layer: is analogous to Data Link layer of the OSI model. TCP/IP was designed to be hardware independent
hence implemented on the top of the virtually any hardware networking device
Internet Layer: has two functions
1. Host Addressing and Identification
2. Packet Routing
Transport Layer: responsible for end-to-end delivery of traffic along with error control segmentation, congestion
control, flow control and application addressing (in term of port numbers)
Application Layer: It refer to the session, presentation and application layers of the OSI reference model
2
CCNA: OSI TCP/IP CHEAT SHEET
Troubleshooting
OSI model uses bottom up approach
Layer 1 (physical) problems
• Interface administrative shutdown
• Faulty or broken cables
• Broken or faulty pins/connectors
• No power
• No cable connected or wrong interface
• Failing or damaged interface
• Incorrect cable for the interface
When there is a physical layer problem, the following states are applicable to router interfaces:
1. Administratively down/down – not configured
2. Down/down – L1
Layer 2 (data link) problems
• Incorrect configuration on the interface
• Clock rate missing or incorrect
• Incorrect layer 2 protocol settings
• Faulty network card
• Interface shut down
In case of a layer-2 problem, the following states are applicable to router interface:
1. Up/Down
Layer 3 (network) problems
• Mis-configured routing protocol
• Incorrect IP/network addressing
• Incorrect subnet masking
Usually both physical and line protocol are in up/up state
Example: Let us consider a simple network running RIP version 2 (as shown figure). The network numbers are
10.0.0.0, 11.0.0.0, 12.0.0.0, and 13.0.0.0. We know that each router should be able to see all of the networks. For
Router A, we know that networks 10.0.0.0 and 11.0.0.0 are directly connected to the router. Networks 12.0.0.0, and
13.0.0.0 should be in the routing table as a RIP route. In order for this to happen all of the interfaces connected to
the other routers should be up/up and the correct routes should be in the routing table
Rather than checking to see if the cables are attached first check to see if the router can see the other networks
RouterA# show ip route | begin Gateway
Gateway of last resort is not set
C 10.0.0.0/24 is directly connected, 10.0.0.1
We can see that only the directly connected Ethernet network can be seen. The WAN network is not there. Start at
layer 1 and check that the router can see the cable
RouterA# show controllers serial 0
HD unit 0, idb = 0x1AE828, driver structure at 0x1B4BA0
buffer size 1524 HD unit 0, V.35 DTE cable
So we can see that the cable is attached. It is a DTE cable, so we know we do not need to use the “clock rate”
command on this interface. If the cable on the other end was DCE then it should have the “clock rate” command
configured on it.
Next we need to check layer 2. The interface has a cable attached but is it showing up/up?
RouterA#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Serial0 11.0.0.1 YES unset administratively down down
Ethernet0 10.0.0.1 YES unset up up
3
CCNA: OSI TCP/IP CHEAT SHEET
Troubleshooting
Somebody has neglected to open or “no shutdown” the serial interface. This can easily be corrected with the “no
shut” command
RouterA#config terminal
RouterA(config)#interface serial 0
RouterA(config-if)#no shutdown
%LINK-3-UPDOWN: Interface Serial0, changed state to up
RouterA(config-if)#end
%LINK-3-UPDOWN: Interface Serial0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down
We should now look at the interfaces to see if there is a difference
RouterA#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Serial0 11.0.0.1 YES unset up down
Ethernet0 10.0.0.1 YES unset up up
Okay, so now the interface is administratively up; however, it is showing as up/down. If the serial interface cannot
see keepalives from the other interface then it will remain up/ down. We need to examine the configuration on our
serial interface and compare it with its neighbor on Router B
RouterA#show run interface serial 0
interface Serial0
ip address 11.0.0.1 255.255.255.0
no ip directed-broadcast
encapsulation ppp
The encapsulation type is set to PPP that is not the default HDLC. The diagram indicates that this side should be
using PPP. On Router B, we would also check to make sure the interfaces are up/up
RouterB#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Serial0 11.0.0.2 YES unset up Down
Serial1 12.0.0.1 YES unset down Down
Ethernet0 unassigned YES unset administratively down Down
Ethernet1 unassigned YES unset administratively down Down
Bri0 unassigned YES unset administratively down Down
Bri0:1 unassigned YES unset administratively down Down
Bri0:2 unassigned YES unset administratively down Down
We can see that the interface connected to Router A is down down. We can check the configuration on the
interface to see what could be wrong
RouterB#show run interface serial 0
interface Serial0
ip address 11.0.0.2 255.255.255.0
no ip directed-broadcast
clock rate 128000 « clock rate present
We can immediately see a difference between the configurations on Router A and Router B. Router A's serial
interface shows that the encapsulation is set to PPP. Router B does not show an encapsulation type because it is left
at the default for Cisco which is HDLC
RouterB#show interface serial 0
Serial1 is down, line protocol is down
Hardware is HD64570
Internet address is 12.0.0.1/24
MTU 1500 bytes, BW 1544 Kbit, DLY 1000 usec, rely 255/255, load 1/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
4
CCNA: OSI TCP/IP CHEAT SHEET
Troubleshooting
We can now change the encapsulation type (layer 2) to HDLC
RouterA#config t
RouterA(config)#interface serial 0
RouterA(config-if)#encapsulation hdlc
RouterA(config-if)#end
%LINK-3-UPDOWN: Interface Serial0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to up
%SYS-5-CONFIG_I: Configured from console by console
RouterB#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Serial0 11.0.0.1 YES unset up Up
Ethernet0 10.0.0.1 YES unset up Up
So now we are satisfied that layers 1 and 2 are now operational. To confirm, we ping Router A from Router B
RouterA#ping 11.0.0.2
Troubleshooting
The problem appears to be that although network 13.0.0.0 is attached to ethernet 0, the router has been
configured to advertise network 14.0.0.0. We can easily correct this problem
RouterC#configure terminal
RouterC(config)#router rip
RouterC(config)#version 2
RouterC(config-router)#no network 14.0.0.0
RouterC(config-router)#network 13.0.0.0
RouterC(config-router)#^Z
%SYS-5-CONFIG_I: Configured from console by console
RouterC#show ip protocols
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 19 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 2, receive version 2
Interface Send Recv Triggered RIP Key-chain
Ethernet0 2 2
Serial0 2 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
12.0.0.0
13.0.0.0
Routing Information Sources:
Gateway Distance Last Update
12.0.0.1 120 00:00:17
Distance: (default is 120)
We are now advertising the correct networks. We should check that Router C can see all of the networks before we
move on
RouterC#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
U - per-user static route
Gateway of last resort is not set
C 12.0.0.0/24 is directly connected, 12.0.0.2
C 13.0.0.0/24 is directly connected, 13.0.0.1
R 11.0.0.0/24 [120/1] via 12.0.0.1, 00:07:13, Serial0
R 10.0.0.0/24 [120/2] via 12.0.0.1, 00:06:37, Serial0