Computer and switch settings Basics

Source: Internet
Author: User

The configuration of vswitches and vrouters is impossible for you to use hardware. what I bring to you today is a small experiment.
You can perform an experiment on the Huawei MA5200G simulator.
For specific commands and explanations, I have all written my friends who wish to cook the same dishes with me!

First, I have collected some basic commands for vswitches.
Common commands:
PCA login: root; Use root User
Password: linux; password: linux
# Shutdown-h now; shutdown
# Init 0; Shutdown
# Logout
# Login
# Ifconfig; display IP addresses
# Ifconfig eth0 <ip address> netmask <netmask>; set the ip address
# Ifconfig eht0 <ip address> netmask <netmask> down; delete an ip address
# Route add 0.0.0.0 gw <ip>
# Route del 0.0.0.0 gw <ip>
# Route add default gw <ip>; Set Gateway
# Route del default gw <ip>; Delete Gateway
# Route; display Gateway
# Ping <ip>
# Telnet <ip>. We recommend that you ping the instance before telnet.
---------------------------------------
Switch command
~~~~~~~~~~
[Quidway] super password changes the privileged user password
[Quidway] sysname switch name
[Quidway] interface ethernet 0/1 enters the interface View
[Quidway] interface vlan x enters the interface View
[Quidway-Vlan-interfacex] ip address 10.65.1.1 255.255.0.0
[Quidway] ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 static route = Gateway

[Quidway] user-interface vty 0 4
[S3026-ui-vty0-4] authentication-mode password
[S3026-ui-vty0-4] set authentication-mode password simple 222
[S3026-ui-vty0-4] user privilege level 3

[Quidway-Ethernet0/1] duplex {half | full | auto} Configure port duplex working status
[Quidway-Ethernet0/1] speed {10 | 100 | auto} Configure port speed
[Quidway-Ethernet0/1] flow-control Configure port flow control
[Quidway-Ethernet0/1] mdi {physical SS | auto | normal} Configure port MDI/MDIX status flat or twist
[Quidway-Ethernet0/1] port link-type {trunk | access | hybrid} sets the Interface Working Mode
[Quidway-Ethernet0/1] shutdown close/restart Interface
[Quidway-Ethernet0/2] quit Exit System View

[Quidway] vlan 3: Create/delete a VLAN/Enter VLAN Mode
[Quidway-vlan3] port ethernet 0/1 to ethernet 0/4 adds/deletes ethernet interfaces in the current VLAN
[Quidway-Ethernet0/2] port access vlan 3 Add the current interface to the specified VLAN
[Quidway-Ethernet0/2] port trunk permit vlan {ID | All} set VLAN allowed by trunk
[Quidway-Ethernet0/2] port trunk pvid vlan 3 sets the PVID of the trunk port
[Quidway] monitor-port <interface_type interface_num> specifies and clears the Image port
[Quidway] port mirror <interface_type interface_num> specifies and clears the mirrored port
[Quidway] port mirror int_list observing-port int_type int_num specifies the image and the image

[Quidway] description string specifies the VLAN description character
[Quidway] description Delete VLAN description characters
[Quidway] display vlan [vlan_id] view VLAN settings

[Quidway] stp {enable | disable} enables/disables the spanning tree, which is disabled by default.
[Quidway] stp priority 4096 sets the switch priority
[Quidway] STPS root {primary | secondary} sets the switch as the root or root backup.
[Quidway-Ethernet0/1] stp cost 200 set switch port cost

[SwitchA-vlanx] isolate-user-vlan enable
[SwitchA] Isolate-user-vlan <x> secondary <list>
[Quidway-Ethernet0/2] port hybrid pvid vlan <id> sets the pvid of a vlan
[Quidway-Ethernet0/2] port hybrid pvid Delete vlan pvid
[Quidway-Ethernet0/2] port hybrid vlan vlan_id_list untagged set unidentified vlan
If the vlan id of the package is the same as that of the PVId, the vlan information is removed. The default value is PVID = 1.
Therefore, set the PVID to the vlan id and the vlan that can communicate with each other as untagged.

Computer commands:
Computer commands
~~~~~~~~~~
PCA login: root; Use root User
Password: linux; password: linux
# Shutdown-h now; shutdown
# Init 0; Shutdown
# Logout
# Login
# Ifconfig; display IP addresses
# Ifconfig eth0 <ip address> netmask <netmask>; set the ip address
# Ifconfig eht0 <ip address> netmask <netmask> down; delete an ip address
# Route add 0.0.0.0 gw <ip>
# Route del 0.0.0.0 gw <ip>
# Route add default gw <ip>; Set Gateway
# Route del default gw <ip>; Delete Gateway
# Route; display Gateway
# Ping <ip>
# Telnet <ip>. We recommend that you ping the instance before telnet.


The following is an explanation of the specific content of a small experiment.

For a vswitch and a computer, double-click the vswitch to enter the Terminal Configuration:


<Quidway> system
Password:
[Quidway] sysname S3026; vswitch name
[S3026] super password 111; set the privileged password
[S3026] user-interface vty 0 4/* enter the virtual terminal interface configuration mode */
[S3026-ui-vty0-4] authentication-mode password

/* Here I use the aaa Authentication mode, and none is optional.
That is, do not authenticate, passowrd password authentication, the recommended choice is aaa and password */
/* Set auth pass cipher xxxxx if you select the password authentication method, you need to set a password */
/* User privilege level 3 sets the telnet logon level to 3,
* // * You only need to use the password in the two steps */
Local-aaa-server
/* View the local 3a server */
[S3026-ui-vty0-4] set authentication-mode password simple 222
[S3026-ui-vty0-4] user privilege level 3
[S3026-ui-vty0-4] quit
[S3026] quit
<S3026> sys
Password: 111
[S3026] display currect-config/* display current configuration */
[S3026] dis curr/* display current configuration */

[S3026] vlan 2
[S3026-vlan2] port ethernet0/2
[S3026-vlan2] port e0/4 to et0/6 in current VLAN Add/delete Ethernet Interface
[S3026-vlan2] quit
[S3026] dis vlan
[S3026] int e0/3
[S3026-Ethernet1] port access vlan 2 Add the current interface to the specified VLAN
[S3026-Ethernet1] quit
[S3026] view vlan settings of dis
[S3026] dis curr

[S3026] interface vlan 1
[S3026-Vlan-interface1] ip address 10.65.1.8 255.255.255.0.0
[S3026-Vlan-interface1] quit

[S3026] ip route-static 0.0.0.0 0.0.0.0 10.65.1.2
[S3026] ip default-gateway 10.65.1.2
[S3026] dis curr
[S3026] save

Double-click the computer:
Login: root
Password: linux
[Root @ PCA root] # ifconfig eth0 10.65.1.1 netmask 255.255.0.0
[Root @ PCA root] # ifconfig
[Root @ PCA root] # route add default gw 10.65.1.2
[Root @ PCA root] # route
[Root @ PCA root] # ping 10.65.1.8
[Root @ PCA root] # telnet 10.65.1.8


Related Article

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.