此仅包含各主流厂商设备的一些最基本配置,盼能对其有所需之人有少许帮助。。故在此列举一部分厂商的基本配置, 包括 思科、华为、华三、锐捷、迈普、Redback、Juniper、中兴等
Context>>
一、思科 路由: a\ IP基本配置: Router>en Router#conf t Router(config)#hostname SPOTO-DX-R1 SPOTO-DX-R1(config)# SPOTO-DX-R1(config)#interface f0/1 SPOTO-DX-R1(config-if)#ip address 192.168.166.254 255.255.255.0 SPOTO-DX-R1(config-if)#no shutdown SPOTO-DX-R1(config-if)#exit b\路由配置: SPOTO-DX-R1(config)#router ospf 100 SPOTO-DX-R1(config-router)#router-id 21.25.97.5 SPOTO-DX-R1(config-router)#network 192.168.166.0 0.0.0.255 area 0 SPOTO-DX-R1(config-router)#network 21.25.97.5 0.0.0.0 area 0 SPOTO-DX-R1(config-router)#exit c\远程管理: SPOTO-DX-R1(config)#enable password espotor1 SPOTO-DX-R1(config)#service password-encryption SPOTO-DX-R1(config)#line vty 0 4 SPOTO-DX-R1(config-line)#password tspotor1 SPOTO-DX-R1(config-line)#login SPOTO-DX-R1(config-line)#exit d\查看信息: SPOTO-DX-R1#show version SPOTO-DX-R1#show ip interface brief SPOTO-DX-R1#show interface SPOTO-DX-R1#show ip route ospf SPOTO-DX-R1#show running-config
交换: a\Access配置: switch>enable switch#confi t switch(config)#hostname SPOTO-S1 SPOTO-S1(config)#vlan 10 SPOTO-S1(config-vlan)#name vlan10 SPOTO-S1(config-vlan)#exit % Applying VLAN changes may take few minutes. Please wait... SPOTO-S1(config)#interface vlan 10 SPOTO-S1(config-if)#ip address 192.168.166.252 255.255.255.0 SPOTO-S1(config-if)#interface f0/3 SPOTO-S1(config-if)#switchport mode access SPOTO-S1(config-if)#switchport access vlan 10 b\Trunk 配置: SPOTO-S1(config-if)#interface f0/24 SPOTO-S1(config-if)#switchport trunk encapsulation dot1q SPOTO-S1(config-if)#switchport mode trunk SPOTO-S1(config-if)#switchporttrunk allowed vlan X SPOTO-S1(config-if)#exit
二、华为 路由: a\ IP基本配置: <Quidway>system view [Quidway]sysname SPOTO-YD-R2 [SPOTO-YD-R2]super password espotor2 [SPOTO-YD-R2]interface ethernet 0 [SPOTO-YD-R2-Ethernet0]ip address 192.168.2.254 255.255.255.0 [SPOTO-YD-R2-Ethernet0]undo shutdown [SPOTO-YD-R2-Ethernet0]quit b\路由配置: [SPOTO-YD-R2]router id x.x.x.x [SPOTO-YD-R2]interface ethernaet 0 [SPOTO-YD-R2-ethernet0]ospf enable area 0.0.0.0 [SPOTO-YD-R2-ospf]quit [SPOTO-YD-R2]ospf enable [SPOTO-YD-R2-ospf]import-route direct [SPOTO-YD-R2-ospf]network 192.168.2.0 0.0.0.255 c\远程管理: [SPOTO-YD-R2] user-interface vty 0 4 [SPOTO-YD-R2-ui-vty0-4]authentication-mode password [SPOTO-YD-R2-ui-vty0-4]set authentication-mode password simpletspotor2 [SPOTO-YD-R2-ui-vty0-4]user privilege level 3 [SPOTO-YD-R2-ui-vty0-4]quit d\查看信息: [SPOTO-YD-R2]display version [SPOTO-YD-R2]display interface [SPOTO-YD-R2]display ip route [SPOTO-YD-R2]display current-configuration [SPOTO-YD-R2]display history 交换: a\Access配置: [SPOTO-S2]vlan 10 [SPOTO-S2-vlan10]quit [SPOTO-S2]interface ethernet 0/1 [SPOTO-S2-Ethernet0/1]port link-type access [SPOTO-S2-Ethernet0/1]port access vlan 10 [SPOTO-S2-Ethernet0/1]quit b\Trunk配置: [SPOTO-S2]interface ethernet 0/2 [SPOTO-S2-Ethernet0/2]port link-type trunk [SPOTO-S2-Ethernet0/2]port trunk permit vlan 10 [SPOTO-S2-Ethernet0/2]port trunk pvid vlan X [SPOTO-S2-Ethernet0/2]quit
三、华三 路由: a\ IP基本配置: <H3C>system view [H3C]sysname SPOTO-R [SPOTO-R]interface GigabitEthernet 1/0/1 [SPOTO-R-GigabitEthernet1/0/1]ip address192.168.166.254 24 [SPOTO-R-GigabitEthernet1/0/1]undo shutdown [SPOTO-R-GigabitEthernet1/0/1]quit b\路由配置: [SPOTO-R]ospf 12 [SPOTO-R-ospf-12]area 0 [SPOTO-R-ospf-12-area-0.0.0.0]network 192.168.166.0 0.0.0.255 [SPOTO-R-ospf-12-area-0.0.0.0]silent-interface gi 0/0 [SPOTO-R-ospf-12]import-routestatit c\远程管理: [SPOTO-R]super password simple espotor \\明文密码,密文可用cipher替代simple [SPOTO-R]user-interface vty 0 4 [SPOTO-R-ui-vty0-4]authentication-mode password [SPOTO-R-ui-vty0-4]set authentication password tspotor [SPOTO-R-ui-vty0-4]user privilege level 3 [SPOTO-R-ui-vty0-4]quit [SPOTO-R]telnet server enable d\查看信息: dir display version display vlan display current-configuration display ip route display users display interface 交换: a\Access配置: [SPOTO-S]vlan 10 [SPOTO-S-vlan10]port e 0/1 [SPOTO-S-vlan10]quit [SPOTO-S]interface ethernet 0/1 [SPOTO-S-Ethernet0/1]port link-type access [SPOTO-S-Ethernet0/1]port access vlan 10 b\Trunk配置: [SPOTO-S-Ethernet0/1]port link-type trunk [SPOTO-S-Ethernet0/1]port trunk permit vlan 10 [SPOTO-S-Ethernet0/1]port trunk pvid vlan 1
四、锐捷
路由: a\ IP基本配置: Router >enable Router#configure terminal Router(config)#interface f0/1 Router(config-if)#ip address 192.168.166.253 255.255.255.0 Router(config-if)#no shutdown b\路由配置: Router(config)#router ospf 1 Router(config-router)#network 192.168.166.0 0.0.0.255 area 0 Router(config-router)#end c\远程管理: Router(config)#enable password espotor1 Router(config)#service password-encryption Router(config)#line vty 0 4 Router(config-line)#password tspotor1 Router(config-line)#login Router(config-line)#exit d\查看信息: show version show ip interface brief show interface fa0/1 show running-config show ip route 交换: a\Access配置: switch>enable switch#confi t switch(config)#hostname S1 S1(config)# S1(config)#vlan 10 S1(config-vlan)#name vlan10 S1(config-vlan)#exit S1(config)#interface vlan 10 1(config-if)#ip address 192.168.166.252 255.255.255.0 S1(config-if)#interface f0/3 S1(config-if)#switchport mode access S1(config-if)#switchport access vlan 10 b\Trunk配置: S1(config)#interface e0/2 S1(config-if)#switchport mode trunk
五、Juniper
路由: a\ IP基本配置: root@%cli root>edit Entering configuration mode [edit]
root#set system host-name SPOTO-Junos [edit] root#commit commitcomplete [edit] [edit interface] [edit interface] [edit interface] [edit] b\路由配置: [edit] c\远程管理: [edit] [edit system login] root@SPOTO-Junos#setuser kiss class super-user authentication plan-text-password Newpassword: Retypenew password: [edit system login] [edit] [edit system services] [edit system services] commitcomplete [edit system services] d\查看信息: a\Access配置: [edit] [edit] root@SPOTO-Junos#set interface fe-0/1 unit 0 family Ethernet-switching port-mode access [edit] root@SPOTO-Junos#set interface fe-0/1 unit 0 family Ethernet-switching vlan members 10 b\Trunk配置: [edit] root@SPOTO-Junos#set interface fe-0/1 unit 0 family ethernet-switching port-mode trunk [edit] root@SPOTO-Junos#set interface fe-0/1 unit 0 family ethernet-switching vlan members all
六、迈普
路由: a\ IP基本配置: Router>enable Router#configure terminal Router(config)#hostname Maipu Maipu(config)#interface fastethernet0 Maipu(config-if-fastethernet0)#ip add 192.168.2.252 255.255.255.0 b\路由配置: Maipu(config)#router ospf 100 Maipu(config-router)#network 192.168.2.0 0.0.0.255 area 0 c\远程管理: Maipu(config)#aaa new-model Maipu(config)#aaa authentication login default local enable none Maipu(config)#user SPOTO password 0 espoto Maipu(config)#line vty 0 4 Maipu(config-line)#login local d\查看信息: Maipu#show version Maipu#show ip route Maipu#show interface Maipu#show cpu Maipu#show memory Maiou#show running-config 交换: a\Access配置: Maipu(config)#vlan 801 Maipu(config-vlan801)#exit Maipu(config)#port 0/0/2 Maipu(config-port-0/0/2)#port access vlan 801 Maipu(config-port-0/0/2)#port-type nni b\Trunk配置: Maipu(config)#interface ethernet1/0/1 Maipu(config-if-ethernet1/0/1)#switchport mode trunk Maipu(config-if-ethernet1/0/1)#exit
七、Redback
路由: a\ IP基本配置: [local]SE800>enable [local]SE800#configuration [local]SE800(config)#context local [local]SE800(config-ctx)#interface toSPOTO-R1 [local]SE800(config-if)#ip add 21.98.65.21/30 [local]SE800(config-if)#commit [local]SE800(config)#port ethernet 1/1 [local]SE800(config-port)#no auto-negotiate [local]SE800(config-port)#no shutdown [local]SE800(config-port)#bind interface toSPOTO-R1 local [local]SE800(config-port)#commit b\路由配置: [local]SE800(config)#context local [local]SE800(config-ctx)#router-id x.x.x.x [local]SE800(config-ctx)#interface lp1 loopback [local]SE800(config-if)#ip address x.x.x.x/32 [local]SE800(config-if)#ip source-address snmp syslog [local]SE800(config-ctx)#router ospf 1 [local]SE800(config-ospf)#auto-cost reference-bandwidth 80000 [local]SE800(config-ospf)#log-neighbor-up-down [local]SE800(config-ospf)#area 0.0.0.0 [local]SE800(config-ospf-area)#interface toSPOTO-R1 [local]SE800(config-ospf-interface)#network-type point-to-point [[local]SE800(config-ospf)#redistribute connected metric 20metric-type 1 c\远程管理: [local]SE800(config)#system hostname SPOTO-R [local]SPOTO-R(config)#context local [local]SPOTO-R(config-ctx)#enable password espotor [local]SPOTO-R(config-ctx)#service ssh [local]SPOTO-R(config-ctx)#administrator SPOTO password se800pt [local]SPOTO-R(config-admin)privil start 10 [local]SPOTO-R(config-admin)privil max 15 ip access-list admin-acl description This is a sample access control list seq 10 permit ip host 192.168.166.55 seq 20 permit ip host 172.16.10.122 sep 30 permit ip host 172.16.10.77 sep 40 deny ip any admin-access-group admin-acl in d\查看信息: show subscribers show cir Sho clock Sho ver show release Sho sub summ all show hardware detail context local show confi
八、中兴
路由: a\ IP基本配置: interface create ip to-r2 address-netmask 120.190.1.1/16port et.1.2 interface create ip to-r3 address-netmask 130.1.1.1/16 portet.1.3 b\路由配置: ip add route 202.1.0.0/16 gateway 120.90.1.2 ospf start ospf create area 140.1.0.0 ospf create area backbone ospf set ase-default cost 4 ospf add interface 140.1.1.1 to-area 140.1.0.0 ospf add interface 140.1.2.1 to-area 140.1.0.0 ip-router policy create ospf-export-destinationospfExpDstType1 type 1 metric 1 c\远程管理: create user administrator login pass administrator line-vty timeout 60 d\查看信息: system show active-config ? 交换: a\Access配置: set vlan 10 add port 1-23 untag set port 1-23 pvid 10 b\Trunk配置: set vlan 1-10 add port 24 tag
九、F5
十、Crossbeam (未完不续)
其中Redback Juniper等设备的配置非即配即生效,需commit后方可生效;由于知识有限,上如有不足或错误之处望各位过路的侠人义士能以share的心态指出或补充完毕,鄙人在此先行谢过。。
|