wdcsx 发表于 2012-10-25 09:03:21

VLAN间单臂路由

实验拓扑:
1.配置pc机ip地址和网关(略)
2.在交换机上创建VLAN,并将接口加入相应的VLAN中
en
conf t
vlan 10
vlan 20
exit
int f0/1
switchport mode access
swithchport access vlan 10
int f0/2
switchport mode access
swithcport access vlan 20
int f0/3
switchport mode trunk
exit
2.在路由器F0/0上配置子接口,并封装vlan号
en
conf t
int f0/0
no shut
int f0/0.1
encapsulation dot1Q 10   *配置以太网子接口vlan号,封装格式为 802.1q
ip add 192.168.1.254 255.255.255.0
no shut
int f0/0.2
encapsulation dot1Q 20   *不首先配置VLAN号,给子接口设置IP 地址将失败
ip add 192.168.2.254 255.255.255.0
no shut
exit


3.在路由器上show ip route

4.验证:PC1pingPC2


zhendeaini123 发表于 2013-3-18 07:47:26

老天,你让夏天和冬天同房了吧?生出这鬼天气!

wind-cold 发表于 2013-5-16 19:34:48

如果有一双眼睛陪我一同哭泣,就值得我为生命受苦。

hudeya 发表于 2013-5-19 06:20:33

我抢、我抢、我抢沙发~

fengda 发表于 2013-5-22 07:55:04

不要在一棵树上吊死,在附近几棵树上多试试死几次~

cjcmay 发表于 2013-5-25 23:45:25

内练一口气,外练一口屁。

jlthlx 发表于 2013-5-30 18:24:47

人生不能像做菜、把所有的料都准备好才下锅!
页: [1]
查看完整版本: VLAN间单臂路由