Of Technology: Router On A Stick
Of Technology: Router On A Stick
og
Router on a Stick
ol
hn
ec
fT
ro
te
en
C
na
SwitchA(config)#interface fa0/3
SwitchA(config-if)#switchport trunk encapsulation dot1q
SwitchA(config-if)#switchport mode trunk
SwitchA(config-if)#switchport trunk allowed vlan 10,20
RouterA(config)#interface fa0/0
ira
RouterA(config-if)#no shut
RouterA(config)#interface fa0/0.10
y
RouterA(config-subif)#encapsulation dot1Q 10
og
RouterA(config-subif)#ip address 192.168.10.254 255.255.255.0
RouterA(config)#interface fa0/0.20
RouterA(config-subif)#encapsulation dot1Q 20
RouterA(config-subif)#ip address 192.168.20.254 255.255.255.0
RouterA#show ip route
ol
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
hn
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
ec
o - ODR, P - periodic downloaded static route
fT
C 192.168.20.0/24 is directly connected, FastEthernet0/0.20
ro
Provoni të bëni një ping:
te
C:Documents and SettingsComputerA>ping 192.168.20.1
en
Pinging 192.168.20.1 with 32 bytes of data:
og
ol
hn
ec
fT
ro
te
en
SwitchA(config)#ip routing
C
SwitchA(config)#interface vlan 10
SwitchA(config-if)#no shutdown
SwitchA(config-if)#ip address 192.168.10.254 255.255.255.0
SwitchA(config)#interface vlan 20
na
SwitchA(config-if)#no shutdown
SwitchA(config-if)#ip address 192.168.20.254 255.255.255.0
SwitchA#showip interface brief vlan 10
Interface IP-Address OK? Method Status Protocol
Vlan10 192.168.10.254 YES manual up up
ira
hn
Genti Mejdani
ec
fT
ro
te
en
C
na
ira