常规交换机配置模板
1
!配置交换机名称,开启telnet,帐号密码
2
3
configure
4
5
hostname XXX
6
7
username ruijie privilege 15 password ruijie123
8
9
enable password ruijie123
10
11
line vty 0 4
12
13
login local
14
15
end
16
17
!配置Vlan
18
19
configure
20
21
vlan A
22
23
name XXX
24
25
interface vlan A
26
27
ip address
28
29
end
30
31
!开启防环路配置
32
33
configure
34
35
spanning-tree
36
37
rldp enable
38
39
errdisable recovery interval 300
40
41
end
42
43
!接口配置
44
45
configure
46
47
interface range gigabitEthernet 0/a-b
48
49
description [XXX]
50
51
switchport access vlan ID
52
53
spanning-tree bpduguard enable
54
55
spanning-tree portfast
56
57
rldp port loop-detect shutdown-port
58
59
spanning-tree bpduguard enable
60
61
end
62
63
!配置回指路由/网关
64
65
configure
66
67
ip route 0.0.0.0 0.0.0.0 x.x.x.x
68
/
69
ip default-network x.x.x.x
Copied!
Last modified 1yr ago
Copy link