拓扑图:
实验需求:
1.PC1,PC3属于vlan2
2.PC2,PC4属于vlan3
3.通过DHCP使pc获取ip地址信息
4.全网可达
实验分析:
1、交换机的配置--vlan
2、实现设备的IP配置---路由器、pc等
3、补全路由器的路由表全网可达---单一网络
4、NAT 技术
5、优化--针对路由表、针对流量策略
6、割接(改造、加固)
7、资料交接
SW1:
<Huawei>sy
[Huawei]sy SW1
[SW1]vlan batch 2 3
[SW1]interface g 0/0/3
[SW1-GigabitEthernet0/0/3]port link-type access
[SW1-GigabitEthernet0/0/3]port default
[SW1-port-group-def]port default vlan 2
[SW1-port-group-def]quit
[SW1]interface g 0/0/4
[SW1-GigabitEthernet0/0/4]port li ac
[SW1-GigabitEthernet0/0/4]po de v 3
[SW1-GigabitEthernet0/0/4]quit
[SW1]int
[SW1]interface g 0/0/2
[SW1-GigabitEthernet0/0/2]po li t
[SW1-GigabitEthernet0/0/2]po li t
[SW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 2 3
[SW1-GigabitEthernet0/0/2]quit
[SW1]int g 0/0/1
[SW1-GigabitEthernet0/0/1]po li t
[SW1-GigabitEthernet0/0/1]po t all v 2 3
SW2:
<Huawei>sy
[Huawei]sy SW2
[SW2]vlan batch 2 3
[SW2]int g 0/0/2
[SW2-GigabitEthernet0/0/2]port link-type access
[SW2-GigabitEthernet0/0/2]port default vlan 2
[SW2-GigabitEthernet0/0/2]quit
[SW2]int g 0/0/3
[SW2-GigabitEthernet0/0/3]po li ac
[SW2-GigabitEthernet0/0/3]po de v 3
[SW2]int g 0/0/1
[SW2-GigabitEthernet0/0/1]port link-type t
[SW2-GigabitEthernet0/0/1]port link-type trunk
[SW2-port-group-trunk]port trunk allow-pass vlan 2 3
[SW2-port-group-trunk]quit