📒
cybersecurity notes
  • Welcome
  • Memory Forensics
    • Resources
    • autovol
    • Memory Forensics - 13cubed
      • Intro to Memory Forensics
      • Windows Memory Analysis
      • Windows Process Genealogy
      • Pulling threads
      • Persistence in Memory
      • Memory Forensics Baselines
      • Extracting Prefetch
      • Shellbag forensics
    • Challenges
      • BTLO
        • Memory Analysis - Ransomware
      • Memlabs
        • Lab 1 - Beginner's Luck
    • Analysis
      • Stuxnet
      • Zeusbot
      • Darkcomet RAT
      • ZeroAccess Rootkit
  • Linux
    • Linux commands
  • Malware Analysis
    • Triaging
    • Malware Analysis - 13cubed
    • gdb
  • Networking
    • CCNA notes
      • Network devices
      • Interfaces and cables
      • OSI model & TCP-IP suite
      • Intro to CLI
      • Ethernet LAN switching (1)
      • Ethernet LAN switching (2)
      • IPv4 addressing (1)
      • IPv4 addressing (2)
      • Switch Interfaces
      • IPv4 Header
      • Static routing
      • Life of a Packet
      • Subnetting (1)
      • Subnetting (2)
      • Subnetting (3)
      • VLAN (1)
      • VLAN (2)
      • VLAN (3)
      • DTP & VTP
      • Spanning Tree Protocol (1)
      • Spanning Tree Protocol (2)
      • RSTP
      • Etherchannel
      • Dynamic routing
      • RIP & EIGRP
      • OSPF (1)
      • Others (gdrive)
Powered by GitBook
On this page
  • IP class (extra)
  • IPv4 addressing
  • Brief
  • Configure
  • Extra 'show' commands
  1. Networking
  2. CCNA notes

IPv4 addressing (2)

PreviousIPv4 addressing (1)NextSwitch Interfaces

Last updated 1 year ago

IP class (extra)

  • Class A address range is 0-127, but the usable range is 1-126, as 0 and 127 are reserved.

  • Max hosts per network = (2^n) - 2, where n = no. of host bits.

  • Network address + 1 = first usable address.

  • Broadcast address - 1 = last usable address.

IPv4 addressing

Brief

  • Goto privileged EXEC mode.

  • R1#show ip interface brief (to confirm the status of each interface on the device & their IP addresses).

  • Interface : lists the network interfaces on the device (eg: GigabitEthernet0/0).

  • IP-Address : lists the IP address of each interface.

  • OK? : legacy command which says whether the IP address is valid or not (modern devices won't let you assign invalid IP addresses).

  • Method : indicates the method by which the interface was assigned an IP address ('unset' by default, 'manual' if you configure it).

  • Status :

    • Layer1 status of the interface.

    • If the interface is enabled, cable is connected and other end of the cable is properly connected to another device, status displays 'up'.

    • Default status of Cisco router interfaces : 'administratively down', which means the interface has been disabled with 'shutdown' command.

    • Even when the interfaces are connected to switches, the interfaces remain 'administratively down' because the 'shutdown' command is applied to them by default.

    • Cisco switch interfaces are NOT administratively down by default (either up - when connected to a device, or down - when not connected).

  • Protocol :

    • Layer2 status of the interface.

    • Because the interfaces are down at Layer1, Layer2 cannot operate. So all are 'down'.

    • 'down' in Status column and 'up' in Protocol column is NOT possible, although the reverse is possible.

  • Once you configure and enable the interfaces, you should see 'up' in both Status and Protocol columns.

Configure

  • Enter global configuration mode.

    • R1#conf t

  • Goto 'interface config' mode, to configure the interface

    • R1(config)#interface gigabitethernet0/0 -> R1(config-if)#

    • shortform : R1(config)#in g0/0 -> R1(config-if)#

    • from here you can jump to another interface without coming back to global config mode.

  • Set the IP address

    • R1(config-if)#ip address 10.255.255.254 255.0.0.0

    • If you don't know what to type next, use '?'

    • Type the subnet mask in dotted decimal instead of prefix.

  • Enable the interface

    • R1(config-if)#no shutdown

    • Cisco router interfaces have 'shutdown' command applied to them by default.

  • Check the brief

    • R1(config-if)#do show ip interface brief

    • 'do' is added to execute 'privileged EXEC' mode command from 'interface config mode'.

Extra 'show' commands

  • R1#show interfaces (interface)

    • shows the detailed Layer1 and Layer2 info about the interface (and some Layer3 info as well).

    • can use this command on a Switch too.

  • R1#show interfaces description

    • displays info like Status, Protocol from 'show ip interface brief' command along with some description, which helps us understand the purpose of the interface.

    • Configuring description :

      • Enter interface config mode.

      • R1(config-if)#decription ## to SW1 ##

IPv4 addressing (1)#IPv4 class