Category Archives: Cisco

Cisco NAT range ports

This article describes how to open a range port from outside to an inside server.

fa0/0 is public interface
Public interface has IP address 222.10.10.1
fa0/1 is lan interface
LAN network is 192.168.99.0/24

Create an extended acl

R1(config)#ip access-list extended NAT_SERVER1
r0(config-ext-nacl)#permit tcp host 192.168.99.10 range 40000 60000 any
r0(config-ext-nacl)#permit udp host 192.168.99.10 range 40000 60000 any
r0(config-ext-nacl)#exit

Associate the acl to the route-map

R1(config)#route-map NAT_SERVER1_RULES per 10
R1(config)#match ip address NAT_SERVER1

Finaly nat with route-map

R1(config)#ip nat inside source static 192.168.45.10 222.10.10.1 route-map NAT_SERVER1

Cisco switch Port-Channel (bonding)

Cisco port-channel consists of link agretation.

Switch(config)#conf t
Switch(config)#interface range gi1/0/25-26
Switch(config-if-range)#channel-group 2 mode active
Switch(config-if-range)#exit

Global view:

Switch#show etherchannel summary

Detailed view for port-channel 2 (po2):

Switch#show etherchannel 2 detail

Details of ports included in port-channel (po2):

Switch#show etherchannel 2 port

Suppress port-channel (po2):

Switch#no interface PortChannel2
Switch#no int Po2

Cisco switch port monitoring / mirroring

The goal is to copy traffic of one port or many ports or a vlan to another port.

First create the monitoring session (named 1) and define source port (fa0/0/1) for traffic in and out (both)

Switch(config)#monitor session 1 source interface fa1/0/1 both

Then define the where you copy the traffic for this sesssion, specify destination port (fa1/0/48)

Switch(config)#monitor session 1 destination interface fa1/0/48

Check the monitoring sessions 1

Switch(config)#do show monitor session 1

Delete the session

Switch(config)#no monitor session 1