• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
千落-小煜
博客园    首页    新随笔    联系   管理    订阅  订阅

交换机-路由器代码

LSW1:
system-view
vlan batch 10 20
interface  Ethernet 0/0/1
port link-type access 
port default vlan 10
interface  Ethernet 0/0/2
port link-type access 
port default vlan 10
interface  Ethernet 0/0/3
port link-type access 
port default vlan 20
interface  Ethernet 0/0/4
port link-type access 
port default vlan 20
quit
interface GigabitEthernet 0/0/2
port link-type trunk
port trunk allow-pass vlan 10  20
 
LSW2:
system-view
vlan batch 30 40
interface  Ethernet 0/0/1
port link-type access 
port default vlan 30
interface  Ethernet 0/0/2
port link-type access 
port default vlan 30
interface  Ethernet 0/0/3
port link-type access 
port default vlan 40
interface  Ethernet 0/0/4
port link-type access 
port default vlan 40
quit
system-view
interface GigabitEthernet 0/0/2
port link-type trunk
port trunk allow-pass vlan 30  40
 
AR2220:
system-view
interface GigabitEthernet 0/0/0.10
dotlq termination vid 10
ip address 192.168.10.254 24
arp broadcast enable
quit
interface GigabitEthernet 0/0/0.20
dotlq termination vid 20
ip address 192.168.20.254 24
arp broadcast enable
quit
interface GigabitEthernet 0/0/1
ip address 172.16.1.1 24
quit
ip route-static 0.0.0.0 0.0.0.0 172.16.1.1 24
quit
ip route-static 0.0.0.0 0.0.0.0 172.16.1.2
 
LSW3:
system-view
sysname Hexin
vlan batch 30 40
interface GigabitEthernet 0/0/1
port link-type trunk
port trunk allow-pass vlan 30  40
interface Vlanif 30
ip address 192.168.30.254 24
interface Vlanif 40
ip address 192.168.40.254 24
interface GigabitEthernet 0/0/24
undo portswitch
portswitch
quit
interface Vlanif 1
ip address 172.16.1.2 24
quit
ip route-static 0.0.0.0 0.0.0.0 172.16.1.1
posted @ 2019-10-30 14:16  YoLen千落  阅读(713)  评论(3)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3