Computer and Switch Setup basics

Source: Internet
Author: User
Tags linux

About switch and router configurations it's impossible to use hardware when it comes to teaching. No condition today brings everyone is I do a small experiment.

You can have the next Huawei ma5200g Simulator to experiment

Specific orders and explanations I've written it all up. Hope and I like the dishes of friends and I do together!

First, we've collected some basic commands for the switches.
Usually commands:
PCA login:root, using root user
password:linux; password is Linux
# shutdown-h now; shutdown
# init 0; shutdown
# Logout
# Login
# ifconfig; Display IP address
# ifconfig eth0 <ip address> netmask <netmask> setting IP address
# ifconfig eht0 <ip address> netmask <netmask> down; Remove 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> remove Gateway
# route; Display Gateway
# ping <ip>
# telnet <ip> suggest a ping before Telnet
---------------------------------------
Switch command
~~~~~~~~~~
[Quidway]super Password Modify privileged user password
[Quidway]sysname switch naming
[Quidway]interface Ethernet 0/1 into the interface view
[Quidway]interface VLAN x into 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 operating rate
[Quidway-ethernet0/1]flow-control Configuration Port flow control
[Quidway-ethernet0/1]mdi {across|auto|normal} configuration Port Mdi/mdix state ping-connect or twist
[Quidway-ethernet0/1]port link-type {Trunk|access|hybrid} set interface working mode
[Quidway-ethernet0/1]shutdown closed/Reset Interface
[Quidway-ethernet0/2]quit Exit System View
[Quidway]vlan 3 Create/Remove a vlan/into VLAN mode
[Quidway-vlan3]port Ethernet 0/1 to Ethernet 0/4 Add/Remove Ethernet interface on current VLAN
[Quidway-ethernet0/2]port Access VLAN 3 joins the current interface to the specified VLAN
[Quidway-ethernet0/2]port trunk Permit VLAN {id| All} set trunk allowed VLAN
[Quidway-ethernet0/2]port trunk pvid VLAN 3 set trunk port Pvid
[Quidway]monitor-port <interface_type interface_num> Specify and clear mirror ports
[Quidway]port Mirror <interface_type interface_num> Specify and clear mirrored ports
[Quidway]port Mirror int_list observing-port int_type int_num specify mirrors and Mirrors
[quidway]description string specifies VLAN descriptor characters
[Quidway]description Delete VLAN descriptor characters
[Quidway]display VLAN [vlan_id] View VLAN settings
[QUIDWAY]STP {enable|disable} Open/close spanning tree, default shutdown
[QUIDWAY]STP priority 4096 sets the switch priority
[QUIDWAY]STP root {primary|secondary} to set up a switch as root or root
[QUIDWAY-ETHERNET0/1]STP cost 200 to set switch port costs
[Switcha-vlanx]isolate-user-vlan Enable set Master VLAN
[SwitchA] Isolate-user-vlan <x> Secondary <list> setting the Sub VLAN included in the main VLAN
[Quidway-ethernet0/2]port hybrid Pvid VLAN <id> set VLAN Pvid
[Quidway-ethernet0/2]port hybrid pvid Delete VLAN Pvid
[Quidway-ethernet0/2]port hybrid VLAN vlan_id_list untagged set up an identity-free VLAN
If the packet's VLAN ID is consistent with the Pvid, the VLAN information is removed. Default pvid=1.
So set Pvid as the owning VLAN ID and set the VLAN to be interoperable untagged.
Commands for computers:
Computer commands
~~~~~~~~~~
PCA login:root, using root user
password:linux; password is Linux
# shutdown-h now; shutdown
# init 0; shutdown
# Logout
# Login
# ifconfig; Display IP address
# ifconfig eth0 <ip address> netmask <netmask> setting IP address
# ifconfig eht0 <ip address> netmask <netmask> down; Remove 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> remove Gateway
# route; Display Gateway
# ping <ip>
# telnet <ip> suggest a ping before Telnet

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.