人的一生,有许多事情,是需要放在心里慢慢回味的,过去的就莫要追悔,一切向前看吧 任何打击都不足以成为你堕落的借口,即使你改变不了这个世界,你却依然可以改变自己,选择条正确的路永远走下去。
返回顶部

hybrid应用和单臂路由技术

一、hybrid(混合端口)

 

 

 

 

1、启动设备,设置PC3PC4IP地址和子网掩码;Client1Client2Server1IP地址

2、设置SW2参数

<Huawei>undo terminal monitor                关闭弹窗

<Huawei>system-view                        进入系统试图

[Huawei]user-interface console 0

[Huawei-ui-console0]idle-timeout 0 0            永不超时

[Huawei-ui-console0]sysname SW2              更改名称

[SW2]Vlan batch 10 20 100                      设置vlan 10 20 100

[SW2]Int e0/0/1                               进入e0/0/1接口

[SW2-Ethernet0/0/1]Port hybrid pvid vlan 10         打上vlan10 标签

[SW2-Ethernet0/0/1]Port hybrid untagged vlan 10 100   解除vlan 10 100 标签

[SW2-Ethernet0/0/1]Int e0/0/2                      进入e0/0/2接口

[SW2-Ethernet0/0/2]Port hybrid pvid vlan 20           打上vlan20 标签

[SW2-Ethernet0/0/2]Port hybrid untagged vlan 20 100    解除vlan 20 100 标签

[SW2-Ethernet0/0/2]Int g0/0/1                       进入g0/0/1接口

[SW2-GigabitEthernet0/0/1]Port link-type trunk           接口类型为trunk

[SW2-GigabitEthernet0/0/1]Port trunk allow-pass vlan 10 20 100   允许vlan10 20 100 通过

[SW2-GigabitEthernet0/0/1]quit                            退出

3、设置SW3参数

<Huawei>Undo terminal monitor

<Huawei>System-view

[Huawei]User-interface console 0

[Huawei-ui-console0]Idle-timeout 0 0

[Huawei-ui-console0]Sysname SW3

[SW3]Vlan batch 10 20 100

[SW3]Int e0/0/1

[SW3-Ethernet0/0/1]Port hybrid pvid vlan 10

[SW3-Ethernet0/0/1]Port hybrid untagged vlan 10 100

[SW3-Ethernet0/0/1]Int e0/0/2

[SW3-Ethernet0/0/2]Port hybrid pvid vlan 20

[SW3-Ethernet0/0/2Port hybrid untagged vlan 20 100

[SW3-Ethernet0/0/2]Int g0/0/1

[SW3-GigabitEthernet0/0/1]Port link-type trunk

[SW3-GigabitEthernet0/0/1]Port trunk allow-pass vlan 10 20 100

[SW3-GigabitEthernet0/0/1]Int g0/0/2

[SW3-GigabitEthernet0/0/2]Port hybrid pvid vlan 100

[SW3-GigabitEthernet0/0/2]Port hybrid untagged vlan 10 20 100

[SW3-GigabitEthernet0/0/2]Quit

4、打开Server1→服务器信息→FtpServer→选择文件根目录后启动→打开Client1

→客户端信息→输入服务器地址→登录

相同vlan间通信,所有PC能访问Server1服务器

 

二、单臂路由(不同vlan间路由)

 

1、启动设备,设置PC5PC6IP地址、子网掩码和网关(两PC不同网段、同一PCIP地址与网关的网段保持一致)

2、设置SW6参数

<Huawei>Undo terminal monitor

<Huawei>System-view

[Huawei]User-interface console 0

[Huawei-ui-console0]Idle-timeout 0 0

[Huawei-ui-console0]Sysname SW6

[SW6]Vlan batch 2 3

[SW6]Int e0/0/1

[SW6-Ethernet0/0/1]Port hybrid pvid vlan 2

[SW6-Ethernet0/0/1]Port hybrid untagged vlan 2

[SW6-Ethernet0/0/1]Int e0/0/2

[SW6-Ethernet0/0/2]Port hybrid pvid vlan 3

[SW6-Ethernet0/0/2]Port hybrid untagged vlan 3

[SW6-Ethernet0/0/2]Int g0/0/1

[SW6-GigabitEthernet0/0/1]Port link-type trunk

[SW6-GigabitEthernet0/0/1]Port trunk allow-pass vlan 2 3

[SW6-GigabitEthernet0/0/1]quit

3、设置R1参数

<Huawei>Undo terminal monitor

<Huawei>System-view

[Huawei]User-interface console 0

[Huawei-ui-console0]Idle-timeout 0 0

[Huawei-ui-console0]Sysname R4

[R4]Int g0/0/0

[R4-GigabitEthernet0/0/0]Undo shundown             开启

[R4-GigabitEthernet0/0/0]Int g0/0/0.1                 进入g0/0/0.1接口

[R4-GigabitEthernet0/0/0.1]Vlan-type dot1q 2 default     vlan2 802.1q

[R4-GigabitEthernet0/0/0.1]Ip add 192.168.1.1 24        设置IP192.168.1.1 24

[R4-GigabitEthernet0/0/0.1]Int g0/0/0.2

[R4-GigabitEthernet0/0/0.2]Vlan-type dot1q 3 default

[R4-GigabitEthernet0/0/0.2]Ip add 192.168.2.1 24

[R4-GigabitEthernet0/0/0.2]quit

4、利用PC去ping另一个PC的IP,不同网段间pc通信

posted @ 2020-07-22 16:00  yy1299050947  阅读(250)  评论(0编辑  收藏  举报