華為路由vlan划分透傳和回城路由配置


整整一個星期才整明白,剛開始是路由器ip地址配置在

interface Ethernet0/0/0這個接口能配置但不能用
,死在了回城路由上,pc1 ping pc2就是不同,很疑惑,請教了大神,原來沒有回城路由,第一次聽說這個詞。記錄一下

 

 

 

 

S1配置


#
sysname s1
#
vlan batch 10 20 30

#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 20
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 10 20

S2配置

#
sysname Huawei
#
vlan batch 10 20 30

interface Vlanif10
ip address 192.168.10.1 255.255.255.0
#
interface Vlanif20
ip address 192.168.20.1 255.255.255.0
#
interface Vlanif30
ip address 192.168.30.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 30

R1路由器

#
sysname Huawei

interface GigabitEthernet0/0/1
ip address 192.168.30.2 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
#
wlan
#
interface NULL0
#
ip route-static 192.168.10.0 255.255.255.0 192.168.30.1
ip route-static 192.168.20.0 255.255.255.0 192.168.30.1

 查看路由表


display routing-table

Destination/Mask Proto Pre Cost Flags NextHop Interface

127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.10.0/24 Static 60 0 RD 192.168.30.1 GigabitEthernet0/0/1
192.168.20.0/24 Static 60 0 RD 192.168.30.1 GigabitEthernet0/0/1
192.168.30.0/24 Direct 0 0 D 192.168.30.2 GigabitEthernet0/0/1
192.168.30.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM