cisco ccna-router on stick

23
CISCO CCNA Router on Stick To watch our Cisco CCNA Training Videos Please Check out the link below: www.asmed.com/c1 ASM EDUCATIONAL CENTER INC. (ASM) WHERE TRAINING, TECHNOLOGY & SERVICE CONVERGE PHONE: (301) 984-7400

Upload: hamed-moghaddam

Post on 07-Jan-2017

440 views

Category:

Education


0 download

TRANSCRIPT

Page 1: Cisco CCNA-Router on Stick

CISCO CCNARouter on StickTo watch our Cisco CCNA Training Videos Please Check out the link below:www.asmed.com/c1

ASM EDUCATIONAL CENTER INC. (ASM)WHERE TRAINING, TECHNOLOGY & SERVICE CONVERGEPHONE: (301) 984-7400

Page 2: Cisco CCNA-Router on Stick

CISCO CCNA- Router on Stick

To see how router on a stick works, build the following topology:

Page 3: Cisco CCNA-Router on Stick

CISCO CCNA-Router on Stick

First we need to change port fa0/24 to be a trunk port.  We will be using 802.1q as the trunking encapsulation. Switch#conf t Enter configuration commands, one per line.  End with CNTL/Z.Switch(config)#int fa0/24Switch(config-if)#sw trunk encapsulation dot1qSwitch(config-if)#sw mode trunkSwitch(config-if)#

Page 4: Cisco CCNA-Router on Stick

CISCO CCNA- Router on Stick

Port Mode Encapsulation

Status Native vlan

Fa0/24 on 802.1q trunking  1

Let’s check the result on SwitchSwitch#show int trunk

Switch#

Page 5: Cisco CCNA-Router on Stick

CISCO CCNA- Router on Stick

Now, on the router we need to create the sub-interfaces for the two VLANs. A sub-interface is created by referencing the interface name followed by a dot, followed by a unique number in this format interface fa0/0.X We can choose any number for X and it does not have to be sequential. However, normally we want to match the sub-interface number with the VLAN number (known as VLAN ID). Don’t forget to bring the physical interface up.

Page 6: Cisco CCNA-Router on Stick

CISCO CCNA- Router on Stick

Let’s take a look:Router>Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#int fa0/0Router(config-if)#no shutdown

Page 7: Cisco CCNA-Router on Stick

CISCO CCNA- Router on Stick

Router(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upRouter(config-if)#exitAfter we bring the interface up, we create the sub-interfaces and indicated to which VLAN they belong to.  We assign the Default Gateway IP address of the relevant VLAN to the sub-interface.

Page 8: Cisco CCNA-Router on Stick

CISCO CCNA- Router on Stick

Router(config)#interface fa0/0

Router(config)#interface fa0/0.?<0-4294967295>  FastEthernet interface numberRouter(config)#int fa0/0.2

Router(config-subif)#%LINK-5-CHANGED: Interface FastEthernet0/0.2, changed state to up

Page 9: Cisco CCNA-Router on Stick

CISCO CCNA- Router on Stick

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.2, changed state to up

Router(config-subif)#encapsulation dotRouter(config-subif)#encapsulation dot1Q 2Router(config-subif)#ip address 10.10.10.100 255.255.255.0

Router(config-subif)#exit

Page 10: Cisco CCNA-Router on Stick

CISCO CCNA- Router on Stick

The number coming after encapsulation dot1Q must match the VLAN number (VLAN ID).  802.1q will TAG the traffic coming from the VLAN with the VLAN ID.  The router looks at the TAG to determine which sub-interface the traffic associated with.

Page 11: Cisco CCNA-Router on Stick

CISCO CCNA- Router on Stick

Here is the configuration for VLAN 3:

Router(config)#interface fa0/0.3Router(config-subif)#%LINK-5-CHANGED: Interface FastEthernet0/0.3, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.3, changed state to up

Page 12: Cisco CCNA-Router on Stick

CISCO CCNA- Router on Stick

Router(config-subif)#encapsulation dot1Q 3Router(config-subif)#ip add 20.20.20.100 255.255.255.0Router(config-subif)#endRouter#%SYS-5-CONFIG_I: Configured from console by console

Page 13: Cisco CCNA-Router on Stick

CISCO CCNA- Router on Stick

Here is our show run:interface FastEthernet0/0no ip addressduplex autospeed auto!

Page 14: Cisco CCNA-Router on Stick

CISCO CCNA- Router on Stick

interface FastEthernet0/0.2description this will act as DG=10.10.10.100 for VLAN2encapsulation dot1Q 2ip address 10.10.10.100 255.255.255.0!

Page 15: Cisco CCNA-Router on Stick

CISCO CCNA- Router on Stick

interface FastEthernet0/0.3description This Will act as DG=20.20.20.100 for VLAN 3encapsulation dot1Q 3ip address 20.20.20.100 255.255.255.0!Hint: Make sure do not give IP address to physical interface f0/0 but you always assign it to sub-interface

Page 16: Cisco CCNA-Router on Stick

CISCO CCNA- Router on Stick

Check to see if we have the subnets in the routing table: Router#sh ip routeCodes: C – connected, S – static, I – IGRP, R – RIP, M – mobile, B – BGPD – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter areaN1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2E1 – OSPF external type 1, E2 – OSPF external type 2, E – EGPi – IS-IS, L1 – IS-IS level-1, L2 – IS-IS level-2, ia – IS-IS inter area* – candidate default, U – per-user static route, o – ODRP – periodic downloaded static route

Page 17: Cisco CCNA-Router on Stick

CISCO CCNA- Router on Stick

Gateway of last resort is not set 10.0.0.0/24 is subnetted, 1 subnetsC       10.10.10.0 is directly connected, FastEthernet0/0.220.0.0.0/24 is subnetted, 1 subnetsC       20.20.20.0 is directly connected, FastEthernet0/0.3Router#

Page 18: Cisco CCNA-Router on Stick

CISCO CCNA- Router on Stick

Note that the router connects the subnets to the virtual sub-interfaces.  Now the router can “Route” the traffic between different broadcast domains, although the traffic is physically coming and going over the same interface.

Page 19: Cisco CCNA-Router on Stick

CISCO CCNA- Router on Stick

We must configure the PC’s with the correct IP address and Default Gateway values:

Page 20: Cisco CCNA-Router on Stick

CISCO CCNA- Router on Stick

As before the switch is configured with the correct VLAN’s and interfaces have been assigned to them.Switch#sh vlan br

VLAN Name Status Ports1 default active Fa0/3, Fa0/6, Fa0/7, Fa0/8

Fa0/9, Fa0/10, Fa0/11, Fa0/12Fa0/13, Fa0/14, Fa0/15, Fa0/16Fa0/17, Fa0/18, Fa0/19, Fa0/20Fa0/21, Fa0/22, Fa0/23, Gig0/1

Gig0/2

Page 21: Cisco CCNA-Router on Stick

CISCO CCNA- Router on Stick

2 Sales active Fa0/1, Fa0/23 EGR active Fa0/4, Fa0/5

1002 fddi-default active1003 token-ring-default active1004 fddinet-default active1005 trnet-default Switch# active

Page 22: Cisco CCNA-Router on Stick

CISCO CCNA- Router on Stick

Ping test from the 10.10.10.0 subnet to the 20.20.20.0 subnet should succeed:

Page 23: Cisco CCNA-Router on Stick

ASM Educational Center Inc. (ASM)Where Training, Technology & Service Converge

TO WATCH OUR CISCO CCNA VIDEO TRAININGS PLEASE CHECK OUT THE LINK BELOW:WWW.ASMED.COM/C1PHONE: (301) 984-7400