单臂路由配置

子接口
-路由器的物理接口可以被划分为多个子接口; -每个子接口对应一个VLAN的网关 配置拓扑图如下所示:华为单臂路由配置详解在交换机上配置如下:[SW]vlan batch 10 20[SW]interface Ethernet0/0/2[SW-Ethernet0/0/10]port link-type access[SW-Ethernet0/0/10]port default vlan 10[SW]interface Ethernet0/0/3[SW-Ethernet0/0/10]port link-type access[SW-Ethernet0/0/10]port default vlan 20在路由器上配置如下:第一步:子接口配置VLAN和网关[R]interface GigabitEthernet 0/0/0.1[R-GigabitEthernet0/0/0.1]dot1q termination vid 10[R-GigabitEthernet0/0/0.1]ip address 192.168.10.254 24[R]interface GigabitEthernet 0/0/0.2[R-GigabitEthernet0/0/0.2]dot1q termination vid 20[R-GigabitEthernet0/0/0.2]ip address 192.168.20.254 24第二步:开启arp广播(必须开启)和dhcp功能(可手动配置ip)[R1]interface g0/0/0.1[R1-GigabitEthernet0/0/0.1]arp broadcast enable[R1-GigabitEthernet0/0/0.1]dhcp select interface[R1]interface g0/0/0.2[R1-GigabitEthernet0/0/0.2]arp broadcast enable[R1-GigabitEthernet0/0/0.2]dhcp select interface最后在pc1、pc2上查看ip地址,并进行验证测试

上一篇:ArrayList和LinkedList的区别


下一篇:静态查找表