Tuesday, January 3, 2012

Source NAT on Cisco Router

There are only 4 commands to do static NAT on Cisco Router. Here is an example

access-list 1 permit 192.168.1.0 0.0.0.255
ip nat inside source list 1 interface <wan> overload
ip nat outside ==> on WAN port
ip nat inside ==> on LAN port

VLAN on Cisco Switch & Mikrotik Router

On Cisco Switch
=============>
set ports of switch to reqired vlan-id. Make a port as trunk & connect a ethernet cable from trunk port to Mikrotik Router

On Mikrotik Router
===============>
1. Create VLAN for example valn10, vlan20, vlan30 on the port connected to switch.
2. Put IP address for each vlan.
3. Do DHCP on each vlan if required.

VLAN on Cisco

On Switch
==========>

VLAN on Cisco Switch is quite easy.  We can set a particular port to an specific VLAN by using the following command:
switchport access vlan <vlan-id>
Further we can set a particular port as a trunk-port to carry multiple VLANs traffic using the following commands:
switchport mode trunk
switchport trunk allowed vlan 10,20,30 ==> do not use this command if you want to carry all VLANs traffic

On Router
=========>
Either you have to connect to the router through access-vlan port individually (i.e. from each vlan to Router's different port) or connect to the router through trunk port & create subinterface as follows.

int f0/0.1
encapsulation dot1q
ip address 192.168.10.1 255.255.255.0
no shut


int f0/0.2
encapsulation dot1q
ip address 192.168.20.1 255.255.255.0
no shut


int f0/0.3
encapsulation dot1q
ip address 192.168.30.1 255.255.255.0
no shut