三层交换机配置及命令

 先划vlan给vlan设ip改端口

LSW9

sys

sysname r1

int eth 0/0/1

port link-type access

q

int eth0/0/2

port link-type access

int eth 0/0/3

port link-type trunk

port trunk allow-pass vlan all

q

vlan 10

port eth0/0/1

q

vlan 20

port eth0/0/2

q

LSW10

sys

sysname r2

int eth0/0/1

port link-type access

int eth0/0/2

port link-type access

int eth0/0/3

port link-type trunk

port trunk allow-pass vlan all

q

划分vlan

vlan 30

port eth0/0/1

vlan 40

port eth0/0/2

LSW11

sys

sysname r4

int g0/0/3

port link-type trunk

port trunk allow-pass vlan all

int g0/0/1

port link-type access

port g0/0/1

vlan 10

q

int vlanif 10

ip add 192.168.1.254 24

vlan 20

q

int vlanif 20

ip add 192.168.2.254 24

q

vlan 100

port g0/0/1

q

int vlanif 100

ip add 50.1.1.9 255.255.255.252

ip route-static 0.0.0.0 0.0.0.0 50.1.1.10(设置默认路由IP)

LSW12

sys

sysname r5

int g0/0/3

port link-typr trunk

port trunk allow-pass vlan all

q

int g0/0/1

port link-type access

vlan 30

q

vlan 40

q

vlan 100

port g0/0/1

q

int vlanif 100

ip add 50.1.1.14 30

q

int vlanif 30

ip add 192.168.3.254 24

q

int vlanif 40

ip add 192.168.4.254 24

ip route-static 0.0.0.0 0.0.0.0 50.1.1.13(设置默认路由IP)

然后设置路由器

AR1

sys

sysname r6

int g0/0/1

ip add 50.1.1.10 30

q

int g0/0/2

ip add 50.1.1.13 30

q

int g0/0/0

ip add 50.1.1.5 30

AR2

sys

sysname r7

int g0/0/0

ip add 50.1.1.6 30

int g0/0/1

ip add 50.1.1.1 30

AR3

sys

sysname r11

int g0/0/1

ip add 50.1.1.2 30

int g0/0/0

ip add 192.168.5.254 24

 

 

接下来要下一跳

AR1

sys

ip route-static 192.168.1.0 24 50.1.1.9

ip route-static 192.168.2.0 24 50.1.1.9

ip route-static 192.168.3.0 24 50.1.1.14

ip route-static 192.168.4.0 24 50 1.1.14

ip route-static 50.1.1.0 30 50.1.1.6

ip route-static 192.168.5.254 24 50.1.1.6

AR2

sys

ip route-static 192.168.5.254 24 50.1.1.2

ip route-static 50.1.1.8 30 50.1.1.5

ip route-static 50.1.1.12 30 50.1.1.5

ip route-static 192.168.1.0 24 50.1.1.5

ip route-static 192.168.2.0 24 50.1.1.5

ip route-static 192.168.3.0 24 50.1.1.5

ip route-static 192.168.4.0 24 50.1.1.5

AR3

sys

ip route-static 50.1.1.4 30 50.1.1.1

ip route-static 50.1.1.8 30 50.1.1.1

ip route-static 50.1.1.12 30 50.1.1.1

ip toute-static 192.168.1.0 24 50.1.1.1

ip toute-static 192.168.2.0 24 50.1.1.1

ip toute-static 192.168.3.0 24 50.1.1.1

ip toute-static 192.168.4.0 24 50.1.1.1

 

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值