Tuesday, 21 March 2023

Packet Tracer – Configure Telnet, VLAN, and DHCP together in a topology


Here is how to configure Telnet, VLAN, and DHCP on a Switch in Cisco Packet Tracer. Create the network topology below in Packet Tracer.

 

1. Telnet configuration on a switch

Switch>enable 

Switch#configure terminal 

Switch(config)#hos S1

S1(config)#line console 0   

S1(config-line)#password 123

S1(config-line)#login

S1(config-line)#exit

S1(config)#enable password 123456

S1(config)#username chhanun password chhanun1

S1(config)#line vty 0 4

S1(config-line)#login local

S1(config-line)#transport input telnet

S1(config-line)#exit 

2. VLAN configuration on a switch

S1>enable 

S1#configure terminal

S1(config)#vlan 10

S1(config-vlan)#name TEED

S1(config-vlan)#vlan 20

S1(config-vlan)#name ITE

S1(config-vlan)#exit

S1(config)#interface vlan 10

S1(config-if)#ip address 192.168.10.2 255.255.255.0

S1(config-if)#int vlan 20

S1(config-if)#ip address 192.168.20.2 255.255.255.0

S1(config-if)#exit

S1(config)#int range fa0/1-2

S1(config-if-range)#switchport mode access 

S1(config-if-range)#switchport access vlan 10

S1(config-if-range)#int range fa0/3-4

S1(config-if-range)#switchport mode access 

S1(config-if-range)#switchport access vlan 20

S1(config-if-range)#exit

S1(config)#int fa0/5

S1(config-if-range)#switchport mode truck

S1(config-if-range)#exit 

Go to config sub-interface on Router 

Router>enable

Router#configure terminal

Router(config)#hos R1

R1(config)#interface f0/0

R1(config-if)#no sh

R1(config-if)exit 

R1(config)#int fa0/0.10

R1(config-subif)#encapsulation dot1Q 10

R1(config-subif)#ip address 192.168.10.1 255.255.255.0

R1(config-subif)#int fa0/0.20

R1(config-subif)#encapsulation dot1Q 20

R1(config-subif)#ip address 192.168.20.1 255.255.255.0

R1(config-subif)#end

R1#wr 

3. DHCP configuration on a switch

 S1>enable

S1#confi t

S1(config)#ip dhcp excluded-address 192.168.10.1 192.168.10.10

S1(config)#ip dhcp excluded-address 192.168.20.1 192.168.20.10

S1(config)#ip dhcp pool VLAN10

S1(dhcp-config)#network 192.168.10.0 255.255.255.0

S1(dhcp-config)#default-router 192.168.10.1

S1(dhcp-config)#dns-server 8.8.8.8

S1(dhcp-config)#exit

S1(config)#ip dhcp pool VLAN20

S1(dhcp-config)#network 192.168.20.0 255.255.255.0

S1(dhcp-config)#default-router 192.168.20.1

S1(dhcp-config)#dns-server 8.8.8.8

S1(dhcp-config)#end

S1#wr

 


No comments:

Post a Comment

What is loopback address?

  A loopback address is a special IP address that is used to test the network interface card (NIC) and the TCP/IP protocol stack on a comput...