Definition : = An interconnected or interrelated chain, group, or system.
Basic connectivity
Living in a Network Centric World Chapter 01 Network Fundamental if an employee want to send a message to Pune office from Gurgaon Office ?
Types of Network Local Area Network Campus Area Network Metropolitan Area Network Personal Area Network (e.g. Bluetooth) Storage Area Network (e.g. Gmail) Wide Area Network
Local Area Network IT Department ECE Department CSE Department ME Department Administration IT Department ECE Department CSE Department ME Department Administration
Campus Area Network MGMT. Block ENGG. Block Hostel Stadium Canteen
Metropolitan Area Network Delhi East Delhi West Delhi South Delhi North
Wide Area Network Delhi Pune Assam Indore
Types of Communication When you talk to your gf /bf in private. The conversation takes places only between two persons. “ ” Unicast messaging is used for all network processes in which a private or unique resource is requested. Unicast
Unicasting in terms of Network
Multicast Multicast is the delivery of a message or information to a group of destination computers simultaneously in a single transmission from the source.
Multicasting in terms of Network
Broadcast A FM or RADIO channel Broadcasts its data to all the users available in the frequency zone.
Broadcasting in terms of Network
Networking Devices Chapter-2
HUB A central device that connects different nodes together for communication purpose. It works on HALF DUPLEX, works on PHYSICAL LAYER. Hub is a DUMB DEVICE . Switch is Preferred over HUB .
Collision Domain
Collision Domain More the number of collision domain better it is. All device in same collision domain always have accidents.
Switch It’s used to make LAN works effectively. Works on FULL DUPLEX, LAYER-2 device because it uses MAC Address for Sending/Receiving Information. Every port has a collision domain.
Broadcast Domain
Broadcast Domain Bigger size will be bad. All device fall in a broadcast domain but they can be in different collision domain. Internet : Is it a Broadcast Domain?
Router Used to connect different Networks Together. LAYER-3 Device, Send/Receive PACKETS: contains info about IP Networks.
FIREWALL A firewall is a computer program & a device, as well. Simply put, to control all information/data traveling into and out of a computer via a network.
IPS Network IPS sit inline on the network, state fully analyzing packet content and blocking certain packets that match a signature and alerting on others.
IDS
LOAD BALANCER A load balancer is a device that distributes network or application traffic across a number of servers. Load balancers are used to increase capacity and reliability of applications.
Networking Topologies – Chapter-3
NETWORK TOPOLOGIES Network topology defines the structure of the network . One part of the topology definition is the Physical Topology, which is the actual layout of the wire or media. The other part is the Logical Topology , which defines how the media is accessed by the hosts for sending data.
TOPOLOGIES
BUS TOPOLOGY
RING TOPOLOGY
STAR TOPOLOGY
EXTENDED STAR TOPOLOGY
MESH TOPOLOGY
HIERARCHICAL TOPOLOGIES
OSI Layers Chapter-4
Communication??? SOUTH INDIAN He knows Tamil. NORTH INDIAN He knows Hindi. But still they cant communicate because they don’t know a common language
Open System Interconnection OSI is not a physical model but a guidelines to be followed by Application Developer for proper communication. Before this Apple and IBM devices were not able to communicate with each other. Created by ISO(International Organization for Standardization) in 1984.
Application Presentation Session Transport Network Data Link Physical Layer - 7 Layer - 6 Layer - 5 Layer - 4 Layer - 3 Layer - 2 Layer - 1 Upper Layer or Software Layer Lower Layer or Hardware Layer Heart of OSI OSI Layers
Application Layer It deals with Networking Application. It acts as an interface between the actual application program. Protocol Data Unit (PDU)-DATA
Application Data Presentation Session Transport Network Data Link Physical How Data Flows in Application Layer
Presentation Layer It ensures that data transferred from application layer of one system can be read by application layer of other system . The presentation layer determines how data is transmitted and represented to the user. It’s responsible for converting data into standard format which may include: JPEG, MPEG, BMP, MIDI, WAV, MP3 Tasks which can be performed: a) Compression >< Decompression b) Encryption >< Decryption PDU- Formatted DATA
Data Data Application Presentation Session Transport Network Data Link Physical How Data Flows in Presentation Layer
ENCAPSULATION & DECAPSULATION IN OSI MODEL
Session Layer This layer establishes, manages, and terminates sessions between Peer to Peer. It keep different application’s data separate from other applications. PDU- Formatted DATA
Data Data Data Application Presentation Session Transport Network Data Link Physical How data flow in Session Layer
Transport Layer Efficient guaranteed delivery is provided through sequencing, acknowledgement & flow control. SEGMENT = TCP/UDP Header + DATA It provides error correction before transmitting thus insure reliable data transport . a) UDP Protocol - unreliable & connectionless, used in LIVE SCENARIOS. b ) TCP Protocol - Reliable because of 3-way handshake PDU- SEGMENTS
Transmission Control Protocol Connection Oriented Acknowledgement Reliable Slower User Datagram Protocol Connection Less No Acknowledgement Unreliable Faster TCP vs UDP
Hello! How are you ? Hello! How Are You ? Hello! How are you ? A B Segmentation
A B you Hello! How ? are Sequencing & Reassembling
A B Hello! How are you ? Sequencing & Reassembling
Hello! How are you ? A B Error Correction
Data Data Data Segment Application Presentation Session Transport Network Data Link Physical How data flow in Transport Layer
Protocols Set of rules & Regulations for devices to communicate. Ex. ENGLISH LANGUAGE.
Network Layer It use Logical Addressing(IP Addressing). Makes “ Best Path Determination ” decisions based on Logical Addressing. PACKET = S. IP + D. IP + TCP/UDP + DATA Packet size is from 64 bytes to 1500 bytes. PDU- PACKETS
Network Layer Protocols IP Address Routing It is a medium for communication between two different Networks.
Data Data Data Segment e.g. Router Packet Application Presentation Session Transport Network Data Link Physical How data flow in Network Layer
Data-Link Layer Its responsible for PHYSICAL ADDRESSING(MAC ADDRESSING). It perform Error Detection & not correction. Receives PACKETS from upper layer & convert it into FRAMES. FRAME = S. MAC + D. MAC + S. IP + D. IP + TCP/UDP + DATA PDU- FRAMES
Data-Link Layer Protocols MAC Address It’s a 48 bits Hexadecimal address. S witch learns MAC Address and store it in MAC Address TABLE on ASIC CHIP . Switch's First attempt is Broadcast and then Unicast , till the time MAC TABLE didn’t FLUSH OUT.
Address Resolution Protocol (ARP) Its used to get the MAC Address of unknown device with the help of IP Address when two devices are communicating for the First Time. FOR FIRST TIME COMMUNICATION destination MAC Address would be FF:FF:FF:FF:FF:FF
e.g. Switch Data Data Data Segment DH Packet DT Application Presentation Session Transport Network Data Link Physical Packet Packet Frame How data flow in Data-Link Layer
Physical Layer This is the physical media through which the data, represented as electronic signals , is sent from the source host to the destination host. Data will be converted in Binary that is 0’s & 1’s . PDU- BITS
Data Data Data Segment Packet Frame Bits Application Presentation Session Transport Network Data Link Physical How data flow in Physical Layer
Segment Packet Frame A B Packet Data Data Data Bits Data Segment Packet Data Data Data Application Presentation Session Transport Network Data Link Physical Application Presentation Session Transport Network Data Link Physical Bits DH DT NH TH Segment Packet DT Packet DH DT DH NH Segment NH TH Data TH Frame Packet
ENCAPSULATION & DECAPSULATION IN OSI MODEL
IP Addressing Chapter-5
Objective Structure of an IP address Subnetting CIDR IP Version 6 addresses
What’s an IP Address..?? An IP address is a 32 bit long, Logical Address for a network interface. If a computer is communicating with the Internet, then, actually its using an IP address . Example: 176.156.2.1
Dotted Decimal Notation IP addresses are written in a so-called dotted decimal notation. Each byte is identified by a decimal number in the range [ 0-255]. 10001111 10000000 10001001 10010000 1 st Byte 128 2 nd Byte 143 3 rd Byte 137 4 th Byte 144 128.143.137.144
Decimal to Binary Conversion Example : 192.168.10.2 For the first octet: 192 we have to add = 128 + 64 = 192 so we get in binary = 1 1 0 0 0 0 0 0 similarly For 2 nd octet = 1 0 1 0 1 0 0 0 For 3 rd octet = 0 0 0 0 1 0 1 0 For 4 th octet = 0 0 0 0 0 0 1 0 So IP address in binary is 128 64 32 16 4 1 2 8 1 1 0 0 0 0 0 0. 1 0 1 0 1 0 0 0. 0 0 0 0 1 0 1 0. 0 0 0 0 0 0 1 0
Binary to Decimal Conversion
Network prefix and Host number The Network Prefix identifies a Network. The Host Number identifies a specific host. network prefix host number
IP Address’s Uniqueness Example : abhijit.eie.azureskynet.Braintech Network id is: 128.143.0.0 Host number is: 137.144 Subnet mask is: 255.255.0.0 Prefix notation : 128.143.137.144/16 Network prefix is 16 bits long 128.143 137.144
Subnet Mask It defines how many bits are network & how many of them are hosts, in an IP. It’s of 32 bits. Represent All Network bits with 1 & N=1 All Host bits with 0. H=0
Types of IP Address IPv4 (Internet Protocol version 4 uses 32 bit addressing.) e.g. 192.168.10.1 IPv6 (Internet Protocol version 6 uses 128 bit addressing). e.g. fe80::74f3::38d5:d634:58ec/14 Version of IP Addressing Scheme Public IP Address : Its used for connectivity with WAN. Private IP Address : non routable, cant travel without NAT. There are certain addresses in each class of IP address that are reserved for LAN.
Range of Private IP Address
IP Address Classes Chapter-6
Classes of IP Addresses
Net ID and host ID
Finding the class in decimal notation
The old way: Classful IP Addresses When Internet addresses were standardized (early 1980s), the Internet address space was divided up into classes: Class A : Network prefix is 8 bits long Class B : Network prefix is 16 bits long Class C : Network prefix is 24 bits long Each IP address contained a key which identifies the class: Class A : IP address starts with “0” Class B : IP address starts with “10” Class C : IP address starts with “110”
The old way: Internet Address Classes
The old way: Internet Address Classes We will learn about multicast addresses later in this course.
Class A Range : 0 - 127 0 & 127 are reserved for Loopback . N.H.H.H 8 bits reserved for network & 24 for Hosts. N part can’t be changed but H can be.
Class A Number of networks & Hosts
Class B Range : 128 to 191 N.N.H.H 16 bits reserved for Network & 16 for Hosts.
Class B Number of networks & Hosts
Class C Range : 192 to 223 N.N.N.H 24 bits reserved for Network & 8 for Hosts. Most Commonly used because wastage of IP Addresses is Avoided.
Class C Number of networks & Hosts
Class D Range : 224-239 used for Multicast. Class E Range : 240 to 255 Its reserved for Research & Development by DOD.
Valid IP Addresses It lies between the Network Address and the Broadcast Address. eg: 192.168.1.0/24
Subnetting Chapter-7
Subnetting It breaks Larger network into Smaller parts. Its used to reduce wastage of IP Addresses.
Subnetting Subnetting Problem : Organizations have multiple networks which are independently managed Solution 1: Allocate one or more addresses for each network Difficult to manage From the outside of the organization, each network must be addressable . Solution 2: Add another level of hierarchy to the IP addressing structure University Network Medical School Library Engineering School
Subnet Masks Routers and hosts use an extended network prefix (subnet mask) to identify the start of the host numbers
Advantages of Subnetting With Subnetting, IP addresses use a 3-layer hierarchy: Network Subnet Host Improves efficiency of IP addresses by not consuming an entire address space for each physical network .
Steps for Subnetting 192.200.200.0 & make 4 sub-networks. 1) Find Network Value. Based on 11111111.11111111.11111111.11000000 N = 2^2 = 4 2) Find Subnet Mask. 255.255.255.192 3) Find Block Size. 256 - 192 = 64 4) Find Number of Host. 2^6 - 2 = 64 - 2 = 62 192.200.200.0 192.200.200.64 192.200.200.128 192.200.200.192
For Class B 172.200.0.0 & make 120 subnets. 1) N = 7, 2) S.M. = 255.255.254.0, 3) B.S.=2, 4) H=2^9 - 2= 512-2=510
CIDR and Routing Information 206.0.64.0/18 204.188.0.0/15 209.88.232.0/21 Internet Backbone ISP X owns: Company X : 206.0.68.0/22 ISP y : 209.88.237.0/24 Organization z1 : 209.88.237.192/26 Organization z2 : 209.88.237.0/26
206.0.64.0/18 204.188.0.0/15 209.88.232.0/21 Internet Backbone ISP X owns: Company X : 206.0.68.0/22 ISP y : 209.88.237.0/24 Organization z1 : 209.88.237.192/26 Organization z2 : 209.88.237.0/26 Backbone sends everything which matches the prefixes 206.0.64.0/18, 204.188.0.0/15, 209.88.232.0/21 to ISP X. ISP X sends everything which matches the prefix: 206.0.68.0/22 to Company X, 209.88.237.0/24 to ISP y Backbone routers do not know anything about Company X, ISP Y, or Organizations z1, z2. ISP X does not know about Organizations z1, z2. ISP y sends everything which matches the prefix: 209.88.237.192/26 to Organizations z1 209.88.237.0/26 to Organizations z2
Variable Length Subnet Mask It’s used to reduce number of IP Addresses. In VLSM, we calculate number of IP Addresses based on the nodes, which means Based on Number of Host Bits. Steps for VLSM 1) Find the largest segment in the area. 2) Follow all the 4 steps of Subnetting.
192.200.200.0/24 LAN 4 6 Devices LAN 3 14 Devices LAN 1 30 Devices LAN 2 60 Devices R 1 R 2 R 3 192.200.200.1 to 192.200.200.63 192.200.200.64to 192.200.200.95 192.200.200.96 to 192.200.200.111 192.200.200.112 to 192.200.200.120
Router’s Mode
Router’s Command Modes
Dynamic Host Configuration Protocol (DHCP) It’s used to assign IP Address through DORA Process . A cknowledgement
DHCP Configuration int $ f0/0 ip $ add $ <ABCD> $ <Subnet-Mask> no $ shutdown ip $ dhcp $ pool $ Network-Bulls network $ <ABC0> $ <Subnet-Mask> default-router $ <ABCD> dns-server $ <12.34.56.78> ip $ dhcp $ excluded-address $ <ABCD> $ <WXYZ> Now apply DHCP on computers. Router Switch 1 2 3 4 f 0/0
Internetwork OS Chapter-8
Fundamentals Created by Cisco to manage Cisco Devices, like Switches & Routers. Cisco devices uses ".bin" extension.
Cisco IOS Versions Version 15 (LATEST)
Fundamental Terminologies Serial Clock Rate Fast-Ethernet Console Auxilliary
It’s used to tell how many bits to be sent per second. Fast Ethernet It’s used to connect LAN Devices. Console It’s used to configure Cisco device viz Router or Switch. Clock rate
It’s used for MODEM's connectivity. Can be used as a Console cable for configuration purpose. Flash It’s used to store IOS. It can be said that its Router's HDD. Normally a Router doesn’t have more than 2 Fast-Ethernet Ports but in HIGH SERIES ROUTERS it can be 5 or 6. Auxiliary
How to connect with a Router for configuration? Step- 1) Connect router’s console port with PC serial, through CONSOLE CABLE . Step-2) Use any third party application: Hyper Terminal Secure.CRT Putty.exe
Router's Boot Process Step 1) POST test Step 2) Load IOS from: Flash (transfer) TFTP (backup) Step 3) Load Startup-config from: NVRAM, if startup-config is present. If not present then it would ask: ( Would you like to enter setup mode ?Y/N) SAY NO.
Router’s Mode
Router’s Command Modes
Global Configuration Mode Interface mode : Router(config-if)# It’s used to put information on an interface. Sub-Interface Mode : Router(config-subif)# It’s used to make logical interfaces. Router Mode : Router(config-router)# It’s used for Routing Protocols RIP, EIGRP OSPF Line Mode Router(config-line)# In this mode, Console, Telnet & Auxiliary password can be set.
Password Setting Simple Text Password : #enable $ password $ pune Encrypted Password : #enable $ secret $ pune123
Telnet Password #conf $ t #line $ vty $ 0 $ 2 #password $ pune #login #exit Enable Password is “MUST” for configuring Telnet Password.
Console Password #conf $ t #line $ console $ 0 #password $ pune #login Line Console “0” is given because one user/admin can connect through console.
Routing Chapter-9
Fundamentals It’s a process to move packets from one LAN to another LAN. Routing Process generates a Routing Table, Routing Information Base(RIB). If RIB don’t have information, then, Packet Failure. A knowledge based method to create Routing Information Base is Routing Table.
Administrative Distance (AD) It’s a unique value from 0 to 255. AD is used by Routing Protocols to rate the trustworthiness of routing information received. Routing Protocols AD Value Connected Static Routing 1 EIGRP 90 OSPF 110 RIP 120
Types of Routing Protocols RIP OSPF EIGRP
Static Routing In Static routing we define routes manually and we always define Indirectly Connected network. Advantage There is no overhead on the router CPU . It adds security because the administrator can chose to allow routing access to certain network only. Disadvantage The administrator must really understand the internetwork and how each router connected in order to configure routers correctly. If a network is added to the internetwork ,the administrator has to add a route to it on all routers –by hand. It is not feasible networks because maintaining it would be a full-time job it self.
Configuration in Static Routing R(config)# ip $ route $ Indirect-Network $ Subnet- -Mask $ next hop-ip-address To See the Routing Table : R# show ip route To See the Static Route : R# show ip route static
Default Routing Default routing is basically used on stub router or stub network. Stub Router : A router which has only one entry or exit point.
Configuration in Default Routing R(config)# ip $ route $ 0.0.0.0 $ 0.0.0.0 $ next- -hop-ip-address To Verify: R# show ip route
Dynamic Routing Protocol It dynamically learn about route and do send route information to the neighbor router. In dynamic routing we always define directly connected network .
Distance Vector Routing It selects the route based on distance i.e. hop count . When a packet cross a router i.e. called hop. It will select the route, which provides a network after crossing least hop. eg: RIP
Routing Information Protocols(RIP) RIP is a true distance-vector routing protocol. RIP only use the hop count to determine the best path to a remote network. RIP sends the complete routing table out to all active interface every 30 sec . RIP maximum allowable hop count of 15 by default. It has two version. Version 1 Version 2
Configuration for RIP Routing R(config)# router rip R(config-router)# network<connected network> For RIPv2 R(config)#router rip R(config-router)#version $ 2 R(config-router)#network <connected network> To Verify: R# show ip route R# show ip protocol R#debug ip rip
RIP version 1 RIP version 2 Distance vector Distance-vector Maximum hop Count 15 Maximum hop Count 15 Class full Class less Broadcast Based Uses Multicast 224.0.0.9 No Authentication Allow MD5 Authentication
Summary Routing Protocol Distance Vector Classless Routing Protocol Uses Hold-Down Timers Use of Split Horizon or Split Horizon w/ Poison Reverse Max Hop count = 15 Auto Summary Support CIDR Supports VLSM Uses Authen-tication RIPv1 Yes No Yes Yes Yes Yes No No No RIP v 2 Yes Yes Yes Yes Yes Yes Yes Yes Yes
Link-State Routing Protocols Build around Dijkstra Algorithm, which is also known as Shortest Path First (SPF) algorithm.
Hello Protocol in Link-State Routing Purpose- To discover neighbors (that use the same Link-State Routing Protocol) on it’s link.
Hello Protocol in Link-State Routing Connected interfaces which uses same Link-State Routing Protocols will exchange Hello Packet. Adjacency is formed once a Router learn about neighbors & start exchanging Hello Packets. These packets will serve as a Keep Alive function. If a Router stops receiving Hello Packets from a Router, the neighbor is considered either unreachable or in an Adjacency Broken State.
Link State Packets (LSPs) Each Router has its own LSPs. Contents of LSP: State of each Directly Connected Network. Includes information about neighbors such as Neighbor ID, Link-Type & Bandwidth.
Open Shortest Path First Protocol Number-88
Introduction to OSPF It’s an Interior Gateway, Classless, Link-State Routing Protocol. It only sends the information or change in Network Topology which the other device requires. It work on the Metric of COST.
Introduction to OSPF It’s an Open Standard, classless(VLSM) Protocol. It uses Virtual-Link, Router ID, Process ID (1-65535), Wild-Card Mask with Unlimited Hop-Count, Designated Router(DR) & Backup Designated Router(BDR). It’s working is based on Areas, namely: Backbone Area, Area Border Router (ABR) & Autonomous Synchronous Border Router (ASBR). It uses 224.0.0.5 for Multicast for all Routers in OSPF & 224.0.0.6 for Designated Router (DR).
OSPF Terms: DR & BDR
It defines that how many Networks or Routers are connected in same Administrative Unit. Range: 1-65535 Given by IANA. Process ID
OSPF Routing Tables
Link Cost The value assigned to a Link, rather than Hope. Link-State protocol assigns a cost to a link, which is based on the Bandwidth of the LINK (Transmission Speed).
Routing Table/Forwarding Database Routing Table for each Router is unique. It’s generated when an algorithm starts running on the Link-State Database.
DR Requirements Default Priority is 1 & max. can be 255. If Priority is zero then Router will not participate in DR & BDR Election. It’s based on Highest Loopback Highest Physical Interface IP It can be Manually configured 2) Router ID 1) Higher Priority
OSPF Metric OSPF metric is COST. Formula for Cost: 100 Mbps Bandwidth
Link Cost The value assigned to a Link, rather than Hope. Link-State protocol assigns a cost to a link, which is based on the Bandwidth of the LINK (Transmission Speed).
OSPF Routers Area 1 Internal Router R2 R6 R1 R4 R3 R5 Backbone Router Area 0 Area 2 EIGRP 100 Area Border Router Autonomous Synchronous Border Router
Internal Router It’s the Router which is in a Regular Area or All interfaces of the Router are in a Regular Area. It’s the Router which is in Area 0. It’s a Router which connects Backbone Area to Regular Area. It’s a Router which connects OSPF Routing Domain with Another Routing Domain. Backbone Router Area Border Router (ABR) Autonomous System Border Router (ASBR)
Commands Router $ ospf $ Process ID network $ A.B.C.0 $ W.W.W.W $ Area no
EIGRP Fundamentals EIGRP is also called Advanced Distance Vector Routing Protocol. Converted to Open Standard, which uses Multicast-Address:224.0.0.10 EIGRP doesn’t form neighbour-ship over Secondary IPs. It’s composed of METRIC Value, which contains:
Metric Calculation 10 7 Sum Of Delay Lowest Bandwidth 10 Lowest Bandwidth in kbps & Delay is in ms. Note: Although EIGRP has 5 metrics but basically it works o n Bandwidth & Delay. Lower Metric value is more preferred. 256
EIGRP Functions Types of Routing Table
Protocol inDependent Module (PDM) Hello Dead Timer: 15 sec for Broadcast & Point-Point 180 sec for Broadcast EIGRP supports: IP IPx AppleTalk Protocols It also creates different types of Routing Tables, as well
Neighbour-ship Requirements Things should be matched between two Routers: Authentication Metric (it should be same) Autonomous Synchronous (AS) Number It defines that how many Networks or Routers are connected in same Administrative Unit. Range: 1-65535 Given by IANA. Autonomous Synchronous (AS) Number
Diffusing Update Algorithm (DUAL) It provides fast convergence & unequal load balancing. EIGRP Supports MD5 Authentication. Feasible Distance (FD) Advertised Distance/Reported Distance (AD/RD) Successor (S) Feasible Successor (FS) Terms Associated with DUAL
Configuration in EIGRP Routing R(config)# router $ eigrp $ AS number R(config-router )# network $ A.B.C.D $ W.W.W.W R(config-router )# no $ auto-summary To Verify: R# show ip eigrp neighbor R# show ip eigrp topology (won’t show FS)
Switching Chapter-12
Switch provides Reliable & Manageable Network. Good network design will improve performance and also reduce the difficulties associated.
Switches Layer 2 Switches Performs only Switching. Layer 3 Switches Switching as well as Routing can be performed.
Layer-1 (Physical Layer) Layer-2 (Data-Link Layer) Layer-3 (Multi-layer) Hub & Repeaters Switches Multi-Layer Switches Non Manageable because of No Console availability Manageable Manageable No MAC-Address Table MAC-Address Table because of ASIC Chips MAC-Address Table because of ASIC Chips No Switching Switching Available Switching as well as Routing is available No Series Series 1900 & 2950 available Series 3500, 3700, 6500 available Only Hardware Hardware + Software Hardware + Software
Fundamentals Once the power cable is connected, the switch initiates a series of tests called the power-on self test (POST). The System LED indicates the success or failure of POST.
Switch’s Mode
Switch Command Modes
Global Configuration Mode Interface mode : Switch(config-if)# It’s used to put information on an interface. VLAN Mode : Switch(config-VLAN)# It’s used to enter into VLAN mode.
Virtual LAN (VLAN) By default, Layer-2 Switches creates, single Broadcast Domain. It can be broken through VLAN. So, it’s a Logical Broadcast domain . By default, all ports of L-2 Switch are in VLAN-1 . Same VLAN users can communicate with each other.
VLAN RANGE VLAN Range : 0 to 4095. Reserved VLANs : 0 & 4095. VLAN NORMAL RANGE 2 -1001 EXTENDED RANGE 1006 - 4094 DEFAULT VLANs 1 , 1002 - 1005
Configuration for VLAN Switch#configure $ terminal Switch(config)# vlan $ vlan-number Switch(config-vlan)# Name $ name
Trunk Trunk is the link which carries all the VLAN Traffic . Trunk ports are configured when: Two Switches OR Switch & Router are connected.
Types of Trunk Static Trunk It’s to be configured by the Network Admin Manually . Switch(c0nfig)#interface $ int-number Switch(config-if) #switchport $ mode $ trunk Dynamic Trunk By Default , it’s created on a Switch through DTP Packets. By Default, all Switch ports are in Dynamic Mode.
Inter-VLAN Routing It’s used in communication between different VLANs. A Layer- 3 Device is required . Eg: Router Sub-interfaces need to be configured, on Router.
VLAN Trunking Protocol ( VTP) It’s tough to create VLAN on each & every port of Switch, That’s why All switches can be managed through a single switch, through VTP. VTP Versions: VTP Version 1 VTP Version 2 VTP Version 3 Administrator have to define each & every VLAN individually, for Security Purpose .
VTP Modes
VTP Configuration Requirements Domain Name should be configured. VTP password to be created, on every Switch for Security Purpose . One Switch to be configured in Server Mode . Revision Number Switch with Higher Revision Number will send VTP info.
VTP Configuration SWITCH1 SWITCH2 SWITCH3 SWITCH4 V lan1 Server Transparent Client Client Vlan 2 Vlan 3 Vlan 2 Vlan 3 V lan1 V lan1 V lan1 Vlan 2 Vlan 3
Spanning Tree Protocol (STP) ALayer-2 protocol , used to prevent loops . First STP, created by Digital Equipment Corporation, followed by: If two or more Switches are connected with each other then loops can occur. 802.1W Rapid Per VLAN Spanning Tree (RPVST) by CISCO 802.1D Open standard by IEEE
Bridge Protocol Data Unit(BPDU) BPDU contains information sent by Root Bridge. STP Process is based on Configuration BPDU’s Topology Change Notification BPDU’s
STP Terminology Root Bridge Election (RB) Root Port Election (RP) Designated Port Election (DP) Non-Designated Port Election/ Blocked Port Election (NDP/BP)
Root Bridge Election Every Switch participate in BPDU election. Decided through a combination of Priority & MAC Address. Priority By DEFAULT , Priority is 32768, which keeps on increasing as number of VLANs increase. MAC Address Lower MAC Address is preferred.
Root Port (RP) Lowest Best Path to Root-Bridge will be elected as RP. Root Port Election Lowest Path Cost (depend on Link Band-Width) Lowest Neighbor Sender Bridge ID Lowest Neighbor Port Priority(Default 128, increases by 16) Lowest Neighbor Port ID Speed Cost 10 mbps 100 100 mbps 19 1 GB 4 10 GB 2
Designated Port (DP) It’s used to transmit the BPDUs. Designated Port Election It’s same as the Election of Root Port (RP). All ports of Root Bridge Switch , will be DP because it’s used to communicate, as a head starter. Switch B has DP because: Cost is same. Priority is same as 32768. Switch B is preferred over Switch C because it has Lower MAC-Address.
Blocked Port It only receive BPDUs & doesn’t transmit. It’s Temporarily Blocked it’s blocked only till the time the port against it is DP.
SPANNING TREE TIMERS
Spanning Tree Port States
PORT-FAST It decreases the conversion time for host port. This feature , bypass the port-state & change the port-state into forwarding.
PORT-FAST It decreases the convergence time for host port. This feature, bypass the port-state & change the port-state into forwarding. Two ways to enable this: -in global mode -on interface
CONFIGURING PORT-FAST On global mode # spanning-tree $ portfast $ default On interface # int <int no.> # spanning-tree $ portfast
Network Address Translation Chapter-13
Need of NAT Shortage of IPv4 Addresses. Application of Host IPv4 has been forecasted in 2005. Although Addresses classes were replaced by usage of CIDR but, it’s not sufficient. IPv6 or IPng (IP Next Generation), which provides an extended Range of IP Addresses. Network Address Translation (NAT) Long Term Solution Short Term Solution
What is NAT & Use It’s used to translate Private IP Addresses to Public IP Addresses and vice versa. Whenever we need to connect to the Internet and our hosts don’t have globally unique IP addresses. Both Cisco IOS devices and PIX/ASA firewalls support NAT. NAT is not restricted to just public-to-private address translations but: public-to-public address translation, or private-to-private address translation.
What does NAT Provide NAT provides Security. NAT really decreases the overwhelming amount of public IP addresses required in the networking environment. It saves COST. NOTE : The most obvious advantage associated with NAT is that it allows us to conserve our legally registered address scheme. That is why we haven’t run out of IPv4 addresses yet.
Private IPs vs. Public IPs Private IPs Public IPs It uses Private Address Range. It uses Public Address Range. Local Addresses may not be used externally. Public Addresses are Globally Unique. R1 R3 SW1 SW3 1 2 3 7 8 9 10.1.1.0/24 3 0.1.1.0/24 172.168.1.0/24 192.168.1.0/24 ISP Inside Global Outside Global Inside Local Outside Local
NAT Terminology I NSIDE LOCAL The term “inside” refers to an address used for a host inside an enterprise . It is the actual IP address assigned to a host in the private enterprise network . It is a Private Address. INSIDE GLOBAL NAT uses an “Inside Global” address to represent the inside host as the packet is sent through the outside network , typically the Internet. A NAT router changes the source IP address of a packet sent by an inside host from an inside local address t o an inside global address as the packet goes from the inside to the outside network .
NAT Terminology OUTSIDE GLOBAL The term “Outside” refers to an address used for a host outside an enterprise, the Internet . An outside global is the actual IP address assigned to a host that resides in the outside network, typically the Internet. OUTSIDE LOCAL NAT uses an outside local address to represent the outside host as the packet is sent through the private enterprise network. A NAT router changes a packet’s destination IP address, sent from an outside global address to an inside host, as the packet goes from the outside to the inside network.
TYPES OF NAT
STATIC NAT It performs a static one-to-one translation between two addresses , or between a portion one address to a port on another address. Static NAT is most often used to assign a public address to a device behind a NAT-enabled firewall/router . Static version requires to have one real Internet IP address for every host on your network .
Static NAT Configuration 1) Identify the Inside(usually Private) & Outside(Usually Public) Interfaces: interface $ f0/0 interface $ s2/0 Ip $ nat $ inside ip $ nat $ outside 2) Do the mapping: ip $ nat $ inside $ source $ static $ Private-IP $ Public-IP
DYNAMIC NAT This version gives you the ability to map an unregistered IP address to a registered IP address from out of a pool of registered IP addresses. But still we need registered IP addresses for everyone who’s going to send packets to and receiving them from the Internet at the same time. The Dynamic Entry in the NAT Table stays in, as long as traffic flows occasionally. 1) Identify the Inside(usually Private) & Outside(Usually Public) Interfaces: interface $ f0/0 interface $ s2/0 Ip $ nat $ inside ip $ nat $ outside
Configuration Dynamic NAT ip $ nat $ pool $ NB $ <200.168.13.1> $ <200.168.13.255> $ netmask $ 255.255.255.0 access-list $ 1 $ permit $ <inside local’s IP Add/Net> $ <Wild-Card Mask> ip $ nat $ inside $ source $ list $ 1 $ pool $ NB {We create access list to permit IP address <inside local>} ip nat pool NB 170.168.2.1 192.168.2.254 netmask 255.255.255.0 command creates a pool of addresses that will be distributed to those hosts that require global addresses. ip nat inside source list 1 pool NB command tells the router to translate IP addresses that match access-list 1 to an address found in the IP NAT pool named NB.
Overloading or PAT (Port Address Translation) We can have thousands of users connected to the Internet using only one real global IP address using port numbers. The only differences between this configuration and the previous dynamic NAT configuration : The pool of addresses has shrunk to only one IP address and at the end of ip nat inside source command we included the overload keyword.
Configuration PAT ip $ nat $ pool $ NB $ <192.168.13.1 > $ <192.168.13.255 > $ netmask $ 255.255.255.0 access-list $ 1 $ permit $ 10.1.1.0 $ 0.0.0.255 ip $ nat $ inside $ source $ list $ 1 $ interface $ s2/0 $ overload int f0/0 int S2/0 ip nat inside ip nat outside
Verification NAT Router#show ip nat translations It might show many translations from the same host to the same host at the destination. This is typical of many connections to the same server. Router#debug ip nat This output will show the sending address, the translation, and the destination address on each debug line. Router#clear ip nat translation * To clear all entries from the NAT table, use an asterisk (*) at the end of the command.
Access Control List Chapter-14
Access Control List It’s used to filter the Packet Traffic. ACL defines the set of rules that Routers use to identify particular type of traffic. ACL can be used to filter both Incoming as well as Outgoing traffic. ACL is widely used for Networking Security & Traffic Control. Types of Filtering: Traffic Filtering : Access Control List is used. Route Filtering : Filter the Routes from the Routing Table.
Rules for ACL 1) Create Access List in Global Configuration Mode Deny/Permit the traffic for particular Host/Network. ACL Matchup with Sequence Number (ACL 10 Default). IMPLICITY OF DENY: By default Last statement is of Deny in an ACL. 2) Apply Access List on Interface Configuration Mode. It’s applied on Inbound/Outbound traffic.
Types of ACL
Standard ACL In it, we can Permit/Deny the traffic for whole TCP/IP stack. It uses Source Address. It should be placed close to the destination. It blocks Source to Destination or opposite’s access in the Network. Specific PC Deny : If only one computer has to be denied Full Network Deny : If the whole network has to be denied. Disadvantage: It can’t filter the traffic for any particular protocol. Range: 1-99 & 1,300-1,999
Configuration in Standard ACL To Block one Specific Computer : access-list $ <1-99> $ <permit/deny> $ host $ <N.N.N.H> Access-list $ <1-99> $ permit $ any To Apply : int $ s0/0 OR int f0/0 ip $ access-group $ <1-99> $ <out > ip $ access-group $ <1-99> $ <out> To Block one Whole Network : access-list $ <1-99> $ <permit/deny> $ <N.N.N.H > $ <W.W.W.W> Access-list $ <1-99> $ permit $ any To Apply : int $ s0/0 OR int $ f0/0 ip $ access-group $ <1-99> $ < in> ip $ access-group $ <1-99> $ <out>
Extended ACL In it, we can filter the traffic for any specific Protocol from TCP/IP stack. Example: HTTP, DNS, DHCP, FTP, Telnet It uses both Source as well as Destination Addresses. Range: 100-199 & 2,000-2,699
Configuration in Extended ACL To Create : access-list $ <100-199> $ <permit/deny> $ <TCP> $ <N.N.N.N> $ <W.W.W.W> $ <N.N.N.N> $ <W.W.W.W> $ <eq/ lt / gt > $ <telnet/ HTTP/ICMP> Access-list $ <100-199> $ permit $ any $ any access-list $ <100-199> $ deny $ ip $ <N.N.N.N.> $ <W.W.W.W> $ <N.N.N.N> $ <W.W.W.W> To Apply : int $ s0/0 ip $ access-group $ <100-199> $ <in/out> Instead of Writing Telnet we can write Port Number of Telnet-23 Port Number of HTTP-80 & so on…..
Internet Protocol Version 6 (IPv6) Chapter-15
IPv6 128 bit hexadecimal larger address space more secure & faster than IPv4 Uses ICMP version 6 doesn’t use ARP IPv6 contains 8 fields and each field contains 16 bits. 1stField: 2ndField: 3rdField: 4thField: 5thField: 6thField: 7thField: 8thField
IPv6 Shortened expression: 1) Leading 0’s IPv6 Address: 2001:abc0:0000:0090:0070:6c00:7a00:0090 Leading Zero Notation: 2001:abc0:0:0090:0070:6c00:7a00:0090 2) Double Colon [::] IPv6 Address: 2001:0000:9c00:0000:0000:6c00:7a00:0090 Double Colon Notation: 2001:0:9c00::6c00:7a00:0090 Only one Double Colon can be used in an IPv6 Address.
IPv6 Address Types: Unicast: One to one Multicast: One to many Any-cast: One to any Unicast is further divided: Global Unicast: can be compared to Public IPs in IPv4 Link-Local: APIPA (Range of APIPA: 169.254.0.0 to 169.254.255.255) Unique-Local: can be compared to Private IPs in IPv4
Global Unicast: Range: 2000 or 3 2001::/64 Link Local: Range: FE80::/10 Unique Local: Range: FC00::/8 Multicast: Range: FF00::/8 Any-cast: NO RANGE DEFINED.
Well Known IPv6 Addresses: ::1 for LOOP-BACK ::A:B:C:D IPv4 & IPv6 Compatible Address. ::10 Default routing IPv6 Address can be assigned in three ways: a) Statically b) Auto Configuration c) DHCP version 6
In IPv6 Routing firstly , we enable Routing Process in Global- Configuration Mode. Secondly , its applied on Interface-Mode. IPv6 Routing Types: Static Routing Dynamic Routing Dynamic Routing has different sub-types: Distance Vector Routing Protocol RIPng Link State Routing Protocol OSPFv3 Hybrid Routing Protocol EIGRPv6 RIPng: Routing Information Protocol, Next Generation
RIPng: Works on 521-UDP port Multicast Address used is FF02::9 All features are same as IPv4 RIPv2 EIGRPv6: Works on 88-IP protocol Number Multicast Address used is FF02 ::A All features are same as IPv4, EIGRP. OSPFv3: Works on 89-IP protocol Number Multicast Address used is FF02::5( for broadcast to all) & FF02::6( for multicast to Designated Router) All features are same as IPv4, OSPF.