![思科技术学习笔记之静态路由和单臂路由 _路由](https://s2.51cto.com/attachment/200811/200811201227148763812.jpg?x-oss-process=image/resize,m_fixed,w_1184)
![思科技术学习笔记之静态路由和单臂路由 _路由_02](https://s2.51cto.com/attachment/200811/200811201227148741703.jpg?x-oss-process=image/resize,m_fixed,w_1184)
Switch(config)#int f0/1
Switch(config-if)#switchport mode trunk
%SYS-5-CONFIG_I: Configured from console by console
Switch#
|
RT1(config)#interface fastethernet 0/0
RT1(config-if)#no ip address
RT1(config-if)#no shutdown
RT1(config)#interface fastethernet 0/0.1
RT1(config-subif)#ip address 192.168.1.1 255.255.255.0
RT1(config-subif)#encapsulation dot1q 10
RT1(config-subif)#exit
RT1(config)#interface fastethernet 0/0.2
RT1(config-subif)#ip address 192.168.2.1 255.255.255.0
RT1(config-subif)#encapsulation dot1q 20
RT1(config-subif)#exit
|
C:>ping 192.168.2.10
Pinging 192.168.2.10 with 32 bytes of data:
Reply from 192.168.2.10: bytes=32 time=60ms TTL=241
Reply from 192.168.2.10: bytes=32 time=60ms TTL=241
Reply from 192.168.2.10: bytes=32 time=60ms TTL=241
Reply from 192.168.2.10: bytes=32 time=60ms TTL=241
Reply from 192.168.2.10: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.2.10:
Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 50ms, Maximum = 60ms, Average = 55ms |