Training For Switch Engineers
Training For Switch Engineers
Module Objectives
2
1
OSI Model
Internet protocols are not directly based on the OSI model However, we do often use the OSI numbering system. You should at least remember these:
Layer 7: Application
Application layer
SMTP HTTP
FTP
Telnet
DNS
Audio
Video
TCP
UDP
IP
RTP
Ethernet
PPP
ATM
Optics
ADSL
Satellite
3G
Application
TCP or UDP IP
Link
Physical
Link
Link
Link
Link
Link
Physical
Physical
Host
Router
Router
Host
End-to-end layers
Upper layers are end-to-end Applications at the two ends behave as if they can talk directly to each other They do not concern themselves with the details of what happens in between
Hop-by-hop layers
At the lower layers, devices share access to the same physical medium Devices communicate directly with each other The network layer (IP) has some knowledge of how many small networks are interconnected to make a large internet Information moves one hop at a time, getting closer to the destination at each hop
Application
TCP or UDP IP
Link
Physical
Link
Link
Link
Link
Link
Physical
Physical
Host
Router
Router
Host
TCP or UDP TCP or UDP The application layer doesn't care about what happens at the lower layers, provided the transport layer IP IP IP IP carries the application's data safely from end to end.
Link
Physical
Link
Link
Link
Link
Link
Physical
Physical
Host
Router
Router
Host
Host
Router
Router
Host
Link Link Link The IP layer works Link forwardsLink Link hop by hop messages from one side to the other side. Physical Physical Physical
Host
Router
Router
Host
Define a protocol that works in the same way with any underlying network Call it the network layer (e.g. IP) IP routers operate at the network layer IP over anything Anything over IP
Lower layers add headers (and sometimes trailers) to data from higher layers
Application Data Header Transport Layer Data Header Network Layer Data Header Header Data Header Link Layer Data Header Header Header Data Trailer Trailer
Transport
Network
Network
Data Link Data Link
IP Addressing
Destination
So the networks know where to send the data
Purpose of an IP Address
Identifies a machines connection to a network Physically moving a machine from one network to another requires changing the IP address Unique; assigned in a hierarchical fashion IPv4 uses unique 32-bit addresses IPv6 used similar concepts but 128-bit addresses
32 bit number (4 octet number): (e.g. 133.27.162.125) Decimal Representation: 133 27 162 125
Hexadecimal Representation:
85
1B
A2
7D
Hosts or routers connected to the same link-layer network will have IP addresses with the same network part, but different host part.
Host part contains enough bits to address all hosts on the subnet; e.g. 8 bits allows 256 addresses
Dividing an address
Hierarchical Division in IP Address:
Network Part (or Prefix) high order bits (left)
describes which physical network
Host Part
Network Masks
Network Masks help define which bits are used to describe the Network Part and which for the Host Part Different Representations:
decimal dot notation: 255.255.224.0 binary: 11111111 11111111 11100000 00000000 hexadecimal: 0xFFFFE000
Above examples all mean the same: 19 bits for the Network Part and 13 bits for the Host Part
Example Prefixes
(netmask 255.255.128.0)
1111 1111 1 000 0000 0000 0000 1001 1110 1 000 0000 0000 0000 (netmask 255.255.0.0) 1111 1111 1000 0110 0000 0000 0000 0000 0000 0000 0000 0000
205.37.193.128/26 (netmask 255.255.255.192) 1111 1111 1111 1111 1111 1111 11 00 0000 1100 1101 0010 0101 1100 0001 10 00 0000
Special Addresses
All 0s in host part: Represents Network
e.g. 193.0.0.0/24
e.g. 138.37.64.0/18
e.g. 196.200.223.96/28
The all-zeros and all-ones addresses are reserved, can't be used for actual hosts
E.g. a subnet mask of 255.255.255.0 or /24 means 24 network bits, 8 host bits (24+8=32)
28 minus 2 = 254 possible hosts
Similarly a subnet mask of 255.255.255.224 or /27 means 27 network bits, 5 host bits (27+5=32)
25 minus 2 = 30 possible hosts
Boundary between network part and host part was implied by the class
Classless addressing
Class A, Class B, Class C terminology and restrictions are now of historical interest only
Obsolete in 1994
An organisation that gets a /22 prefix from their ISP divides it into smaller blocks
e.g. a /26 prefix (64 addresses) for one department, and a /27 prefix (32 addresses) for another department (and some space left over for other internal networks)
netmasks in decimal
IP address ranges
A device on one network cannot send a packet directly to a device on another network
The packet has to be forwarded from one network to another, through intermediate nodes, until it reaches its destination The intermediate nodes are called routers
An IP Router
A device with more than one link-layer interface
Each router makes an independent decision, based on its own forwarding table
Different routers have different forwarding tables and make different decisions
If all is well, decisions will be consistent
Routers talk routing protocols to each other, to help update routing and forwarding tables
Router Functions
Determine optimum routing paths through a network
Lowest delay Highest reliability
Interconnected Routers exchange routing tables in order to maintain a clear picture of the network
In a large network, the routing table updates can consume a lot of bandwidth
a protocol for route updates is required
If more than one prefix matches, the longest prefix wins (more specific route)
0.0.0.0/0 is "default route" - matches anything, but only if no other prefix matches
Router Components
ROM
Starts and maintains the router
Bootstrap
Stored in ROM microcode brings router up during initialisation, boots router and loads the IOS.
ROM Monitor
Stored in ROM microcode used for manufacturing, testing and troubleshooting
Mini-IOS
a.k.a RXBOOT/boot loader by Cisco small IOS ROM used to bring up an interface and load a Cisco IOS into flash memory from a TFTP server; can also perform a few other maintenance operations
Router Components
RAM
Holds packet buffers, ARP cache, routing table, software and data structure that allows the router to function; runningconfig is stored in RAM, as well as the decompressed IOS in later router models
Flash memory
Holds the IOS; is not erased when the router is reloaded; is an EEPROM [Electrically Erasable Programmable Read-Only Memory] that can be erased and reprogrammed repeatedly through an application of higher than normal electric voltage
NVRAM
Non-Volatile RAM - stores router startup-config; is not erased when router is reloaded
Router Components
Config-Register
controls how router boots;
System Startup
POST
loaded from ROM and runs diagnostics on all router hardware
Bootstrap
locates and loads the IOS image; default setting is to load the IOS from flash memory
IOS
locates and loads a valid configuration from NVRAM; file is called startup-config; only exists if you copy the running-config to NVRAM
startup-config
if found, router loads it and runs embedded configuration; if not found, router enters setup mode
Overview
Router configuration controls the operation of the routers:
Interface IP address and netmask
Routing information (static, dynamic or default) Boot and startup information
Startup confguration
In NVRAM, determines how the router will operate after next reload Is modified using the copy command To see it: show startup-config
Privileged EXEC mode detailed examination of router, debugging, testing, file manipulation (router prompt changes)
Router#
ROM Monitor useful for password recovery & new IOS upload session Setup Mode available when router has no startup-config file
Auxiliary port
Modem access
Virtual terminals
Telnet/SSH access
TFTP Server
Copy configuration file into router RAM
Can use direct serial connection to console port, or Telnet/SSH to vtys (virtual terminals), or Modem connection to aux port, or Edited in a text file and uploaded to the router at a later time via tftp; copy tftp start or config net
Router(config)
Router(config-if)
Router(config-router)#
Router(config-line)# rommon 1>
The old method was to use the enable password command. But this is not secure (weak encryption) and is ABSOLUTELY NOT RECOMMENDED. DO NOT USE IN REAL NETWORK!
Ensure that all passwords stored on router are (weakly) encrypted rather than clear text:
router(config)# service password-encryption
Interface:
interface fastethernet 0/0 ip address 10.5.2.3 255.255.255.0
Line:
line vty 0 4
Global Configuration
Global configuration statements are independent of any particular interface or routing protocol, e.g.:
hostname routerK enable secret cop455 service password-encryption
The NO Command
Used to reverse or disable commands, e.g.
ip domain-lookup no ip domain-lookup
router isis no router isis ip address 1.1.1.1 255.255.255.0 no ip address
Interface Configuration
Interfaces are named by slot/type; e.g.:
FastEthernet0/0, FastEthernet0/1, FastEthernet0/1/0, ...
Interface Configuration
Administratively enable/disable the interface
router(config-if)#no shutdown
router(config-if)#shutdown
Description
router(config-if)#description ethernet link building router to admin
Interactive Configuration
Enter configuration mode, using configure terminal
Often abbreviated to conf t
Prompt gives a hint about where you are: router#configure terminal router(config)#ip classless router(config)#ip subnet-zero router(config)#int fasteth0/1 router(config-if)#ip addr n.n.n.n m.m.m.m router(config-if)#no shut router(config-if)#^Z
router(config)#int faste0/0
router(config-if)#ip a? access-group accounting address
Line editing
left-arrow, right-arrow moves cursor inside command ^d or backspace will delete character in front of cursor Ctrl-a takes you to start of line Ctrl-e takes you to end of line
No parity
8 data bits 1 stop bit
No flow control
RFC 1350
router# copy start tftp router# copy tftp start router# copy flash tftp router# copy tftp flash router# copy run tftp