solaris10 zone配置VLAN
**當我們的solaris zone ip和物理(宿主)機不在同一網段,這時就需要配置下VLAN
1、確定正在系統上使用的介面的型別。
[[email protected]]#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 的一部分。
[[email protected]]#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
[[email protected]]#ifconfig e1000g125001 plumb [[email protected]]#ifconfig e1000g125000 plumb
[[email protected]]# 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地址:
[[email protected]]#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.
[[email protected]]#zoneadm -z test10 reboot
5、登入到zone
[[email protected]]#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 bash-3.2# ping 10.128.25.254 10.128.25.254 is alive bash-3.2# ping 10.128.25.81 10.128.25.81 is alive bash-3.2# ping 10.128.25.83 10.128.25.83 is alive
命令參考: #netstat -rn //檢視路由 #traceroute 10.128.25.254 #snoop -r -d e1000g0 icmp