1

我正在备用专用服务器上对 SmartOS 进行一些试验。我在服务器上有 2 个 IP 地址。对于 ex 1.1.1.1 和 2.2.2.2 (它们不在同一范围内)。

全局区域被配置为我的全局区域使用 IP 1.1.1.1

这是我的全局区域的配置

[root@global ~]# dladm show-link
LINK        CLASS     MTU    STATE    BRIDGE     OVER
igb0        phys      1500   up       --         --
igb1        phys      1500   up       --         --
net0        vnic      1500   ?        --         igb0
[root@global ~]# dladm show-phys
LINK         MEDIA                STATE      SPEED  DUPLEX    DEVICE
igb0         Ethernet             up         1000   full      igb0
igb1         Ethernet             up         1000   full      igb1
[root@global ~]# ifconfig
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
igb0: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 2
        inet 1.1.1.1 netmask ffffff00 broadcast 1.1.1.255
        ether c:c4:7a:2:xx:xx
igb1: flags=1000842<BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 0.0.0.0 netmask 0
        ether c:c4:7a:2:xx:xx
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
        inet6 ::1/128

我通过以下方式配置了我的区域

[root@global ~]# vmadm get 84c201d4-806c-4677-97f9-bc6da7ad9375 | json nics
[
  {
    "interface": "net0",
    "mac": "02:00:00:78:xx:xx",
    "nic_tag": "admin",
    "gateway": "2.2.2.254",
    "ip": "2.2.2.2",
    "netmask": "255.255.255.0",
    "primary": true
  }
]
[root@84c201d4-806c-4677-97f9-bc6da7ad9375 ~]# ifconfig
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
net0: flags=40001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,L3PROTECT> mtu 1500 index 2
        inet 2.2.2.2 netmask ffffff00 broadcast 2.2.2.255
        ether 2:0:0:78:xx:xx
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
        inet6 ::1/128
[root@84c201d4-806c-4677-97f9-bc6da7ad9375 ~]# dladm show-link
LINK        CLASS     MTU    STATE    BRIDGE     OVER
net0        vnic      1500   up       --         ?
[root@84c201d4-806c-4677-97f9-bc6da7ad9375 ~]# netstat -rn

Routing Table: IPv4
Destination           Gateway           Flags  Ref     Use     Interface
-------------------- -------------------- ----- ----- ---------- ---------
default              87.98.252.254        UG        2         47 net0
87.98.252.0          87.98.252.162        U         4         23 net0
127.0.0.1            127.0.0.1            UH        2          0 lo0

但是我在我的区域没有连接到互联网。是不是有什么配置错误?

4

1 回答 1

0

我建议你想绕过你的第二个真实 IP 到访客区域。根据wiki,您应该为第二个 NIC(igb1)配置标签并在您的访客区域中使用它。

于 2014-05-30T16:12:42.497 回答