Basic Configuration of Router and Switch
Basic Configuration of Router and Switch
and Switch
Faisalabad Router:
Faisalabad>en
Faisalabad #config t
Faisalabad (config)#int se 0/3/0
Faisalabad (config-if)#ip add 192.168.1.1 255.255.255.0
Faisalabad (config-if)#no sh
Karachi Router:
Karachi>en
Karachi #config t
Karachi (config)#int se 0/3/0
Karachi (config-if)#ip add 192.168.1.2 255.255.255.0
Karachi (config-if)#no sh
Karachi Router:
Karachi (config)#line vty 0 4
Karachi (config-line)#password cisco
Karachi (config-line)#login
Karachi (config-line)#exit
Karachi (config)#enable password huawei
Now from Faisalabad Router we can telnet Karachi Router …..
Faisalabad:
Faisalabad# telnet 192.168.1.2
Trying 192.168.1.2 ...Open
Password:
Karachi>en
Password:
Karachi# config t
Karachi(config)#
If you want that you can also telnet to Faisalabad Router then enable telnet to
Faisalabad router …..
Accessing tftp://192.168.1.2/umar.bin...
Loading umar.bin from
192.168.1.2: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 5571584 bytes]
Now if you see flash than you will see two images….
Router# sh flash
Karachi:
karachi# config t
karachi(config)#int se 0/3/0
karachi(config-if)#encapsulation ppp
How to check encapsulation :
R2:
Assign IP address to se 0/2/0 of R2:
R2>ena
R2#config t
R2(config)#int se 0/2/0
R2(config-if)#ip add 1.1.1.2 255.0.0.0
R2(config-if)#no sh
R1:
R1>en
R1#show ip route connected
C - 1.0.0.0/8 is directly connected, Serial0/2/0
C - 192.168.1.0/24 is directly connected, GigabitEthernet0/0
R1#config t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router rip
R1(config-router)#network 1.0.0.0
R1(config-router)#net 192.168.1.0
R2:
R2>ena
R2#show ip route connected
R2#config t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router rip
R2(config-router)#network 1.0.0.0
R2(config-router)#network 192.168.2.0
So in this case , I have two directly network 1.0.0.0 and 192.168.2.0
So I advertise these two network in RIP.
Now if you apply an command Show ip route
There is a new route that entry comes with “R”
R1:
Assign IP address to se 0/2/0 of R1:
R1>ena
R1#config t
R1(config)#int se 0/2/0
R1(config-if)#ip add 1.1.1.1 255.0.0.0
R1(config-if)#no sh
R2:
Assign IP address to se 0/2/0 of R2:
R2>ena
R2#config t
R2(config)#int se 0/2/0
R2(config-if)#ip add 1.1.1.2 255.0.0.0
R2(config-if)#no sh
R1:
How to advertise network in ospf (Single Area)
R1#show ip route connected
C 1.0.0.0/8 is directly connected, Serial0/2/0
C 192.168.1.0/24 is directly connected, GigabitEthernet0/0
R1#config t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router ospf 10
R1(config-router)#network 1.0.0.0 0.255.255.255 area 0
R1(config-router)#network 192.168.1.0 0.0.0.255 area 0
R2:
R2#show ip route connected
C 1.0.0.0/8 is directly connected, Serial0/2/0
C 192.168.2.0/24 is directly connected, GigabitEthernet0/0
R2#config t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router ospf 10
R2(config-router)#network 1.0.0.0 0.255.255.255 area 0
R2(config-router)#network 192.168.2.0 0.0.0.255 area 0
If you have 8 Routers and Area 0 is Configured on Router 2 then you have to
creates Virtual links.
Now if you apply an command Show ip route
There is a new route that entry comes with “O”
Qno.10: How to complete routing table using
EIGRP(Enhanced interior gateway routing protocol) ?
R2:
Assign IP address to se 0/2/0 of R2:
R2>ena
R2#config t
R2(config)#int se 0/2/0
R2(config-if)#ip add 1.1.1.2 255.0.0.0
R2(config-if)#no sh
R1:
How to advertise network in EIGRP.
R1>ena
R1#show ip route connected
C 1.0.0.0/8 is directly connected, Serial0/2/0
C 192.168.1.0/24 is directly connected, GigabitEthernet0/0
R1#config t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router eigrp 20
R1(config-router)#net 1.0.0.0 0.255.255.255
R1(config-router)#net 192.168.1.0 0.0.0.255
R2:
R2>ena
R2#show ip route connected
C 1.0.0.0/8 is directly connected, Serial0/2/0
C 192.168.2.0/24 is directly connected, GigabitEthernet0/0
R2#config t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router eigrp 20
R2(config-router)#net 1.0.0.0 0.255.255.255
R2(config-router)#net 192.168.2.0 0.0.0255
Ans:
By default , there are 5 vlans in switch
Vlan # 1 , 1002 , 1003 , 1004 and 1005
How to show vlan
SW-A>ena
SW-A#show vlan brief
SW-B:
SW-B>ena
SW-B#config t
Enter configuration commands, one per line. End with CNTL/Z.
SW-B(config)#vlan 10
SW-B(config-vlan)#Name IT
SW-B(config-vlan)#vlan 11
SW-B(config-vlan)#Name HR
SW-B(config-vlan)#exi
SW-B(config)#int fa 0/3
SW-B(config-if)#switchport mode access
SW-B(config-if)#switchport access vlan 11
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gig0/1, Gig0/2
10 IT Fa0/2
11 HR Fa0/3
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
SW-C:
SW-C>ena
SW-C#config t
Enter configuration commands, one per line. End with CNTL/Z.
SW-C(config)#vlan 10
SW-C(config-vlan)#name IT
SW-C(config-vlan)#vlan 11
SW-C(config-vlan)#name HR
SW-C(config-vlan)#int fa 0/4
SW-C(config-if)#switchport mode access
SW-C(config-if)#switchport access vlan 10
Result:
1. PC-1 can ping PC-3
2. PC-1 can’t ping PC-2
3. PC-2 can’t ping PC-1 and PC-2
4. PC-3 can ping PC-1
5. PC-3 can’t ping PC-2