Showing posts with label Router. Show all posts

DHCP configuration on Cisco Router or switch

 

 DHCP configuration on Cisco Router or switch :

 ________________________________________

Follow us on Facebook

Follow us on Google+

________________________________________ 


Let's begin to configure basic DHCP on IOS-based router.
May configure through console cable or Ethernet cable, however please plug into correct port and use correct method access into IOS command line console.

To configure Cisco IOS DHCP, follow these steps, which include sample commands:
  1. Configure an IP address on the router's Ethernet port, and bring up the interface. (On an existing router, you would have already done this.)
  2. Create a DHCP IP address pool for the IP addresses you want to use.
  3. Specify the network and subnet for the addresses you want to use from the pool.
  4. Specify the DNS domain name for the clients.
  5. Specify the primary and secondary DNS servers.
  6. Specify the default router (i.e., default gateway).
  7. Specify the lease duration for the addresses you're using from the pool. (i.e: 7days and 12hours / half day)
  8. Exit Pool Configuration Mode.
Next, exclude any addresses in the pool range that you don't want to hand out.
For example, let's say that you've decided that all IP addresses up to .100 will be for static IP devices such as servers and printers. All IP addresses above .100 will be available in the pool for DHCP clients.

Here's an example of how to exclude IP addresses .100 and below:


Then, enter the ipconfig /renew command on the laptop to receive an IP address. After you have the IP address, enter the ipconfig /all command.

This is the sample output:



DHCP configuration on Cisco Router or switch :

 

 

Steps to configure a Cisco router and switch

Steps to configure a Cisco router and switch:

 

 ________________________________________

Follow us on Facebook

Follow us on Google+

________________________________________ 


Architecture of a Cisco router  :


The IOS operating:
- Flash memory.
- IOS running in Flash.
- IOS running in RAM.
The startup configuration:
- NVRAM.
- Access and backup.
Operational configuration:
- RAM memory.


Installing and Configuring a Cisco Router :

Preparing the Cisco router
- Setting up connections. Power. Access and configuration of the console. The passage in privileged mode. Identification of the hardware configuration. Identifying versions. Configuration mode.
General configuration commands
- Last time, host name, password ... Minimum configuration. Ethernet interfaces.
View Controls
- Validation Tests. Ping function. Trace function. Types of access to the router via the console via the network
Protection of access configuration
- Encryption of passwords. Implementation of filters Telnet access. Associating commands to a level password. Access Control List


Configuring Cisco Switch :

Principles of the frame switching.
-Configure topology LANs reliable. Spanning-tree algorithm.
Virtual LANs: VLAN
- Principles and criteria for establishing VLANs. Configuration commands. Benefits of switching. Integration of the switches in a network of routers.
 


Configure IP routing  :

General
- Creation of an interconnection network. Default routing.
static Routing
- Presentation: advantages and disadvantages. Configuring routing tables. Checks LAN to LAN.
Dynamic Routing RIP V2
- Implementation of routing. Distribution tables. Audits. Management of networks and subnets. Using the debug RIP. Incident handling.
OSPF dynamic routing
- Presentation. Without routing area.
Configuration and implementation of OSPF
- The OSPF metric and the consequences of the choices. Incident Response: convergence. Supervision routing.


Configure a Cisco router for WAN:

- Serial PPP leased line. Configuration of the encapsulation.
- Serial Frame Relay. Configuring the physical interface. Configuring virtual serial interfaces. Flow definition, CIR for each DLCI.
- The PPP and its security mechanisms. CHAP configuration mode.


Tutorial :

Configuration of the serial interfaces PPP, Frame Relay.Mise implement CHAP. Validation and routing of emergency. Test and debug configurations.

Security  :

- Public addresses, private addresses
- Implementation of the function of translation: NAT / PAT.
- Translation static or dynamic.
- Filter access to a given application.
- Access-list extended.

Operate a Cisco router :

- Recovery of the password on the router and switch.
- Erasing configuration: what to do?
- Starting Cisco. The states of the configuration register. Download a new version of software package.
- Backups. Cisco IOS backup via TFTP. Backup configuration on the network. Change outside router configuration. Downloading a new configuration.
- Supervision. Verification software. Change management. Configuration management.


Tutorial :

Backup / reinstall IOS and configuration via the network. Recovery after loss of IOS in Flash. Recovery / replacement password.

Nat and Pat configuration (Router cisco)

Nat and Pat configuration :

 ________________________________________

Follow us on Facebook

Follow us on Google+

________________________________________ 



1. Set the automatic translation of addresses:
Router(config)#ip nat inside source static ip local ip global
2. Declare the internal interface:
Router(config-if)#ip nat inside
3. Represent the external interface:
Router(config-if)#ip nat outside


Exemple :

Router(config)#ip nat inside source static 10.1.1.2 179.19.32.16
Router(config)#interface e0
Router(config-if)#ip nat inside
Router(config-if)#interface s0
Router(config-if)#ip nat outside

2. NAT dynamique :

1. Define the address pool:
Router(config)#ip nat pool name ip début ip fin netmask mask
2. Define a standard access-list that indicate which addresses should be translated:
Router(config)#access-list numéro permit source wildcard
3. Establish dynamic source translation, specifying the access-list:
Router(config)#ip nat inside source list numéro pool name
4. Declare the internal interface:
Router(config-if)#ip nat inside
5. Represent the external interface:
Router(config-if)#ip nat outside

Exemple :

Router(config)#ip nat pool my-internet 179.9.8.17 179.9.8.30 netmask
255.255.255.0
Router(config)#access-list 1 permit 10.0.0.0 0.255.255.255
Router(config)#ip nat inside source list 1 pool my-internet
Router(config)#interface e0
Router(config-if)#ip nat inside
Router(config-if)#interface s0
Router(config-if)#ip nat outside

3. Overload ( PAT ) with a single global address :

1. Define a standard access-list to determine which addresses should be translated:
Router(config)#access-list numéro permit source wildcard
2. Establish dynamic source translation, specifying the access-list:
Router(config)#ip nat inside source list numéro interface interface overload
3. Declare the internal interface:
Router(config-if)#ip nat inside
4. Represent the external interface:
Router(config-if)#ip nat outside

Exemple :

Router(config)#access-list 1 permit 10.0.0.0 0.255.255.255
Router(config)#ip nat inside source list 1 interface s0 overload
Router(config)#interface e0
Router(config-if)#ip nat inside
Router(config-if)#interface s0
Router(config-if)#ip nat outside

4. Overload ( PAT ) with a pool of public addresses :

1. Define a standard access-list to determine which addresses should be translated:
Router(config)#access-list numéro permit source wildcard
2. Or define the address pool:
Router(config)#ip nat pool name ip début ip fin netmask mask
3. Establish dynamic source translation, specifying the access-list:
Router(config)#ip nat inside source list numéro pool name overload
4. Represent the internal interface:
Router(config-if)#ip nat inside
5. Represent the external interface:
Router(config-if)#ip nat outside

Exemple :

Router(config)#access-list 1 permit 10.0.0.0 0.255.255.255
Router(config)#ip nat pool my-internet 179.9.8.17 179.9.8.30 netmask
255.255.255.0
Router(config)#ip nat inside source list 1 pool my-internet overload
Router(config)#interface e0
Router(config-if)#ip nat inside
Router(config-if)#interface s0
Router(config-if)#ip nat outside
5. Configurer la durée de validité d’une traduction :
Router(config)#ip nat translation timeout time_out seconds *
* la valeur par défaut est 24H

6. Checking NAT configuration and Pat :

To view the NAT configuration:
Router#show run
To delete all dynamic entries from the NAT table:
Router#clear ip nat translation *
To delete a dynamic entry in the NAT table:
Router#clear ip nat translation inside global-ip local-ip [ ouside local-ip
global-ip ]
[ ] = optionnel
To delete a dynamic input range of the NAT table:
Router#clear ip nat translation protocol inside global-ip global- port local- ip
local- port [ ouside local- ip local-port global-ip global-port ]
Pour voir les translations NAT actives :
Router#show ip nat translations [ verbose ]
L’option verbose donne plus de détail.
Pour voir les statistiques de traduction :
Router#show ip nat statistics

7. Troubleshooting NAT and PAT :

Based on the show run command to examine the configuration and determine what
what does this configuration.

Verify that the translation is done with the following commands:
Router#show ip nat translations [ verbose ]
Router#show ip nat statistics
Router#debug ip nat [ detailed ]



Basic Configuration of a CISCO Router

 

Introduction

This article aims to explain more or less detail how to configure a Cisco router to LANs and small business networks. You can find some examples to better understand how communication protocols TCP / IP, IPX and NetBEUI. You will also find a little explanation about the Access-Lists with some examples.

Configure the router using Hyper Terminal

Configuration d'Hyper-Terminal

First, you need a console cable (RJ-45 cable to Series) connecting the serial port of your computer to the RJ-45 labeled "Console" to your router.
Ensuite, ouvrez Hyper-Terminal (Menu démarrer -> Tous les programmes -> accessoires -> communications -> Hyper-Terminal), then enter a name for your new connection, select the serial port to which the cable is connected console and click "Default Settings" then ok.
Here, you are connected to the router and from now on you can configure. If it is, made ​​a newline, you should see a line asking if you want to enter tool in the initial configuration, in this case answer "No", otherwise it will display the name of the router monitoring ">" (eg: Router>), in which case type "to" to enable and enter the password if there is one. This time "Router>" change in "Router #" and you can start typing commands configuration.

Commandes de bases

Here are some basic commands that you can test;:
  • Changer le nom du routeur:
Router#conf t
Router(config)#hostname RouterA
  • Mettre un mot de passe pour la console:
RouterA#conf t
RouterA(config)#line console 0
RouterA(config-line)#password *****
RouterA(config-line)#login
RouterA(config-line)#exit
RouterA(config)#
  • Mettre un mot de passe pour les lignes virtuelles(pour la configuration à travers telnet) :
RouterA(config)#line vty 0 4
RouterA(config-line)#password *****
RouterA(config-line)#login
RouterA(config-line)#exit
RouterA(config)#enable password *****
  • pour crypter les mot de passe:
RouterA(config)#service password-encryption
  • Enregistrer la configuration :
Router#copy running-config startup-config
  • Effacer la configuration :
Router#wr er
Router#reload

Exemple de Configuration :

Configuration for a network using TCP/IP

Voilà un exemple de configuration pour un réseau comportant 2 sous-réseaux (Subnets). Pour cet exemple, imaginez qu'il y a 63 postes de travail sur le 1er sous-réseaux et 4 sur le 2e.
La classe d'adresse utilisé est 192.168.1.x :
  • Subnet 1
adresse : 192.168.1.0
adresse broadcast : 192.168.1.127
masque sous-réseaux: 255.255.255.128
  • Subnet 2
adresse : 192.168.1.128
adresse broadcast : 192.168.1.135
masque sous-réseaux : 255.255.255.248
Voilà la configuration du routeur reliant les 2 sous réseaux :
Router>en
/* saisie du mot de passe si existant */
Router#conf t
--- Configuration des interfaces ---
Router(config)#int fastEthernet 0/0
Router(config-if)#ip address 192.168.1.1 255.255.255.128
Router(config-if)#no shutdown // allumer cette interface.
Router(config)#int fastEthernet 0/1
Router(config-if)#ip address 192.168.1.130 255.255.255.248
Router(config-if)#no shutdown
--- Rip v.2 et routage ---
Router(config)#ip routing // active le routage sur les sous-réseaux
Router(config)#router rip // active le routage avec le protocole de passerelle interne Rip
Router(config-router)#version 2 // définit la version de rip utilisé
Router(config-router)#network 192.168.1.0 // Subnet 1
Router(config-router)#network 192.168.1.128 // Subnet 2
Here, with this configuration of the router, not to mention configure workstations with IP addresses (example: one station on a subnet -> @ ip: 192.168.1.2, Gateway: 192.168.1.1, mask: 255255255128) your network is functioning.

Configuration for a network utilisant IPX

Consider the same example as before except that the protocol used is IPX. To use IPX, you must define an external network number the stations (eg station 1 on subnet 1 -> no res. ext.: 00000010, frame type: Ethernet 802.3)
Router>en
/* saisie du mot de passe si existant */
Router#conf t
Router(config)#ipx routing
--- Configuration des interfaces ---
Router(config)#int fastEthernet 0/0
Router(config-if)#ipx network 00000010 // spécifie le numéro de réseau externe du sous-réseau
Router(config-if)#ipx type-20-propagation// laisse passer les broadcasts NetBios
Router(config-if)#no shutdown
Router(config)#int fastEthernet 0/1
Router(config-if)#ipx network 00000020
Router(config-if)#ipx type-20-propagation
Router(config-if)#no shutdown

Configuration pour un réseau utilisant NetBeui (Bridge)

Pour cet exemple, l'infrastructure réseau est la même que pour les 2 exemples précédents mais cette fois nous utiliserons le protocole non-routable NETBEUI.
Pour installer NETBEUI, il vous faut le cd-rom de Windows XP. Marche à suivre :
Insérez le cd de windows xp. Copiez les fichiers Netnbf.inf et Nbf.sys, se trouvant dans le ::répertoire « Valueadd\MSFT\Net\NetBEUI », dans les répertoires suivants :
  • Nbf.sys -> « %SYSTEMROOT%\System32\Drivers »
  • Netbnf.inf -> « %SYSTEMROOT%\Inf »
Une fois NETBEUI installé, activez-le, puis configurez le routeur pour utiliser un bridge car, vu que NETBEUI est un protocole non routable, il faudra faire un bridge (pont) pour relier les 2 sous-réseaux.
Router>en
/* saisie du mot de passe si existant */
Router#conf t
--- Configuration des interfaces ---
Router(config)#int fastEthernet 0/0
Router(config-if)#bridge-group 1 // assigne l'interface au groupe de bridge 1
Router(config-if)#no shutdown
Router(config)#int fastEthernet 0/1
Router(config-if)#bridge-group 1
Router(config-if)#no shutdown
--- Bridging ---
Router(config)#bridge irb // active irb(integrated routing and bridging) et permet de bridger et router
Router(config)#bridge 1 protocol ieee // spécifige le type de protocole (spanning tree protocol)

Mise en place de filtrage IP (Access-lists)

Maintenant, voyons comment mettre en place des Access-lists (filtres) sur notre réseau.
Tout d'abord, il y a 3 principes fondamentaux à ne pas oublier avec les ACL :
  • Lorsqu’on crée une ACL, elle définit par défaut que TOUT est deny (bloqué)
  • Le routeur applique les ACL séquentiellement, c’est-à-dire dans l’ordre où on les a créées
  • Lorsque l’on met un « permit » sur un protocole de couche de niveau 3 par exemple (comme ip) le routeur laissera aussi passer sur les couches inférieures.
Ensuite, les ACL sont définies par des numéros qui peuvent être :
  • <1-99> IP standard access list
ces access list ne permettent que de filtrer au niveau de l'adresse ip source
  • <100-199> IP extended access list
Permet d'identifier un paquet par les adresses IP, protocoles et ports source et destination
  • <1100-1199> Extended 48-bit MAC address access list
  • <200-299> Protocol type-code access list
Permet le filtrage par protocole
  • <700-799> 48-bit MAC address access list
Permet le filtrage par adresse MAC
Voici la syntaxe de la commande servant à créer une ACL : access-list <number> <action> <protocol> <source> <destination> <eq,gt,it,neq ou range> <port number>
Exemple :
  • Permettre une ip spécifique (ce qui interdira toutes les autres, cf: 3 principes fondamentaux) :
Router(config)#access-list 10 permit 192.92.130.2
  • Permettre le trafic sur le port 80 (www) depuis une source spécifique vers une destination :
Router(config)#access-list 101 permit tcp host 10.1.1.2 host 10.1.2.2 eq www
  • Permettre l'utilisation du ping (echo)
Router(config)#access-list 101 permit icmp any any echo