近日看到一個(gè)VLAN圖,為了驗(yàn)證交換機(jī)與路由器這個(gè)箭頭所指接口,到底是配成Access類型,還是Trunk類型,特地做了個(gè)實(shí)驗(yàn)。
使用模擬器,搭建了下面這個(gè)環(huán)境,如圖所示。
這個(gè)圖也是我們中小企業(yè),常用的網(wǎng)絡(luò)拓?fù)鋱D。
對(duì)于路由器RouterB做了如下配置。
<RouterB>DIS CU
#
sysname RouterB
#
undo info-center enable
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher I@qZ>s3UmQjKUGU-KkpBb1>#
local-user admin service-type http
#
firewall zone Local
priority 16
#
interface Ethernet0/0/0
#
interface Ethernet0/0/1
#
interface Serial0/0/0
link-protocol ppp
#
interface Serial0/0/1
link-protocol ppp
#
interface Serial0/0/2
link-protocol ppp
#
interface Serial0/0/3
link-protocol ppp
#
interface GigabitEthernet0/0/0
ip address 192.168.60.254 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 2.2.2.3 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 60.60.60.61 255.255.255.0
#
interface GigabitEthernet0/0/3
#
wlan
#
interface NULL0
#
ip route-static 192.168.10.0 255.255.255.0 192.168.60.253
ip route-static 192.168.20.0 255.255.255.0 192.168.60.253
#
user-interface con 0
user-interface vty 0 4
user-interface vty 16 20
#
return
<RouterB>
針對(duì)交換機(jī)JRJHJ5,做了如下配置
<JRJHJ5>dis current-configuration
#
sysname JRJHJ5
#
undo info-center enable
#
vlan batch 10 20 60 999
#
cluster enable
ntdp enable
ndp enable
#
dhcp enable
#
diffserv domain default
#
drop-profile default
#
ip pool vlan10
gateway-list 192.168.10.254
network 192.168.10.0 mask 255.255.255.0
dns-list 202.102.192.68
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
#
interface Vlanif10
ip address 192.168.10.254 255.255.255.0
dhcp select global
#
interface Vlanif20
ip address 192.168.20.254 255.255.255.0
#
interface Vlanif60
#
interface Vlanif999
ip address 192.168.60.253 255.255.255.0
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/10
port link-type access
port default vlan 20
#
interface GigabitEthernet0/0/11
#
interface GigabitEthernet0/0/12
#
interface GigabitEthernet0/0/24
description ToRouter
port link-type access
port default vlan 999
#
interface NULL0
#
ip route-static 0.0.0.0 0.0.0.0 192.168.60.254
#
user-interface con 0
user-interface vty 0 4
#
return
<JRJHJ5>
測(cè)試配置
此交換機(jī)接口配置為Access類型,若將交換機(jī)與路由器連接的端口配置成Trunk口,經(jīng)過測(cè)試是不能互通的。
|