đRouting 3 Router
Last updated
Last updated
Router1>Router2 : 192.168.1.1/30
Router2<Router1: 192.168.1.2/30 Router2>Router3: 192.168.2.1/30
Router3<Router2: 192.168.2.2/30
Router> enable
Router# config terminal
Router(config)# hostname Router1
Router1(config)# int fa4/0
Router1(config-if)# ip address 192.168.1.1 255.255.255.0
Router1(config-if)# no shutdown
///to connect to router1///
Router> enable
Router# config terminal
Router(config)# hostname Router2
Router2(config)# int fa4/0
Router2(config-if)# ip address 192.168.1.2 255.255.255.0
Router2(config-if)# no shutdown
///to connect to router3///
Router1(config)# int fa5/0
Router1(config-if)# ip address 192.168.2.1 255.255.255.0
Router1(config-if)# no shutdown
Router> enable
Router# config terminal
Router(config)# hostname Router3
Router3(config)# int fa4/0
Router3(config-if)# ip address 192.168.2.2 255.255.255.0
Router3(config-if)# no shutdown
Router1> enable
Router1# config terminal
Router1(config)# int fa0/0
Router1(config-if)# no shutdown
///VLAN10///
Router1(config-if)# int fa0/0.10
Router1(config-subif)# encapsulation dot1q 10
Router1(config-subif)# ip address 10.10.10.1 255.255.255.0
///VLAN20///
Router1(config)# int fa0/0.20
Router1(config-subif)# encapsulation dot1q 20
Router1(config-subif)# ip address 20.20.20.1 255.255.255.0
///VLAN30///
Router1(config)# int fa0/0.30
Router1(config-subif)# encapsulation dot1q 30
Router1(config-subif)# ip address 30.30.30.1 255.255.255.0
Router2> enable
Router2# config terminal
Router2(config)# int fa0/0
Router2(config-if)# no shutdown
///VLAN40///
Router2(config-if)# int fa0/0.40
Router2(config-subif)# encapsulation dot1q 40
Router2(config-subif)# ip address 40.40.40.1 255.255.255.0
///VLAN50///
Router2(config)# int fa0/0.50
Router2(config-subif)# encapsulation dot1q 50
Router2(config-subif)# ip address 50.50.50.1 255.255.255.0
///VLAN60///
Router2(config)# int fa0/0.60
Router2(config-subif)# encapsulation dot1q 60
Router2(config-subif)# ip address 60.60.60.1 255.255.255.0
Router3> enable
Router3# config terminal
Router3(config)# int fa0/0
Router3(config-if)# no shutdown
///VLAN70///
Router3(config-if)# int fa0/0.70
Router3(config-subif)# encapsulation dot1q 70
Router3(config-subif)# ip address 70.70.70.1 255.255.255.0
///VLAN80///
Router3(config)# int fa0/0.80
Router3(config-subif)# encapsulation dot1q 80
Router3(config-subif)# ip address 80.80.80.1 255.255.255.0
///VLAN90///
Router3(config)# int fa0/0.90
Router3(config-subif)# encapsulation dot1q 90
Router3(config-subif)# ip address 90.90.90.1 255.255.255.0
Switch>enable
Switch#config terminal
///Add VLAN///
Switch(config)#vlan 10
Switch(config-vlan)#name vlan10
Switch(config)#vlan 20
Switch(config-vlan)#name vlan20
Switch(config)#vlan 30
Switch(config-vlan)#name vlan30
///Add Access Port///
Switch(config)#int fa1/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
Switch(config)#int fa2/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config)#int fa3/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 30
///Add Trunk Port
Switch(config)#int fa0/1
Switch(config-if)#switchport mode trunk
Switch>enable
Switch#config terminal
///Add VLAN///
Switch(config)#vlan 40
Switch(config-vlan)#name vlan40
Switch(config)#vlan 50
Switch(config-vlan)#name vlan50
Switch(config)#vlan 60
Switch(config-vlan)#name vlan60
///Add Access Port///
Switch(config)#int fa1/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 40
Switch(config)#int fa2/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 50
Switch(config)#int fa3/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 60
///Add Trunk Port
Switch(config)#int fa0/1
Switch(config-if)#switchport mode trunk
Switch>enable
Switch#config terminal
///Add VLAN///
Switch(config)#vlan 70
Switch(config-vlan)#name vlan70
Switch(config)#vlan 80
Switch(config-vlan)#name vlan80
Switch(config)#vlan 90
Switch(config-vlan)#name vlan90
///Add Access Port///
Switch(config)#int fa1/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 70
Switch(config)#int fa2/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 80
Switch(config)#int fa3/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 90
///Add Trunk Port
Switch(config)#int fa0/1
Switch(config-if)#switchport mode trunk
Router1(config)#ip route 192.168.2.0 255.255.255.0 192.168.1.2
Router1(config)#ip route 40.40.40.0 255.255.255.0 192.168.1.2
Router1(config)#ip route 50.50.50.0 255.255.255.0 192.168.1.2
Router1(config)#ip route 60.60.60.0 255.255.255.0 192.168.1.2
Router1(config)#ip route 70.70.70.0 255.255.255.0 192.168.1.2
Router1(config)#ip route 80.80.80.0 255.255.255.0 192.168.1.2
Router1(config)#ip route 90.90.90.0 255.255.255.0 192.168.1.2
Router2(config)#ip route 10.10.10.0 255.255.255.0 192.168.1.1
Router2(config)#ip route 20.20.20.0 255.255.255.0 192.168.1.1
Router2(config)#ip route 30.30.30.0 255.255.255.0 192.168.1.1
Router2(config)#ip route 70.70.70.0 255.255.255.0 192.168.2.2
Router2(config)#ip route 80.80.80.0 255.255.255.0 192.168.2.2
Router2(config)#ip route 90.90.90.0 255.255.255.0 192.168.2.2
Router3(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1
Router3(config)#ip route 10.10.10.0 255.255.255.0 192.168.2.1
Router3(config)#ip route 20.20.20.0 255.255.255.0 192.168.2.1
Router3(config)#ip route 30.30.30.0 255.255.255.0 192.168.2.1
Router3(config)#ip route 40.40.40.0 255.255.255.0 192.168.2.1
Router3(config)#ip route 50.50.50.0 255.255.255.0 192.168.2.1
Router3(config)#ip route 60.60.60.0 255.255.255.0 192.168.2.1