ccna-notes2

back 1736130293-ccna-notes

  • Switcher β†’ expand network
    • could be in the same network 1 lan 1 network , 2 switch

Network Layer (Layer 3)

  • Router operate at layer 3

add one router in the middle

  • become two network

192.168.1.0/24 192.168.1 β†’ ip address

.0 β†’ represent end host

/24 β†’ represent the first three part is the ip address

24/8 = 3 , first 3 part 1 dot mean 8

IP address are 32bits (4 bytes) in length

now learning how to convert ip to binary


Quick Review

C represents 12
D represents 13
E represents 14

To convert CDE to decimal, we calculate: C * 16² + D * 16¹ + E * 16⁰


ip 192 first part:

  1. β†’ binary
  • called octet binary

11000000 right to left first 2^0 + 2^1 + … 🦧 1x2 + 2x2 +3x2 …

two different method to write that down

128+64=192

so how to convert decimal to binary?

  • by attraction 192 -168 β‡’ if can, 1

255 β‡’ sum(all 8 bits)

  • so ip addressβ†’ 32 bits β€œ/24” β†’ first three part 1 part per 8 bits, and the last part represent end host

  • ip (first three part are the same) β†’ same network

Class | First octet | numerial range | prefix A 0xxxxxxx 0-127 /8 B 10xxxxxx 128-191 /16 C 110xxxxx 192-223 /24 D 1110xxxx 224-239 E 1111xxxx 240-255

Address range 127.0.0.0 – 127.255.255.255

  • loopback address
    • Used to test the β€˜network stack’ (think OSI, TCP/IP model) on the local device

Class A: 12.128.251.23/8 β†’ check the first octet numerial range , largest no. of host Class B: 154.78.111.32/16 β†’ class B , medium Class C: 192 .168.1.254 /24 class C β†’ fewer host,


netmask (right hand side is cisco way )

Class A: /8 255.0.0.0

Class B: /16

Class C: /24

  • Host portion of the address is all O’s = Network Address
  • The network address CANNOT be assigned to a host.

  • last available address can’t be 255 as well , last should be 254

last value β‡’ 255 could be represent broadcasting ,

last value 0 β‡’ host network address AND 255 β‡’ broadcasting

0 AND 255 can’t be assigned to address


Class A usable range is not 0-127 but 1-126

  • size of rest bit field β†’ 32 - size of the ip network, e.g. class A 32 -8 = 24

2^24 β‡’ 16777216 address per network

e.g. 192.168.1.0/24

  • max host per network β†’ 192.168.1.255/24

only 1 part left β‡’ 2^8 β‡’ 256,(1 part = 8 bit)

2^8 - 2(exclud the 0 and 255) β‡’ 254 total final ans

172.16.0.0/16 β‡’ 172.16.255.255/16

2^16 = 65536 - 2 = 65534

  • still - 2 only because the speicial case require all 0 and all 255

Maximum hosts per network = 2^n-2 (n = number of host bits , = parts * 8)

add one to the last part of bit = first usable address

last usable address would be minus one


IPv4 address (command line)

  • Status (e.g. Dminitratively down ) β‡’ layer 1 status

  • Protocol β‡’ Layer 2 status

en β‡’ enable advanced mode

conf t β‡’ enter configuation commands , global

interface gigabitethernet 0/0

short cut:

int tab

g0/0 β‡’ replace : gigabitethernet 0/0

10.255.255.254 ? β‡’ 255 = subnet mask

ip address 10.255.255.254 255.0.0.0 (represent =/8)

no shutdown β‡’ enable it

do so ip int br β‡’ show ip interface brie

My insight:

  • interface β‡’ usually mean the last usable address

cisco command:

show interfaces [interface]

show interfaces descriptions β‡’ show up or down

int g0/0 description manaal setting the desc int g/0/1 descriptino this is 1

Quiz : PC1 has an IP address of 43.109.23.12/3 Find the following:

Network address: 43.0.0.0

Maximum number of hosts in the network: 16,777,214 Network broadcast address: 43.255.255.255

First usable address of the network: 43.0.0.1

Last usable address of the network: 43.255.255.254


cisco command:

en conf t

host

hostname R1 (change the hostname)

do sh ip inter br

  • do before this so that it can run in global mode

int g??? ip add xxx.xxx.xx xx.255.255.255 no stutdown

show running config


save config

e.g. copy run e.g write memory

short cut β‡’ wr

configuring ip : click and change their config by gui into their own ipaddress

click on pc1 and start command line tool β‡’ ping other pc