clock rate 128000 配置串口上的时钟(DCE端)
show vlan brief 检查vlan是否创建成功
s2 s3同样创建
interface f0/0
switchport mode access //access 模式
switchport access vlan 30
将s1的f0/1配置为中继,并使用vlan99为本征vlan
int f0/1
switchport mode trunk
switchport trunk native vlan 99
vtp doamin VTP-TEST
配置VTP名字
int f0/13
switchport trunk encapsulation dot1q
switchport mode trunk
show spanning tree 检查STP树
S2():spanning tree vlan 1 priority 8192 //设置优先级,数字越低优先级越高 成为根桥 4096
R1():int f0/0
no sh
int f0/0.1
R1(config-subif):encapture dot1q 1 native//native vlan 是1 所以这里指定1
R1(config-subif):ip address xxxxxx //为vlan 1的网关
ip route 目的网络 掩码 {网关地址|接口}
例子:ip route 192.168.1.0 255.255.255.0 s0/0
例子:ip route 192.168.1.0 255.255.255.0 12.12.12.2
默认路由:所谓的默认路由,是指路由器在路由表中如果找不到到达目的网络的具体路由时,最后会采用的路由。
原文:https://www.cnblogs.com/vstar-o/p/14165605.html