Sunday, October 4, 2009

Roting Protocol

Routing Protocol Concepts :

Remmmber these notes about :
  • Routing Protocol are some rules , messages and ? that help to ip -routing by route Routed protocol such as IP .
  • Routing Protocol functions :

  1. Learn routes
  2. Advertise learned route
  3. Pick the best route
  4. Replace the failed route with a new best route
  • there are 3 algorithms for routing protocol :
  1. Distance Vector
  2. Link State
  3. Balanced Hybrid (Enhanced Distance Vector )
  • Routing protocol : RIP , OSPF . IGRP , EIGRP
  • Routed protocol (Routable Protocol) : IP , IPX
  • AS(Autonomous System):Refers to a internet work under administrative control of single organization.
  • Classfull Routing protocol : If the routing updates doesn't contain the subnet mask along with their respective advertised network .
  • Classless Routing Protocols : If the subnet mask is tranmited alng with the network information ,, its charectrised as classless routing protocol.
  • classless routing protocols support discontigues networks , VLSM and route summarization .
  • IGP : (Interior Gateway Protocol ) Refers to routing protocols that they run in a specific network under a called AS (Autonomous System) management or etc . such as School Network , Provice or State network , company network or ....IGP protocols are : Rip , OSPf , EIGRP
  • EGP : (Exterior Gateway protocol) Refers to routing protocol that runs between more than one AS. onle one EGP protocol is there that BGP (Border Gate way protocol ). for example BGP can run between some ISP .
  • There are some differences between IGP routing protocols (Rip , OSPF and EIGRP ) . you can see them in below table :

Distance Vector in summary :
When using distance vector routing protocol , that is important to know how they are working.
lets look at to routing protocol functions again :
  1. Learning
  2. Advertising by sending routing table in routing protocol update.
  3. Pick the best route by looking the received routing table and each routing protocol metric.
  4. Replace failed route if congestion occurred.
those are most and specific function that routing protocols do .but to to them some rules need to enhanced the performance of routing protocol .these rules are :

  1. Split-Horizon : Means that each router to send routing update on each interface ,check the routing update table and omits the routes that received from that interface .
  2. Route - Poisoning : Refers to the practical of advertising a route but with a special metric value called infinity .Note that each distance vector routing protocol uses the concept of an actual metric value taht represents infinity . Rip defines infinity as 16
  3. Triggerd Update : when a route fails dont wait for periodic update but imediantly send the triggend updates
  4. Hold-Time : Prevent continuing loop in a redundant network .wait a time thats called holdtime and dont belive any oyher information about down route until ending holdtime.
  5. Poison-Reverse :
  6. Whena route failed suspend split-horizon rules and advertize a poisoned route.



  • to Infinity over a single link : 1-Bandwith consumed 2- take several minutes 3-


  • During periods of stability, routers send periodic full routing updates based on a shortupdate timer (the RIP default is 30 seconds). The updates list all known routes except the routes omitted because of split-horizon rules.
  • However information sent by neighbors that originally advertized the working route can be belived befor the holdtime expires .
■ When changes occur that cause a route to fail, the router that notices the failure reacts
by immediately sending triggered partial updates, listing only the newly poisoned
(failed) routes, with an infinite metric.
■ Other routers that hear the poisoned route also send triggered partial updates,
poisoning the failed route.
■ Routers suspend split-horizon rules for the failed route by sending a poison reverse
route back toward the router from which the poisoned route was learned.
■ All routers place the route in holddown state and start a holddown timer for that route
after learning that the route has failed. Each router ignores all new information about
this route until the holddown timer expires, unless that information comes from the
same router that originally advertised the good route to that subnet.


Link State :

LSA : Link State Advertise
LSDB : Link State Data Base
Flooding : Sending LSA by a router to its neighbors (Only and only)
  1. First it needs that each router creats a Router LSA for itself and a link LSA for each subnet.(LSA contains Router ID , IP address , state, cost)
  2. then Floods LSAs to other routers in routing updates messages .(Flooding )
  3. all router learn the same detailed information about routers and subnets in the internet work .
  4. the individual pieces of topology information are called LSA , all LSAs are stored in LSDB & RAM.
  5. The LSDB does'nt have routes but they has more detailed information that can be processed by Dijkstra SPF algorithm (For OSPF routing protocol ) to find best routes.
  6. each router runs SPF process to find all routers to each subnet and SPF process to find all routes to each subnet and SPF algorithm can pick the best route as quickly as possible.
  7. Link state protocol provides fast convergence with built-in loop avoidance.
  8. link state protocol consume much more RAM and CPU than Distance vector.
  9. Link state protocol inherenthly avoid loops .
  10. Link state need much more palning and designing offort .
  11. Routers flood LSA :
  • When they are created
  • On a regular time
  • imediently after convergence accurs.

Friday, October 2, 2009

VPN



VPN (Virtual Private Network)

VPN can provide for us a secure communication link between such as leased line besides internet.VPN is a Flexible , scalable and Low-cost secure link.

VPN Features :
  1. Authentication
  2. Privacy
  3. Data integrity
  4. Anti reply
VPN types :
  1. Intranet VPN
  2. Extranet VPN
  3. Access VPN
VPN Devices :
  1. Router
  2. ASA(Adaptive Security Applience )
  3. Pix Firewall
  4. VPNconnection
  5. VPN client
Notes :
  • Modern VPN powerd by IP sec .
  • Because of VPN forms a tunnel through a public network , new IP headers must be generated and applied to the packet . this increase the network overhead for this type of connection.
  • When Desighning VPN you must choose the appropriate of levels of Encryption ,Authentication & Diffre-Hiffen
  • Protect data from the Transport Layer and above .
  • IP sec have large advantage than other encryption protocol such as SSH and SSL .
  • Encryption Protocol work at Transport layer ans restricted to specific ports .

IP Sec:
It's rule as an architecture and a frame for others VPN protocol .IP sec as a secure architecture use dynamic key exchange that is called Internet Key Exchange (IKE) and IKE calls for a process that called Diffie-Hellman (DH) key exchange .


AH & ESP

Two IP sec core protocol:
  1. Authentication Header (AH)
  2. Encapsulation Security Payload (ESP)


ESP

AH

Authentication

yes(weak)

yes(strong)

Message Integrity

yes

yes

Encyption

yes

No

Anti reply

yes

No


------------------------------------------------------------
  • AH is the older of the two IP sec core protocol .it supports only authentication and data integrity features .
use a pair of encryption algoritms :
  1. Encrypt
  2. Decrypt
IP packet + key =Encrypted Data

VPN encryption :
  1. DES : Data Encryption Standard (56 bit)
  2. 3 DES : 3*56 bit
  3. AES : Advanced Encryption Standard
  • AES currently offers the strongest level of encryption possible for symmetric encryption . it can reach up to 256 bit encryption .
Authentication :

the widely supported hashing algoritm are used :
  1. MD5(Message Digital 5)
  2. Secure Hash Algoritm (SH-1)
  • Hashing features pass data through a mathematical algorithm to generate a hash for data integrity nn

DH (Deffie-Hellman) :

The goog of DH algorithm is to give devices a way to security exchanges the shared key over a public network .
  • DH1 : 768 bit
  • DH2 : 1024 bit
  • H3 : 1536 bit



SSL:


SSL :Secure Socket Layer: SSL encrypt the segments of network connections at the Transport Layer end-to-end.

Several versions of the protocols are in wide-spread use in applications like web browsing, electronic mail, Internet faxing, instant messaging and voice-over-IP (VoIP).(Wikipediya)

To support SSL vpm connection you need a router or cisco ASA that be configured with SSL VPN and the client can connect using standard web browser.SSL use port 443.(SSL is a transport layer protocol)

Cisco introduce web VPN server acts as a web server can be implemented by many devices including as ASA . this connection uses SSL for all communication.


SSL VPN types :

  • Clientless :Doesn't allow user to use application on their PC over the VPN
  • Thin Client : Install Activex or Java based plugins after the user has successfully authenticated to the VPN . this plugin allow user to use application (only TCP based application ). CISCO released a new implemention called "CISCO Secure Desktop".



Tuesday, September 29, 2009

Frame Relay

Frame Relay is another type of encapsulation in WAN protocol . as you know The others are PPP , HDLC and ATM. PPP and HDLC are leased line protocol but Frame Relay works on Frame Relay .
(Wan Speed : From 2400bps to 45Mbps(T3))
DTE = Data Terminal Equepment
DCE = Data Communication Equepment

Remember these notes about Frame Relay :
  • Frame Relay is a popular WAN protocol that today is instead with VPN and Multi Protocol Lable Switching (MPLS)
  • Frame Relay Task is deliver layer 3 packets between routers.
  • Leased line provides a WAN service between tow points . each router with CSU/DSU on end of this link and installing two-pair(four wire) cable into the building . a dedicated line . if you need more than one link you should order a new link with new devices on end of new link . but in Frame Relay you could have more than one links and WAN services between some points without buy more than one link or buy new devices . in other words Frame Relay is a point-to-point , point-to-multi point and Muti point-to-Multi point wan service with cost advantages than leased line actually Frame Relay can send data to multiple remote routers over a single Physical WAN circuit .
  • HDLC , PPP and Frame Relay can use same physical Layer specification but ISDN has different pin out and specification at physical layer .but remember that ISDN is an infrastructure that any of PPP , HDLC and Frame Relay is working on it . PPP is a most common encapsulation across ISDN connections.
  • ISDN can work with both asynchronous and synchronous serila links but Packet Switched service (Such as Frame Relay )only work with synchronous.
  • Frame Relay is a NBMA(none broadcast multi access ) network. because Frame Relay use an identified addresses for each router .
  • In fram-relay there are some useful notification such as FECN (Forward Explicate Congestion Notification) & BECN (Backward Explicate Congestion Notification) or DE (Discard Eligibility). if any problem occurred in frame-relay switch or any congestion frame relay send a FECN or BECN notification with a FECN=1 or BECN=1. FECN for a congestion in fram-relay switches near you and BECN for a congestion on the othe hand .
  • FECN and BECN equal zero if there is noo any congestion occurred.

  • DLCI (Data Link Connection Identifier) : identifies the VC for each link . remember that each router that connect to Frame-Relay has a specified DLCI.DLCI must be unique for each VC. so same DLCI is used on every access-link.
  • Global DLCI : global addressing for DLCI just makes DLCI assignment more obvious.remember that each DLCI is unique.

  • VC (Virtual Circuit) : Define a logical path between 2 Frame Relay DTEs.that is virtual path shows the connection between your two DTE devices
  • VC categorized in two mode:
  1. PVC ( Permanent VC ) :They are working as long as you pay bill.
  2. SVC (Switched VC ) : Work like a phone call when you use .work when need data transfer and take down when data transfer is complate .

  • LMI : is a defination messages that travel between DTE ( your Router) and DCE (Nearest Frame Relay switch) and have a messages containing status of links :
    1- LMI peform Keepalive messages . 2-the signal weather a PVC is active or inactive .
  • after a router recives LMI from Frame Relay switches can update the virtual circuits status to 3 diffrent status : 1- Active state 2- inactive state 3- deleted state

  • LMI protocols are : cisco , ITU , ANSI
  • LMI types are : cisco , q933a , ansi
  • A router that is connected to Frame-Realy befor send each packet encapsulate it in a Frame-Relay with defination header and trailer and then send out it on Access-Link .

  • Subneting on Frame Relay :
  1. one subnet containing Frame Relay
  2. One subnet per VC
  3. A hybrid of two previous option .

  • If you use different router on end of WAN link you should use any of PPP or Frame-Relay encapsulation . by defalt HDLC is runing on Cisco routers.that not recognized for the other brands.
  • Frame Relay provides Packet switched network to many diffrent costomers at the same time .
  • Two separet bandwith specifics wiyh Frame Relay :
  1. Access Rate : The maximum speed that Frame Relay can transmit
  2. CIR : the maximum bandwith of data guaranteed to be delivered.actually is a rate in bits per second at which the Frame Relay switch agrees to transfer data.
  • You cant use PPP and HDLC on Frame Relay because Frame RElay is basically diffrent from the others .

  • Frame Relay Encapsulation :
  1. CISCO : for two cisco Devices
  2. IETF (Internet Engineering Task Force ) : between two different device .
  • There are some different end for serial connection between DTE and DCE :
  1. EIA/TIA-232
  2. EIA/TIA-449
  3. V.35(Connect to CSU/DSU)
  4. X.21(used in X.25)
  5. EIA-530

  • Planing for Frame Relay :
  1. Which physical sites need to Frame Relay
  2. Define each VC by identifying the end points and setting the CIR
  3. Agree to an LMI type (Usually dedicated by provider )
  4. define Subneting
  • Frame Relay Mappnig : Mapping between layer 3 address and its corresponding layer 2 address similar ARP cash for LAN .Mappnig is needed for multicast network .
  • Inverse Arp : mapping between layer 3 address(IP) to layer 2 address (DLCI). it is disable on router when you configured router with #frame-relay map command .
  • when you use static map remember that other router on end of the VC will not recive any Inverse ARP messages and may also then need to be configurd with #frame-relay map command.
  • Frame Relay command :
  1. #encapsulation fram-relay {cisco/IETF}
  2. #frame-relay lmi-type {ansi / cisco/ q933a)
  3. #fram-relay interface-dlci 16(or any number between 16 to ?) ietf
  4. #show frame-relay pvc
  5. #no keepalive

Some Notes about ISDN:

  • Carry voice ,video and data .
  • Call setup is faster than modem.
  • Data rate is faster than modem
  • Fuul time conectivity across the ISDN is do by the cisco IOS routers using dial-on-demand routing (DDR)
  • ISDN can be used as a backup service for leasedline conection.
  • PPP is the most common encapsulation across ISDN connection.
Fram Relay Configuration :

1. #interface serail 0/0

2. #encapsulation frame-relay {cisco / ietf} for all vc

3. or #encapsulation frame-relay interface DLCI ietf (for single subinterface)

4. #fram-relay interface-dlci ietf

5. #frame-relay map ip ip-address dlci


OSI layer Protocols :

  • Layer 1 : IP , IPX , Apple talk
  • Layer 2 : PPP , HDLC , FRAME-RELAY , NCP , LCP
  • Layer 3 : V.24 , V.35 , ISDN

Monday, September 28, 2009

PPP , HDLC

As you know there are some wan protocols that you can use them on wan .
PPP , HDLC , Frame Relay , ATM

PPP and HDLC are 2 protocols that used in leased line .

PPP have some advantages than HDLC . PPP is a data link protocol that :
  1. Definition of header and trailer can transport layer 3 protocol on a same link .
  2. Builts in Authentication protocol (PAP and CHAP)
  3. Have LCP (Link Control Protocol ) in frame.
  4. PPP compression
with LCP , PPP have most ability to control the links :
  • Loop Detection : with magic number , that each router is used
  • Error Detection : With FCS in frame and use LQM (Link Quality Monitoring )
  • Authentication : PAP & CHAP
  • Multi Link support : (Load balancing )

Authentication :
  • PAP (Powered Authentication Protocol) : Send password as clear Text .
  • CHAP (Challenge Authentication Protocol ) : More secure then PPP because of use MD5 one way hash .
for Authentication configuration :
  1. use Hostname for end link router .
  2. use this command on each router : # username The other end link router-name password which is same on both router from example :
    R1(config)#username R2 password mypassword
  3. and this command : # PPP authentication PAP or PAP CHAP


Troubleshooting PPP :

1- Layer 1 problems : (when line status down , line protocol is down )
  • Physically problem
  • CSU/DSUhas failed or is misconfigured
  • Link may be not pluged in to CSU/DSU from telco
2-layer 2 problems : (When line status Up , line protocol is down )
  • Clock Rate not set
  • mismatch Encapsulation or Encapsulation not set
  • misconfiguration Authentication
  • keepalive is not set
3- layer 3 problems : (When line status Up , line protocol is Up )
  • mismatched IP subnet (link work if encapsulation is PPP , but if encapsulation is HDLC link is not work )

HDLC :
  • the other wan protocol that is a default encapsulation used by cisco router .
  • No authentication can be used with HDLC .
  • PPP is a protocol that can use with both asynchronous(Dial-up) and synchronous (ISDN).

Monday, September 21, 2009

Router start-up

If you turn on your router or your switch , what do you thing about how is it work ?

Router (or switch ) has 3 kind of memory :
  • ROM
  • FLASH
  • NVRam (none Available Ram) : hold the router and switch configuration file.
  1. When you turn your device on , first a POST (Power on self test ) is run then bootstrap file is run from ROM .
  2. Bootstrap looks and loads IOS from flash . (IOS is in order place in : Flash , TFTP server , RAM )
  3. Device copy satrtup.config from NVRAM to RAM

How a Router Chooses Which OS to Load :

A router chooses the OS to load based on the low-order 4 bits in the configuration register
and the details configured in any boot system global configuration commands found in
the startup-config file. The low-order 4 bits (the 4th hex digit) in the configuration register
are called the boot field, with the value of these bits being the first value a router examines
when choosing which OS to try and load. The boot field’s value when the router is powered
on or reloaded tells the router how to proceed with choosing which OS to load.
The process to choose which OS to load, on more modern routers that do not have
an RxBoot OS, happens as follows (note that “boot” refers to the boot field in the
configuration register):

  • Step 1 : If boot field = 0, use the ROMMON OS.
  • Step 2 :If boot field = 1, load the first IOS file found in Flash memory.
  • Step 3 : If boot field = 2-F:
  • a. Try each boot system command in the startup-config file, in order, until one works.
  • b. If none of the boot system commands work, load the first IOS file found in Flash memory.

NOTE On most Cisco routers, the default configuration register setting is
hexadecimal 2102.
NOTE Cisco represents hexadecimal values by preceding the hex digit(s) with 0x—for
example, 0xA would mean a single hex digit A.





Saturday, September 19, 2009

IP addresses :

IP Addresses



Current challenges in IP Addressing

An IP address consists of a 32-bit number with two components: a network address and a node.


The incredible growth of the Internet has resulted in following challenges:

  • IP address exhaustion
  • Routing table growth and manageability


IP Addressing Solutions

Solutions have been developed to slow the depletion of IP addresses and to reduce the number of

Internet route table entries by enabling more hierarchical layers in an IP address.


These solutions include the following:

  • Subnet masking
  • Address allocation for private internets
  • Network Address Translation (NAT)
  • Hierarchical addressing
  • Variable-length subnet masks (VLSMs)
  • Route summarization
  • Classless Interdomain Routing (CIDR)
  • Hierarchical Addressing
  • The benefits of hierarchical addressing are:
  • Reduced number of routing table entries
  • Efficient allocation of addresses

Variable Length Subnet Masks

The VLSMs are commonly used to maximize the number of possible addresses available for a

network. The benefits if VLSMs are:

Even more efficient use of IP addresses

Greater capability to use route summarization


Route Summarization

Route summarization can reduce the number of routes that a router must maintain because it is a

method of representing a series of network numbers in a single summary address.


Cisco routers manage route summarization in two ways:

Sending route summaries

Selecting routes from route summaries


CIDR

CIDR is a mechanism developed to help alleviate the problem of exhaustion of IP addresses and

growth of routing tables.

Redistribution Implementation Guidelines

Be familiar with your network and your network traffic

Do not overlap routing protocols

One-way redistribution

Two-way redistribution


NAT

Network Address Translation can be used to merge two large networks without having to readdress

the whole network. Another function of NAT is overloading inside global addresses.

This process allows several inside addresses to use a single IP address. NAT can also use a pool

of addresses or multiple interfaces.