计算机网络实验

跨交换机 VLAN 配置

输入命令 + ? 显示命令帮助
dis curr
system-view
interface g1/0/1
port link-type trunk
port trunk permit vlan all # 2 3

dis vlan all
dis vlan

vlan 2
port g1/0/1

路由器配置

直连路由

interface g1/0/1
port link-mode route
ip address 192.168.1.1 255.255.255.0   // 子网网关 IP
undo shutdown                          // 激活端口
quit 

interface g1/0/2
port link-mode route
ip address 192.168.3.1 255.255.255.0
undo shutdown
quit

// 查看路由表
display current-configuration
display ip routing-table

单臂路由

interface g1/0/0.1

静态路由

R1:

interface g1/0/1
port link-mode route
ip address 192.168.1.2 255.255.255.0
undo shutdown
quit

interface g1/0/2
port link-mode route
ip address 192.168.3.1 255.255.255.0
undo shutdown
quit

ip route-static 192.168.2.0 255.255.255.0 192.168.3.2 // (对方) 目标网段 子网掩码 (对方路由器) 跳点

R2: 类似 R1

posted @ 2024-06-06 02:26  Undefined443  阅读(7)  评论(0编辑  收藏  举报