Configurazioni di base router cisco

 

 

Configurazione minimale di una ISDN


hostname <nome_router>
enable password <password>
!
isdn switch-type basic-net3
ip subnet-zero
!
interface BRI0
 no ip address
 no ip directed-broadcast
 encapsulation ppp
 dialer pool-member 1
 ppp authentication chap
 isdn switch-type basic-net3
!
interface Dialer1
 ip address <x.x.x.x y.y.y.y|negotiated>
 no ip directed-broadcast
 encapsulation ppp
 dialer remote-name <nome del router remoto>
 dialer idle-timeout 300
 dialer string <numero di telefono>
 dialer pool 1
 dialer-group 1
 ppp authentication chap
 ppp chap hostname <username>
 ppp chap password <password>
!
ip classless
ip route 0.0.0.0 0.0.0.0 Dialer1
!
dialer-list 1 protocol ip permit
!
line vty 0 4
 password <password>
 login
!
end

 

Configurazione minimale ISDN per Internet con NAT


hostname <nome_router>
enable password <password>
!
isdn switch-type basic-net3
ip subnet-zero
!
interface Ethernet0
 ip address <ip> <netmask>
 no ip directed-broadcast
 no ip proxy-arp
 ip nat inside
!
interface BRI0
 no ip address
 no ip directed-broadcast
 encapsulation ppp
 dialer pool-member 1
 ppp authentication chap
 no cdp enable
 ppp authentication chap pap callin
 isdn switch-type basic-net3
!
interface Dialer1
 ip address negotiated
 no ip directed-broadcast
 no ip proxy-arp
 ip nat outside
 encapsulation ppp
 dialer remote-name <nome del router remoto, non indispensabile>
 dialer pool 1
 dialer string <numero di telefono>
 dialer hold-queue 10
 dialer idle-timeout 300
 dialer-group 1
 no cdp enable
 ppp authentication chap pap callin
 ppp chap hostname <username>
 ppp chap password <password>
 ppp pap sent-username <username>@<provider> password <password>
!
ip classless
ip nat inside source list 10 interface Dialer1 overload
ip route 0.0.0.0 0.0.0.0 Dialer1
!
access-list 10 permit <net che deve essere nattata per accedere ad Internet> <netmask invertita>
dialer-list 1 protocol ip permit
!
line vty 0 4
 password <password>
 login
!
end

 

Configurazione minimale di una ADSL (PPPoverATM) 1


hostname <nome_router>
enable password <password>
!
ip subnet-zero
ip name-server <Ip_DNS>
!
interface Ethernet0
 ip address <Ip_LAN> <subnet-mask>
 ip nat inside
!
interface ATM0
 no ip address
 no ip directed-broadcast
 no atm ilmi-keepalive
 pvc 8/35
  encapsulation aal5snap
  oam-pvc manage
  protocol ppp dialer
  dialer pool-member 1
!
interface Dialer1
 ip address negotiated
 no ip directed-broadcast
 encapsulation ppp
 ip nat outside
 dialer pool 1
 dialer-group 1
 ppp pap sent-username <utente_adsl> password <password_adsl>
!
ip nat inside source list 101 interface Dialer1 overload
ip classless
no ip http server
!
access-list 101 permit ip any any
dialer-list 1 protocol ip permit
!
ip route 0.0.0.0 0.0.0.0 Dialer0
!
line vty 0 4
 password <password>
 login
!
end

 

Configurazione minimale di una ADSL (PPPoverATM) 2


hostname <nome_router>
enable password <password>
!
ip subnet-zero
ip name-server <Ip_DNS>
!
interface Ethernet0
 ip address <Ip_LAN> <subnet-mask>
 ip nat inside
!
interface ATM0
 no ip address
 no ip directed-broadcast
 atm vc-per-vp 64
 no atm ilmi-keepalive
 pvc 8/35
  encapsulation aal5mux ppp dialer
  oam-pvc manage
  dialer pool-member 1
!
interface Dialer1
 ip address negotiated
 no ip directed-broadcast
 encapsulation ppp
 ip nat outside
 dialer pool 1
 dialer-group 1
 ppp pap sent-username <utente_adsl> password <password_adsl>
!
ip nat inside source list 101 interface Dialer1 overload
ip classless
no ip http server
!
access-list 101 permit ip any any
dialer-list 1 protocol ip permit
!
ip route 0.0.0.0 0.0.0.0 Dialer1
!
line vty 0 4
 password <password>
 login
!
end

 

Configurazione minimale di una ADSL (con IP Pubblico)


hostname <nome_router>
enable password <password>
!
ip subnet-zero
ip name-server <Ip_DNS>
!
interface Ethernet0
 ip address <Ip_LAN> <subnet-mask>
 ip nat inside
!
interface ATM0
 no ip address
 no ip mroute-cache
 ip nat outside
 no atm ilmi-keepalive
 dsl operating-mode auto
!
interface ATM0.1 point-to-point
  ip address <ip_pubblico_acquistato> 255.255.255.252
  ip nat outside
  pvc 8/35
    oam-pvc manage
    protocol ip <ip_pubblico_POP> broadcast
!
ip nat inside source list 101 interface ATM0.1 overload
ip classless
!
access-list 101 permit ip any any
dialer-list 1 protocol ip permit
!
ip route 0.0.0.0 0.0.0.0 ATM0.1
no ip http server
!
line vty 0 4
 password <password>
 login
!
end

 

Configurazione minimale di una ADSL (PPPoverEthernet)


hostname <nome_router>
enable password <password>
!
ip subnet-zero
ip name-server <Ip_DNS>
!
vpdn enable
no vpdn logging
!
vpdn-group 1
 request-dialin
 protocol pppoe
!
interface Ethernet0

 descritpion Connessione LAN
 ip address <Ip_LAN> <subnet-mask>
!
interface Ethernet1
 descritpion Connessione verso router Adsl
 pppoe enable
 pppoe-client dial-pool-number 1 dial-on-demand
!
interface Dialer1
 ip address negotiated
 ip mtu 1492
 encapsulation ppp
 dialer pool 1
 dialer idle-timeout 180 either
 dialer hold-queue 100
 dialer-group 1
!
dialer-list 1 protocol ip permit
!
ip route 0.0.0.0 0.0.0.0 Dialer1 permanent
no ip http server
!
line vty 0 4
 password <password>
 login
!
end

 

Configurazione minimale di un servizio generico Frame Relay


hostname <nome_router>
!
enable password <password>
!
ip subnet-zero
!
interface Serial0
 no ip address
 no ip directed-broadcast
 encapsulation frame-relay
 no fair-queue
!
interface Serial0.1 point-to-point
 ip address <x.x.x.x> <y.y.y.y>
 no ip directed-broadcast
 frame-relay interface-dlci <numero_DLCI>
!
ip classless
!
line vty 0 4
 password <password>
 login
!
end

 

Come verificare se il router funziona correttamente:

connettere sulla seriale un secondo router tramite cavo DCE (femmina) e configurarlo nel modo seguente:

frame-relay switching
!
interface Serial0
 no ip address
 encapsulation frame-relay
 no ip mroute-cache
 clock rate 256000
 frame-relay intf-type dce
 keepalive 15

verificare quindi lo stato delle seriali di entrambi i router, che dovranno essere ovviamente:
Serial0/0 is up, line protocol is up
quindi immettere su entrambi i router il comando:
show frame-relay lmi
verificando il numero degli Enquires Sent/Received:

LMI Statistics for interface Serial0 (Frame Relay DTE) LMI TYPE = CISCO
  Invalid Unnumbered info 0                  Invalid Prot Disc 0
  Invalid dummy Call Ref 0                    Invalid Msg Type 0
  Invalid Status Message 0                    Invalid Lock Shift 0
  Invalid Information ID 0                                  Invalid Report IE Len 0
  Invalid Report Request 0                    Invalid Keep IE Len 0
  Num Status Enq.
Sent 180     Num Status msgs Rcvd 180
  Num Update Status Rcvd 0     Num Status Timeouts 0

LMI Statistics for interface Serial0 (Frame Relay DCE) LMI TYPE = CISCO
Invalid Unnumbered info 0                    Invalid Prot Disc 0
  Invalid dummy Call Ref 0                    Invalid Msg Type 0
  Invalid Status Message 0                    Invalid Lock Shift 0
  Invalid Information ID 0                                  Invalid Report IE Len 0
  Invalid Report Request 0                    Invalid Keep IE Len 0
  Num Status Enq. Sent 180     Num Status msgs Rcvd 180
  Num Update Status Rcvd 0     Num Status Timeouts 0


Configurazione minimale di un servizio generico X.25


hostname <nome_router>
!
enable password <password>
!
x25 routing
!
interface Serial0
 encapsulation x25
 x25 address <nua X25>
 x25 htc <numero circuiti virtuali>
 x25 win <window in>
 x25 wout <window out>
 x25 accept-reverse
 x25 default pad
 lapb N1 8216
!
line vty 0 4
 password <password>
 login
!
end




<indietro>