Posts tagged CCNA

Router On A Stick Tutorial

Someone asked me about configuring a router on a stick yesterday, so I figured I’d make a short tutorial on it. I haven’t seen this used much in the real world as L3 switches are so common, but it is something I had to learn for the CCNA. Router on a stick is used when for inter-VLAN routing when you have an L2 switch and a router. Here’s the topology:

Router on a stick Topology

Here we have an L2 switch with three VLANs connected to a router. Here’s the config:

Switch

Switch(config)#vlan 10
Switch(config-vlan)#exit
Switch(config)#vlan 5
Switch(config-vlan)#exit
Switch(config)#vlan 10
Switch(config-vlan)#exit
Switch(config)#vlan 15
Switch(config-vlan)#exit
Switch(config)#interface FastEthernet0/1
Switch(config-if)#switchport trunk encapsulation dot1q
Switch(config-if)#switchport mode trunk

The switch config is pretty basic, we create VLANs 5, 10 and 15, then we make a trunk port to the router.

Router

Router(config)#interface FastEthernet0/0
Router(config-if)#no ip address
Router(config-if)#interface FastEthernet0/0.5
Router(config-subif)#encapsulation dot1Q 5
Router(config-subif)#ip add 192.168.5.1 255.255.255.0
Router(config-subif)#interface FastEthernet0/0.10
Router(config-subif)#encapsulation dot1Q 10
Router(config-subif)#ip add 192.168.10.1 255.255.255.0
Router(config-subif)#interface FastEthernet0/0.15
Router(config-subif)#encapsulation dot1Q 15
Router(config-subif)#ip add 192.168.15.1 255.255.255.0

On the router, we go to the interface connected to the switch and make sure there is no IP address. Then we configure our subinterfaces with 802.1q and the appropriate VLAN. Then we give each subinterface an IP address. Now we can see all the subinterfaces are up:

Free Cisco Lab

Strech, the owner of PacketLife is now offering lab time for free. From his site:

Lab gear is broken into multiple “device blocks” to allow for multiple users to use independent portions of the lab simultaneously. Users can reserve one, several, or all of these blocks at once (however, a user may only have one unexpired reservation at any given time).
Block A
* 1x Cisco 2811 (with 2x WIC-2T)
* 2x Cisco 1841 (with 1x WIC-2T)
* 1x Cisco Catalyst 3550-24
* 1x Cisco Catalyst 3550-24 (with Inline Power)
* 1x Cisco ASA 5505

Block B
* 1x Cisco 2811 (with 2x WIC-2T)
* 2x Cisco 1841 (with 1x WIC-2T)
* 1x Cisco Catalyst 3550-24
* 1x Cisco Catalyst 3550-24 (with Inline Power)

NAT Tutorial

In this article we will configure semi-basic NAT with a Cisco router. This post will be useful for CCNA studies. First we’ll create an ACL specifying which addresses we want to be NATed, then we apply our NAT statement to the router (enabling NAT), then we tell the interfaces whether they are inside or outside. I will also throw in a little “port forwarding” as a bonus.

Here’s our NAT ACL:

ip access-list extended NAT
 permit ip 192.168.0.0 0.0.255.255 any

This ACL is permitting ANY 192.168.x.x address to be NATed. I’m doing it this way because I have a lot of subnets at home and it’s easier than a line for each. Most people would probably use something like this:

ip access-list extended NAT
 permit ip 192.168.10 0.0.0.255 any

Next we turn NAT on, we do it with this NAT statement:

ip nat inside source list NAT interface FastEthernet 0/0 overload