xkonekt
Language: EN
  • English
  • Türkçe
  • Español, Coming soon
  • Português, Coming soon
  • Deutsch, Coming soon
  • Français, Coming soon

Network models · Fundamentals · Module 1

Layers: the OSI and TCP/IP models · page 3 of 3

Show topologyHide topology
H1hostSW1switchR1routerH2host10.0.1.0/2410.0.1.0/2410.0.2.0/24eth0Et0/1Et0/0Et0/0Et0/1eth0.10.1.1.20Et0/0 = Ethernet0/0.1 = the last number of the address
Topology · SW1 joins H1 and R1 in one network; R1 joins that network to H2’s.

Four devices in a column, joined by three cables. At the top the host H1: its eth0, address ending .10, is cabled to the switch SW1’s Et0/1. SW1’s Et0/0 is cabled to the router R1’s Et0/0, address ending .1. Both of SW1’s cables are one network, 10.0.1.0/24, written on each of them; SW1 itself has no address. R1’s Et0/1, address ending .1, is cabled to the host H2 at the bottom, its eth0 ending .20, in the network 10.0.2.0/24, written on that cable. A legend explains the short forms.

Troubleshoot

Find the layer that stopped

R1 cannot reach the program on H2. Which layer stopped?

Check from the bottom, because each layer needs the one below it. The first layer that fails is where to look; everything above it fails with it. You can use the same order when a web page will not load on your own computer, though some web servers do not answer pings.

Case 1 of 2.H2’s program does not answer

R1H2ApplicationTransportNetworkData linkPhysicalApplicationTransportNetworkData linkPhysicalEt0/1eth0ping: OK(layers 1–3)port 2001:refused
Figure 1.4 · Layers 1 to 3 work; H2’s transport layer answers but refuses port 2001, where no program waits.

Two columns of layers, as in Figure 1.3: R1 on the left, H2 on the right, each with Application, Transport, Network, Data link and Physical from top to bottom, and a cable between the two physical layers, from R1’s Et0/1 to H2’s eth0. H2’s application layer is crossed out. A note under R1 reads “ping: OK (layers 1–3)”; a note under H2 reads “port 2001: refused”.

  1. Case 1 · Symptom

    R1 tries to connect to port 2001 on H2 and gets no greeting.

    Output · IOS XE 17.18.2
    R1#telnet 10.0.2.20 2001Trying 10.0.2.20, 2001 ... 1% Connection refused by remote host
    1. % Connection refused by remote host: H2 answered and refused the connection.
  2. Case 1 · Command

    Check the layers below first. On R1, ping 10.0.2.20 tests whether the network layer gets through to H2.

  3. Case 1 · Output

    Output · IOS XE 17.18.2
    R1#ping 10.0.2.20Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.0.2.20, timeout is 2 seconds:1!!!!!2Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
    1. A reply for every test packet.
    2. Key line 5/5 means layer 3 gets through to H2, so H2 itself refused the connection.
  4. Case 1 · How far it reaches

    R1’s side, its interface toward H2:

    Output · IOS XE 17.18.2
    R1#show interfaces Ethernet0/11Ethernet0/1 is up, line protocol is up   Hardware is AmdP2, address is aabb.cc00.0910 (bia aabb.cc00.0910)2  Internet address is 10.0.2.1/24… 24 more lines (see Full output)
    1. up and up: layers 1 and 2 work.
    2. The address and mask are as in the topology: the layer-3 setting is right.
    Full output · 27 lines
    R1#show interfaces Ethernet0/1Ethernet0/1 is up, line protocol is up   Hardware is AmdP2, address is aabb.cc00.0910 (bia aabb.cc00.0910)  Internet address is 10.0.2.1/24  MTU 1500 bytes, BW 10000 Kbit/sec, DLY 1000 usec,      reliability 255/255, txload 1/255, rxload 1/255  Encapsulation ARPA, loopback not set  Keepalive not set  ARP type: ARPA, ARP Timeout 04:00:00  Last input 00:00:00, output 00:00:00, output hang never  Last clearing of "show interface" counters 00:01:52  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0  Queueing strategy: fifo  Output queue: 0/40 (size/max)  5 minute input rate 0 bits/sec, 0 packets/sec  5 minute output rate 0 bits/sec, 0 packets/sec     91 packets input, 9870 bytes, 0 no buffer     Received 0 broadcasts (0 IP multicasts)     0 runts, 0 giants, 0 throttles      0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored     0 input packets with dribble condition detected     98 packets output, 10319 bytes, 0 underruns     Output 0 broadcasts (0 IP multicasts)     0 output errors, 0 collisions, 0 interface resets     0 unknown protocol drops     0 babbles, 0 late collision, 0 deferred     0 lost carrier, 0 no carrier     0 output buffer failures, 0 output buffers swapped out
  5. Case 1 · What it means

    • The connection to port 2001 was refused because, with no program waiting on that port, H2’s TCP answers the connection attempt with a reset, a refusal. H2’s transport layer still answered, so the stop is the program above it.
    • Nothing on R1 needs to change. R1 writes no log message about this fault; the connection test is what shows it.
  6. Case 1 · Fix

    Whoever runs H2 starts the program on port 2001 again.

  7. Case 1 · Proof

    On R1, the same connection test, after the program was started again:

    Output · IOS XE 17.18.2
    R1#telnet 10.0.2.20 20011Trying 10.0.2.20, 2001 ... Open2hello from H2
    1. Open: the connection to port 2001 is accepted.
    2. The greeting arrives: the application layer works again.

End of case 1. Solved: the program on H2 answers again.

Case 2 of 2.R1 cannot reach H2 at all (your turn)

  1. Case 2 · Symptom

    R1’s pings to H2 get no reply, and the connection to port 2001 fails too.

    Output · IOS XE 17.18.2
    R1#ping 10.0.2.20Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.0.2.20, timeout is 2 seconds:.....1Success rate is 0 percent (0/5)
    1. 0/5: not one reply.
  2. Case 2 · Command

    Run commands to narrow the cause, then choose it.

    Choose the next command

    Output · IOS XE 17.18.2
    R1#show interfaces Ethernet0/11Ethernet0/1 is administratively down, line protocol is down   Hardware is AmdP2, address is aabb.cc00.0910 (bia aabb.cc00.0910)2  Internet address is 10.0.2.1/24  MTU 1500 bytes, BW 10000 Kbit/sec, DLY 1000 usec,      reliability 255/255, txload 1/255, rxload 1/255  Encapsulation ARPA, loopback not set  Keepalive not set  ARP type: ARPA, ARP Timeout 04:00:00  Last input 00:00:25, output 00:00:25, output hang never  Last clearing of "show interface" counters 00:02:38  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0  Queueing strategy: fifo  Output queue: 0/40 (size/max)  5 minute input rate 0 bits/sec, 0 packets/sec  5 minute output rate 0 bits/sec, 0 packets/sec     116 packets input, 12446 bytes, 0 no buffer     Received 0 broadcasts (0 IP multicasts)     0 runts, 0 giants, 0 throttles      0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored     0 input packets with dribble condition detected     126 packets output, 13091 bytes, 0 underruns     Output 0 broadcasts (0 IP multicasts)     0 output errors, 0 collisions, 0 interface resets     0 unknown protocol drops     0 babbles, 0 late collision, 0 deferred     0 lost carrier, 0 no carrier     0 output buffer failures, 0 output buffers swapped out
    1. The first line: layers 1 and 2 on Ethernet0/1.
    2. The Internet address line: the layer-3 setting.
    Output · IOS XE 17.18.2
    R1#show ip interface briefInterface Ethernet0/0IP-Address 10.0.1.1OK? YESMethod TFTPStatus upProtocol up1Interface Ethernet0/1IP-Address 10.0.2.1OK? YESMethod TFTPStatus administratively downProtocol downInterface Ethernet0/2IP-Address unassignedOK? YESMethod unsetStatus administratively downProtocol downInterface Ethernet0/3IP-Address unassignedOK? YESMethod unsetStatus administratively downProtocol down
    1. Ethernet0/1, toward H2: Status is layer 1, Protocol is layer 2.
    Full output · 5 lines
    R1#show ip interface briefInterface              IP-Address      OK? Method Status                ProtocolEthernet0/0            10.0.1.1        YES TFTP   up                    up      Ethernet0/1            10.0.2.1        YES TFTP   administratively down down    Ethernet0/2            unassigned      YES unset  administratively down down    Ethernet0/3            unassigned      YES unset  administratively down down    
    Output · IOS XE 17.18.2
    R1#show logging | include LINK|LINEPROTO1Nov 25 21:10:20.691: %LINK-5-CHANGED: Interface Ethernet0/1, changed state to administratively downNov 25 21:10:21.691: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/1, changed state to down
    1. %LINK-5-CHANGED: when Ethernet0/1 changed state, and to which state.
    Output · IOS XE 17.18.2
    R1#show running-config interface Ethernet0/1Building configuration... Current configuration : 111 bytes!interface Ethernet0/1 ip address 10.0.2.1 255.255.255.0… 1 more line (see Full output) shutdown… 1 more line (see Full output)end
    Full output · 10 lines
    R1#show running-config interface Ethernet0/1Building configuration... Current configuration : 111 bytes!interface Ethernet0/1 ip address 10.0.2.1 255.255.255.0 no ip route-cache cef shutdown no keepaliveend
    Output · IOS XE 17.18.2
    R1#ping 10.0.1.10Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.0.1.10, timeout is 2 seconds:!!!!!1Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
    1. 5/5: R1’s side toward H1.
    Output · IOS XE 17.18.2
    R1#telnet 10.0.2.20 2001Trying 10.0.2.20, 2001 ... 1% Destination unreachable; gateway or host down
    1. % Destination unreachable: R1 did not reach H2 at all, so not even a refusal came back.
    Cause
  3. Answer to see what it means, the fix and the proof.

  4. Case 2 · How far it reaches

    With Ethernet0/1 still off, R1 tests H1, on its other side:

    Output · IOS XE 17.18.2
    R1#ping 10.0.1.10Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.0.1.10, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
  5. Case 2 · What it means

    R1H2ApplicationTransportNetworkData linkPhysicalApplicationTransportNetworkData linkPhysicalEt0/1eth0Et0/1:turned offno reply
    Figure 1.5 · With layer 1 off on R1’s Ethernet0/1, no layer above it can reach H2.

    The same two columns of layers: R1 on the left, H2 on the right. R1’s physical layer is crossed out, and the cable from R1’s Et0/1 to H2’s eth0 is drawn as usual; the cross marks R1’s end. Every layer of H2 is dimmed. A note under R1 reads “Et0/1: turned off”; a note under H2 reads “no reply”.

    • The fault is on one interface, Ethernet0/1, and so is the fix.
  6. Case 2 · Fix

    Turn Ethernet0/1 on again. On R1 that is configure terminal, then interface Ethernet0/1, then no shutdown, then end before the show commands. The prompt, the text R1 prints when it is ready for a command, shows where you are: R1(config)#, then R1(config-if)# for the interface.

    Type a command, or tap one in the list, then run it. The list stays the same in every mode: the commands that read R1’s state, the tests and configure terminal. After configure terminal, type the configuration lines yourself.

    Ticket: Since this morning R1 cannot reach H2. Find the layer that stopped on R1 and bring the link back.

    Output · IOS XE 17.18.2
  7. Case 2 · Proof

    After the fix, the first line of show interfaces on R1:

    Output · IOS XE 17.18.2
    R1#show interfaces Ethernet0/11Ethernet0/1 is up, line protocol is up … 26 more lines (see Full output)
    1. up, line protocol is up: layers 1 and 2 work again, so the ping and the connection test can get through.
    Full output · 27 lines
    R1#show interfaces Ethernet0/1Ethernet0/1 is up, line protocol is up   Hardware is AmdP2, address is aabb.cc00.0910 (bia aabb.cc00.0910)  Internet address is 10.0.2.1/24  MTU 1500 bytes, BW 10000 Kbit/sec, DLY 1000 usec,      reliability 255/255, txload 1/255, rxload 1/255  Encapsulation ARPA, loopback not set  Keepalive not set  ARP type: ARPA, ARP Timeout 04:00:00  Last input 00:00:00, output 00:00:00, output hang never  Last clearing of "show interface" counters 00:03:58  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0  Queueing strategy: fifo  Output queue: 0/40 (size/max)  5 minute input rate 0 bits/sec, 0 packets/sec  5 minute output rate 0 bits/sec, 0 packets/sec     129 packets input, 13856 bytes, 0 no buffer     Received 0 broadcasts (0 IP multicasts)     0 runts, 0 giants, 0 throttles      0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored     0 input packets with dribble condition detected     142 packets output, 14699 bytes, 0 underruns     Output 4 broadcasts (0 IP multicasts)     0 output errors, 0 collisions, 1 interface resets     0 unknown protocol drops     0 babbles, 0 late collision, 0 deferred     0 lost carrier, 0 no carrier     0 output buffer failures, 0 output buffers swapped out

End of case 2. Solved: Ethernet0/1 is up again at layers 1 and 2.

What both cases share follows once you have answered case 2.

Both cases

Checking a connection from the bottom, step by step
CommandLayersGoodBroken
show interfaces, first line1 and 2up, line protocol is upadministratively down or down
show interfaces, Internet address line3 settingthe address and mask in the topologyanother address or mask
ping the far host3, to the far host!!!!!.....
telnet the far host and portthe layers aboveOpen and the program’s datarefused
Messages you may meet, and where to look first
MessageMeansLook first
%LINK-5-CHANGED … administratively downturned off with shutdownfirst line of show interfaces, then the interface’s configuration
%LINEPROTO-5-UPDOWN … downline protocol downfirst line of show interfaces
% Connection refused by remote hostno program waits on that portthe far host’s program
% Destination unreachable; gateway or host downthe host was not reachedfirst line of show interfaces, then ping

Check

Which list is OSI’s order, from layer 1 up?
In the usual side-by-side comparison of the two models, which OSI layers stand beside TCP/IP’s link layer?
A protocol decides which program on a host gets the data. At which layer does it work?

R1 on another day.

Tap a line, or “Not in the output”, then submit.

Of the interfaces in the topology, find the one whose layers 1 and 2 are down.

Output · IOS XE 17.18.2
R1#show ip interface brief
Full output · 5 lines
R1#show ip interface briefInterface              IP-Address      OK? Method Status                ProtocolEthernet0/0            10.0.1.1        YES TFTP   administratively down down    Ethernet0/1            10.0.2.1        YES manual up                    up      Ethernet0/2            unassigned      YES unset  administratively down down    Ethernet0/3            unassigned      YES unset  administratively down down    
R1’s interface is up and up and its ping to H2 works. Which layers do these two checks prove?
After no shutdown, the first line of show interfaces reads up, line protocol is up. What still has to be checked to say that H2’s program is reachable?

Summary

R1H2ApplicationTransportNetworkData linkPhysicalApplicationTransportNetworkData linkPhysicalEt0/1eth0
Figure 1.3, recap · H2’s layers undo the same steps from the bottom. Each checks only its own part, and the program on port 2001 gets the text.

Two columns of layers, R1 on the left and H2 on the right, each with Application, Transport, Network, Data link and Physical, joined by a cable between the two physical layers. Arrows go down R1’s column and across the cable, drawn faint, and up H2’s column from Physical to Application, where H2’s application layer is drawn in the accent color.

  • OSI’s seven layers each do one job; TCP/IP does the same jobs in four layers. Layer 2 works within one network, layer 3 across networks, layer 4 picks the program.
  • Going down, each layer hands its result to the one below; arriving, each undoes it from the bottom. The header a layer adds on R1 is read by the same layer on H2.
  • The first line of show interfaces answers for layers 1 and 2, the Internet address line is the layer-3 setting, a ping proves layer 3 to the far host, and the program’s answer proves the rest.
  • Check from the bottom: the first layer that fails is the one to fix.

Commands

  • show interfaces <interface>

    the first line for layers 1 and 2; the Internet address line for the layer-3 setting.

  • show ip interface brief

    Status and Protocol of every interface at once.

  • ping <address>

    the success line: layer 3 to the far host.

  • telnet <address> <port>not read-only

    Open or refused: whether a program waits on that port. Opens one connection.

  • show logging | include LINK|LINEPROTO

    when an interface changed state.