Cisco

Cisco

Inhoudstabel

Op zoek naar een IP- of mac-adres?

Met het commando ‘show mac address-table’ zie je vrij veel informatie. Zoals de VLAN ID, het mac adres, poort informatie…
Meestal doe ik eerste en ping naar het adres vanop de switch zelf. Zo ben je zeker dat het ip-adres in de tabel staat (als het natuurlijk bereikbaar is).

>UwSwitch# ping 192.168.201.9
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.201.9, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/201/1000 ms

Vervolgens kan u aan de hand van de arp table het juist mac adres vinden:

>UwSwitch#sh ip arp | incl 192.168.201.9
Internet  192.168.201.9           2   0030.3100.5216  ARPA   Vlan201

Nu u het mac-adres kent, kan u zoeken achter welke interface deze node zich bevindt:

UwSwitch#sh mac-address-table | incl 0030.3100.5216
 201    0030.3100.5216    DYNAMIC    Gi0/1

Assign DHCP on a cisco router

If you want to put a DHCP server into a certain vlan, you can use following command for this

interface vlan 123 ip helper-address 123.456.789.001

Cisco ASA ezvpn

Wijzigen van routes, DNS servers… op remote vpn-boxen met ezvpn. Dit gebeurt op de ASA firewall, en vervolgens (bij de nieuwe sync krijgen de routers dit binnen.

Wijzig ASA (core zijde)

>Open de ASA firewall > Configuration > Remote Access VPN > Network (Client) Access > Group Policies > Advanced > Split Tunneling > Network list > manage….

Herstart remote router Of herstart de ipsec tunnels:

>cle crypto isakmp

Verifeer de routes op de remote router

>sh cryptop ipsec sa

Cisco backup

Om de startup configuratie te backuppen, kan je gebruik maken van volgend commando😀

copy startup-config tftp ip-address 192.168.0.100 filename MijnBackup

Cisco Blade commando’s

Start from cli

scope chassis
power on

Show power usuage:

show power-cap

Cisco cli vs H3C cli

Some commands that are usefull when you switch from cisco towards h3c. As most of us (?) know, cisco is around for quite a while. And when you want to present a new product, you’ll have to make sure that your product can do the same like cisco. OK, i agree, H3C is a bit to much. It’s rarther funny to see how they reuse the commands in their way…

Cisco >< H3C
show >< display
no > user >< local-user
end >< return
exit >< quit
write >< save
erase >< delete
write >< save
hostname >< sysname
router rip >< rip
router ospf >< ospf
router bgp >< bgp
ip route >< ip route-static
access-list >< acl
line vty 0 4 >< user-interface vty 0 4
terminal length 0 >< screen-length disable
terminal >< monitor
logging console level >< terminal logging
terminal >< debugging
show run >< display current-configuration
show start >< display save-confguration
show tech-support >< display diagnostic-information
show interfaces status >< display brief interfaces
show ip int brief >< display ip int brief
show ip route >< display ip routing-table
show logging >< display info-center
show version >< display version

Cisco NAT

Indien je een cisco router wenst te gebruiken als gateway naar het internet, dan kun je volgende doen. Ik ga hier niet teveel details neerpennen zoals ga naar ‘configuratie-mode’ en zo. Als je dit wenst te doen, ga ik ervan uit dat je de basis reeds beheerst. En anders geef je maar een seintje…
Het komt er op neer dat je alle adressen van je internet netwerk verbergt achter 1 adres, het adres dat je krijgt van je provider in de meeste gevallen. Dan lijkt het voor de provider dat je slechts 1 adres hebt. Dit noemen we natteren…

Configureer 1 interface als LAN, en een tweede als WAN. Je kan dit eventueel op dezelfde interface doen, doch we gaan het hier simpel/overzichtelijk houden.
Ik heb internet van telenet, welk me automatisch een IP adres toekent. Dus daarom gebruik ik op vlan1 een dhcp adres, en mijn interne interface (VLAN2) configureer ik als fixed.
En configureer op deze interface welke adressen moeten vertaald worden. Meestal is dit op de uitgaande interface, dus degene naar het internet toe.

interface Vlan1
 description WAN
 ip address dhcp
 ip nat outside

interface Vlan2
 description LAN
 ip address 192.168.111.1 255.255.255.0
 ip nat inside

Volgende stap is een access lijst configureren. Waarin je meegeeft wat dit zo allemaal mag. Hieronder zie je dat mijn volledige interne range naar het internet mag. Ik gebruik verschillende protocollen voor security redenen. Niet van wakker liggen, dit werkt. 😉

access-list 100 permit ip 192.168.111.0 0.0.0.255 any
access-list 100 permit udp 192.168.111.0 0.0.0.255 any
access-list 100 permit tcp 192.168.111.0 0.0.0.255 any
access-list 100 permit icmp 192.168.111.0 0.0.0.255 any

Nu nog even zeggen wat er juist genat moet worden. Dus de access list koppelen aan de interface.


>ip nat inside source list 100 interface Vlan1 overload

Cisco Serial-USB

If you want to connect your computer and a cisco device (fe router, switch…) with a usb-cable instead of a serial-cable, you can use following steps under linux to connect it properly

Check with the command ‘dmesg’ in a terminal screen the correct address. Do this just after inserting the usb-cable.

[ 2663.068216] usb 1-3.3: new full speed USB device using ehci_hcd and address 9
[ 2663.169789] cdc_acm 1-3.3:1.0: This device cannot do calls on its own. It is not a modem.
[ 2663.169839] cdc_acm 1-3.3:1.0: ttyACM0: USB ACM device

In our example, this is ttyACM0
Open now your ‘configuration program’ (fe putty) and insert following port as ‘serial’:

/dev/ttyACM0

Cisco switch 3500 series – Boot problem – Recovery Procedure

If your cisco device has troubles booting, and you need to copy a new image to the switch/router, you can following these guide lines.

Delete the current image on the switch

delete flash:c3500xl-c3hls-mz.120-5.WC9A.bin

Save the new image (fe c3550-i9q3l2-mz.121-22.EA7.bin).
Prepare the switch to accept the Xmodem file transfer

>copy xmodem: flash:c3550-i9q3l2-mz.121-22.EA7.bin

To send the file choose ‘Transfer > Send File’ from the top of the HyperTerminal window. Choose the ‘Xmodem’ protocol in the Send File dialog box, click ‘Browse’ in order to select the IOS image and click ‘Send’. This transfer can take up to 2 hours.
To boot the new image enter

>boot flash:c3550-i9q3l2-mz.121-22.EA7.bin

Verify with

sh ver
dir flash:
sh boot

>switch#conf t
switch(config)#boot system flash:c3550-i9q3l2-mz.121-22.EA7.bin
switch(config)#end

If no boot statement is set or if the boot statement still points to the old version, configure the correct boot statement:

switch#conf t
switch(config)#boot system flash:c3550-i9q3l2-mz.121-22.EA7.bin
switch(config)#end

Cisco VPN

encryptionDebug for specific source
debug crypto condition peer ipv4 10.84.251.150
debug crypto isakmp

sh debugging condition
     % No conditions found

sh crypto debug-condition
     Crypto conditional debug currently is turned ON
     IKE debug context unmatched flag: OFF
     IKEV2 debug context unmatched flag: OFF
     IPsec debug context unmatched flag: OFF
     Crypto Engine debug context unmatched flag: OFF
     IKE peer IP address filters:  
      10.84.251.150

QOS

Create Access-Lists

ip access-list extended outpolacl-MGMT
remark | Management traffic
 permit udp any 10.10.10.0 0.0.0.255 eq snmp
 permit udp any 10.10.10.0 0.0.0.255 eq snmptrap
 permit tcp any any eq tacacs

ip access-list extended outpolacl-FILE-PREPROD
remark   Filetransfer PreProduction
 permit tcp any host 192.168.0.1 eq ftp 22
 permit tcp host 192.168.0.1 any eq ftp 22

Map ACL’s with groups

class-map match-any outpol-MGMT
 match access-group name outpolacl-MGMT
class-map match-any outpol-FILE-PROD
 match access-group name outpolacl-FILE-PROD

Define speeds

>policy-map outpol-all
 class outpol-FILE-PROD
    shape average percent 95
 class outpol-MGMT
    shape average percent 5
 class class-default
>
>policy-map outpol-shape-256
 class class-default
    shape average 256000
  service-policy outpol-all
>
>policy-map outpol-shape-512
 class class-default
    shape average 512000
  service-policy outpol-all
>
>policy-map outpol-shape-1024
 class class-default
    shape average 1024000
  service-policy outpol-all
>
>policy-map outpol-shape-2048
 class class-default
    shape average 2048000
  service-policy outpol-all

Apply Speed to interface

interface Tunnel1
 service-policy output outpol-shape-512
bandwidth 512000
interface Tunnel2
 service-policy output outpol-shape-512
bandwidth 512000

Troubleshooting

Clear all statistics
Clear counters
Clear access-lists counters

Traffic in the ACL’s?

Show access-lists
Show access-lists | include matches

Shaping?

Show policy-map interface
Ben

Een reactie achterlaten

Index