VLAN间路由(独臂路由器-子接口)
!交换机
<H3C>system
[H3C]vlan 100 !VLAN100
[H3C-vlan100]port Ethernet 1/0/1 to Ethernet 1/0/4 !指定端口1-4
[H3C-vlan100]quit
[H3C]vlan 200
[H3C-vlan200]port Ethernet 1/0/5 to Ethernet 1/0/8 !指定端口5-8
[H3C-vlan200]quit
[H3C]interface Ethernet 1/0/24
[H3C-Ethernet1/0/24]port link-type trunk !设置Trunk端口
[H3C-Ethernet1/0/24]port trunk permit vlan all !允许所有VLAN通过
[H3C-Ethernet1/0/24]quit
!路由器
<H3C>system
[H3C]interface Ethernet 0/0.100
[H3C-Ethernet0/0.100]ip address 1.1.1.1 24 !配置子接口ip
[H3C-Ethernet0/0.100]vlan-type dot1q vid 100 !封装类型dot1q,指定VLAN100
[H3C-Ethernet0/0.100]quit
[H3C]interface Ethernet 0/0.200
[H3C-Ethernet0/0.200]ip address 2.2.2.1 24 !配置子接口ip
[H3C-Ethernet0/0.200]vlan-type dot1q vid 200 !封装类型dot1q,指定VLAN100
[H3C-Ethernet0/0.200]quit
!路由器配置文件
#
sysname H3C
#
cpu-usage cycle 1min
#
radius scheme system
#
domain system
#
local-user admin
password cipher .]@USE=B,53Q=^Q`MAF4<1!!
service-type telnet terminal
level 3
service-type ftp
#
interface Aux0
async mode flow
#
interface Bri3/0
link-protocol ppp
#
interface Ethernet0/0
ip address dhcp-alloc
#
interface Ethernet0/0.1
#
interface Ethernet0/0.100
ip address 1.1.1.1 255.255.255.0
vlan-type dot1q vid 100
#
interface Ethernet0/0.200
ip address 2.2.2.1 255.255.255.0
vlan-type dot1q vid 200
#
interface Ethernet0/1
ip address dhcp-alloc
#
interface Serial0/0
link-protocol ppp
ip address dhcp-alloc
#
interface Serial0/1
clock DTECLK1
link-protocol ppp
ip address dhcp-alloc
#
interface GigabitEthernet1/0
ip address dhcp-alloc
#
interface NULL0
#
FTP server enable
#
user-interface con 0
user-interface aux 0
user-interface vty 0 4
authentication-mode scheme
#
return

浙公网安备 33010602011771号