Switch default gateway (for cross-segment Telnet)

Source: Internet
Author: User

Experimental Purpose: Configure a switch and configure the default gateway so that the host of different network segments can connect to the switch remotely telnet login

Second, the experimental topology diagram is as follows:

Second, the experimental steps:

1, first to the PC1 host Configuration IP address and gateway(Gateway)--not worthy of gateways may Ping different, and the gateway and the next hop address is the same, or else can not ping Pass

2. Configuring the Switch S1

Enter the S1 command line interface

switch>enable --Entering privileged mode

Switch#configure Terminal --Enter global configuration mode

switch (config) #hostname S1 --Modify switch host name S1(easy to identify)

S1 (config) #enable password 111 --Set plaintext admin password to 111

S1 (config) #enable secret 222 --Set the encryption password to 222(the plaintext will not work after the encryption password is set)

S1 (config) #line vty 0 5 --Set the number of virtual terminals (typically 5 , up to three)

S1 (config-line) #password 333 --Set the Telnet password to 333

S1 (config-line) #login --login password must be configured after login , if not, remote login password is invalid

S1 (config-line) #exit --return to the previous level (global configuration mode)

S1 (config) #interface vlan 1 --Enter VLAN 1 Port

S1 (config-if) #ip address 192.168.1.1 255.255.255.0 --Configure the vlan1 with an IP address so PC1 and S1 can ping interoperability

S1 (config-if) #no shutdown --activating VLAN 1 Port

S1 (config-if) #exit ----return to the previous level (global configuration mode)

S1 (config) #ip default-gateway 192.168.1.254 --Set the default gateway to the switch S1 to achieve cross-network segment Telnet

S1 (config-if) #end --Return to privileged mode

s1#copy running-config startup-config --Save configuration (from memory RAM to hard disk NVRAM)

3. Configure Router R1

Enter the router R1 command line interface

Continue with configuration dialog? [yes/no]: n --do you want to continue configuring the dialog box? (yes/no)

router>enable --access to privileged mode

Router#configure Terminal --go to global configuration mode

Router (config) #hostname R1 --Modify the router host name to R1

R1 (config) #interface f0/0 --Go to f0/0 Port

R1 (config-if) #ip address 192.168.2.254 255.255.255.0 --Configure IP addresses for f0/0

R1 (config-if) #no shutdown --activating f0/0 Port

R1 (config-if) #interface f0/1 --Enter F0/1 Port

R1 (config-if) #ip address 192.168.1.254 255.255.255.0 --Configure IP addresses for F0/1

R1 (config-if) #no shutdown --activating F0/1 Port

R1 (config-if) #end ----return to privileged mode

r1#copy running-config startup-config --Save configuration (from memory RAM to hard disk NVRAM)

3. Go to PC1 host command line interface

Go to the PC1 host to test whether the Ping S1

# ping 192.168.1.1

(2)tenlet remote Login

# Tenlet 192.168.1.1

Passwor 333

Successful Login

Switch default gateway (for cross-segment Telnet)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.