solaris10 zone配置VLAN

**当我们的solaris zone ip和物理(宿主)机不在同一网段,这时就需要配置下VLAN

1、确定正在系统上使用的接口的类型。

[root@cass05]#dladm show-link
e1000g0 type: non-vlan mtu: 1500 device: e1000g0
e1000g1 type: non-vlan mtu: 1500 device: e1000g1
e1000g2 type: non-vlan mtu: 1500 device: e1000g2
e1000g3 type: non-vlan mtu: 1500 device: e1000g3

例 ,若要将 e1000g0 和 e1000g1 接口配置为 VLAN 125 的一部分,则创建以下 PPA:
e1000g + 125 * 1000 + 0= e1000g125000
e1000g + 125 * 1000 + 1= e1000g125001

2、将接口配置为 VLAN 的一部分。

[root@cass05]#dladm show-link
e1000g0 type: non-vlan mtu: 1500 device: e1000g0
e1000g1 type: non-vlan mtu: 1500 device: e1000g1
e1000g2 type: non-vlan mtu: 1500 device: e1000g2
e1000g3 type: non-vlan mtu: 1500 device: e1000g3
clprivnet0 type: legacy mtu: 1500 device: clprivnet0
clprivnet1 type: legacy mtu: 1500 device: clprivnet1
clprivnet2 type: legacy mtu: 1500 device: clprivnet2
clprivnet3 type: legacy mtu: 1500 device: clprivnet3

[root@cass05]#ifconfig e1000g125001 plumb
[root@cass05]#ifconfig e1000g125000 plumb

[root@cass05]# dladm show-link
e1000g0 type: non-vlan mtu: 1500 device: e1000g0
e1000g125000 type: vlan 125 mtu: 1500 device: e1000g0
e1000g1 type: non-vlan mtu: 1500 device: e1000g1
e1000g125001 type: vlan 125 mtu: 1500 device: e1000g1
e1000g2 type: non-vlan mtu: 1500 device: e1000g2
e1000g3 type: non-vlan mtu: 1500 device: e1000g3
clprivnet0 type: legacy mtu: 1500 device: clprivnet0
clprivnet1 type: legacy mtu: 1500 device: clprivnet1
clprivnet2 type: legacy mtu: 1500 device: clprivnet2
clprivnet3 type: legacy mtu: 1500 device: clprivnet3

3、配置zone的IP地址:

[root@cass05]#zonecfg -z test10 info
zonename: test10
zonepath: /test10/ROOT
brand: native
autoboot: false
bootargs:
pool:
limitpriv:
scheduling-class:
ip-type: shared
hostid:
net:
address: 10.128.25.81
physical: e1000g125000
defrouter: 10.128.25.254
capped-memory:
physical: 4G
[swap: 8G]
[locked: 4G]
… …

4、重启zone.

[root@cass05]#zoneadm -z test10 reboot

5、登入到zone

[root@cass05]#zlogin test10
bash-3.2# ifconfig -a
lo0:2: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g125000:1: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 9
inet 10.128.25.81 netmask ffffff00 broadcast 10.128.25.255
bash-3.2# netstat -nr
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface


default 10.128.25.254 UG 1 0 e1000g125000
10.128.25.0 10.128.25.81 U 1 20 e1000g125000:1
224.0.0.0 10.128.25.81 U 1 0 e1000g125000:1
127.0.0.1 127.0.0.1 UH 4 54 lo0:2

命令参考:
#netstat -rn //查看路由
#traceroute 10.128.25.254
#snoop -r -d e1000g0 icmp

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值