打印本文 关闭窗口 | |
分析华为路由器单臂路由实例应用 | |
作者:佚名 文章来源:不详 点击数1885 更新时间:2007-5-18 3:15:13 文章录入:啊祖 责任编辑:啊祖 | |
|
|
组网:路由器E0端口与交换机的上行trunk端口(第24端口)相连,交换机下行口划分3个VLAN,带若干主机. 拓扑图如下:
1.路由器的配置 [Router] [Router]inter e0 [Router-Ethernet0]ip add 10.0.0.1 255.255.255.0 [Router-Ethernet0]inter e0.1 //定义子接口E0.1 [Router-Ethernet0.1]ip add 172.16.1.1 255.255.255.0 [Router-Ethernet0.1]vlan-type dot1q vid 1 //指定以太网子接口属于VLAN1,此命令应用在以太网子接口上。只有配置了该命令之后,以太网子接口才会根据配置的VLAN ID 号在以太网帧头中嵌入VLAN 标签,与该网口相连的交换机接口才能正确处理接收到的帧。 [Router-Ethernet0.1]inter e0.2 //定义子接口E0.2 [Router-Ethernet0.2]ip add 172.16.2.1 255.255.255.0 [Router-Ethernet0.2]vlan-type dot1q vid 2 //指定以太网子接口属于VLAN2 [Router-Ethernet0.2]inter e0.3 //定义子接口E0.3 [Router-Ethernet0.3]ip add 172.16.3.1 255.255.255.0 [Router-Ethernet0.3]vlan-type dot1q vid 3 //指定以太网子接口属于VLAN3 [Router-Ethernet0.3]inter e0 [Router-Ethernet0]undo shut % Interface Ethernet0 is up [Router-Ethernet0] //用网线将E0端口连到S3026第24端口 %19:46:32: Interface Ethernet0 changed state to UP %19:46:32: Line protocol ip on interface Ethernet0, changed state to UP %19:46:32: Line protocol ip on interface Ethernet0.1, changed state to UP %19:46:32: Line protocol ip on interface Ethernet0.2, changed state to UP %19:46:32: Line protocol ip on interface Ethernet0.3, changed state to UP 2.交换机的配置 <Quidway> <Quidway>sys Enter system view , return user view with Ctrl+Z. [Quidway]vlan 1 [Quidway-vlan1]vlan 2 |
|
打印本文 关闭窗口 |