單臂路由器配置
阿新 • • 發佈:2018-01-21
mar png 由器 src process 交換機配置 roc ati pass 通常路由器一個接口只能配置 一個ip地址,但是有些時候需要配置多個ip,就用到了單臂路由
這是就需要在接口配置子接口 [Huawei-GigabitEthernet0/0/0.2]ip add 192.168.20.254 255.255.255.0
[Huawei-GigabitEthernet0/0/0.2]
[Huawei-GigabitEthernet0/0/0.2]inte gi0/0/0.3
[Huawei]inter gi0/0/0.3
[Huawei-GigabitEthernet0/0/0.3]dot1q termination vid 30
[Huawei-GigabitEthernet0/0/0.3]ip add 192.168.30.254 255.255.255.0
[Huawei-GigabitEthernet0/0/0.3]arp broadcast en
[Huawei-GigabitEthernet0/0/0.3]inte gi0/0/0.4
[Huawei]inter gi0/0/0.4
[Huawei-GigabitEthernet0/0/0.4]dot1q termination vid 40
[Huawei-GigabitEthernet0/0/0.4]ip add 192.168.40.254 255.255.255.0
[Huawei-GigabitEthernet0/0/0.4]arp broadcast en
這是就需要在接口配置子接口
#路由器配置
[Huawei]inter gi0/0/0.1
[Huawei-GigabitEthernet0/0/0.1]dot1q termination vid 10 封裝協議
[Huawei-GigabitEthernet0/0/0.1]ip add 192.168.10.254 255.255.255.0 字接口配置ip
[Huawei-GigabitEthernet0/0/0.1]arp broadcast enable 開啟ARP廣播
[Huawei]inter gi0/0/0.2
[Huawei-GigabitEthernet0/0/0.2]dot1q termination vid 20
[Huawei-GigabitEthernet0/0/0.2]
[Huawei-GigabitEthernet0/0/0.2]inte gi0/0/0.3
[Huawei]inter gi0/0/0.3
[Huawei-GigabitEthernet0/0/0.3]dot1q termination vid 30
[Huawei-GigabitEthernet0/0/0.3]ip add 192.168.30.254 255.255.255.0
[Huawei-GigabitEthernet0/0/0.3]arp broadcast en
[Huawei-GigabitEthernet0/0/0.3]inte gi0/0/0.4
[Huawei-GigabitEthernet0/0/0.4]dot1q termination vid 40
[Huawei-GigabitEthernet0/0/0.4]ip add 192.168.40.254 255.255.255.0
[Huawei-GigabitEthernet0/0/0.4]arp broadcast en
#交換機配置
[Huawei]vla batch 10 20 30 40 批量創建VLAN 10 20 30 40
[Huawei]inter gi0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vla 10
[Huawei-GigabitEthernet0/0/1]inter gi0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type access
[Huawei-GigabitEthernet0/0/2]port default vla 20
[Huawei-GigabitEthernet0/0/2]inter gi0/0/3
[Huawei-GigabitEthernet0/0/3]port link-type access
[Huawei-GigabitEthernet0/0/3]port default vla 30
[Huawei-GigabitEthernet0/0/3]inter gi0/0/4
[Huawei-GigabitEthernet0/0/4]port link-type access
[Huawei-GigabitEthernet0/0/4]port default vla 40
[Huawei-GigabitEthernet0/0/4]inter gi0/0/5
[Huawei-GigabitEthernet0/0/5]port link-type trunk
[Huawei-GigabitEthernet0/0/5]port trunk allow-pass vl all
單臂路由器配置