华为模拟器三层交换机VALN兼路由
华为模拟器三层交换机VALN兼路由实验需求:
1.创建VLAN并且能正确地划分Hybrid VLAN
2.Hybrid端口配置正确
3.Tag标签能正确标记,去除
4.利用三层交换机实现全网互通
5.设置DHCP,PC可以自动获取IP地址
以下是拓扑图及详细步骤:
一.创建VLAN并且划分hybrid VLAN正确
以下是详细步骤:
LSW2
sys
Enter system view, return user view with Ctrl+Z.
vlan 10
vlan 20
Oct 21 2013 16:07:38-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 5, the
change loop count is 0, and the maximum number of records is 4095.
int e0/0/1
port hybrid pvid vlan 10
Oct 21 2013 16:08:08-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 6, the
change loop count is 0, and the maximum number of records is 4095.
port hybrid untagged vlan 10 20
int e0/0/2
Oct 21 2013 16:08:28-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 7, the
change loop count is 0, and the maximum number of records is 4095. h
port hybrid pvid vlan 20
port hybrid untagged vlan 10 20
Oct 21 2013 16:08:48-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 9, the
change loop count is 0, and the maximum number of records is 4095.
LSW2:
sys
Enter system view, return user view with Ctrl+Z.
vlan 30
int e
Oct 21 2013 16:18:58-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 4, the
change loop count is 0, and the maximum number of records is 4095.
int e0/0/1
port hybrid pvid vlan 30
port hybrid untagged vlan 30
Oct 21 2013 16:19:28-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 6, the
change loop count is 0, and the maximum number of records is 4095.
二.创建Hybrid的端口
以下是详细步骤:
LSW2:
interface GigabitEthernet 0/0/1
port hybrid tagged vlan 10 20
Oct 21 2013 16:26:48-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 10, the
change loop count is 0, and the maximum number of records is 4095.
LSW3:
interface GigabitEthernet 0/0/1
port hybrid tagged vlan 30
Oct 21 2013 16:28:48-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 7, the
change loop count is 0, and the maximum number of records is 4095.
用display vlan查看配置是否正确
如图所示:
三.在确保无误之后进行三层交换机创建VLAN,配置网关的工作
以下是详细步骤:
sys
Enter system view, return user view with Ctrl+Z.
vlan 10
Oct 21 2013 16:34:38-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 4, the
change loop count is 0, and the maximum number of records is 4095.
vlan 20
vlan 30
Oct 21 2013 16:34:48-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 6, the
change loop count is 0, and the maximum number of records is 4095.
int vlan 10
ip add 192.168.10.1 24
int vlan 20
Oct 21 2013 16:35:08-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 7, the
change loop count is 0, and the maximum number of records is 4095.
ip add 192.168.20.1 24
Oct 21 2013 16:35:28-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 8, the
change loop count is 0, and the maximum number of records is 4095.
int vlan 30
ip add 192.168.30.1 24
Oct 21 2013 16:35:48-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 9, the
change loop count is 0, and the maximum number of records is 4095.
四.进入VLAN创建DHCP,在此之前先开启DHCP功能
以下是详细步骤:
dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
interface vlan 10
Oct 21 2013 16:42:29-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 10, the
change loop count is 0, and the maximum number of records is 4095.
dhcp select interface
Oct 21 2013 16:42:49-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 11, the
change loop count is 0, and the maximum number of records is 4095.
int vlan 20
dhcp select interface
int vlan 30
Oct 21 2013 16:43:09-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 12, the
change loop count is 0, and the maximum number of records is 4095.
dhcp select interface
Oct 21 2013 16:43:19-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 13, the
还要将三层交换机下的两个二层接口改为Hybrid端口,并标记TAG标签
interface GigabitEthernet 0/0/1
port hybrid tagged vlan 10 20
Oct 21 2013 16:46:46-08:00 Huawei %%01IFNET/4/IF_STATE(l):Interface Vlanif10 h
as turned into UP state.
Oct 21 2013 16:46:46-08:00 Huawei %%01IFNET/4/LINK_STATE(l):The line protocol
IP on the interface Vlanif10 has entered the UP state.
Oct 21 2013 16:46:46-08:00 Huawei %%01IFNET/4/IF_STATE(l):Interface Vlanif20 h
as turned into UP state.
Oct 21 2013 16:46:46-08:00 Huawei %%01IFNET/4/LINK_STATE(l):The line protocol
IP on the interface Vlanif20 has entered the UP state.
Oct 21 2013 16:46:49-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 14, the
change loop count is 0, and the maximum number of records is 4095.nt
int g0/0/2
port hybrid tagged vlan 30
Oct 21 2013 16:47:14-08:00 Huawei %%01IFNET/4/IF_STATE(l):Interface Vlanif30 h
as turned into UP state.
Oct 21 2013 16:47:14-08:00 Huawei %%01IFNET/4/LINK_STATE(l):The line protocol
IP on the interface Vlanif30 has entered the UP state.
Oct 21 2013 16:47:19-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 15, the
change loop count is 0, and the maximum number of records is 4095.
验证一下如果PC能自动获得IP地址且三台PC能够互通则前期工作完成
如图所示:
Ping 192.168.20.254: 32 data bytes, Press Ctrl_C to break
From 192.168.20.254: bytes=32 seq=1 ttl=127 time=94 ms
From 192.168.20.254: bytes=32 seq=2 ttl=127 time=47 ms
From 192.168.20.254: bytes=32 seq=3 ttl=127 time=78 ms
From 192.168.20.254: bytes=32 seq=4 ttl=127 time=62 ms
From 192.168.20.254: bytes=32 seq=5 ttl=127 time=63 ms
--- 192.168.20.254 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 47/68/94 ms
PC>ping 192.168.30.254
Ping 192.168.30.254: 32 data bytes, Press Ctrl_C to break
From 192.168.30.254: bytes=32 seq=1 ttl=127 time=78 ms
From 192.168.30.254: bytes=32 seq=2 ttl=127 time=47 ms
From 192.168.30.254: bytes=32 seq=3 ttl=127 time=78 ms
From 192.168.30.254: bytes=32 seq=4 ttl=127 time=78 ms
From 192.168.30.254: bytes=32 seq=5 ttl=127 time=94 ms
--- 192.168.30.254 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 47/75/94 ms
五,在三层交换机上创建一个新的VLAN,用于访问路由器的端口
详细步骤如下:
vlan 6
Oct 21 2013 16:58:39-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 16, the
change loop count is 0, and the maximum number of records is 4095.
int vlan 6
ip add 1.1.1.1 24
Oct 21 2013 17:01:19-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 17, the
change loop count is 0, and the maximum number of records is 4095.
int g0/0/3
port hybrid untagged vlan all(这里要将TAG标签脱去,不然,路由器接收到的报文将无法识别)
Oct 21 2013 17:02:58-08:00 Huawei %%01IFNET/4/IF_STATE(l):Interface Vlanif6 ha
s turned into UP state.
Oct 21 2013 17:02:58-08:00 Huawei %%01IFNET/4/LINK_STATE(l):The line protocol
IP on the interface Vlanif6 has entered the UP state.
Oct 21 2013 17:02:59-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 18, the
change loop count is 0, and the maximum number of records is 4095.
六.在AR1路由器中将内网端口配置网关及子网掩码
详细步骤如下:
sys
Enter system view, return user view with Ctrl+Z.
interface GigabitEthernet 0/0/0
ip add 1.1.1.2 24
O
:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
0/0]
接下来陆续将后面两台路由器的接口配置完毕,并实现三台路由器互通
以下是详细步骤:
AR1:
interface GigabitEthernet 0/0/1
ip add 202.106.1.1 24
Oct 21 2013 14:29:35-05:
l):The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
AR2:
sys
Enter system view, return user view with Ctrl+Z.
interface GigabitEthernet 0/0/0
ip add 202.106.1.2 24
Oct 21 2013 1
ET/4/LINK_STATE(l):The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
int g0/0/1
ip add 202.106.2.1 24
Oct 21 2013
ET/4/LINK_STATE(l):The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
AR3:
sys
Enter system view, return user view with Ctrl+Z.
interface GigabitEthernet 0/0/0
ip add 202.106.2.2 24
Oct 21 2013 14:34:47-05:13 Huawei %%01IFNET/4/LINK_STATE(l):The line protocol IP on the interface GigabitEthernet0/0/0 has entered t
[Huawei-Gigahe UP state. b
itEthernet0/0/0]
以上是配置IP地址,接下来是做静态路由
AR1
ip route-static 202.106.2.0 24 202.106.1.2
AR3
ip route-static 202.106.1.0 24 202.106.2.1
来验证一下三台路由器是否互通了
如图所示:
七.在三层交换机上做默认路由并在AR1上做到达内网的静态路由
以下是详细步骤:
LSW:
ip route-static 0.0.0.0 0.0.0.0 1.1.1.2
AR1:
ip route-static 192.168.10.0 24 1.1.1.1
ip route-static 192.168.20.0 24 1.1.1.1
ip route-static 192.168.30.0 24 1.1.1.1
做到这一步要来个小检查,查看自己的PC能否Ping通三层交换机中所创建的VLAN的网关和AR1内网口的网关
如图所示:
八.最后一步,在AR1上做PAT即可实现全网互通
以下是详细步骤:
sys
Enter system view, return user view with Ctrl+Z.
acl 2000
rule 5 permit source any
qu
interface GigabitEthernet 0/0/1
nat outbound 2000
最后验证:
如图:
就此完成!
床上运动也可以减肥的,你们都不知道吗? 站的更高,尿的更远。 爱她,就请为她做无痛人流手术! 昨天,系花对我笑了一下,乐得我晚上直数羊,一只羊,两只羊,三只羊…… 学习了,不错,讲的太有道理了 爱护环境,人人有病。
页:
[1]