Showing posts with label packet tracer. Show all posts
Showing posts with label packet tracer. Show all posts

Saturday, 8 March 2014

Router-on-a-stick is a term frequently used to describe a setup up that consists of a router and switch connected using one Ethernet link configured as an 802.1q trunk link. In this setup, the switch is configured with multiple VLANs and the router performs all routing between the different networks/VLANs. It's a very popular term and commonly used in networks where no layer-3 switch exists.


Inter-vlan using router on a stick method.

Solution: The given topology is:



Steps:
Configuring steps for PC1:
VLAN 2: Sales
Ip address: 192.168.10.2
Subnet mask: 255.255.255.224
Default gateway: 192.168.10.10

Configuring steps for PC2:
VLAN 2: Sales
Ip address: 192.168.10.3
Subnet mask: 255.255.255.224
Default gateway: 192.168.10.10

Configuring steps for PC0:
VLAN 2: Sales
Ip address: 192.168.10.4
Subnet mask: 255.255.255.224
Default gateway: 192.168.10.10

Configuring steps for PC3:
VLAN 3: Accounts
Ip address: 192.168.10.33
Subnet mask: 255.255.255.224
Default gateway: 192.168.10.40

Configuring steps for PC4:
VLAN 3: Accounts
Ip address: 192.168.10.34
Subnet mask: 255.255.255.224
Default gateway: 192.168.10.40

Configuring steps for PC5:
VLAN 3: Accounts
Ip address: 192.168.10.35
Subnet mask: 255.255.255.224
Default gateway: 192.168.10.40

Configuring steps for switch0:
Switch>enable
Switch#config terminal
Switch(config)#vlan 2
Switch(config-vlan)#name sales
Switch(config-vlan)#interface range fa0/2 – fa0/4
Switch(config-if-range)# switchport mode access
Switch(config-if-range)#switchport access vlan 2
Switch(config-if-range)#exit
Switch(config)# vlan 3
Switch(config-vlan)# name account
Switch(config-vlan)# interface range fa0/5-fa0/7
Switch(config-if-range)# switchport mode access
Switch(config-if-range)# switchport access vlan 3
Switch(config-if-range)# exit
Switch(config)#interface fa0/1
Switch(config-if)# switchport mode trunk
Switch(config-if)# exit
Switch(config)#

Configuring steps for router:

Router0>enable
Router0#config terminal
Router0(config)#interface fa0/0
Router0(config-if)# interface fa0/0.1
Router0(config-subif)# encapsulation dot1Q 2
Router0(config-subif)# ip address 192.168.10.10 255.255.255.224
Router0(config-subif)# exit
Router0(config)# interface fa0/0
Router0(config-if)# interface fa0/0.2
Router0(config-subif)# encapsulation dot1Q 3
Router0(config-subif)# ip address 192.168.10.40 255.255.255.224
Router0(config-subif)# exit
Router0(config)#

Output:
Ping command from PC1 to PC5:

                       

Wednesday, 5 March 2014



Description: Open Shortest Path First (OSPF) is a link-state routing protocol for Internet Protocol (IP) networks. It uses a link state routing algorithm and falls into the group of interior routing protocols, operating within a single autonomous system (AS).  Using OSPF, a host that obtains a change to a routing table or detects a change in the network immediately multicasts the information to all other hosts in the network so that all will have the same routing table information. Unlike the RIP in which the entire routing table is sent, the host using OSPF sends only the part that has changed. With RIP, the routing table is sent to a neighbour host every 30 seconds. OSPF multicasts the updated information only when a change has taken place.

Solution: The given topology is:

 
Inter-Communication through OSPF.


Steps:
Configuring steps for router0:

Router0>enable
Router0#config terminal
Router0(config)#interface fa0/0
Router0(config-if)#ip address 192.16.10.3 255.255.255.0
Router0(config-if)#no shutdown
Router0(config-if)#exit
Router0(config)#interface se2/0
Router0(config-if)#ip address 10.0.0.1 255.255.255.0
Router0(config-if)#no shutdown
Router0(config-if)#clock rate 64000
Router0(config-if)#exit
Router0(config-if)#router ospf 100
Router0(config-router)#network 20.0.0.0 0.0.0.255 area 0
Router0(config-router)#network 192.16.12.0 0.0.0.255 area 0
Router0(config-router)#exit
Configuring steps for router1:
Router1>enable
Router1#config terminal
Router1(config)#interface fa0/0
Router1(config-if)#ip address 192.16.12.3 255.255.255.0
Router1(config-if)#no shutdown
Router1(config-if)#exit
Router1(config)#interface se2/0
Router1(config-if)#ip address 20.0.0.2 255.255.255.0
Router1(config-if)#no shutdown
Router1(config-if)#clock rate 64000
Router1(config-if)#exit
Router1(config-if)#router ospf 100
Router1(config-router)#network 192.16.12.0 0.0.0.255 area 0
Router1(config-router)#network 20.0.0.0 0.0.0.255 area 0
Router1(config-router)#exit

Configuring steps for router2:

Router2>enable
Router2#config terminal
Router2(config)#interface fa0/0
Router2(config-if)#ip address 192.16.11.3 255.255.255.0
Router2(config-if)#no shutdown
Router2(config-if)#exit
Router2(config)#interface se2/0
Router2(config-if)#ip address 10.0.0.2 255.255.255.0
Router2(config-if)#no shutdown
Router2(config-if)#exit
Router2(config)#interface se3/0
Router2(config-if)#ip address 20.0.0.1 255.255.255.0
Router2(config-if)#no shutdown
Router2(config-if)#clock rate 64000
Router2(config-if)#exit
Router2(config-if)#router ospf 100
Router2(config-router)#network 20.0.0.0 0.0.0.255 area 0
Router2(config-router)#network 192.16.11.0 0.0.0.255 area 0
Router2(config-router)#network 10.0.0.0 0.0.0.255 area 0
Router2(config-router)#exit

Configuring steps for PC0:

Ip address: 192.16.10.1
Subnet mask: 255.255.255.0
Default gateway: 10.0.0.0.1

Configuring steps for PC1:

Ip address: 192.1.10.2
Subnet mask: 255.255.255.0
Default gateway: 10.0.0.1

Configuring steps for PC2:

Ip address: 192.16.11.1
Subnet mask: 255.255.255.0
Default gateway: 10.0.0.2

Configuring steps for PC3:

Ip address: 192.16.11.2
Subnet mask: 255.255.255.0
Default gateway: 10.0.0.2

Configuring steps for PC4:

Ip address: 192.16.12.2
Subnet mask: 255.255.255.0
Default gateway: 20.0.0.2

Configuring steps for PC5:

Ip address: 192.16.12.1
Subnet mask: 255.255.255.0
Default gateway: 20.0.0.2
Output:
Show ip route command on router 1: